/* =========================================================
   Siriwat Wisetpakdeewong — Portfolio  ·  "data pipeline" (v2)
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:            #070b14;
  --bg-2:          #0a1020;
  --surface:       rgba(18, 26, 45, 0.55);
  --surface-solid: #0e1526;
  --surface-2:     #131c31;
  --border:        rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.24);

  --text:      #e7eef8;
  --muted:     #9fb0c9;
  --muted-2:   #6b7a95;

  --cyan:        #22d3ee;
  --cyan-bright: #67e8f9;
  --violet:      #a78bfa;
  --violet-bright:#c4b5fd;
  --grad:        linear-gradient(135deg, #22d3ee 0%, #7dd3fc 40%, #a78bfa 100%);
  --grad-soft:   linear-gradient(135deg, rgba(34,211,238,.16), rgba(167,139,250,.16));

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --container: 1160px;
  --radius:    18px;
  --radius-sm: 12px;

  --shadow:      0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
strong { color: #fff; font-weight: 600; }
::selection { background: rgba(34,211,238,.28); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2740; border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #263450; }

/* hide native cursor only when custom cursor active (fine pointer) */
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor [role="button"] { cursor: none; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 400; background: var(--cyan); color: #04121a; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; position: relative;
  font-weight: 600; font-size: .95rem; padding: 12px 20px; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .2s;
  white-space: nowrap; border: 1px solid transparent; will-change: transform;
}
.btn svg { transition: transform .25s var(--ease); }
.btn--primary { background: var(--grad); color: #04121a; box-shadow: 0 10px 30px -10px rgba(34,211,238,.6); }
.btn--primary:hover { box-shadow: 0 16px 44px -12px rgba(34,211,238,.8); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { background: rgba(148,163,184,.05); border-color: var(--border-strong); color: var(--text); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--cyan); color: #fff; background: rgba(34,211,238,.08); }
.btn--sm { padding: 8px 15px; font-size: .85rem; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }

/* ---------- Chips & badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; background: rgba(148,163,184,.03); transition: color .2s, border-color .2s, background .2s; }
.chips li:hover { color: var(--cyan-bright); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.06); }
.chips--sm { gap: 6px; margin-top: 18px; }
.chips--sm li { font-size: .72rem; padding: 4px 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border-strong); color: var(--muted); }
.badge--feat { color: #04121a; background: var(--grad); border: none; letter-spacing: .02em; }
.badge--muted { color: var(--muted-2); }
.badge--diagram { color: var(--violet-bright); border-color: rgba(167,139,250,.35); background: rgba(167,139,250,.08); }
.badge svg { color: var(--violet-bright); }

/* =========================================================
   BOOT / PRELOADER
   ========================================================= */
.boot { display: none; }
.js .boot {
  display: flex; position: fixed; inset: 0; z-index: 500;
  background: var(--bg); align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__inner { width: min(90vw, 520px); }
.boot__log { color: var(--cyan-bright); font-size: clamp(.72rem, 2.4vw, .9rem); line-height: 1.9; min-height: 190px; white-space: pre-wrap; }
.boot__log .ok { color: #34d399; }
.boot__log .dim { color: var(--muted-2); }
.boot__track { height: 3px; background: rgba(148,163,184,.14); border-radius: 3px; overflow: hidden; margin-top: 14px; }
.boot__bar { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 3px; }

/* =========================================================
   GLOBAL BACKGROUND (site-wide motion)
   ========================================================= */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.bg__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 20%, transparent 80%);
}
.bg__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 0%, transparent 40%, rgba(7,11,20,.55) 100%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; will-change: transform; }
.aurora--1 { width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(34,211,238,.5), transparent 65%); top: -12vw; right: -8vw; animation: drift1 24s var(--ease) infinite alternate; }
.aurora--2 { width: 42vw; height: 42vw; background: radial-gradient(circle, rgba(167,139,250,.45), transparent 65%); top: 32vh; left: -12vw; animation: drift2 30s var(--ease) infinite alternate; }
.aurora--3 { width: 38vw; height: 38vw; background: radial-gradient(circle, rgba(59,130,246,.32), transparent 65%); bottom: -14vw; left: 40vw; animation: drift3 34s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(-8vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(10vw, -8vh) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-12vw, -6vh) scale(1.1); } }

