/* =========================================================
   Prabin Phasikawo, portfolio
   ========================================================= */
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url(fonts/geist-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url(fonts/geist-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url(fonts/geist-600.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #070a12;
  --bg-2: #0a0f1c;
  --panel: rgba(17, 24, 44, .62);
  --panel-solid: #0f1628;
  --line: rgba(150, 170, 230, .12);
  --line-2: rgba(150, 170, 230, .22);
  --text: #eaf0ff;
  --muted: #95a2c4;
  --dim: #66739a;
  --blue: #7aa2ff;
  --violet: #8b6cff;
  --teal: #3fd5c8;
  --amber: #ffb547;
  --grad: linear-gradient(110deg, #7aa2ff 0%, #8b6cff 50%, #3fd5c8 100%);
  --display: "Bricolage", "Avenir Next", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --r-lg: 22px;
  --r-md: 14px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 108, 255, .4); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 200; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 10px; }
.grad { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* scroll progress */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; }
.progress span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15.5px; letter-spacing: .005em; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, border-color .3s;
}
.btn-sm { height: 42px; padding: 0 20px; font-size: 14.5px; }
.btn-primary { color: #fff; background: linear-gradient(110deg, #5f86ff, #8b6cff); box-shadow: 0 10px 30px -10px rgba(122, 110, 255, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(122, 110, 255, .9), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { border-color: var(--line-2); background: rgba(255,255,255,.03); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(122,162,255,.6); background: rgba(122,162,255,.08); }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 10, 18, .72); backdrop-filter: blur(18px) saturate(140%); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 36px; height: 36px; }
nav { margin-left: auto; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--muted); transition: color .25s, background .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.06); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), top .3s; }
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; overflow: hidden; isolation: isolate; }
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .9;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 45%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 70% 45%, #000 30%, transparent 78%); }
.hero-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 420px at 78% 38%, rgba(139,108,255,.20), transparent 70%),
    radial-gradient(520px 380px at 12% 80%, rgba(63,213,200,.10), transparent 70%),
    radial-gradient(700px 500px at 30% 10%, rgba(122,162,255,.12), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); z-index: -1; }

.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); backdrop-filter: blur(10px); font-size: 14px; color: #cfd8f2; margin-bottom: 30px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 rgba(62,224,143,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(62,224,143,0); } 100% { box-shadow: 0 0 0 0 rgba(62,224,143,0); } }

