/* ---------- fonts (self-hosted) ---------- */
@font-face{
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-var.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Space Mono';
  src: url('fonts/space-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Space Mono';
  src: url('fonts/space-mono-700.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #f7f9fc;
  --bg-alt: #eef3f8;
  --surface: #ffffff;
  --ink: #102033;
  --muted: #536477;
  --muted-2: #718196;
  --line: #dce5ee;
  --line-strong: #c6d3df;

  --accent: #147d92;
  --accent-ink: #0d5d70;
  --accent-soft: #dff2f5;
  --safe: #19805f;
  --safe-soft: #dcf4e9;
  --spam: #c64b4b;
  --spam-soft: #fce5e5;
  --dark: #102033;
  --dark-2: #193047;

  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --shadow: 0 1px 2px rgba(16,32,51,.04), 0 10px 28px rgba(16,32,51,.07);
  --ease: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
*{ margin: 0; padding: 0; }

html{
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg{ display: block; max-width: 100%; }
img{ height: auto; }
ul, ol{ list-style: none; }
a{ color: var(--accent); text-underline-offset: 3px; }
a:hover{ color: var(--accent-ink); }
button{ font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4{ line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
::selection{ background: var(--accent); color: #fff; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link{
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus{ transform: translateY(0); color: #fff; }

.container{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(245,246,248,.86);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.brand:hover{ color: var(--ink); }
.brand-mark{
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-list{ display: flex; gap: 26px; }
.nav-list a{
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-list a:hover,
.nav-list a.is-active{ color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle{
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after{
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), background .2s;
}
.nav-toggle-bars{ position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after{ content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before{ top: -6px; }
.nav-toggle-bars::after{ top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars{ background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before{ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after{ transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-sm{ padding: 8px 16px; min-height: 38px; font-size: 14px; }
.btn-primary{ background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(38,80,217,.3); }
.btn-primary:hover{ background: var(--accent-ink); color: #fff; box-shadow: 0 8px 20px rgba(38,80,217,.28); }
.btn-secondary{ background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover{ border-color: var(--ink); color: var(--ink); }
.btn-light{ background: #fff; color: var(--dark); }
.btn-light:hover{ background: var(--accent-soft); color: var(--dark); }
.btn-ghost-light{ background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost-light:hover{ border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

.icon{
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-row{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-row-tight{ margin-top: 16px; gap: 8px 24px; }

.text-link{ font-weight: 500; text-decoration: none; }
.text-link:hover{ text-decoration: underline; }

/* ---------- hero ---------- */

.hero{ padding: 80px 0 72px; }
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.status{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}
.status-dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 4px var(--safe-soft);
}
.hero-title{
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.hero-title > span{ display: inline; }
.hero-title-divider{ color: var(--line-strong); margin: 0 .15em; font-weight: 400; }
.hero-title-accent{ color: var(--accent); }
.hero-lead{
  margin-top: 24px;
  max-width: 60ch;
  font-size: 18px;
  color: var(--muted);
}

.spec-card{
  background: var(--dark);
  color: #d6dbf0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15,18,32,.22);
}
.spec-card-bar{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.spec-card-file{ font-family: var(--mono); font-size: 12.5px; color: #8f98b8; }
.spec-card-code{
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.spec-card-code code{ font-family: inherit; }
.t-p{ color: #8f98b8; }
.t-k{ color: #8fb0ff; }
.t-s{ color: #8fe0b8; }
.t-b{ color: #ffc369; }

.dots{ display: inline-flex; gap: 6px; }
.dots i{ width: 10px; height: 10px; border-radius: 50%; background: #3a4060; }
.dots i:nth-child(1){ background: #ff6b6b; }
.dots i:nth-child(2){ background: #ffc369; }
.dots i:nth-child(3){ background: #4fd1a1; }

/* ---------- sections ---------- */

.section{ padding: 96px 0; }
.section-alt{ background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head{ max-width: 720px; margin-bottom: 56px; }
.section-head h2{ font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; }
.section-intro{ margin-top: 14px; color: var(--muted); font-size: 17px; }

.eyebrow{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.eyebrow span{ color: var(--accent); }
.eyebrow-light{ color: rgba(255,255,255,.65); }
.eyebrow-light span{ color: #8fb0ff; }

/* ---------- reveal ---------- */

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

/* ---------- about ---------- */

.about-grid{
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 56px;
  align-items: start;
}
.about-photo{
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.about-photo img{ width: 100%; height: 100%; object-fit: cover; }
.about-body p{ color: var(--muted); font-size: 17px; max-width: 64ch; }
.about-body p + p{ margin-top: 18px; }
.about-points{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
.about-points li{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--muted);
}
.about-point-label{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- tags ---------- */

.tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.tag{
  display: inline-block;
  padding: 4px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.section-alt .tag{ background: var(--bg); }
.tag-accent{ background: var(--accent-soft) !important; border-color: transparent; color: var(--accent-ink); }

/* ---------- projects ---------- */

.project-group + .project-group{ margin-top: 80px; }
.group-title{
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.project{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.project + .project{ margin-top: 32px; }
.project-reverse .project-media{ order: 2; }
.project-media{ position: relative; min-width: 0; padding-bottom: 28px; }

.browser{
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(18,21,31,.12);
}
.browser-bar{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.browser-bar .dots i{ background: var(--line-strong) !important; }
.browser-url{
  flex: 1;
  min-width: 0;
  padding: 3px 12px;
  background: var(--surface);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser img{ width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; background: var(--bg-alt); }

.phone{
  position: absolute;
  right: -12px;
  bottom: 0;
  width: 26%;
  min-width: 90px;
  max-width: 150px;
  border: 5px solid var(--dark);
  border-radius: 20px;
  overflow: hidden;
  background: var(--dark);
  box-shadow: 0 16px 36px rgba(18,21,31,.3);
}
.phone img{ width: 100%; aspect-ratio: 540 / 1169; object-fit: cover; }

.project-body{ min-width: 0; }
.project-meta{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.project-category{ font-family: var(--mono); font-size: 12.5px; color: var(--muted-2); }
.project-title{ font-size: 28px; letter-spacing: -0.025em; }
.project-desc{ margin-top: 12px; color: var(--muted); }
.project-points{ margin: 18px 0 20px; display: grid; gap: 8px; }
.project-points li{ position: relative; padding-left: 22px; font-size: 15px; color: var(--muted); }
.project-points li::before{
  content: '';
  position: absolute;
  left: 2px; top: .6em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg) scale(.8);
}

/* spam detector diagram */
.frame{
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 22px;
}
.frame-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.frame-label{ font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.frame-note{ font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.flow{ display: grid; gap: 10px; counter-reset: none; }
.flow li{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.flow-step{
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 26px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 12px;
}
.flow-result{ border-color: var(--line-strong) !important; flex-wrap: wrap; }
.pill{
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
}
.pill-safe{ background: var(--safe-soft); color: var(--safe); }
.pill-spam{ background: var(--spam-soft); color: var(--spam); }

/* ---------- skills ---------- */

.skills-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skill-card{
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.skill-icon{
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.skill-icon svg{
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skill-card h3{ font-size: 20px; margin-bottom: 16px; }

/* ---------- experience ---------- */

.timeline{ position: relative; display: grid; gap: 40px; max-width: 880px; }
.timeline::before{
  content: '';
  position: absolute;
  top: 6px; bottom: 6px;
  left: 160px;
  width: 1px;
  background: var(--line-strong);
}
.timeline-item{
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 40px;
}
.timeline-item::before{
  content: '';
  position: absolute;
  left: 156px; top: 9px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
}
.timeline-when{ padding-top: 2px; }
.timeline-body h3{ font-size: 21px; }
.timeline-sub{ margin-top: 2px; font-size: 14.5px; color: var(--muted-2); }
.timeline-body ul{ margin-top: 14px; display: grid; gap: 10px; }
.timeline-body ul li{ position: relative; padding-left: 20px; color: var(--muted); font-size: 15.5px; }
.timeline-body ul li::before{
  content: '';
  position: absolute;
  left: 2px; top: .72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.timeline-body strong{ color: var(--ink); font-weight: 600; }

/* ---------- contact ---------- */

.contact-panel{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px;
  background: var(--dark);
  color: #fff;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}
.contact-panel::before{
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(79,120,255,.35), transparent 70%);
  pointer-events: none;
}
.contact-copy, .contact-actions{ position: relative; }
.contact-copy h2{ font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.contact-copy p:not(.eyebrow){ margin-top: 16px; color: rgba(255,255,255,.72); max-width: 46ch; }
.contact-actions{ display: grid; gap: 12px; min-width: 0; }
.contact-row{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.contact-row:hover{ background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.3); color: #fff; transform: translateY(-1px); }
.contact-icon{
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
}
.contact-icon svg{
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-text{ display: flex; flex-direction: column; min-width: 0; }
.contact-label{ font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.contact-value{ overflow-wrap: anywhere; }
.contact-actions .btn-row{ margin-top: 8px; }
.copy-status{ min-height: 1.5em; font-size: 14px; color: #8fe0b8; }

/* ---------- footer ---------- */

.site-footer{ padding: 56px 0 0; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner{
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 32px 48px;
  align-items: start;
}
.footer-brand p{ margin-top: 10px; font-size: 14.5px; color: var(--muted-2); }
.footer-links{ display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; justify-content: start; }
.footer-links a, .footer-social a{ color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover, .footer-social a:hover{ color: var(--accent); text-decoration: underline; }
.footer-social{ display: grid; gap: 8px; }
.footer-base{ margin-top: 40px; padding-block: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted-2); }

/* ---------- refinement ---------- */

:root{
  --shadow-lg: 0 2px 4px rgba(18,21,31,.04), 0 16px 40px rgba(18,21,31,.09);
}

body{ font-feature-settings: 'ss01', 'cv11'; text-rendering: optimizeLegibility; }

/* Keep long project labels readable on narrow screens. */
.project-category, .browser-url{ overflow-wrap: anywhere; }
h1, h2, h3, h4{ text-wrap: balance; }
p, li{ text-wrap: pretty; }

/* header gains a hairline shadow once the page scrolls */
.site-header{ transition: box-shadow .3s var(--ease), background .3s; }
.site-header.is-scrolled{ box-shadow: 0 6px 24px rgba(18,21,31,.06); background: rgba(245,246,248,.94); }

/* hero: faint blueprint grid echoes the profile.json card */
.hero{ position: relative; isolation: isolate; }
.hero::before{
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(18,21,31,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18,21,31,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 20%, transparent 75%);
}
.status-dot{ animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse{ 50%{ box-shadow: 0 0 0 7px rgba(15,138,95,0); } }
.hero-title-accent{ white-space: nowrap; }
.spec-card{ transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.spec-card:hover{ transform: translateY(-4px); box-shadow: 0 32px 60px rgba(15,18,32,.26); }

/* section heads: numbered eyebrow with a hairline rule */
.eyebrow::after{ content: ''; flex: 0 0 40px; height: 1px; background: var(--line-strong); }
.eyebrow-light::after{ background: rgba(255,255,255,.25); }
.section-head h2{ max-width: 20ch; }
.section-intro{ max-width: 56ch; }

/* buttons: arrow icons nudge on hover */
.btn .icon{ transition: transform .25s var(--ease); }
.btn:hover .icon{ transform: translate(2px, 2px); }
.btn-primary{ box-shadow: 0 1px 2px rgba(38,80,217,.3), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-secondary:hover{ background: var(--surface); box-shadow: 0 6px 16px rgba(18,21,31,.08); }

/* cards: consistent lift on hover */
.project, .skill-card, .about-points li{
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.project:hover, .skill-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.about-points li:hover{ border-color: var(--line-strong); transform: translateY(-2px); }
.project-media .browser, .project-media .phone{ transition: transform .6s var(--ease); }
.project:hover .browser{ transform: translateY(-3px); }
.project:hover .phone{ transform: translateY(-6px); }
.skill-card:hover .skill-icon{ background: var(--accent); color: #fff; }
.skill-icon{ transition: background .3s, color .3s; }

.tag{ transition: border-color .2s, color .2s, background .2s; }
.tags .tag:hover{ border-color: var(--accent); color: var(--accent-ink); }

/* timeline: dot fills for the current role */
.timeline-item:first-child::before{ background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* contact + footer */
.contact-panel{ box-shadow: 0 30px 60px rgba(15,18,32,.18); }
.contact-row .contact-icon{ transition: background .2s; }
.contact-row:hover .contact-icon{ background: rgba(255,255,255,.18); }

/* staggered reveal inside grids */
.js .skills-grid .reveal:nth-child(2){ transition-delay: .08s; }
.js .skills-grid .reveal:nth-child(3){ transition-delay: .16s; }
.js .skills-grid .reveal:nth-child(4){ transition-delay: .24s; }
.js .timeline .reveal:nth-child(n+2){ transition-delay: .06s; }

@media (min-width: 761px) and (max-width: 960px){
  .project-media{ max-width: 620px; }
  .skills-grid{ gap: 18px; }
}
@media (max-width: 760px){
  .hero-title-divider{ display: none; }
  .hero-title > span{ display: block; }
  .hero-title-accent{ white-space: normal; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px){
  .hero-grid{ grid-template-columns: 1fr; gap: 40px; }
  .spec-card{ max-width: 520px; }
  .about-grid{ grid-template-columns: 1fr; gap: 36px; }
  .about-photo{ max-width: 320px; }
  .project{ grid-template-columns: 1fr; gap: 32px; padding: 24px; }
  .project-reverse .project-media{ order: 0; }
  .contact-panel{ grid-template-columns: 1fr; gap: 36px; padding: 40px 28px; }
  .footer-inner{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}

@media (max-width: 760px){
  .nav-toggle{ display: inline-flex; }
  .hud-level{ display: none; }
  .site-nav{
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(18,21,31,.08);
  }
  .js .site-nav{ display: none; }
  .js .site-nav.is-open{ display: flex; }
  .nav-list{ flex-direction: column; gap: 0; }
  .nav-list a{ display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-cta{ width: 100%; }

  .hero{ padding: 48px 0 56px; }
  .hero-lead{ font-size: 17px; }
  .section{ padding: 64px 0; }
  .section-head{ margin-bottom: 36px; }
  .skills-grid{ grid-template-columns: 1fr; }
  .about-points{ grid-template-columns: 1fr; }
  .project-title{ font-size: 24px; }
  .project-media{ padding-bottom: 20px; }
  .phone{ right: 8px; width: 29%; min-width: 82px; }
  .project-body .btn-row{ margin-top: 24px; }
  .contact-panel{ border-radius: 16px; }
  .contact-row{ padding: 14px; }

  .timeline::before{ left: 4px; }
  .timeline-item{ grid-template-columns: 1fr; gap: 10px; padding-left: 28px; }
  .timeline-item::before{ left: 0; top: 7px; }
  .btn-row .btn{ flex: 1 1 auto; }
}

@media (max-width: 480px){
  .container{ padding: 0 18px; }
  .brand-name{ font-size: 15px; }
  .project{ padding: 18px; }
  .frame{ padding: 16px; }
  .footer-inner{ grid-template-columns: 1fr; }
  .spec-card-code{ font-size: 12.5px; padding: 16px; }
}

/* ---------- phone layout polish ---------- */
@media (max-width: 760px){
  .header-inner{ padding-inline: 18px; }
  .site-header{ height: 62px; }
  :root{ --header-h: 62px; }
  .brand{ min-width: 0; }
  .brand-name{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero{ padding-top: 40px; }
  .hero-title{ font-size: clamp(34px, 10vw, 46px); }
  .status{ font-size: 12px; margin-bottom: 18px; }
  .hero-lead{ font-size: 16px; line-height: 1.6; }
  .btn-row{ flex-direction: column; gap: 10px; }
  .btn-row .btn{ width: 100%; }
  .spec-card{ width: 100%; }
  .spec-card-code{ overflow-x: auto; }
  .section{ padding: 56px 0; }
  .section-head h2{ font-size: 30px; }
  .section-intro{ font-size: 16px; }
  .project{ gap: 24px; border-radius: 14px; }
  .project-media{ margin-inline: -2px; }
  .project-body{ min-width: 0; }
  .project-desc{ font-size: 15px; }
  .tags{ gap: 6px; }
  .tag{ font-size: 11px; }
  .contact-panel{ padding: 28px 20px; gap: 28px; }
  .contact-panel h2{ font-size: 30px; }
  .contact-row{ min-height: 58px; gap: 10px; }
  .contact-row span:nth-child(2){ overflow-wrap: anywhere; }
  .footer{ padding-top: 44px; }
}

@media (max-width: 360px){
  .container, .header-inner{ padding-inline: 14px; }
  .brand-name{ font-size: 14px; }
  .hero-title{ font-size: 32px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation: none !important; transition: none !important; }
  .js .reveal{ opacity: 1; transform: none; }
}

/* =====================================================
   GAME LAYER — HUD, levels, quests, inventory, toasts
   ===================================================== */

:root{
  --hud: var(--mono);
  --corner: 12px;
}

/* ---- HUD: progress bar + level chip ---- */
.hud-bar{
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: transparent;
  pointer-events: none;
}
.hud-fill{
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  box-shadow: 0 0 10px rgba(38,80,217,.45);
  /* segmented like an XP bar */
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 14px);
  mask-image: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 14px);
}
.hud-level{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--hud);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hud-lvl{
  padding: 2px 9px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}
.hud-lvl b{ font-weight: 500; }
.hud-name{ transition: opacity .25s; }
.hud-level.is-changing .hud-name{ opacity: 0; }
.hud-level.pop{ animation: pop .5s var(--ease); }
@keyframes pop{ 40%{ transform: scale(1.07); } }

@media (min-width: 761px) and (max-width: 1040px){ .hud-level{ display: none; } }
.site-nav{ margin-left: 0; }

/* ---- level labels on section eyebrows ---- */
.eyebrow span::before{ content: 'LVL '; color: var(--muted-2); }
.eyebrow-light span::before{ color: rgba(255,255,255,.5); }
.section-head h2{ font-weight: 600; }

/* ---- HUD corner brackets: signature detail ---- */
.skill-card, .project, .spec-card, .frame{ position: relative; }
.skill-card::before, .skill-card::after,
.project::before, .project::after{
  content: '';
  position: absolute;
  width: var(--corner); height: var(--corner);
  border: 2px solid var(--accent);
  opacity: .0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.skill-card::before, .project::before{ top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: inherit; transform: translate(6px,6px); }
.skill-card::after, .project::after{ bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: inherit; transform: translate(-6px,-6px); }
.skill-card:hover::before, .skill-card:hover::after,
.project:hover::before, .project:hover::after,
.skill-card:focus-within::before, .skill-card:focus-within::after,
.project:focus-within::before, .project:focus-within::after{ opacity: 1; transform: none; }
.spec-card::before{
  content: 'PLAYER 1';
  position: absolute;
  top: 12px; right: 14px;
  font-family: var(--hud);
  font-size: 11px;
  letter-spacing: .14em;
  color: #6f7aa3;
}

/* ---- quests: numbered projects ---- */
.projects-count, #projects{ counter-reset: quest; }
.project{ counter-increment: quest; }
.project-meta::before{
  content: 'QUEST ' counter(quest, decimal-leading-zero);
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--hud);
  font-size: 11.5px;
  letter-spacing: .1em;
}
.group-title::before{ content: '▸ '; color: var(--accent); }

/* ---- inventory: skill slots ---- */
.skills-grid{ counter-reset: slot; }
.skill-card{ counter-increment: slot; }
.skill-card::before{ z-index: 1; }
.skill-card h3::after{
  content: 'SLOT ' counter(slot, decimal-leading-zero);
  display: block;
  margin-top: 4px;
  font-family: var(--hud);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--muted-2);
}
.skill-card .tag{ border-radius: 8px; background: var(--bg); }
.skill-card .tags .tag:hover{ transform: translateY(-2px); }
.tags .tag{ transition: transform .2s var(--ease), border-color .2s, color .2s; }

/* ---- timeline: checkpoint style ---- */
.timeline-item::before{ border-radius: 2px; transform: rotate(45deg); }
.timeline-when .tag{ border-radius: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }

/* ---- achievement toast ---- */
.toast{
  position: fixed;
  left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px 12px 12px;
  background: var(--dark);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,18,32,.35);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .5s var(--ease), opacity .4s;
}
.toast.show{ transform: translate(-50%, 0); opacity: 1; }
.toast-icon{
  flex: none;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  font-size: 18px;
}
.toast-text{ display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.toast-title{ font-family: var(--hud); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8fb0ff; }
.toast-msg{ font-size: 15px; }

/* ---- hero polish ---- */
.hero-title{ letter-spacing: -0.04em; }
.hero .btn-primary::after{
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(38,80,217,.35);
  animation: ping 2.8s ease-out infinite;
  pointer-events: none;
}
.hero .btn-primary{ position: relative; }
@keyframes ping{ 0%{ box-shadow: 0 0 0 0 rgba(38,80,217,.35); } 70%,100%{ box-shadow: 0 0 0 12px rgba(38,80,217,0); } }
.spec-card{ will-change: transform; transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }
.spec-card:hover{ transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(-4px); }

/* ---- mobile: a proper game-HUD feel ---- */
@media (max-width: 760px){
  :root{ --header-h: 60px; }
  .brand-mark{ width: 36px; height: 36px; }
  .hud-level{ margin-right: 0; font-size: 11px; padding: 4px 10px 4px 4px; }
  .hud-name{ max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }
  .header-inner{ gap: 10px; }
  .brand-name{ display: none; }
  .hud-bar{ height: 4px; }

  .hero{ padding: 40px 0 48px; }
  .hero-title{ font-size: clamp(34px, 10.5vw, 46px); }
  .hero-lead{ font-size: 16.5px; line-height: 1.6; }
  .hero .btn-row{ flex-direction: column; }
  .hero .btn-row .btn{ width: 100%; }
  .spec-card{ max-width: none; }
  .spec-card:hover{ transform: none; }

  .section{ padding: 56px 0; }
  .section-head h2{ max-width: none; }
  .eyebrow::after{ flex: 0 0 28px; }

  .project{ padding: 16px; border-radius: 16px; gap: 24px; }
  .project-media{ padding-bottom: 0; }
  .phone{ position: relative; right: auto; bottom: auto; margin: -56px 12px 0 auto; width: 34%; max-width: 150px; }
  .project:hover{ transform: none; }
  .project-title{ font-size: 24px; }
  .project-points li{ font-size: 15px; }
  .frame-head{ flex-direction: column; align-items: flex-start; }
  .flow li{ font-size: 14.5px; padding: 11px 12px; }

  .skill-card{ padding: 22px; }
  .timeline{ gap: 32px; }
  .contact-panel{ padding: 32px 20px; border-radius: 18px; }
  .contact-row{ padding: 14px; }
  .contact-actions .btn-row{ flex-direction: column; }
  .contact-actions .btn-row .btn{ width: 100%; }

  .toast{ left: 16px; right: 16px; max-width: none; transform: translateY(24px); }
  .toast.show{ transform: none; }

  /* generous tap targets */
  .text-link{ display: inline-block; padding: 10px 0; }
  .footer-links a, .footer-social a{ display: inline-block; padding: 6px 0; }
}

@media (hover: none){
  .skill-card::before, .skill-card::after,
  .project::before, .project::after{ opacity: .9; transform: none; }
  .project:hover .browser, .project:hover .phone{ transform: none; }
}

@media (prefers-reduced-motion: reduce){
  .hero .btn-primary::after, .status-dot{ animation: none !important; }
  .toast{ transition: none !important; }
}

/* =====================================================
   ARCADE PASS — pixel type, hard shadows, CRT, press-start
   ===================================================== */

:root{
  --pixel: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --hud: var(--pixel);
  --px: 4px;                         /* hard-shadow unit */
  --hard: 0 0 0 2px var(--ink);
}

/* ---- pixel labels (small, tracked, never body copy) ---- */
.eyebrow, .group-title, .frame-label, .contact-label, .about-point-label,
.timeline-when .tag, .project-category, .frame-note, .spec-card-file, .status{
  font-family: var(--pixel);
  font-weight: 400;
}
.eyebrow{ font-size: 10px; letter-spacing: .04em; line-height: 1.6; }
.group-title{ font-size: 11px; letter-spacing: .04em; line-height: 1.6; }
.frame-label, .about-point-label, .contact-label{ font-size: 9px; letter-spacing: .04em; line-height: 1.7; }
.project-category{ font-size: 9px; line-height: 1.8; }
.frame-note, .spec-card-file{ font-size: 9px; }
.timeline-when .tag{ font-size: 9px; letter-spacing: .04em; padding: 7px 10px; }
.status{ font-size: 10px; padding: 9px 14px; border-radius: 4px; border: 2px solid var(--ink); background: var(--surface); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
.status-dot{ border-radius: 0; width: 8px; height: 8px; box-shadow: none; animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink{ 50%{ opacity: 0; } }

/* ---- HUD chip becomes an arcade readout ---- */
.hud-level{
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 9px;
  letter-spacing: .02em;
  padding: 4px 10px 4px 4px;
  color: var(--ink);
  gap: 10px;
}
.hud-lvl{ border-radius: 2px; background: var(--ink); padding: 5px 8px; }
.hud-lvl b{ font-weight: 400; }
.hud-xp{ color: var(--accent); }
.hud-xp b{ font-weight: 400; }
.hud-fill{
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
  mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
  box-shadow: none;
}
.hud-bar{ height: 6px; background: rgba(18,21,31,.06); }
.brand-mark{ border-radius: 4px; font-family: var(--pixel); font-size: 11px; box-shadow: 3px 3px 0 var(--accent); }

/* ---- hero: dot-matrix field, PRESS START, CRT code card ---- */
.hero::before{
  background-image: radial-gradient(circle, rgba(18,21,31,.16) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
}
.hero-title{ letter-spacing: -0.045em; }
.hero-title-accent{ position: relative; }
.hero-title-accent::after{
  content: '';
  display: inline-block;
  width: .42em; height: .09em;
  margin-left: .12em;
  background: var(--accent);
  animation: blink 1s steps(2, jump-none) infinite;
}
.press-start{
  margin-top: 28px;
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink);
  animation: blink 1.2s steps(2, jump-none) infinite;
}
.press-start + .btn-row{ margin-top: 14px; }

.spec-card{
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--accent);
}
.spec-card:hover{ box-shadow: 12px 12px 0 var(--accent); }
.spec-card-bar{ padding: 10px 14px; }
.spec-card::after{                      /* CRT scanlines */
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
  border-radius: inherit;
}
.spec-card::before{ font-size: 8px; top: 15px; color: #8f98b8; letter-spacing: .08em; z-index: 1; }
.dots i{ border-radius: 0; }

/* ---- buttons: chunky, press-down ---- */
.btn{
  border-radius: 6px;
  border: 2px solid var(--ink);
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .08s linear, box-shadow .08s linear, background .15s, color .15s;
}
.btn-primary{ background: var(--accent); border-color: var(--ink); color: #fff; box-shadow: 0 var(--px) 0 var(--ink); }
.btn-primary:hover{ background: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn-primary:active{ transform: translateY(var(--px)); box-shadow: 0 0 0 var(--ink); }
.btn-secondary{ background: var(--surface); box-shadow: 0 var(--px) 0 var(--ink); }
.btn-secondary:hover{ background: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn-secondary:active{ transform: translateY(var(--px)); box-shadow: 0 0 0 var(--ink); }
.btn-sm{ box-shadow: 0 3px 0 var(--ink); }
.btn-sm:hover{ box-shadow: 0 5px 0 var(--ink); }
.btn-sm:active{ transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn-light{ border-color: #fff; box-shadow: 0 var(--px) 0 var(--accent); }
.btn-light:hover{ transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent); background: #fff; }
.btn-light:active{ transform: translateY(var(--px)); box-shadow: 0 0 0 var(--accent); }
.btn-ghost-light{ border-width: 2px; border-color: rgba(255,255,255,.55); }
.hero .btn-primary::after{ display: none; }
.btn:focus-visible{ outline-offset: 5px; border-radius: 6px; }

/* ---- cards: pixel frame + hard offset shadow ---- */
.project, .skill-card{
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--px) var(--px) 0 var(--line-strong);
}
.project:hover, .skill-card:hover{
  border-color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--accent);
}
.about-points li{ border: 2px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--line-strong); }
.about-points li:hover{ transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--accent); border-color: var(--ink); }
.about-photo{ border: 2px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--accent); }
.browser{ border: 2px solid var(--ink); border-radius: 6px; box-shadow: 5px 5px 0 var(--ink); }
.browser-bar{ background: var(--bg-alt); }
.browser-url{ border-radius: 3px; }
.phone{ border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
.frame{ border: 2px dashed var(--ink); border-radius: 8px; background: var(--surface); }
.flow li{ border: 2px solid var(--ink); border-radius: 4px; }
.flow-step{ font-family: var(--pixel); font-size: 9px; border-radius: 2px; background: var(--ink); color: #fff; width: 34px; height: 28px; }
.pill{ border-radius: 3px; font-family: var(--pixel); font-size: 9px; padding: 4px 8px; }
.skill-icon{ border-radius: 6px; border: 2px solid var(--ink); background: var(--accent-soft); box-shadow: 3px 3px 0 var(--ink); }
.skill-card:hover .skill-icon{ background: var(--accent); color: #fff; }

/* corner brackets give way to the hard shadow; keep them on touch */
.skill-card::before, .skill-card::after, .project::before, .project::after{ display: none; }

/* ---- quest + slot badges ---- */
.project-meta::before{
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: .04em;
  padding: 6px 9px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--ink);
}
.skill-card h3::after{ font-family: var(--pixel); font-size: 8px; letter-spacing: .06em; margin-top: 8px; color: var(--muted-2); }

/* ---- tags as pixel items ---- */
.tag{ border-radius: 3px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 12px; padding: 3px 9px; }
.section-alt .tag{ background: var(--surface); }
.tag-accent{ background: var(--accent) !important; color: #fff; border-color: var(--ink); }
.tags .tag:hover{ transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); border-color: var(--ink); }

/* ---- headings: hard underline accent ---- */
.section-head h2{ position: relative; padding-bottom: 18px; }
.section-head h2::after{
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 64px; height: 6px;
  background:
    linear-gradient(90deg, var(--accent) 0 16px, transparent 16px 20px, var(--accent) 20px 36px, transparent 36px 40px, var(--ink) 40px 56px, transparent 56px);
}
.eyebrow::after{ height: 2px; background: var(--ink); flex-basis: 32px; }
.eyebrow-light::after{ background: rgba(255,255,255,.5); }

/* ---- timeline checkpoints ---- */
.timeline::before{ width: 2px; background: repeating-linear-gradient(to bottom, var(--ink) 0 6px, transparent 6px 12px); left: 159px; }
.timeline-item::before{ border-radius: 0; width: 13px; height: 13px; left: 154px; top: 8px; transform: none; background: var(--bg-alt); border: 2px solid var(--ink); }
.timeline-item:first-child::before{ background: var(--accent); box-shadow: 3px 3px 0 var(--ink); }

/* ---- contact: arcade cabinet ---- */
.contact-panel{
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 10px 10px 0 var(--accent);
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
}
.contact-panel::before{ display: none; }
.contact-row{ border: 2px solid rgba(255,255,255,.35); border-radius: 6px; background: rgba(255,255,255,.04); }
.contact-row:hover{ border-color: #fff; transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--accent); background: rgba(255,255,255,.08); }
.contact-icon{ border-radius: 4px; }
.contact-copy h2{ letter-spacing: -0.04em; }
.copy-status{ font-family: var(--pixel); font-size: 9px; line-height: 1.8; }

/* ---- toast: 8-bit achievement ---- */
.toast{ border: 2px solid var(--ink); border-radius: 6px; background: var(--ink); box-shadow: 5px 5px 0 var(--accent); }
.toast-icon{ border-radius: 3px; background: var(--accent); border: 2px solid #fff; font-family: var(--pixel); font-size: 14px; }
.toast-title{ font-size: 8px; letter-spacing: .06em; line-height: 1.6; color: #ffc369; }
.toast-msg{ margin-top: 4px; }

/* ---- footer ---- */
.site-footer{ border-top: 2px solid var(--ink); }
.footer-base{ font-family: var(--pixel); font-size: 9px; line-height: 1.8; }
.site-header{ border-bottom: 2px solid var(--ink); }
.nav-list a{ border-bottom-width: 3px; }
.nav-list a.is-active{ border-bottom-color: var(--accent); }

/* ---- mobile ---- */
@media (max-width: 760px){
  .brand-mark{ width: 38px; height: 38px; box-shadow: 2px 2px 0 var(--accent); }
  .hud-level{ font-size: 8px; padding: 3px 8px 3px 3px; gap: 8px; box-shadow: 2px 2px 0 var(--ink); }
  .hud-lvl{ padding: 5px 6px; }
  .hud-name{ display: none; }
  .nav-toggle{ border: 2px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 0 var(--ink); }
  .nav-toggle:active{ transform: translate(2px,2px); box-shadow: none; }
  .site-nav{ border-bottom: 2px solid var(--ink); }
  .eyebrow{ font-size: 9px; }
  .press-start{ margin-top: 22px; font-size: 10px; }
  .hero .btn-row{ gap: 14px; }
  .spec-card{ box-shadow: 5px 5px 0 var(--accent); }
  .about-photo{ box-shadow: 5px 5px 0 var(--accent); }
  .project, .skill-card{ box-shadow: 3px 3px 0 var(--line-strong); }
  .project:hover, .skill-card:hover{ transform: none; box-shadow: 3px 3px 0 var(--line-strong); }
  .contact-panel{ box-shadow: 6px 6px 0 var(--accent); }
  .timeline::before{ left: 5px; }
  .timeline-item::before{ left: 0; top: 6px; }
  .toast{ border-radius: 6px; box-shadow: 4px 4px 0 var(--accent); }
  .section-head h2::after{ width: 56px; }
}
@media (min-width: 761px) and (max-width: 1200px){ .hud-xp{ display: none; } }

@media (prefers-reduced-motion: reduce){
  .press-start, .status-dot, .hero-title-accent::after{ animation: none !important; }
  .btn, .project, .skill-card{ transition: none !important; }
}

/* Keep the compact hero calm and readable on small screens. */
@media (max-width: 760px){
  .hero::before{ opacity: .55; }
  .hero-deco{ display: block; opacity: .42; overflow: hidden; }
  .hero-deco i{ width: 11px; height: 11px; animation-duration: 4.5s; }
  .hero-deco i:nth-child(1){ top: 10%; left: 3%; }
  .hero-deco i:nth-child(2){ top: 18%; left: auto; right: 8%; }
  .hero-deco i:nth-child(3){ bottom: 12%; left: 4%; }
  .hero-deco i:nth-child(4){ top: 42%; right: 3%; }
  .hero-deco i:nth-child(5){ bottom: 8%; right: 12%; }
  .hero-deco i:nth-child(6){ bottom: 32%; left: 8%; }
  .hero-title-accent::after{ display: none; }
  .hero-title-accent{
    background: linear-gradient(transparent 64%, var(--yellow) 64% 92%, transparent 92%);
  }
  .hud-bar{ background: rgba(27,19,64,.12); }
  .hud-fill{ background: var(--violet); }
}

/* =====================================================
   COLOR & PLAY PASS — warm paper, candy accents, stickers
   ===================================================== */

:root{
  --bg: #fffaf0;
  --bg-alt: #f1ecff;
  --surface: #ffffff;
  --ink: #1b1340;
  --muted: #4a4470;
  --muted-2: #6f6a92;
  --line: #e8e0f5;
  --line-strong: #cfc6ea;

  --violet: #5b3df5;
  --pink: #ff4f8b;
  --yellow: #ffc233;
  --mint: #17c3a0;
  --sky: #2ea8ff;

  --accent: var(--violet);
  --accent-ink: #3f24c9;
  --accent-soft: #ebe6ff;
  --safe: #0c9c7e;
  --safe-soft: #d6f7ef;
  --spam: #e0245e;
  --spam-soft: #ffe0ea;
  --dark: #1b1340;
  --dark-2: #2a1f66;
  --c: var(--violet);
  --c-ink: #fff;
}

::selection{ background: var(--pink); color: #fff; }
body{ background: var(--bg); }
.site-header{ background: rgba(255,250,240,.88); }
.site-header.is-scrolled{ background: rgba(255,250,240,.96); box-shadow: 0 4px 0 rgba(27,19,64,.06); }
.site-nav{ background: var(--bg); }

/* section rhythm: paper → lavender → paper → butter → paper */
#projects.section-alt{ background: var(--bg-alt); }
#experience.section-alt{ background: #fff0c9; }
.section-alt{ border-block: 2px solid var(--ink); }

/* ---- hero ---- */
.hero{ overflow: hidden; }
.hero::before{ background-image: radial-gradient(circle, rgba(91,61,245,.28) 1.4px, transparent 1.8px); }
.hero-title-accent{
  color: var(--ink);
  background: linear-gradient(transparent 60%, var(--yellow) 60% 92%, transparent 92%);
  padding: 0 .08em;
  margin: 0 -.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-title-accent::after{ background: var(--pink); }
.hero-title-divider{ color: var(--pink); }
.status{ background: #fff; }
.status-dot{ background: var(--mint); }
.press-start{ color: var(--pink); }

.hero-deco{ position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-deco i{ position: absolute; width: 14px; height: 14px; background: var(--c1, var(--pink)); border: 2px solid var(--ink); animation: bob 3.2s steps(4, jump-none) infinite; }
.hero-deco i:nth-child(1){ top: 12%; left: 6%; --c1: var(--yellow); }
.hero-deco i:nth-child(2){ top: 22%; left: 47%; --c1: var(--pink); width: 10px; height: 10px; animation-delay: -1s; }
.hero-deco i:nth-child(3){ bottom: 14%; left: 38%; --c1: var(--mint); animation-delay: -2s; }
.hero-deco i:nth-child(4){ top: 10%; right: 5%; --c1: var(--sky); animation-delay: -.5s; }
.hero-deco i:nth-child(5){ bottom: 10%; right: 8%; --c1: var(--yellow); width: 10px; height: 10px; animation-delay: -1.5s; }
.hero-deco i:nth-child(6){ bottom: 30%; left: 3%; --c1: var(--violet); width: 10px; height: 10px; animation-delay: -2.5s; }
@keyframes bob{ 50%{ transform: translateY(-10px) rotate(45deg); } }

.spec-card{ box-shadow: 8px 8px 0 var(--pink); background: var(--dark); }
.spec-card:hover{ box-shadow: 12px 12px 0 var(--pink); }
.spec-card-bar{ background: var(--dark-2); }
.t-k{ color: #9fb4ff; } .t-s{ color: #6ff0c9; } .t-b{ color: var(--yellow); } .t-p{ color: #a99cf0; }
.dots i:nth-child(1){ background: var(--pink); } .dots i:nth-child(2){ background: var(--yellow); } .dots i:nth-child(3){ background: var(--mint); }

/* ---- ticker ---- */
.ticker{
  overflow: hidden;
  background: var(--ink);
  border-block: 2px solid var(--ink);
  padding: 14px 0;
  transform: rotate(-1deg);
  margin: 8px -12px 0;
  box-shadow: 0 6px 0 var(--pink);
}
.ticker-track{
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
}
.ticker:hover .ticker-track{ animation-play-state: paused; }
.ticker-track li{
  display: flex; align-items: center;
  padding: 0 22px;
  font-family: var(--pixel);
  font-size: 11px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.ticker-track li::after{ content: ''; width: 9px; height: 9px; margin-left: 44px; background: var(--c1, var(--yellow)); transform: rotate(45deg); }
.ticker-track li:nth-child(5n+1)::after{ --c1: var(--yellow); }
.ticker-track li:nth-child(5n+2)::after{ --c1: var(--pink); }
.ticker-track li:nth-child(5n+3)::after{ --c1: var(--mint); }
.ticker-track li:nth-child(5n+4)::after{ --c1: var(--sky); }
.ticker-track li:nth-child(5n)::after{ --c1: var(--violet); }
@keyframes ticker{ to{ transform: translateX(-50%); } }

/* ---- buttons ---- */
.btn-primary{ background: var(--violet); box-shadow: 0 4px 0 var(--ink); }
.btn-primary:hover{ background: #6b4fff; }
.btn-secondary{ background: var(--yellow); color: var(--ink); }
.btn-secondary:hover{ background: #ffd25e; }
.btn-light{ background: var(--yellow); color: var(--ink); border-color: var(--yellow); box-shadow: 0 4px 0 var(--pink); }
.btn-light:hover{ background: #ffd25e; box-shadow: 0 6px 0 var(--pink); }
.btn-light:active{ box-shadow: 0 0 0 var(--pink); }
.project .btn-secondary, .timeline .btn-secondary{ background: #fff; }

/* ---- headings, eyebrows ---- */
.eyebrow span{ color: var(--pink); }
.eyebrow span::before{ color: var(--muted-2); }
.section-head h2::after{
  background: linear-gradient(90deg, var(--violet) 0 16px, transparent 16px 20px, var(--pink) 20px 36px, transparent 36px 40px, var(--yellow) 40px 56px, transparent 56px);
}
.group-title::before{ color: var(--pink); }
.group-title{ border-bottom: 2px dashed var(--ink); }

/* ---- per-card color identity ---- */
.project, .skill-card{ box-shadow: 4px 4px 0 var(--c); }
.project:hover, .skill-card:hover{ box-shadow: 9px 9px 0 var(--c); transform: translate(-3px,-3px) rotate(-.3deg); }
.project-featured{ --c: var(--violet); --c-ink: #fff; }
.project-reverse{ --c: var(--pink); --c-ink: #fff; }
.project:not(.project-featured):not(.project-reverse){ --c: var(--mint); --c-ink: var(--ink); }
.skills-grid .skill-card:nth-child(1){ --c: var(--violet); --c-ink: #fff; }
.skills-grid .skill-card:nth-child(2){ --c: var(--pink); --c-ink: #fff; }
.skills-grid .skill-card:nth-child(3){ --c: var(--yellow); --c-ink: var(--ink); }
.skills-grid .skill-card:nth-child(4){ --c: var(--mint); --c-ink: var(--ink); }
.project-meta::before{ background: var(--c); color: var(--c-ink); }
.skill-icon{ background: var(--c); color: var(--c-ink); }
.skill-card:hover .skill-icon{ background: var(--c); color: var(--c-ink); transform: rotate(-8deg) scale(1.06); }
.skill-icon{ transition: transform .3s var(--ease); }
.project-points li::before{ background: var(--c); border: 1.5px solid var(--ink); }
.about-points li:nth-child(1){ --c: var(--violet); } .about-points li:nth-child(2){ --c: var(--pink); }
.about-points li:nth-child(3){ --c: var(--yellow); } .about-points li:nth-child(4){ --c: var(--mint); }
.about-points li{ box-shadow: 3px 3px 0 var(--c, var(--line-strong)); }
.about-points li:hover{ box-shadow: 6px 6px 0 var(--c); }
.about-point-label{ color: var(--ink); background: var(--c); padding: 4px 8px; align-self: flex-start; border-radius: 2px; }
.about-points li:nth-child(1) .about-point-label, .about-points li:nth-child(2) .about-point-label{ color: #fff; }
.about-photo{ box-shadow: 8px 8px 0 var(--yellow); background: var(--accent-soft); }

/* ---- sticker tags ---- */
.tags .tag:nth-child(5n+1){ background: #ebe6ff; }
.tags .tag:nth-child(5n+2){ background: #ffe0ea; }
.tags .tag:nth-child(5n+3){ background: #fff0c2; }
.tags .tag:nth-child(5n+4){ background: #d6f7ef; }
.tags .tag:nth-child(5n){ background: #d9eeff; }
.section-alt .tags .tag:nth-child(5n+1){ background: #ebe6ff; }
.tag{ color: var(--ink); }
.tags .tag:hover{ transform: translate(-1px,-2px) rotate(-3deg); box-shadow: 2px 2px 0 var(--ink); }
.tag-accent{ background: var(--pink) !important; color: #fff; }
.timeline-when .tag{ background: #fff; }
.timeline-when .tag-accent{ background: var(--pink) !important; }

/* ---- diagram / mockups ---- */
.frame{ background: #fff; }
.flow-step{ background: var(--c); color: var(--c-ink); }
.flow li:nth-child(1){ --c: var(--violet); --c-ink: #fff; } .flow li:nth-child(2){ --c: var(--sky); --c-ink: var(--ink); }
.flow li:nth-child(3){ --c: var(--yellow); --c-ink: var(--ink); } .flow li:nth-child(4){ --c: var(--mint); --c-ink: var(--ink); }
.flow li:nth-child(5){ --c: var(--pink); --c-ink: #fff; }
.pill-safe{ background: var(--mint); color: var(--ink); } .pill-spam{ background: var(--pink); color: #fff; }
.browser{ box-shadow: 5px 5px 0 var(--c); }
.phone{ box-shadow: 4px 4px 0 var(--c); border-color: var(--ink); }
.browser-bar .dots i:nth-child(1){ background: var(--pink) !important; }
.browser-bar .dots i:nth-child(2){ background: var(--yellow) !important; }
.browser-bar .dots i:nth-child(3){ background: var(--mint) !important; }

/* ---- timeline ---- */
.timeline-item:first-child::before{ background: var(--pink); box-shadow: 3px 3px 0 var(--ink); }
.timeline-item:nth-child(2)::before{ background: var(--yellow); }
.timeline-item:nth-child(3)::before{ background: var(--mint); }
.timeline-item:nth-child(4)::before{ background: var(--sky); }
.timeline-body ul li::before{ background: var(--pink); border-radius: 0; }
#experience .timeline-when .tag{ border-color: var(--ink); }

/* ---- HUD ---- */
.hud-fill{ background: linear-gradient(90deg, var(--violet), var(--pink) 55%, var(--yellow)); background-size: 100vw 100%; }
.hud-lvl{ background: var(--violet); }
.hud-xp{ color: var(--pink); }
.hud-level{ box-shadow: 3px 3px 0 var(--yellow); }
.brand-mark{ background: var(--violet); box-shadow: 3px 3px 0 var(--yellow); }
.nav-list a.is-active{ border-bottom-color: var(--pink); }
.nav-list a:hover{ border-bottom-color: var(--yellow); }

/* ---- contact ---- */
.contact-panel{ background-color: var(--dark); box-shadow: 10px 10px 0 var(--pink); }
.contact-row:hover{ box-shadow: 4px 4px 0 var(--yellow); }
.contact-row:nth-of-type(1) .contact-icon{ background: var(--yellow); color: var(--ink); }
.contact-row:nth-of-type(2) .contact-icon{ background: var(--sky); color: var(--ink); }
.eyebrow-light span{ color: var(--yellow); }
.copy-status{ color: var(--mint); }

/* ---- toast ---- */
.toast{ box-shadow: 5px 5px 0 var(--pink); }
.toast-icon{ background: var(--yellow); color: var(--ink); }
.toast-title{ color: var(--yellow); }

/* ---- footer ---- */
.site-footer{ background: #fff; border-top: 2px solid var(--ink); }
.footer-links a:hover, .footer-social a:hover{ color: var(--pink); }
a{ color: var(--violet); }
a:hover{ color: var(--pink); }
.timeline-body a{ font-weight: 500; }
.skip-link{ background: var(--violet); }

@media (max-width: 760px){
  .ticker{ margin-inline: -8px; padding: 12px 0; }
  .ticker-track li{ font-size: 9px; padding: 0 16px; }
  .ticker-track li::after{ margin-left: 32px; }
  .hero-deco i:nth-child(2), .hero-deco i:nth-child(3){ display: none; }
  .project, .skill-card{ box-shadow: 4px 4px 0 var(--c); }
  .project:hover, .skill-card:hover{ box-shadow: 4px 4px 0 var(--c); transform: none; }
  .hud-level{ box-shadow: 2px 2px 0 var(--yellow); }
  .spec-card{ box-shadow: 5px 5px 0 var(--pink); }
  .contact-panel{ box-shadow: 6px 6px 0 var(--pink); }
}
@media (prefers-reduced-motion: reduce){
  .ticker-track, .hero-deco i{ animation: none !important; }
  .ticker{ transform: none; }
}

/* =====================================================
   TRANSITIONS — per-section entrances
   ===================================================== */

/* ---- scroll entrances: each section gets its own motion ---- */
.js .reveal{ transition: opacity .7s var(--ease), transform .8s var(--ease); }

.js .about-photo.reveal:not(.in-view){ transform: translateX(-36px) rotate(-4deg); }
.js .about-body.reveal:not(.in-view){ transform: translateX(36px); }

.js .group-title.reveal:not(.in-view){ transform: translateX(-24px); }
.js .project.reveal:not(.in-view){ transform: translateY(48px) scale(.96); }
.js .project.reveal:not(.in-view) .browser{ transform: translateX(-20px) rotate(-1.5deg); }
.js .project.reveal:not(.in-view) .phone{ transform: translateY(40px) rotate(4deg); }
.js .project.reveal .browser, .js .project.reveal .phone{ transition: transform .9s var(--ease) .15s; }

.js .skill-card.reveal:not(.in-view){ transform: translateY(36px) scale(.9) rotate(-1.5deg); }
.js .skills-grid .skill-card.reveal:nth-child(even):not(.in-view){ transform: translateY(36px) scale(.9) rotate(1.5deg); }
.js .skill-card.reveal:not(.in-view) .skill-icon{ transform: scale(0) rotate(-45deg); }
.js .skill-card.reveal .skill-icon{ transition: transform .6s var(--ease) .35s, background .3s; }
.js .skill-card.reveal:not(.in-view) .tag{ opacity: 0; transform: translateY(8px); }
.js .skill-card.reveal .tag{ transition: opacity .4s ease .4s, transform .4s var(--ease) .4s, box-shadow .2s, border-color .2s; }

.js .timeline-item.reveal:not(.in-view){ transform: translateX(-36px); }
.js .timeline-item.reveal:not(.in-view)::before{ transform: scale(0); }
.js .timeline-item.reveal::before{ transition: transform .5s var(--ease) .2s; }

.js .contact-panel.reveal:not(.in-view){ transform: translateY(50px) scale(.94); }
.js .contact-panel.reveal:not(.in-view) .contact-row{ opacity: 0; transform: translateX(28px); }
.js .contact-panel.reveal .contact-row{ transition: opacity .5s ease, transform .6s var(--ease), border-color .2s, box-shadow .2s, background .2s; }
.js .contact-panel.reveal .contact-row:nth-of-type(1){ transition-delay: .25s, .25s, 0s, 0s, 0s; }
.js .contact-panel.reveal .contact-row:nth-of-type(2){ transition-delay: .4s, .4s, 0s, 0s, 0s; }

/* section title: headline rises, pixel underline draws in */
.js .section-head.reveal:not(.in-view) h2::after{ transform: scaleX(0); }
.section-head h2::after{ transform-origin: left; transition: transform .7s var(--ease) .35s; }
.js .section-head.reveal:not(.in-view) .eyebrow::after{ flex-basis: 0; }
.eyebrow::after{ transition: flex-basis .6s var(--ease) .2s; }

/* hero entrance on first load */
@keyframes rise{ from{ opacity: 0; transform: translateY(24px); } }
@keyframes drop-in{ from{ opacity: 0; transform: translateY(32px) rotate(2deg) scale(.96); } }
.js .hero-copy > *{ animation: rise .8s var(--ease) both; }
.js .hero-copy > :nth-child(1){ animation-delay: .05s; }
.js .hero-copy > :nth-child(2){ animation-delay: .15s; }
.js .hero-copy > :nth-child(3){ animation-delay: .28s; }
.js .hero-copy > :nth-child(4){ animation-delay: .38s; }
.js .hero-copy > :nth-child(5){ animation-delay: .48s; }
.js .spec-card{ animation: drop-in 1s var(--ease) .3s both; }
.js .ticker{ animation: rise .9s var(--ease) .6s both; }

/* ---- mobile: lighter, quicker ---- */
@media (max-width: 760px){
  .js .about-photo.reveal:not(.in-view),
  .js .about-body.reveal:not(.in-view),
  .js .timeline-item.reveal:not(.in-view){ transform: translateY(28px); }
  .js .project.reveal:not(.in-view){ transform: translateY(32px) scale(.98); }
  .js .project.reveal:not(.in-view) .browser{ transform: translateY(16px); }
  .js .project.reveal:not(.in-view) .phone{ transform: translateY(24px) rotate(3deg); }
  .js .skill-card.reveal:not(.in-view),
  .js .skills-grid .skill-card.reveal:nth-child(even):not(.in-view){ transform: translateY(28px) scale(.96); }
  .js .contact-panel.reveal:not(.in-view) .contact-row{ transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce){
  .js .reveal, .js .reveal *, .js .hero-copy > *, .js .spec-card, .js .ticker{ animation: none !important; }
  .js .reveal:not(.in-view), .js .reveal:not(.in-view) *{ opacity: 1 !important; transform: none !important; }
}