/* content sits above bg */
.nav, main, .footer { position: relative; z-index: 2; }

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 450; pointer-events: none; opacity: 0; transition: opacity .3s; }
body.cursor-active .cursor { opacity: 1; }
/* precise point — a small diamond (JS adds the translate + rotate) */
.cursor--dot { width: 6px; height: 6px; background: var(--cyan-bright); box-shadow: 0 0 9px 1px rgba(34,211,238,.9); transition: background .25s, box-shadow .25s; }
/* trailing reticle — four corner brackets */
.cursor--frame { width: 0; height: 0; }
.cursor__box { position: absolute; left: 0; top: 0; width: 28px; height: 28px; transform: translate(-50%,-50%) rotate(0deg); transition: width .28s var(--ease), height .28s var(--ease), transform .45s var(--ease); }
.cursor__box span { position: absolute; width: 9px; height: 9px; border: 1.6px solid var(--cyan); box-shadow: 0 0 6px rgba(34,211,238,.35); transition: border-color .25s, box-shadow .25s; }
.cursor__box span:nth-child(1){ top: 0; left: 0; border-right: 0; border-bottom: 0; }
.cursor__box span:nth-child(2){ top: 0; right: 0; border-left: 0; border-bottom: 0; }
.cursor__box span:nth-child(3){ bottom: 0; left: 0; border-right: 0; border-top: 0; }
.cursor__box span:nth-child(4){ bottom: 0; right: 0; border-left: 0; border-top: 0; }
/* lock-on: expand + rotate into a diamond + shift to violet */
body.cursor-hover .cursor__box { width: 46px; height: 46px; transform: translate(-50%,-50%) rotate(45deg); }
body.cursor-hover .cursor__box span { border-color: var(--violet); box-shadow: 0 0 10px rgba(167,139,250,.6); }
body.cursor-hover .cursor--dot { background: var(--violet-bright); box-shadow: 0 0 11px 1px rgba(167,139,250,.9); }
body.cursor-down .cursor__box { width: 20px; height: 20px; }

/* =========================================================
   SCROLL PROGRESS
   ========================================================= */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300; background: var(--grad); box-shadow: 0 0 12px rgba(34,211,238,.7); transition: width .1s linear; }

/* =========================================================
   NAV
   ========================================================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(7, 11, 20, 0.72); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--border); }
.nav__inner { max-width: var(--container); margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.brand__mark { color: var(--cyan); display: grid; place-items: center; filter: drop-shadow(0 0 6px rgba(34,211,238,.5)); }
.brand__node { fill: currentColor; }
.brand__mark .brand__node:nth-child(2){ fill: var(--violet); }
.brand__dot { color: var(--cyan); }
.brand__text { color: #fff; }
.nav__links { display: flex; gap: 4px; }
.nav__link { position: relative; font-size: .88rem; color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 9px; transition: color .2s, background .2s; display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.nav__num { font-family: var(--font-mono); font-size: .66rem; color: var(--cyan); opacity: .7; }
.nav__link:hover { color: #fff; background: rgba(148,163,184,.06); }
.nav__link.is-active { color: #fff; }
.nav__link.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--grad); border-radius: 2px; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0 0 0 auto; z-index: 99; width: min(80vw, 320px); background: rgba(10, 16, 30, 0.96); backdrop-filter: blur(18px); border-left: 1px solid var(--border); padding: 100px 30px 40px; display: flex; flex-direction: column; gap: 4px; transform: translateX(100%); transition: transform .4s var(--ease); visibility: hidden; }
.mobile-menu.is-open { transform: translateX(0); visibility: visible; }
.mobile-menu__link { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--border); transition: color .2s, padding .2s; display: flex; align-items: baseline; gap: 12px; }
.mobile-menu__link span { font-family: var(--font-mono); font-size: .8rem; color: var(--cyan); }
.mobile-menu__link:hover { color: #fff; padding-left: 6px; }
.mobile-menu__link--cta { color: var(--cyan); border-bottom: none; margin-top: 14px; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero__inner { position: relative; z-index: 2; max-width: 880px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(10,16,30,.5); backdrop-filter: blur(6px); margin-bottom: 26px; }
.hero__eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.7rem, 8vw, 5.6rem); line-height: 1.02; letter-spacing: -0.02em; color: #fff; margin-bottom: 22px; text-shadow: 0 2px 40px rgba(7,11,20,.6); }
.hero__role { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: clamp(1.1rem, 3.2vw, 1.7rem); color: var(--cyan-bright); margin-bottom: 26px; min-height: 1.5em; }
.hero__prompt { color: var(--violet); }
.hero__caret { width: 3px; height: 1.15em; background: var(--cyan); display: inline-block; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__desc { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--muted); max-width: 620px; margin-bottom: 38px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 60px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, auto); gap: 14px 44px; padding-top: 34px; border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1; color: #fff; display: inline-flex; align-items: baseline; }
.stat__suffix { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { font-size: .74rem; color: var(--muted-2); margin-top: 8px; text-transform: uppercase; letter-spacing: .08em; line-height: 1.35; }
.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: .68rem; color: var(--muted-2); letter-spacing: .2em; text-transform: uppercase; }
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content:""; position: absolute; top: -10px; left: 0; width: 1px; height: 10px; background: var(--cyan-bright); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { top: -10px; } 100% { top: 44px; } }
@media (max-height: 920px) { .hero__scroll { display: none; } }

/* =========================================================
   IMPACT BAND
   ========================================================= */