.hero-title { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 7.4vw, 104px); line-height: .98; letter-spacing: -.035em; margin-bottom: 28px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-sub { font-size: 18.5px; color: var(--muted); max-width: 56ch; margin-bottom: 22px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.rotator { font-family: var(--mono); font-size: 14.5px; color: var(--dim); margin-bottom: 38px; }
.rot-word { color: var(--teal); }
.caret { display: inline-block; width: 8px; height: 16px; margin-left: 3px; vertical-align: -3px; background: var(--teal); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* portrait */
.hero-visual { display: flex; justify-content: center; }
.portrait { position: relative; width: min(420px, 100%); aspect-ratio: 5 / 6; }
.portrait-ring { position: absolute; inset: -14px; border-radius: 40px; background: conic-gradient(from var(--a, 0deg), #7aa2ff, #8b6cff, #3fd5c8, #ffb547, #7aa2ff); filter: blur(22px); opacity: .45; animation: spin 10s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.portrait-frame { position: relative; height: 100%; border-radius: 32px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); background: var(--panel-solid); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,10,18,.55)); }

.float-card { position: absolute; z-index: 2; padding: 14px 16px; border-radius: 18px; background: rgba(14, 20, 38, .78); border: 1px solid var(--line-2); backdrop-filter: blur(16px) saturate(150%); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); }
.fc-label { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.fc-value { font-size: 14.5px; font-weight: 500; }
.fc-value b { color: var(--amber); font-weight: 600; }
.ride-card { left: -46px; bottom: 54px; width: 250px; animation: bob 6s ease-in-out infinite; }
.ride-top { display: flex; gap: 12px; align-items: center; }
.ride-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,181,71,.15); color: var(--amber); flex: none; }
.ride-bar { margin-top: 12px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.ride-bar span { display: block; height: 100%; width: 20%; border-radius: 5px; background: linear-gradient(90deg, var(--amber), #ff8a5c); transition: width 1s var(--ease); }
.exp-card { right: -30px; top: 40px; text-align: left; animation: bob 7s ease-in-out -2s infinite; }
.exp-card .big { font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1; letter-spacing: -.03em; margin-bottom: 4px; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.orbit li { position: absolute; z-index: 2; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(14,20,38,.8); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.orbit .o1 { left: -22px; top: 26%; color: #ff9f6b; animation: bob 5s ease-in-out -1s infinite; }
.orbit .o2 { right: -18px; top: 52%; color: #62c6ff; animation: bob 6.5s ease-in-out -3s infinite; }
.orbit .o3 { right: 30px; bottom: -16px; color: #b49bff; animation: bob 5.5s ease-in-out -2s infinite; }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* hero entrance */
.js .hero-title .line > span { transform: translateY(105%); }
.js .status-pill, .js .hero-sub, .js .rotator, .js .hero-cta { opacity: 0; transform: translateY(16px); }
.js .portrait { opacity: 0; transform: scale(.94); }
.js .float-card, .js .orbit li { opacity: 0; }
.loaded .hero-title .line > span { transform: none; transition: transform 1.1s var(--ease); }
.loaded .hero-title .line:nth-child(2) > span { transition-delay: .1s; }
.loaded .status-pill, .loaded .hero-sub, .loaded .rotator, .loaded .hero-cta { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.loaded .hero-sub { transition-delay: .25s; }
.loaded .rotator { transition-delay: .35s; }
.loaded .hero-cta { transition-delay: .45s; }
.loaded .portrait { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .2s, transform 1.2s var(--ease) .2s; }
.loaded .float-card, .loaded .orbit li { opacity: 1; transition: opacity .8s var(--ease) .9s; }

/* ---------- Stats + marquee ---------- */
.stats { position: relative; padding: 40px 0 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); backdrop-filter: blur(12px); overflow: hidden; }
.stat { padding: 34px 30px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 4.6vw, 60px); line-height: 1; letter-spacing: -.04em; margin-bottom: 12px; background: linear-gradient(180deg, #fff, #9fb0dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 15px; color: var(--muted); max-width: 24ch; line-height: 1.45; }

.marquee { margin-top: 64px; padding: 22px 0; border-block: 1px solid var(--line); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 56px; animation: marquee 50s linear infinite; }
.marquee-track span { font-family: var(--display); font-weight: 500; font-size: 22px; color: #5d6a90; white-space: nowrap; display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2c375a; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 130px 0; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); }
.sec-head { max-width: 760px; margin-bottom: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--blue); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }
h2 { font-family: var(--display); font-weight: 650; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 20px; }
.sec-head > p:last-child { font-size: 18.5px; color: var(--muted); max-width: 60ch; }
h3 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -.015em; }

.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); backdrop-filter: blur(14px); }

/* reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { position: relative; padding: 30px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: border-color .4s, transform .5s var(--ease); }
.tile:hover { border-color: var(--line-2); transform: translateY(-4px); }
.tile h3 { margin: 22px 0 10px; }
.tile p { color: var(--muted); font-size: 15.5px; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(122,162,255,.14), transparent 60%); }
.spot:hover::before { opacity: 1; }
.tile-hero { grid-column: span 2; grid-row: span 2; display: grid; grid-template-rows: auto 1fr; padding: 36px; }
.tile-hero h3 { margin-top: 0; font-size: clamp(26px, 2.6vw, 34px); }
.tile-hero .tile-text > p { font-size: 17px; max-width: 52ch; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; }
.ticks li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: #c9d3ef; }
.ticks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: rgba(63,213,200,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%233fd5c8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.mini-map { margin: 28px -36px -36px; min-height: 230px; border-top: 1px solid var(--line); background: #0a1122; position: relative; }
.mini-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.streets path { stroke: rgba(130,150,210,.16); stroke-width: 7; fill: none; }
.mm-route { fill: none; stroke: url(#none); stroke: var(--violet); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 8 8; animation: dash 1.2s linear infinite; filter: drop-shadow(0 0 6px rgba(139,108,255,.8)); }
@keyframes dash { to { stroke-dashoffset: -16; } }
.mm-pin-a { fill: var(--teal); }
.mm-pin-b circle { fill: var(--amber); }
.mm-pin-b .pulse { fill: rgba(255,181,71,.25); transform-origin: 530px 50px; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(2); opacity: 0; } }
.mm-car circle { fill: #fff; }
.mm-car .halo { fill: rgba(122,162,255,.35); }

.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-2); }
.tile-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-blue { color: var(--blue); background: rgba(122,162,255,.1); }
.i-teal { color: var(--teal); background: rgba(63,213,200,.1); }
.i-violet { color: #a991ff; background: rgba(139,108,255,.12); }
.i-amber { color: var(--amber); background: rgba(255,181,71,.1); }

.tile-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1.2fr 1fr; gap: 28px; align-items: center; }
.tile-wide h3 { margin: 0 0 8px; }
.tile-wide .chips { justify-content: flex-end; }

/* ---------- Skills infographic ---------- */
.skills-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; }
.panel-title { font-family: var(--display); font-weight: 600; font-size: 19px; margin-bottom: 28px; }
.gantt { padding: 32px; margin: 0; display: flex; flex-direction: column; }
.gantt .legend { margin-top: auto; }
.gantt-rows { margin-bottom: 28px; }
.gantt-axis { position: relative; height: 22px; margin-left: 230px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.gantt-axis span { position: absolute; left: calc((var(--y) - 2015) / 12 * 100%); top: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--dim); }
.gantt-axis span:first-child { transform: none; }
.gantt-rows li { display: grid; grid-template-columns: 230px 1fr; align-items: center; min-height: 46px; }
.g-label { font-size: 14px; color: #c9d3ef; padding-right: 18px; line-height: 1.3; }
.g-track { position: relative; height: 30px; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.g-bar { position: absolute; top: 3px; bottom: 3px; left: calc((var(--from) - 2015) / 12 * 100%); width: calc((var(--to) - var(--from)) / 12 * 100%); min-width: 10px; border-radius: 8px; background: var(--c); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.g-bar em { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--dim); opacity: 0; transition: opacity .6s .9s; }
.gantt-rows li:nth-child(5) .g-bar em, .gantt-rows li:nth-child(6) .g-bar em { left: auto; right: calc(100% + 10px); }
.in .g-bar { transform: scaleX(1); }
.in .g-bar em { opacity: 1; }
.gantt-rows li:nth-child(2) { --d: .1s; } .gantt-rows li:nth-child(3) { --d: .2s; } .gantt-rows li:nth-child(4) { --d: .3s; } .gantt-rows li:nth-child(5) { --d: .4s; } .gantt-rows li:nth-child(6) { --d: .5s; }
.c-blue { --c: linear-gradient(90deg, #5f86ff, #7aa2ff); }
.c-teal { --c: linear-gradient(90deg, #22b3a7, #3fd5c8); }
.c-violet { --c: linear-gradient(90deg, #7a5cff, #a28bff); }
.c-amber { --c: linear-gradient(90deg, #ff9b3d, #ffb547); }
.gantt-rows .c-blue .g-bar { box-shadow: 0 0 22px -6px #7aa2ff; }
.gantt-rows .c-teal .g-bar { box-shadow: 0 0 22px -6px #3fd5c8; }
.gantt-rows .c-violet .g-bar { box-shadow: 0 0 22px -6px #8b6cff; }
.gantt-rows .c-amber .g-bar { box-shadow: 0 0 22px -6px #ffb547; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.legend li::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }

.donut-panel { padding: 32px; margin: 0; display: flex; flex-direction: column; }
.donut-wrap { position: relative; width: min(240px, 100%); margin: 0 auto 26px; }
.donut { transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut .track { stroke: rgba(255,255,255,.05); }
.donut .seg { stroke-linecap: butt; stroke-dasharray: 0 302; stroke-dashoffset: calc(var(--o) * -3.016); transition: stroke-dasharray 1.4s var(--ease); }
.donut .s1 { stroke: #8b6cff; } .donut .s2 { stroke: #7aa2ff; transition-delay: .25s; } .donut .s3 { stroke: #3fd5c8; transition-delay: .5s; }
.in .donut .seg { stroke-dasharray: calc(var(--p) * 3.016 - 2) 302; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.donut-center span { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.donut-legend li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; color: #c9d3ef; }
.donut-legend b { margin-left: auto; font-family: var(--mono); font-weight: 400; color: var(--text); }
.donut-legend i, .tool-group h3 i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.k1 { background: #8b6cff; } .k2 { background: #7aa2ff; } .k3 { background: #3fd5c8; } .k4 { background: #ffb547; }
.panel-note { margin-top: auto; padding-top: 14px; font-size: 12.5px; color: var(--dim); }

.toolbox { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 18px; }
.tool-group { padding: 26px; }
.tool-group h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: #cdd6f0; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: border-color .25s, background .25s, color .25s; }
.chips li:hover { border-color: rgba(122,162,255,.5); background: rgba(122,162,255,.1); color: #fff; }
.soft { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin-top: 44px; }
.soft li { padding: 10px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project { border-radius: 28px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .4s, transform .6s var(--ease); }
.project:hover { border-color: var(--line-2); transform: translateY(-6px); }
.project-visual { position: relative; height: 440px; display: grid; place-items: center; overflow: hidden; }
.v-violet { background: radial-gradient(70% 80% at 50% 100%, rgba(139,108,255,.45), transparent 70%), linear-gradient(160deg, #141b38, #0b1122); }
.v-teal { background: radial-gradient(70% 80% at 50% 100%, rgba(63,213,200,.35), transparent 70%), linear-gradient(160deg, #0f2230, #0b1122); }
.visual-note { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 11.5px; color: rgba(234,240,255,.45); }
.phone { position: relative; width: 210px; height: 420px; margin-top: 80px; border-radius: 36px; padding: 8px; background: linear-gradient(160deg, #2a3350, #11172a); box-shadow: 0 40px 70px -20px rgba(0,0,0,.9), inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .8s var(--ease); }
.project:hover .phone { transform: translateY(-14px) rotate(-2deg); }
.phone-notch { position: absolute; top: 16px; left: 50%; z-index: 2; width: 66px; height: 18px; margin-left: -33px; border-radius: 12px; background: #05070d; }
.phone-map { width: 100%; height: 100%; border-radius: 29px; }
.pm-bg { fill: #0c1426; }
.pm-street { stroke: rgba(140,160,220,.16); stroke-width: 9; fill: none; }
.pm-route { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.v-violet .pm-route { stroke: #8b6cff; filter: drop-shadow(0 0 5px #8b6cff); }
.v-teal .pm-route { stroke: #3fd5c8; filter: drop-shadow(0 0 5px #3fd5c8); }
.pm-a { fill: #fff; stroke: #0c1426; stroke-width: 3; }
.pm-b { fill: var(--amber); }
.pm-car circle { fill: #fff; } .pm-car .halo { fill: rgba(255,255,255,.25); }
.phone-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 10px 16px 18px; border-radius: 0 0 29px 29px; background: rgba(18,25,46,.95); border-top: 1px solid rgba(255,255,255,.1); }
.sheet-grab { display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: rgba(255,255,255,.2); }
.sheet-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.sheet-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #7aa2ff, #8b6cff); }
.sheet-lines { flex: 1; display: grid; gap: 5px; }
.sheet-lines i { height: 6px; border-radius: 4px; background: rgba(255,255,255,.16); }
.sheet-lines i:last-child { width: 60%; background: rgba(255,255,255,.08); }
.sheet-row b { font-size: 12.5px; color: var(--amber); }
.sheet-btn { display: block; height: 30px; border-radius: 10px; background: linear-gradient(110deg, #5f86ff, #8b6cff); }
.v-teal .sheet-btn { background: linear-gradient(110deg, #22b3a7, #3fd5c8); }
.project-body { padding: 32px 34px 36px; border-top: 1px solid var(--line); }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.badge { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: #c9d3ef; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.project-body h3 { font-size: 30px; margin-bottom: 12px; }
.project-body p { color: var(--muted); margin-bottom: 24px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--text); padding-bottom: 4px; background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--ease); }
.link-arrow::after { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M6 4h6v6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M6 4h6v6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .3s var(--ease); }
.link-arrow:hover { background-size: 100% 1.5px; }
.link-arrow:hover::after { transform: translate(2px, -2px); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 0; }
.tl-progress { position: absolute; left: 191px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-progress span { display: block; width: 100%; height: 100%; background: var(--grad); border-radius: 2px; transform-origin: 50% 0; transform: scaleY(var(--tl, 0)); }
.job { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 44px; padding-bottom: 22px; }
.job::before { content: ""; position: absolute; left: 186px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); box-shadow: 0 0 0 5px var(--bg); z-index: 1; }
.job-when { padding-top: 20px; font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 8px; height: fit-content; }
.now-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; animation: ping 2s infinite; }
.job-card { padding: 26px 30px; transition: border-color .4s; }
.job-card:hover { border-color: var(--line-2); }
.job-card h3 { font-size: 21px; margin-bottom: 4px; }
.job-org { color: var(--blue); font-size: 14.5px; margin-bottom: 14px; }
.job-card ul { display: grid; gap: 8px; }
.job-card li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.job-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: #3a4a78; }

.edu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 60px; }
.edu { padding: 26px; }
.edu-year { font-family: var(--mono); font-size: 13px; color: var(--teal); margin-bottom: 14px; }
.edu h3 { font-size: 19px; margin-bottom: 6px; }
.edu p:last-child { color: var(--muted); font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 400px at 80% 60%, rgba(139,108,255,.16), transparent 70%), radial-gradient(500px 360px at 10% 30%, rgba(63,213,200,.08), transparent 70%); }
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-lede { color: var(--muted); font-size: 18px; max-width: 48ch; margin-bottom: 40px; }
.contact-list { display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.ci { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--blue); flex: none; }
.ci svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list p { font-size: 13px; color: var(--dim); }
.contact-list a, .contact-list span:not(.ci) { font-weight: 500; font-size: 17px; }
.contact-list a:hover { color: var(--blue); }

.contact-form { padding: 34px; display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: #c9d3ef; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(7,10,18,.55); font-size: 15.5px; transition: border-color .25s, box-shadow .25s; }
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2395a2c4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field select option { background: #0f1628; }
.field input::placeholder, .field textarea::placeholder { color: #56628a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(122,162,255,.15); }
.field.invalid input, .field.invalid textarea { border-color: #ff6b81; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.4em; font-size: 14.5px; color: var(--muted); }
.form-status.ok { color: #3ee08f; }
.form-status.err { color: #ff8a9b; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer p { color: var(--dim); font-size: 14px; }
.footer .copy { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 80px; }
  .hero { padding-top: 140px; }
  .hero-visual { padding: 0 40px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-wide { grid-template-columns: auto 1fr; }
  .tile-wide .chips { grid-column: 1 / -1; justify-content: flex-start; }
  .skills-layout { grid-template-columns: 1fr; }
  .toolbox { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 76px; left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 12px; border-radius: 18px; background: rgba(12,17,32,.97); border: 1px solid var(--line-2); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s, transform .3s var(--ease), visibility .3s; }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 16px; font-size: 16px; }
  .menu-btn { display: block; }
  .nav-cta { margin-left: auto; }
  nav { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .work-grid { grid-template-columns: 1fr; }
  .gantt-axis { margin-left: 0; }
  .gantt-rows li { grid-template-columns: 1fr; min-height: 0; padding: 8px 0; }
  .g-label { padding: 0 0 6px; font-size: 13.5px; }
  .tl-progress { left: 5px; }
  .job { grid-template-columns: 1fr; gap: 10px; padding-left: 34px; }
  .job::before { left: 0; top: 4px; }
  .job-when { justify-content: flex-start; text-align: left; padding-top: 0; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  body { font-size: 16px; }
  .brand span { display: none; }
  .hero { padding: 120px 0 90px; }
  .hero-visual { padding: 0 26px; }
  .ride-card { left: -20px; bottom: 30px; width: 220px; }
  .exp-card { right: -14px; top: 20px; }
  .orbit .o1 { left: -14px; } .orbit .o2 { right: -12px; }
  .section { padding: 96px 0; }
  .bento, .toolbox, .edu-grid { grid-template-columns: 1fr; }
  .tile-hero { grid-column: auto; padding: 28px; }
  .tile-wide { grid-template-columns: 1fr; gap: 18px; }
  .mini-map { margin: 24px -28px -28px; }
  .stat { padding: 26px 20px; }
  .gantt, .donut-panel { padding: 24px; }
  .project-visual { height: 380px; }
  .project-body { padding: 26px; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .footer .copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
}

/* =========================================================
   Additions: same dark theme, new content
   ========================================================= */

/* ---------- Hero code card (inside the portrait frame) ---------- */
.code-frame { display: flex; flex-direction: column; background: linear-gradient(180deg, #0d1426, #0a0f1e); }
.code-frame::after { display: none; }
.cf-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.cf-dots { display: inline-flex; gap: 7px; }
.cf-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b81; }
.cf-dots i:nth-child(2) { background: var(--amber); } .cf-dots i:nth-child(3) { background: #3ee08f; }
.cf-tab { font-family: var(--mono); font-size: 12px; color: #cfd8f2; padding: 4px 10px; border-radius: 8px; background: rgba(122,162,255,.1); border: 1px solid var(--line); }
.cf-code { flex: 1; margin: 0; padding: 18px 0 10px; font: 400 12.6px/1.72 var(--mono); color: #c9d3ef; white-space: normal; overflow: hidden; counter-reset: ln; }
.cf-code code { display: block; }
.cf-code .ln { display: block; white-space: pre; padding-right: 14px; }
.cf-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2.8em; padding-right: 1.1em; text-align: right; color: #3b4770; user-select: none; }
.cf-code .c { color: #56628a; font-style: italic; }
.cf-code .k { color: #b49bff; }
.cf-code .t { color: #62c6ff; }
.cf-code .s { color: var(--teal); }
.cf-code .n { color: var(--amber); }
.cf-code .f { color: #7aa2ff; }
.cf-cursor { display: inline-block; width: 7px; height: 15px; margin-left: 3px; vertical-align: -3px; background: var(--teal); animation: blink 1s steps(1) infinite; }
.cf-term { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); font: 400 12px/1.5 var(--mono); color: #95a2c4; background: rgba(0,0,0,.18); }
.cf-prompt { color: var(--violet); }
.cf-out { margin-left: auto; color: #3ee08f; }
.cf-out.pending { color: var(--dim); }
.orbit .o4 { left: 34px; bottom: -14px; color: var(--teal); animation: bob 6s ease-in-out -4s infinite; }

/* ---------- Agent log (AI tile) ---------- */
.agent-log { margin: 28px -36px -36px; padding: 18px 24px 22px; border-top: 1px solid var(--line); background: #0a1122; font: 400 13px/1.6 var(--mono); min-height: 230px; }
.al-head { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; margin-bottom: 12px; }
.al-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; animation: ping 2s infinite; }
.al-lines li { display: flex; gap: 12px; color: #c9d3ef; padding: 3px 0; animation: al-in .5s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-t { color: #3b4770; flex: none; }
.al-k { flex: none; min-width: 54px; color: var(--blue); }
.al-k.ok { color: #3ee08f; } .al-k.rv { color: var(--amber); } .al-k.ai { color: #b49bff; }
@keyframes al-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* map tile */
.tile-map { grid-column: span 2; display: grid; grid-template-rows: auto 1fr; }
.tile-map h3 { margin-top: 22px; }
.tile-map .mini-map { margin: 24px -30px -30px; min-height: 190px; }

/* ---------- Work: filter, extra visuals ---------- */
.work-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -24px 0 34px; }
.wf { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .25s; }
.wf:hover { color: var(--text); border-color: rgba(122,162,255,.5); }
.wf.active { color: #fff; border-color: transparent; background: linear-gradient(110deg, #5f86ff, #8b6cff); box-shadow: 0 8px 24px -10px rgba(122,110,255,.8); }
.project.hide { display: none; }
.project.pop { animation: pop-in .5s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.v-blue { background: radial-gradient(70% 80% at 50% 100%, rgba(122,162,255,.42), transparent 70%), linear-gradient(160deg, #111d3d, #0b1122); }
.v-rose { background: radial-gradient(70% 80% at 50% 100%, rgba(255,107,129,.32), transparent 70%), linear-gradient(160deg, #2a1424, #0b1122); }
.v-blue .sheet-btn { background: linear-gradient(110deg, #5f86ff, #7aa2ff); }
.v-rose .pm-route { stroke: #ff7d93; filter: drop-shadow(0 0 5px #ff7d93); }
.v-rose .sheet-btn { background: linear-gradient(110deg, #ff6b81, #ffb547); }
.v-blue .sheet-row b { color: #3ee08f; }
.sa-h { fill: rgba(255,255,255,.18); }
.sa-t { opacity: .9; }
.sa-t.t1 { fill: #ff9fb8; } .sa-t.t2 { fill: #ffc56b; } .sa-t.t3 { fill: #6ad0ff; } .sa-t.t4 { fill: #b49bff; } .sa-t.t5 { fill: #3fd5c8; }
.sa-icons circle { fill: rgba(255,255,255,.14); }
.project:hover .sa-t { animation: tile-glow 1.6s ease-in-out infinite alternate; }
@keyframes tile-glow { to { opacity: .6; } }

.tablet { position: relative; display: grid; grid-template-columns: 34px 1fr 118px; gap: 10px; width: 400px; max-width: 86%; height: 260px; margin-top: 60px; padding: 12px; border-radius: 22px; background: linear-gradient(160deg, #2a3350, #11172a); box-shadow: 0 40px 70px -20px rgba(0,0,0,.9), inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .8s var(--ease); }
.project:hover .tablet { transform: translateY(-12px) rotate(-1.5deg); }
.tb-side, .tb-main, .tb-ticket { border-radius: 12px; background: #0c1426; }
.tb-side { display: grid; align-content: start; gap: 10px; padding: 10px 7px; }
.tb-side i { height: 20px; border-radius: 6px; background: rgba(255,255,255,.08); }
.tb-side i.on { background: linear-gradient(110deg, #22b3a7, #3fd5c8); }
.v-violet .tb-side i.on { background: linear-gradient(110deg, #5f86ff, #8b6cff); }
.tb-main { padding: 12px; display: flex; flex-direction: column; }
.tb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 12px; }
.tb-chip { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(63,213,200,.15); color: var(--teal); }
.v-violet .tb-chip { background: rgba(139,108,255,.18); color: #b49bff; }
.tb-tables { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tb-tables i { border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.tb-tables i.busy { background: rgba(255,181,71,.18); border-color: rgba(255,181,71,.4); }
.tb-tables i.ready { background: rgba(63,213,200,.18); border-color: rgba(63,213,200,.45); animation: tile-glow 1.4s ease-in-out infinite alternate; }
.tb-bars { flex: 1; display: flex; align-items: flex-end; gap: 7px; padding-top: 6px; }
.tb-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #8b6cff, #5f86ff); height: var(--h, 50%); transform-origin: bottom; transition: transform .6s var(--ease); }
.tb-bars .h1 { --h: 40%; } .tb-bars .h2 { --h: 62%; } .tb-bars .h3 { --h: 48%; } .tb-bars .h4 { --h: 80%; } .tb-bars .h5 { --h: 56%; } .tb-bars .h6 { --h: 92%; } .tb-bars .h7 { --h: 70%; }
.project:hover .tb-bars i { animation: bar-up 1.2s var(--ease); }
@keyframes bar-up { from { transform: scaleY(.2); } to { transform: none; } }
.tb-ticket { padding: 12px; font: 400 10.5px/1.6 var(--mono); color: #c9d3ef; display: flex; flex-direction: column; }
.tk-h { font-weight: 600; color: #fff; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed rgba(255,255,255,.15); }
.tk-ai { margin-top: 6px; color: var(--teal); }
.v-violet .tk-ai { color: #b49bff; }
.tk-btn { margin-top: auto; height: 22px; border-radius: 7px; background: linear-gradient(110deg, #22b3a7, #3fd5c8); }
.v-violet .tk-btn { background: linear-gradient(110deg, #5f86ff, #8b6cff); }
.own-badge { position: absolute; top: 16px; left: 18px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #04121a; background: var(--teal); }

.project-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.project-head img, .mono-logo { width: 44px; height: 44px; border-radius: 12px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.mono-logo { display: grid; place-items: center; font: 700 19px/1 var(--display); color: #fff; background: linear-gradient(140deg, #6d4aff, #3b2bb5); }
.project-head h3 { margin: 0; font-size: 26px; }
.project-sub { font-size: 14px; color: var(--muted); margin: 2px 0 0 !important; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

.lab { margin-top: 24px; padding: 30px 34px; display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.lab-head h3 { font-size: 24px; margin-bottom: 6px; }
.lab-head p { color: var(--muted); font-size: 14.5px; }
.lab-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 28px; }
.lab-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; }
.lab-list b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.lab-list li > span:last-child { grid-column: 2; color: var(--muted); font-size: 14px; }
.lab-st { grid-row: span 2; align-self: start; margin-top: 3px; font: 400 11px/1 var(--mono); padding: 5px 9px; border-radius: 999px; border: 1px solid; }
.s-build { color: #3ee08f; border-color: rgba(62,224,143,.35); background: rgba(62,224,143,.08); }
.s-plan { color: var(--blue); border-color: rgba(122,162,255,.35); background: rgba(122,162,255,.08); }
.s-design { color: #b49bff; border-color: rgba(139,108,255,.4); background: rgba(139,108,255,.1); }
.s-proto { color: var(--amber); border-color: rgba(255,181,71,.35); background: rgba(255,181,71,.08); }

/* ---------- AI section ---------- */
.ai-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.ai-steps { display: grid; gap: 14px; }
.ai-steps li { display: flex; gap: 20px; padding: 24px 26px; overflow: hidden; isolation: isolate; transition: border-color .4s, transform .5s var(--ease); }
.ai-steps li:hover { border-color: var(--line-2); transform: translateX(6px); }
.step-n { flex: none; font: 400 13px/1 var(--mono); color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; padding-top: 6px; }
.ai-steps h3 { font-size: 20px; margin-bottom: 6px; }
.ai-steps p { color: var(--muted); font-size: 15.5px; }
.ai-panel { position: sticky; top: 100px; padding: 30px; }
.panel-title.small { font-size: 15px; margin: 6px 0 14px; color: var(--muted); }
.ai-wins { display: grid; gap: 18px; margin-bottom: 26px; }
.ai-wins li { display: grid; gap: 4px; padding-left: 16px; border-left: 2px solid; border-image: var(--grad) 1; }
.ai-wins b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.ai-wins span { color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-grid .sec-head { position: sticky; top: 110px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 0 26px; transition: border-color .3s; }
.faq-item[open] { border-color: var(--line-2); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-size: 18px; font-weight: 500; }
.faq-icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); transition: background .3s, transform .4s var(--ease); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; border-radius: 2px; background: var(--text); transform: translate(-50%, -50%); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .35s var(--ease); }
.faq-item[open] .faq-icon { background: linear-gradient(110deg, #5f86ff, #8b6cff); border-color: transparent; transform: rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p { padding: 0 40px 24px 0; color: var(--muted); font-size: 16px; animation: al-in .4s var(--ease); }

/* ---------- Contact additions ---------- */
.lt-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.presence { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.presence::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.presence.on { color: #3ee08f; border-color: rgba(62,224,143,.35); }
.presence.on::before { background: #3ee08f; animation: ping 2s infinite; }
.presence.away::before { background: var(--amber); }
.contact-list li[hidden] { display: none; }
.char-count { float: right; font: 400 12px/1.6 var(--mono); color: var(--dim); }
.form-success { display: none; text-align: center; padding: 36px 8px; }
.contact-form.sent .form-success { display: grid; gap: 14px; justify-items: center; }
.contact-form.sent > :not(.form-success) { display: none; }
.check { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3ee08f, #3fd5c8); box-shadow: 0 16px 40px -12px rgba(62,224,143,.6); animation: pop .5s var(--ease); }
.check svg { width: 32px; height: 32px; fill: none; stroke: #04121a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { font-size: 24px; }
.form-success p { color: var(--muted); max-width: 40ch; }
.btn .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.form-status a { text-decoration: underline; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { font-size: 14px; color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.donut .s4 { stroke: #ffb547; transition-delay: .75s; }

@media (max-width: 1080px) {
  .tile-map { grid-column: span 2; }
  .ai-grid, .faq-grid { grid-template-columns: 1fr; }
  .ai-panel, .faq-grid .sec-head { position: static; }
  .lab { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 640px) {
  .tile-map { grid-column: auto; }
  .tile-map .mini-map { margin: 22px -28px -28px; }
  .agent-log { margin: 24px -28px -28px; padding: 16px 18px; font-size: 12px; }
  .cf-code { font-size: 11px; }
  .cf-code .ln::before { width: 2.2em; padding-right: .8em; }
  .orbit .o4 { left: 10px; }
  .lab { padding: 24px; }
  .lab-list { grid-template-columns: 1fr; }
  .tablet { grid-template-columns: 26px 1fr 96px; height: 220px; padding: 9px; gap: 7px; }
  .tb-ticket { font-size: 9.5px; padding: 9px; }
  .faq-item { padding: 0 18px; }
  .faq-item p { padding-right: 0; }
  .project-head h3 { font-size: 22px; }
}

/* ---------- Case study pages ---------- */
.cs-cta { margin-left: auto; }
.cs-hero { position: relative; padding: 140px 0 60px; overflow: hidden; isolation: isolate; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 400 13px/1 var(--mono); color: var(--dim); margin-bottom: 34px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); }
.cs-id { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.cs-id img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 20px 40px -16px rgba(0,0,0,.8); }
.cs-id .eyebrow { margin: 0; }
.cs-title { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; max-width: 1000px; margin-bottom: 22px; }
.cs-lede { font-size: 18.5px; color: var(--muted); max-width: 62ch; }
.cs-facts { margin: 40px 0 28px; }
.cs-k { font: 400 12px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.cs-v { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.cs-facts .stat { padding: 24px 26px; }
.cs-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-gallery { padding: 64px 0; border-block: 1px solid var(--line); }
.cs-gallery-inner { display: flex; justify-content: center; gap: clamp(14px, 3vw, 32px); }
.cs-shot { margin: 0; width: min(30%, 290px); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 70px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.1); }
.cs-shot:nth-child(2) { transform: translateY(-18px); }
.cs-wide { margin: 0; max-width: 960px; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 70px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.1); }
.cs-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
.cs-block { padding: 32px; }
.cs-block h2 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 16px; }
.cs-block > p { color: var(--muted); }
.cs-built { grid-column: 2; grid-row: 1 / span 2; }
.cs-built ul { display: grid; gap: 12px; }
.cs-built li { position: relative; padding-left: 22px; color: var(--muted); }
.cs-built li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 3px; background: var(--grad); }
.cs-next { padding: 0 0 110px; }
.cs-next-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 32px; border-top: 1px solid var(--line); }
.cs-nav-link { display: grid; gap: 4px; }
.cs-nav-link.right { text-align: right; }
.cs-nav-link span { font: 400 12px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.cs-nav-link b { font: 600 22px/1.2 var(--display); }
.cs-nav-link:hover b { color: var(--blue); }
@media (max-width: 860px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-built { grid-column: auto; grid-row: auto; }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: 110px; }
  .cs-gallery-inner { gap: 10px; }
  .cs-shot { border-radius: 14px; }
  .cs-next-inner { flex-wrap: wrap; }
  .cs-next-inner .btn { order: 3; width: 100%; }
  .cs-block { padding: 24px; }
}
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-family: var(--display); font-size: clamp(40px, 6vw, 72px); letter-spacing: -.03em; margin-bottom: 16px; }
.notfound p { color: var(--muted); margin-bottom: 30px; }
.hero-title { font-size: clamp(46px, 6.4vw, 92px); }
.turnstile:empty { display: none; } .turnstile { min-height: 0; }
