:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fffdf7;
  --ink: #241e36;
  --muted: #5d556b;
  --line: #dcd5df;
  --accent: #513394;
  --dark: #271b40;
  --lime: #e4f89d;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.62 system-ui, sans-serif; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.06; text-wrap: balance; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #8659e0; outline-offset: 5px; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: -100px; left: 12px; padding: 8px 12px; background: white; color: var(--ink); }
.skip:focus { top: 12px; }
.header .wrap, footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.header .wrap { min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; white-space: nowrap; text-decoration: none; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; background: var(--accent); border-radius: 8px; color: white; font: 700 .75rem var(--mono); }
nav { display: flex; gap: clamp(14px, 4vw, 38px); align-items: center; font-size: .88rem; font-weight: 640; }
nav a, .back { text-decoration: none; }
nav a:hover, .back:hover, footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero { color: white; background: radial-gradient(ellipse at 95% 0%, #4c3276 0, transparent 53%), var(--dark); }
.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 56px; align-items: end; padding-block: clamp(62px, 9vw, 115px) clamp(56px, 7vw, 92px); }
.kicker { color: var(--accent); font: 700 .73rem/1.45 var(--mono); letter-spacing: .11em; text-transform: uppercase; margin-bottom: 15px; }
.hero .kicker { color: var(--lime); }
h1 { font-size: 4.8rem; font-size: clamp(3.15rem, 7.1vw, 6.35rem); font-weight: 770; letter-spacing: -.085em; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero-copy { color: #e3daef; font-size: clamp(1rem, 2vw, 1.16rem); max-width: 37ch; }
.cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 22px; padding: 10px 15px; background: var(--lime); color: #241c32; border-radius: 7px; font-size: .91rem; font-weight: 760; text-decoration: none; }
.cta:hover { background: #f0ffbe; }
.cta:focus-visible { outline-color: var(--lime); }





.section { padding-block: clamp(54px, 8vw, 90px); }
.section-title { margin-bottom: 30px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; }
.section-title p, .services p, .experience p { color: var(--muted); }
h2 { font-size: 3.3rem; font-size: clamp(2.05rem, 5vw, 4rem); letter-spacing: -.07em; font-weight: 755; }
h3 { font-size: 1.34rem; letter-spacing: -.035em; font-weight: 750; }
.projects, .services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.project { min-width: 0; display: grid; }
.project a { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .18s, box-shadow .18s, transform .18s; }
.project a:hover { transform: translateY(-4px); border-color: #9477c1; box-shadow: 0 10px 25px #311e5418; }
.art { height: 178px; position: relative; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.art::after { position: absolute; inset: 0; content: ""; z-index: -1; opacity: .26; background-image: radial-gradient(currentColor 1px, transparent 1px); background-size: 13px 13px; }
.rail { background: #402785; color: #b696ff; }
.rail-map { width: min(83%, 430px); height: 65%; }
.erp { background: #e3efb0; color: #727b47; }
.erp-window { display: grid; width: min(59%, 272px); height: 63%; grid-template: 21% 1fr 1fr / 1fr 1.36fr 1.36fr; gap: 6px; transform: rotate(-8deg); }
.erp-window i { background: #f6f9df; border: 1px solid #53643a; border-radius: 3px; }
.erp-window i:first-child { grid-column: span 3; background: #283727; }
.erp-window i:nth-child(2) { grid-row: span 2; background: #a6bc6d; }
.photo { background: #ecd4c0; color: #9e6759; }
.photo-frame { position: absolute; width: min(46%, 270px); height: 62%; right: 42%; border: 6px solid #fdf1e8; box-shadow: 0 0 0 1px #713e40; transform: rotate(-11deg); background: linear-gradient(163deg, #a45562 0 46%, #652f4a 47% 62%, #3e283b 63%); }
.photo-frame + .photo-frame { right: auto; left: 42%; transform: rotate(11deg); background: radial-gradient(circle at 65% 28%, #ffe4a3 0 12%, transparent 13%), linear-gradient(153deg, #c36453 0 46%, #9b4449 47% 60%, #4b3044 61%); }

.project-diagram { background: var(--diagram-bg); color: var(--diagram-ink); }
.project-diagram > div { width: min(68%, 350px); height: 58%; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 8px; }
.project-diagram i { display: block; height: 42%; border: 1px solid currentColor; border-radius: 4px; background: var(--diagram-fill); }
.trading { --diagram-bg: #dfeafa; --diagram-ink: #2d5683; --diagram-fill: #9bb9e5; }
.trading i:nth-child(2) { height: 66%; }
.trading i:nth-child(3) { height: 52%; }
.trading i:nth-child(4) { height: 81%; }
.trading i:nth-child(5) { height: 100%; }
.allocation { --diagram-bg: #f0e1f5; --diagram-ink: #714d86; --diagram-fill: #c5a5d8; }
.allocation > div { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; align-items: stretch; }
.allocation i { height: auto; }
.allocation i:first-child { grid-column: span 2; }
.allocation i:last-child { background: #ead8f3; }
.pipelines { --diagram-bg: #e0eee9; --diagram-ink: #2b6659; --diagram-fill: #9fc7b7; }
.pipelines > div { grid-template-columns: 1fr .45fr 1fr .45fr 1fr; align-items: center; }
.pipelines i:nth-child(even) { height: 2px; border: 0; background: currentColor; }

.project .art { flex: 0 0 auto; }
.project-body { display: flex; flex: 1 0 auto; flex-direction: column; padding: 20px; }
.project-body .kicker { margin-bottom: 8px; font-size: .65rem; }
.project-body p:not(.kicker) { margin-top: 10px; color: var(--muted); font-size: .93rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 16px 0 0; padding: 0; }
.tags li { border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px; font: .7rem/1.55 var(--mono); }
.project-link { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; color: var(--accent); font-weight: 770; font-size: .86rem; }
.experience { background: #eee9f3; }
.about-grid { display: grid; grid-template-columns: minmax(210px, .75fr) 1.6fr; gap: clamp(28px, 7vw, 95px); }
.about-grid > div:first-child p { margin-top: 18px; }
.credentials { margin-top: 22px; display: grid; gap: 5px; font-size: .88rem; font-weight: 700; }
.credential { display: block; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 21px 23px; border-left: 1px solid #b8a5ce; }
.timeline li:last-child { padding-bottom: 1px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline .meta { display: block; margin: 5px 0 7px; color: var(--accent); font-size: .81rem; font-weight: 700; }
.timeline p, .services p { font-size: .94rem; }
.services article { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-top: 3px solid #aa90d2; border-radius: 10px; background: var(--surface); }
.services p { margin-block: 10px 18px; }
.services .tags { margin-top: auto; }
footer { padding-block: 24px; background: var(--dark); color: #e9e1f1; font-size: .86rem; }
footer a { color: var(--lime); text-decoration: none; }
footer a:focus-visible { outline-color: var(--lime); }
.back { display: inline-block; margin-bottom: 27px; color: var(--accent); font-size: .91rem; font-weight: 700; }
.case { padding-top: clamp(34px, 5.5vw, 65px); }
.case-intro { max-width: 760px; }
.case h1 { font-size: 4.5rem; font-size: clamp(2.8rem, 7.7vw, 5.65rem); }
.case-intro > p:not(.kicker) { max-width: 64ch; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.19rem); margin-top: 17px; }
.case .art { margin-top: 30px; height: clamp(175px, 29vw, 300px); border-radius: 15px; }
.case-grid { display: grid; grid-template-columns: minmax(170px, .55fr) minmax(0, 1.7fr); gap: clamp(26px, 6vw, 78px); margin-top: 35px; }
.case-facts { align-self: start; padding: 21px; border-radius: 10px; background: #eee9f3; }
.case-facts div + div { margin-top: 15px; }
.case-facts dt { font: 700 .69rem/1.4 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.case-facts dd { margin-top: 3px; font-size: .92rem; }
.case-body { max-width: 690px; }
.case-body section + section { margin-top: 28px; }
.case-body h2 { font-size: 2rem; font-size: clamp(1.45rem, 3.25vw, 2.18rem); letter-spacing: -.045em; }
.case-body p, .case-body ul { margin-top: 10px; color: var(--muted); }
.case-body ul { padding-left: 21px; }
.case-body li + li { margin-top: 6px; }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 44px; border-top: 1px solid var(--line); padding-top: 18px; }
.next a { color: var(--accent); font-weight: 740; text-underline-offset: 4px; }
@media (max-width: 870px) {
  .wrap { width: calc(100% - 48px); }
  .hero-grid { grid-template-columns: 1fr; gap: 21px; }
  .hero-copy { max-width: 57ch; }
  .project-body { padding-inline: 14px; }
}
@media (min-width: 681px) and (max-width: 870px) {
  .projects, .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 36px); }
  .projects, .services, .about-grid, .case-grid { grid-template-columns: 1fr; }
  .project-body { padding-inline: 19px; }
  .art { height: 154px; }


  .header .wrap { min-height: 63px; gap: 9px; }
  .brand { gap: 7px; font-size: .87rem; }
  .mark { width: 27px; height: 27px; }
  nav { font-size: .77rem; gap: clamp(8px, 3vw, 18px); }
}
@media (prefers-reduced-motion: reduce) { .project a { transition: none; } }