.impact { position: relative; z-index: 2; padding: 30px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(10,16,30,.5); backdrop-filter: blur(8px); }
.impact__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.impact__item { text-align: center; padding: 6px 10px; position: relative; }
.impact__item:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 20%; bottom: 20%; width: 1px; background: var(--border); }
.impact__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.2rem); color: #fff; line-height: 1; }
.impact__num span { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.impact__label { display: block; font-size: .76rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { position: relative; padding: 110px 0; z-index: 2; scroll-margin-top: 72px; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(9,14,26,.6) 12%, rgba(9,14,26,.6) 88%, transparent); }
.section__head { max-width: 720px; margin-bottom: 60px; }
.section__index { display: block; font-size: .8rem; color: var(--cyan); letter-spacing: .12em; margin-bottom: 16px; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4.6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.section__sub { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }
.section__sub a { color: var(--cyan-bright); border-bottom: 1px solid rgba(34,211,238,.35); }
.section__sub a:hover { color: #fff; }

/* =========================================================
   ABOUT + TERMINAL
   ========================================================= */
.about { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
.about__lead { font-size: 1.3rem; color: var(--text); font-weight: 500; margin-bottom: 20px; line-height: 1.55; }
.about__body p { color: var(--muted); margin-bottom: 18px; }
.about__points { display: grid; gap: 12px; margin-top: 30px; }
.about__points li { display: flex; align-items: flex-start; gap: 12px; color: var(--text); font-size: .98rem; }
.about__points svg { color: var(--cyan); flex-shrink: 0; margin-top: 3px; }
.edu { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.edu__label { font-size: .78rem; color: var(--muted-2); margin-bottom: 12px; }
.edu__degree { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 1.05rem; }
.edu__school { color: var(--muted); font-size: .92rem; margin-top: 4px; }

.about__side { position: sticky; top: 100px; }
.terminal { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: rgba(6,10,18,.85); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.terminal__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.35); }
.terminal__dots { display: flex; gap: 7px; }
.terminal__dots span { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dots span:nth-child(1){ background:#ff5f57; } .terminal__dots span:nth-child(2){ background:#febc2e; } .terminal__dots span:nth-child(3){ background:#28c840; }
.terminal__title { font-size: .76rem; color: var(--muted-2); }
.terminal__body { padding: 16px; height: 340px; overflow-y: auto; font-size: .8rem; line-height: 1.75; cursor: text; }
.terminal__body::-webkit-scrollbar { width: 8px; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .tprompt { color: var(--violet); }
.term-line .tuser { color: #34d399; }
.term-cmd { color: #fff; }
.term-out { color: var(--muted); }
.term-out .k { color: var(--cyan-bright); }
.term-out .v { color: #a5e8b0; }
.term-out .a { color: var(--violet-bright); }
.term-err { color: #ff8080; }
.term-link { color: var(--cyan-bright); border-bottom: 1px solid rgba(34,211,238,.4); cursor: pointer; }
.term-inputline { display: flex; align-items: baseline; gap: 8px; }
.term-inputline .tprompt { color: var(--violet); flex-shrink: 0; }
.term-input-wrap { position: relative; flex: 1; }
#termInput { position: absolute; opacity: 0; left: 0; width: 100%; height: 100%; border: none; background: none; }
.term-shown { color: #fff; }
.term-caret { display: inline-block; width: 8px; height: 1.05em; background: var(--cyan); vertical-align: text-bottom; animation: blink 1.05s steps(1) infinite; }
.terminal__hint { text-align: center; font-size: .72rem; color: var(--muted-2); margin-top: 14px; }
.terminal__hint b { color: var(--cyan-bright); font-weight: 500; }

/* =========================================================
   HOW I BUILD — flow diagram
   ========================================================= */
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.flow__line { position: absolute; top: 34px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, rgba(34,211,238,.15), rgba(167,139,250,.35), rgba(34,211,238,.15)); overflow: visible; }
.flow__packet { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 12px 2px rgba(34,211,238,.9); animation: flowmove 4.5s linear infinite; }
.flow__packet--2 { background: var(--violet-bright); box-shadow: 0 0 12px 2px rgba(167,139,250,.9); animation-delay: 2.25s; }
@keyframes flowmove { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.flow__stage { position: relative; text-align: center; padding: 0 6px; }
.flow__node { width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center; color: var(--cyan-bright); background: rgba(10,16,30,.9); border: 1px solid var(--border-strong); box-shadow: 0 0 0 6px rgba(7,11,20,1), 0 8px 30px -10px rgba(34,211,238,.4); transition: transform .3s var(--ease), color .3s, border-color .3s, box-shadow .3s; position: relative; z-index: 1; }
.flow__stage:hover .flow__node { transform: translateY(-6px) scale(1.05); color: #fff; border-color: var(--cyan); box-shadow: 0 0 0 6px rgba(7,11,20,1), 0 14px 40px -8px rgba(34,211,238,.7); }
.flow__stage h3 { font-family: var(--font-display); font-size: 1.05rem; color: #fff; margin-bottom: 8px; }
.flow__stage p { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.flow__tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.flow__tags li { font-size: .68rem; color: var(--violet-bright); padding: 3px 8px; border: 1px solid rgba(167,139,250,.25); border-radius: 6px; background: rgba(167,139,250,.05); }

/* =========================================================
   SKILLS + MARQUEE
   ========================================================= */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); padding: 26px 24px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; position: relative; overflow: hidden; transform-style: preserve-3d; cursor: pointer; }
.skill-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .3s; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.skill-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--border-strong); }
.skill-card:hover::before { opacity: .6; }
.skill-card:hover::before { opacity: .5; }
.skill-card__head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.skill-card__icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 1.05rem; background: var(--grad-soft); border: 1px solid var(--border-strong); color: var(--cyan-bright); }
.skill-card__head h3 { font-family: var(--font-display); font-size: 1.08rem; color: #fff; font-weight: 600; }

.marquee { margin-top: 56px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 46px; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tech { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; opacity: .7; transition: opacity .25s; }
.tech:hover { opacity: 1; }
/* mask-image is set inline in JS (relative URLs must resolve against the
   document, not this stylesheet) — here we only style colour + sizing */
.tech__logo { width: 26px; height: 26px; flex-shrink: 0; background: #cdd8ea; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background .25s; }
.tech:hover .tech__logo { background: var(--cyan-bright); }
.tech__label { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* =========================================================
   EXPERIENCE — timeline
   ========================================================= */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), transparent); opacity: .5; }
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__marker { position: absolute; left: -34px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.12), 0 0 14px rgba(34,211,238,.5); }
.tl-item__card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); padding: 28px; transition: border-color .3s, box-shadow .3s; }
.tl-item__card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.tl-item__top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.tl-item__role { font-family: var(--font-display); font-size: 1.3rem; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-intern { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--violet-bright); border: 1px solid rgba(167,139,250,.4); padding: 2px 8px; border-radius: 6px; }
.tl-item__company { color: var(--cyan-bright); font-weight: 500; font-size: 1rem; }
.tl-item__date { color: var(--muted-2); font-size: .82rem; white-space: nowrap; }
.tl-item__context { color: var(--muted); font-size: .95rem; margin: 12px 0 6px; }
.tl-item__project { font-family: var(--font-mono); font-size: .82rem; color: var(--violet-bright); margin: 22px 0 12px; padding-left: 16px; position: relative; text-transform: uppercase; letter-spacing: .04em; }
.tl-item__project::before { content: "▹"; position: absolute; left: 0; color: var(--cyan); }
.tl-item__list { display: grid; gap: 10px; }
.tl-item__list li { position: relative; padding-left: 22px; color: var(--muted); font-size: .95rem; }
.tl-item__list li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); opacity: .7; }

/* =========================================================
   PROJECTS
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px; transition: all .25s var(--ease); }
.filter:hover { color: #fff; border-color: var(--cyan); }
.filter.is-active { color: #04121a; background: var(--grad); border-color: transparent; font-weight: 600; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); padding: 26px; display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, opacity .3s; }
.project:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
/* the whole card is a real link (stretched-link pattern) */
.project__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.project__link:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.project:focus-within { border-color: var(--border-strong); }
.project .chips li { position: relative; z-index: 2; }
.project--feat { grid-column: span 3; }
.project__glow { position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; background: radial-gradient(circle, rgba(34,211,238,.14), transparent 65%); pointer-events: none; opacity: 0; transition: opacity .4s; }
.project:hover .project__glow { opacity: 1; }
.project__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.project__badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.project__gh { color: var(--muted); transition: color .2s, transform .2s; position: relative; z-index: 3; }
.project__gh:hover { color: #fff; transform: translateY(-2px) scale(1.08); }
.project__title { font-family: var(--font-display); font-size: 1.25rem; color: #fff; font-weight: 600; margin-bottom: 12px; }
.project--feat .project__title { font-size: 1.5rem; }
.project__desc { color: var(--muted); font-size: .95rem; flex-grow: 1; }
.project--feat .project__desc { max-width: 760px; font-size: 1rem; }
/* Featured cards keep the big hero treatment only in the unfiltered "All" view;
   once a category/tech filter is active they collapse to normal card size (badge stays). */
.projects.is-filtered .project--feat { grid-column: auto; }
.projects.is-filtered .project--feat .project__title { font-size: 1.25rem; }
.projects.is-filtered .project--feat .project__desc { max-width: none; font-size: .95rem; }
.project__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: .78rem; color: var(--cyan-bright); opacity: .8; transition: gap .25s var(--ease), opacity .25s; }
.project:hover .project__cta { gap: 10px; opacity: 1; }
.project.is-hidden { display: none; }
.projects__more { text-align: center; margin-top: 42px; }

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cert { display: flex; align-items: center; gap: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); padding: 24px; transition: border-color .3s, box-shadow .3s; }
.cert:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.cert__logo { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.cert__logo svg { width: 58%; height: 58%; display: block; }
.cert__logo--fill svg { width: 100%; height: 100%; }
.cert__name { font-size: .98rem; color: #fff; font-weight: 600; line-height: 1.35; }
.cert__issuer { font-size: .76rem; color: var(--muted); margin-top: 6px; }
.cert__check { margin-left: auto; color: #34d399; flex-shrink: 0; }

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.section--contact { padding: 130px 0; }
.contact { text-align: center; max-width: 760px; margin: 0 auto; }
.contact .section__index { text-align: center; }
.contact__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; color: #fff; margin: 8px 0 22px; }
.contact__sub { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 40px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 44px; }
#copyEmailText { font-family: var(--font-mono); font-size: .9rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; padding-top: 34px; border-top: 1px solid var(--border); }
.contact__link { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: .92rem; transition: color .2s; }
.contact__link svg { color: var(--cyan); transition: transform .2s; }
.contact__link:hover { color: #fff; }
.contact__link:hover svg { transform: scale(1.12); }
.contact__link--static { cursor: default; }
.footer { border-top: 1px solid var(--border); padding: 34px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__name, .footer__note { color: var(--muted-2); font-size: .82rem; }

/* =========================================================
   CASE-STUDY CONTENT BLOCKS (shared with project pages) + LIGHTBOX
   ========================================================= */
.m-eyebrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.m-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); color: #fff; line-height: 1.1; }
.m-sub { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .84rem; margin-top: 8px; }
.m-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 18px 0 6px; align-items: center; }
.m-meta a { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--text); border: 1px solid var(--border-strong); padding: 7px 14px; border-radius: 999px; transition: border-color .2s, color .2s, background .2s; }
.m-meta a:hover { border-color: var(--cyan); color: #fff; background: rgba(34,211,238,.08); }
.m-meta .m-star { color: var(--muted); font-family: var(--font-mono); font-size: .82rem; display: inline-flex; align-items: center; gap: 6px; }
.m-meta .m-star svg { color: var(--violet-bright); }
.m-desc { color: var(--muted); font-size: 1rem; margin: 22px 0; line-height: 1.7; }
.m-heading { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin: 30px 0 16px; display: flex; align-items: center; gap: 10px; }
.m-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.m-figure { background: #eef2f8; border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px; margin-bottom: 14px; cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s; }
.m-figure:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -18px rgba(34,211,238,.4); }
.m-figure img { width: 100%; border-radius: 8px; display: block; }
.m-figcap { font-size: .78rem; color: var(--muted-2); margin-top: 12px; text-align: center; font-family: var(--font-mono); }
.m-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 22px; background: rgba(10,16,30,.6); border: 1px solid var(--border); border-radius: 14px; }
.m-flow__node { font-family: var(--font-mono); font-size: .82rem; color: #fff; padding: 10px 14px; border-radius: 10px; background: var(--grad-soft); border: 1px solid var(--border-strong); }
.m-flow__arrow { color: var(--cyan); font-size: 1.1rem; }
.m-list { display: grid; gap: 11px; }
.m-list li { position: relative; padding-left: 26px; color: var(--muted); font-size: .95rem; }
.m-list li::before { content: "▹"; position: absolute; left: 0; top: 0; color: var(--cyan); }
.m-list li strong { color: #fff; }
.m-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 30px; background: rgba(3,5,10,.92); backdrop-filter: blur(6px); }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.lightbox__close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 1.2rem; transition: background .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.18); }

/* =========================================================
   TOAST
   ========================================================= */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 140%); background: var(--surface-solid); border: 1px solid var(--cyan); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: .9rem; font-weight: 500; z-index: 460; box-shadow: 0 12px 40px -10px rgba(34,211,238,.5); transition: transform .4s var(--ease); display: flex; align-items: center; gap: 8px; }
.toast.is-visible { transform: translate(-50%, 0); }
.toast::before { content: "✓"; color: var(--cyan); font-weight: 700; }

/* =========================================================
   REVEAL
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1040px) {
  .nav__links { gap: 0; }
  .nav__link { padding: 8px 9px; font-size: .82rem; }
}
@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__side { position: static; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .project--feat { grid-column: span 2; }
  .certs { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 0; max-width: 460px; margin: 0 auto; }
  .flow__line { top: 0; bottom: 0; left: 35px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, rgba(34,211,238,.15), rgba(167,139,250,.35), rgba(34,211,238,.15)); }
  .flow__packet { top: 0; left: 50%; margin-left: -4px; animation: flowmove-v 4.5s linear infinite; }
  .flow__packet--2 { animation: flowmove-v 4.5s linear infinite; animation-delay: 2.25s; }
  @keyframes flowmove-v { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .flow__stage { display: grid; grid-template-columns: 70px 1fr; gap: 4px 22px; text-align: left; padding: 0 0 34px; align-items: start; }
  .flow__node { margin: 0; grid-row: span 3; }
  .flow__stage h3 { align-self: center; }
  .flow__tags { justify-content: flex-start; }
  .impact__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 20px; }
  .impact__item:nth-child(odd)::after { display: none; }
  .impact__item:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .container { padding: 0 20px; }
  .nav__inner { padding: 14px 20px; }
  .btn--ghost.btn--sm { display: none; }
  .section { padding: 80px 0; }
  .hero { padding: 110px 0 70px; }
  .hero__title { font-size: clamp(2.05rem, 8.4vw, 3.4rem); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
  .skills { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .project--feat { grid-column: span 1; }
  .project--feat .project__title { font-size: 1.3rem; }
  .tl-item__card { padding: 22px; }
  .impact__grid { grid-template-columns: 1fr; gap: 22px; }
  .impact__item::after { display: none !important; }
  .impact__item:not(:last-child) { border-bottom: 1px solid var(--border); padding-bottom: 22px; }
  .contact__actions .btn { width: 100%; justify-content: center; }
  #copyEmailText { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .aurora, .flow__packet, .hero__caret, .hero__scroll-line::after, .marquee__track { animation: none !important; }
  .bg__canvas { opacity: .35; }
}

/* =========================================================
   V3 ADDITIONS — command palette, project pages, DAG runs,
   clickable boxes, cross-page transitions
   ========================================================= */

/* ---------- cross-document view transitions (progressive) ---------- */
@view-transition { navigation: auto; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } }
main { animation: pagein .5s var(--ease); }

/* ---------- kbd ---------- */
kbd { font-family: var(--font-mono); font-size: .72em; background: rgba(148,163,184,.1); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; color: var(--text); }

/* ---------- nav search / palette trigger ---------- */
.nav__search { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(148,163,184,.05); backdrop-filter: blur(6px); transition: color .2s, border-color .2s, background .2s; }
.nav__search:hover { color: #fff; border-color: var(--cyan); background: rgba(34,211,238,.08); }
.nav__search kbd { font-size: .6rem; padding: 1px 6px; }

/* ---------- hero: palette hint + clickable stats ---------- */
.hero__hint { display: inline-flex; align-items: center; gap: 7px; font-size: .75rem; color: var(--muted-2); padding-left: 6px; align-self: center; }
@media (hover: none) { .hero__hint { display: none; } }
a.stat { border-radius: 10px; transition: transform .25s var(--ease); }
a.stat:hover { transform: translateY(-3px); }
.stat__label { transition: color .2s; }
a.stat:hover .stat__label { color: var(--cyan-bright); }

/* ---------- impact band: clickable numbers ---------- */
a.impact__item { display: block; border-radius: 12px; transition: background .25s, transform .25s var(--ease); }
a.impact__item:hover { background: rgba(34,211,238,.05); transform: translateY(-2px); }
.impact__go { position: absolute; top: 2px; right: 12px; color: var(--cyan-bright); font-size: .8rem; opacity: 0; transform: translateX(-5px); transition: opacity .25s, transform .25s var(--ease); }
a.impact__item:hover .impact__go { opacity: 1; transform: none; }
.impact__label { transition: color .2s; }
a.impact__item:hover .impact__label { color: var(--text); }

/* ---------- chips are live filters everywhere ---------- */
.chips li, .flow__tags li { cursor: pointer; }
.chips li { transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease); }
.chips li:hover { color: var(--cyan-bright); border-color: rgba(34,211,238,.6); background: rgba(34,211,238,.12); transform: translateY(-2px); }
.flow__tags li { transition: color .2s, border-color .2s, background .2s; }
.flow__tags li:hover { color: #fff; border-color: rgba(167,139,250,.6); background: rgba(167,139,250,.14); }

/* ---------- DAG bar + run states (How I build) ---------- */
.dagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .74rem; color: var(--muted-2); border: 1px solid var(--border); background: rgba(10,16,30,.55); backdrop-filter: blur(6px); border-radius: 12px; padding: 10px 16px; margin-bottom: 44px; }
.dagbar b { color: var(--text); font-weight: 500; }
.dagbar__id { color: var(--cyan-bright); }
.dagbar__sep { opacity: .5; }
.dagbar__state { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border-strong); text-transform: lowercase; }
.dagbar__state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dagbar__state[data-state="queued"] { color: var(--muted-2); }
.dagbar__state[data-state="running"] { color: var(--cyan-bright); border-color: rgba(34,211,238,.4); }
.dagbar__state[data-state="running"]::before { animation: dagblink 1s steps(1) infinite; }
@keyframes dagblink { 50% { opacity: .25; } }
.dagbar__state[data-state="success"] { color: #34d399; border-color: rgba(52,211,153,.35); }
.flow__stage.is-running .flow__node { border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 6px rgba(7,11,20,1), 0 0 26px rgba(34,211,238,.6); transform: translateY(-4px) scale(1.04); }
.flow__stage.is-done .flow__node { border-color: rgba(52,211,153,.55); }
.flow__stage.is-done .flow__node::after { content: "✓"; position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #0a1626; border: 1px solid rgba(52,211,153,.6); color: #34d399; font-size: .6rem; line-height: 1; display: grid; place-items: center; }

/* ---------- tech filter pill + empty state ---------- */
.filter--tech { color: #120a26; background: linear-gradient(135deg, #a78bfa, #c4b5fd); border-color: transparent; font-weight: 600; }
.projects__empty { display: none; text-align: center; color: var(--muted-2); font-family: var(--font-mono); font-size: .85rem; padding: 34px 0 8px; }
.projects__empty.is-visible { display: block; }
.projects__empty button { color: var(--cyan-bright); border-bottom: 1px solid rgba(34,211,238,.4); font-size: inherit; font-family: inherit; }

/* ---------- experience: related-build links ---------- */
.tl-item__related { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: .78rem; font-family: var(--font-mono); color: var(--cyan-bright); border: 1px solid rgba(34,211,238,.25); padding: 7px 14px; border-radius: 999px; background: rgba(34,211,238,.05); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.tl-item__related:hover { background: rgba(34,211,238,.12); border-color: var(--cyan); transform: translateY(-2px); }

/* ---------- certifications as links ---------- */
.cert { position: relative; }
a.cert:hover { border-color: rgba(34,211,238,.45); }
.cert__ext { position: absolute; top: 12px; right: 14px; color: var(--muted-2); opacity: 0; transform: translate(-4px, 4px); transition: opacity .25s, transform .25s var(--ease), color .2s; }
a.cert:hover .cert__ext { opacity: 1; transform: none; color: var(--cyan-bright); }
.cert__verify { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--muted-2); margin-top: 4px; transition: color .2s; }
a.cert:hover .cert__verify { color: var(--cyan-bright); }

/* ---------- terminal SQL tables ---------- */
.term-table { overflow-x: auto; white-space: pre; margin: 4px 0; padding-bottom: 4px; color: var(--muted); font-family: inherit; font-size: inherit; line-height: 1.55; scrollbar-width: thin; }
.term-table::-webkit-scrollbar { height: 6px; }
.term-table::-webkit-scrollbar-thumb { background: #1c2740; border-radius: 4px; }

/* ---------- footer palette hint ---------- */
.footer__note button { color: var(--muted-2); font-size: inherit; transition: color .2s; }
.footer__note button:hover { color: var(--cyan-bright); }
.footer__note kbd { font-size: .62rem; padding: 1px 5px; }

/* =========================================================
   COMMAND PALETTE
   ========================================================= */
.palette { position: fixed; inset: 0; z-index: 480; display: none; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; }
.palette.is-open { display: flex; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(4,7,14,.62); backdrop-filter: blur(7px); }
.palette__panel { position: relative; width: min(640px, 100%); background: linear-gradient(180deg, rgba(16,23,40,.98), rgba(9,14,26,.98)); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 40px 120px -30px rgba(0,0,0,.9), 0 0 60px -20px rgba(34,211,238,.25); overflow: hidden; animation: palIn .2s var(--ease); }
@keyframes palIn { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.palette__top { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette__top svg { color: var(--cyan); flex-shrink: 0; }
.palette__top input { flex: 1; background: none; border: none; outline: none; color: #fff; font-family: var(--font-sans); font-size: 1rem; }
.palette__top input::placeholder { color: var(--muted-2); }
.palette__top kbd { font-size: .62rem; }
.palette__list { max-height: min(430px, 52vh); overflow-y: auto; padding: 8px; margin: 0; }
.palette__list::-webkit-scrollbar { width: 8px; }
.palette__group { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-2); padding: 12px 12px 5px; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-size: .93rem; cursor: pointer; }
.palette__item svg { color: var(--cyan); flex-shrink: 0; opacity: .75; }
.palette__item .pi-hint { margin-left: auto; color: var(--muted-2); font-size: .76rem; font-family: var(--font-mono); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__item.is-active { background: rgba(34,211,238,.1); }
.palette__item.is-active svg { opacity: 1; }
.palette__item.is-active .pi-hint { color: var(--muted); }
.palette__empty { padding: 28px; text-align: center; color: var(--muted-2); font-family: var(--font-mono); font-size: .84rem; }
.palette__foot { display: flex; gap: 18px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .68rem; }
.palette__foot span { display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
   PROJECT (CASE-STUDY) PAGES
   ========================================================= */
.pp-section { padding: 150px 0 90px; position: relative; z-index: 2; }
.pp-section .container { max-width: 920px; }
.pp-crumb { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--muted-2); margin-bottom: 30px; flex-wrap: wrap; }
.pp-crumb a { color: var(--muted); border-bottom: 1px dotted var(--border-strong); transition: color .2s, border-color .2s; }
.pp-crumb a:hover { color: var(--cyan-bright); border-color: var(--cyan); }
.pp-crumb__here { color: var(--cyan-bright); }
.pp-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6vw, 3.4rem); color: #fff; line-height: 1.06; letter-spacing: -.02em; margin: 12px 0 10px; }
.pp-lead { color: var(--muted); font-size: 1.08rem; line-height: 1.75; margin-top: 24px; max-width: 72ch; }
.pp-err { color: #ff8080; font-size: .84rem; margin-bottom: 14px; }
.pp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 36px 0 10px; }
.pp-facts > div { border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(8px); border-radius: var(--radius-sm); padding: 14px 16px; transition: border-color .25s, transform .25s var(--ease); }
.pp-facts > div:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.pp-facts dt { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.pp-facts dd { color: #fff; font-size: .9rem; font-weight: 500; line-height: 1.4; }
.pp-story { color: var(--muted); line-height: 1.85; font-size: .98rem; max-width: 74ch; }
.pp-stack-hint { font-size: .66rem; letter-spacing: .04em; text-transform: none; }
.pp-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--border); }
.pp-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 46px; }
.pp-pn__card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.pp-pn__card:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: var(--shadow); }
.pp-pn__card .mono { font-size: .66rem; color: var(--muted-2); letter-spacing: .14em; text-transform: uppercase; }
.pp-pn__card b { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.pp-pn__card--next { text-align: right; align-items: flex-end; }
.pp-hint { color: var(--muted-2); font-size: .68rem; text-align: center; margin-top: 16px; }
.pp-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pp-related--wide { margin-top: 30px; }
.pp-rel { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); backdrop-filter: blur(8px); padding: 18px; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.pp-rel:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.pp-rel h4 { color: #fff; font-family: var(--font-display); font-size: .96rem; font-weight: 600; margin-bottom: 7px; }
.pp-rel p { color: var(--muted-2); font-size: .75rem; font-family: var(--font-mono); line-height: 1.5; }
.pp-notfound { padding-top: 10px; }

/* ---------- responsive (v3) ---------- */
@media (max-width: 940px) {
  .pp-facts { grid-template-columns: repeat(2, 1fr); }
  .pp-related { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav__search .nav__search-label, .nav__search kbd { display: none; }
  .nav__search { padding: 9px 11px; }
  .pp-section { padding: 120px 0 70px; }
  .pp-facts { grid-template-columns: 1fr 1fr; }
  .pp-related { grid-template-columns: 1fr; }
  .pp-pn { grid-template-columns: 1fr; }
  .pp-pn__card--next { text-align: left; align-items: flex-start; }
  .dagbar { font-size: .66rem; padding: 9px 12px; }
  .dagbar__state { margin-left: 0; }
  .palette { padding: 8vh 12px 12px; }
}
