@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ================================================================
   AMAN DOBRIYAL — PORTFOLIO  |  style.css
   Design System: "Neon Protocol / The Command Line Editorial" (via Stitch MCP)
   ================================================================ */

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

:root {
  /* Stitch surface hierarchy — no borders, depth via background shifts */
  --bg:                    #0e0e0e;
  --bg2:                   #131313;  /* surface-container-low */
  --bg3:                   #1a1919;  /* surface-container */
  --bg4:                   #201f1f;  /* surface-container-high */
  --bg5:                   #262626;  /* surface-container-highest */
  --bg-bright:             #2c2c2c;  /* surface-bright */
  --bg-black:              #000000;  /* surface-container-lowest */

  /* Primary neon green system */
  --green:      #00ff88;
  --green-dim:  #00ed7e;
  --green-full: #00fd87;  /* primary-container */
  --green-pale: #a4ffb9;  /* primary (text on dark) */
  --green-glow: rgba(0,255,136,0.10);

  /* Tertiary accent (cyan) */
  --cyan:       #7ee6ff;
  --cyan-full:  #00dcff;

  /* Text */
  --text:       #ffffff;
  --text-dim:   #adaaaa;  /* on-surface-variant */
  --text-muted: #777575;  /* outline */

  /* Legacy border (used sparingly, Stitch rule: felt not seen) */
  --border:     rgba(164,255,185,0.15);
  --border-mid: rgba(73,72,71,0.6);   /* outline-variant */

  --mono:  'JetBrains Mono', monospace;
  --sans:  'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px;
  line-height: 1.6; overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 2px; }

/* ── NAV ──────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  width: 100%; box-sizing: border-box;
  padding: 1.1rem 4%;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,10,10,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none;
}
.nav-logo-img {
  height: 50px; width: auto;
  display: block;
  transition: opacity .2s;
}
.nav-logo:hover .nav-logo-img { opacity: .75; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: .72rem;
  color: var(--text-dim); text-decoration: none; transition: color .2s;
}
.nav-links a::before { content: './'; color: var(--green); opacity: .55; }
.nav-links a:hover  { color: var(--green); }
.nav-menu-btn {
  display: none; background: none; border: none;
  color: var(--green); font-size: 1.3rem; cursor: pointer; padding: .2rem;
}

/* ── HERO ─────────────────────────────────────────────────────── */
#hero {
  position: relative; height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8%; overflow: hidden;
  gap: clamp(1rem, 4vw, 4rem);
}
#three-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-portrait-wrap {
  position: relative;
  z-index: 1;
  width: min(33vw, 420px);
  min-width: 250px;
  aspect-ratio: 1 / 1;
  perspective: 1200px;
}

.hero-portrait-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.35);
  background: linear-gradient(160deg, rgba(10, 14, 14, 0.9), rgba(7, 10, 12, 0.95));
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(0, 255, 136, 0.16);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.hero-portrait-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.05) 24%,
    rgba(255,255,255,0.0) 55%
  );
  mix-blend-mode: screen;
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
}

.hero-portrait-glow {
  position: absolute;
  inset: auto -20% -32% -20%;
  height: 48%;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 45%, rgba(0,255,136,0.3), rgba(0,255,136,0));
  filter: blur(16px);
  pointer-events: none;
}
.hero-prompt {
  font-family: var(--mono); font-size: .8rem;
  color: var(--green); opacity: .65; margin-bottom: 1rem;
}
.hero-name {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700; color: var(--text); line-height: 1.05; margin-bottom: .6rem;
}
.hero-name .accent { color: var(--green); }
.hero-title {
  font-family: var(--mono); font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--text-dim); margin-bottom: 1.8rem; min-height: 1.5em;
}
#typed-text { color: var(--green); }
#cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--green); margin-left: 2px; vertical-align: middle;
  animation: blink .85s infinite;
}
@keyframes blink { 0%,49%{opacity:1}50%,100%{opacity:0} }
.hero-desc {
  font-size: .95rem; color: var(--text-dim);
  line-height: 1.75; max-width: 480px; margin-bottom: 2.2rem;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; padding: .7rem 1.7rem;
  background: var(--green); color: #000;
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  text-decoration: none; letter-spacing: .06em; transition: all .2s;
  clip-path: polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,8px 100%,0 calc(100% - 8px));
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost {
  display: inline-block; padding: .7rem 1.7rem;
  border: 1px solid var(--border); color: var(--green);
  font-family: var(--mono); font-size: .78rem;
  text-decoration: none; letter-spacing: .06em; transition: all .2s;
}
.btn-ghost:hover { border-color: var(--green); background: var(--green-glow); }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .65rem; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  z-index: 1; animation: fadeUp 2s 2s both;
}
.scroll-hint::after {
  content: ''; width: 1px; height: 38px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: scrollLine 1.5s ease infinite;
}
@keyframes scrollLine {
  0%  {transform:scaleY(0);transform-origin:top}
  50% {transform:scaleY(1);transform-origin:top}
  51% {transform:scaleY(1);transform-origin:bottom}
  100%{transform:scaleY(0);transform-origin:bottom}
}
@keyframes fadeUp {
  from{opacity:0;transform:translate(-50%,10px)}
  to{opacity:1;transform:translate(-50%,0)}
}

/* ── SECTION BASE ─────────────────────────────────────────────── */
section { padding: 6rem 8%; }
.section-label {
  font-family: var(--mono); font-size: .68rem;
  color: var(--green); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: .4rem; opacity: .65;
}
.section-label::before { content: '// '; }
.section-title {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700; color: var(--text); line-height: 1.15; margin-bottom: 3rem;
}
.section-title span { color: var(--green); }

/* ── ABOUT ────────────────────────────────────────────────────── */
#about {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 1rem; line-height: 1.8; }
.about-text strong { color: var(--green); font-weight: 600; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1.4rem; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--green);
}
.stat-num { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--green); }
.stat-label { font-size: .78rem; color: var(--text-dim); margin-top: .2rem; }

/* ── SKILLS ───────────────────────────────────────────────────── */
#skills { background: var(--bg); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1.25rem; }
.skill-group { background: var(--bg2); border: 1px solid var(--border); padding: 1.4rem; }
.skill-group-title {
  font-family: var(--mono); font-size: .68rem;
  color: var(--green); text-transform: uppercase; letter-spacing: .15em; margin-bottom: .9rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-tag {
  font-family: var(--mono); font-size: .72rem; padding: .28rem .65rem;
  background: var(--green-glow); color: var(--green);
  border: 1px solid rgba(0,255,136,.18); letter-spacing: .02em;
}

/* ── EXPERIENCE ───────────────────────────────────────────────── */
#experience {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, var(--green), transparent);
}
.timeline-item {
  position: relative; padding-bottom: 3rem;
}
.timeline-item::before {
  content: ''; position: absolute;
  left: -2.45rem; top: .45rem; width: 9px; height: 9px;
  background: var(--green); border-radius: 50%; box-shadow: 0 0 12px var(--green);
}
.exp-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .4rem; margin-bottom: .2rem; }
.exp-company { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--text); }
.exp-date { font-family: var(--mono); font-size: .72rem; color: var(--green); opacity: .7; }
.exp-role { font-size: .82rem; color: var(--green); margin-bottom: .7rem; font-weight: 500; }
.exp-bullets { list-style: none; }
.exp-bullets li { font-size: .88rem; color: var(--text-dim); padding: .18rem 0 .18rem 1.2rem; position: relative; }
.exp-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--green); font-size: .65rem; top: .32rem; }

/* ── PROJECT CARDS (HOME GRID) ────────────────────────────────── */
#projects { background: var(--bg); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(340px,1fr)); gap: 1.5rem; }
.project-card {
  background: var(--bg2); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .3s;
  will-change: transform;
  cursor: pointer;
}
.project-card:hover { border-color: rgba(0,255,136,.4); box-shadow: 0 8px 48px rgba(0,255,136,0.07), 0 2px 12px rgba(0,0,0,0.5); }
.project-card:focus-visible {
  outline: 2px solid rgba(0,255,136,0.7);
  outline-offset: 2px;
}
.project-mock {
  width: 100%; aspect-ratio: 16 / 10;
  min-height: 220px;
  overflow: hidden; background: #0d0d0d; flex-shrink: 0;
}
.mock-bar {
  background: #191919; padding: 7px 10px;
  display: flex; align-items: center; gap: 5px;
  border-bottom: 1px solid #222;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.r{background:#ff5f57} .dot.y{background:#febc2e} .dot.g{background:#28c840}
.mock-url {
  flex: 1; margin-left: 8px; background: #111; border-radius: 3px;
  padding: 2px 9px; font-family: var(--mono); font-size: .58rem; color: #444;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-body { height: calc(100% - 24px); overflow: hidden; position: relative; }

/* iframe card preview */
.iframe-preview { width: 100%; height: 100%; overflow: hidden; position: relative; background: #111; }
.iframe-preview iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1366px;
  height: 900px;
  transform: translate(-50%, -50%) scale(var(--frame-scale, 0.32));
  transform-origin: center center;
  border: none;
  display: block;
  pointer-events: none;
}

.projects-grid .project-card[data-project="hsconnect"] { order: 1; }
.projects-grid .project-card[data-project="kollens"] { order: 2; }
.projects-grid .project-card[data-project="thescribes"] { order: 3; }
.projects-grid .project-card[data-project="hpled"] { order: 4; }
.projects-grid .project-card[data-project="pharmaleap"] { order: 5; }
.projects-grid .project-card[data-project="algomine"] { order: 6; }
.projects-grid .project-card[data-project="resobridge"] { order: 7; }
.projects-grid .project-card[data-project="servicedesk"] { order: 8; }
.projects-grid .project-card[data-project="socialbi"] { order: 9; }

.projects-slider-ui { display: none; }

.iframe-fallback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1rem;
  background:
    radial-gradient(130% 90% at 10% 5%, rgba(0,255,136,0.14), transparent 55%),
    radial-gradient(110% 90% at 100% 100%, rgba(0,225,255,0.14), transparent 60%),
    linear-gradient(160deg, #0c1215 0%, #0a1013 100%);
}

.iframe-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.0),
    rgba(255,255,255,0.0) 3px,
    rgba(255,255,255,0.03) 3px,
    rgba(255,255,255,0.03) 4px
  );
}

.iframe-fallback-chip {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: #8effc4;
  letter-spacing: 0.12em;
  border: 1px solid rgba(0,255,136,0.35);
  padding: 0.16rem 0.45rem;
}

.iframe-fallback-brand {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 1rem;
  color: #d5ffe9;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(0,255,136,0.2);
}

.iframe-fallback-note {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(213,255,233,0.72);
  max-width: 30ch;
  line-height: 1.45;
}

.project-info { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.project-name { font-family: var(--mono); font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: .4rem; }
.project-desc { font-size: .84rem; color: var(--text-dim); line-height: 1.65; flex: 1; margin-bottom: .9rem; }
.project-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: .3rem; }
.project-stack span {
  font-family: var(--mono); font-size: .62rem; padding: .18rem .5rem;
  background: var(--bg3); color: var(--text-dim); border: 1px solid #222;
}
.project-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.project-link {
  font-family: var(--mono); font-size: .68rem; color: var(--green);
  text-decoration: none; border: 1px solid rgba(0,255,136,.25);
  padding: .32rem .75rem; transition: all .2s; white-space: nowrap;
}
.project-link:hover { background: var(--green-glow); border-color: var(--green); }
.project-detail-link {
  font-family: var(--mono); font-size: .68rem; color: var(--text-dim);
  text-decoration: none; border: 1px solid #222;
  padding: .32rem .75rem; transition: all .2s; white-space: nowrap;
}
.project-detail-link:hover { color: var(--green); border-color: var(--green); }

/* ── CONTACT SECTION (HOME) ───────────────────────────────────── */
#contact { background: var(--bg2); border-top: 1px solid var(--border); text-align: center; }
.contact-inner { max-width: 1100px; margin: 0 auto; }
.contact-layout { text-align: left; }
.contact-sub { color: var(--text-dim); font-size: .93rem; margin-bottom: .4rem; }
.contact-grid { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 2rem; }
.contact-link {
  display: flex; align-items: center; gap: .7rem;
  background: var(--bg3); border: 1px solid var(--border);
  padding: .9rem 1.4rem; text-decoration: none; color: var(--text);
  font-family: var(--mono); font-size: .78rem; transition: all .2s;
}
.contact-link:hover { border-color: var(--green); color: var(--green); }
.contact-icon { color: var(--green); font-style: normal; }

/* ── FOOTER ───────────────────────────────────────────────────── */
footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 1.8rem 8%;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
footer p { font-family: var(--mono); font-size: .68rem; color: var(--text-dim); }
footer p span { color: var(--green); }

/* ── PAGE HERO (PROJECT & CONTACT PAGES) ──────────────────────── */
.page-hero {
  padding: 9rem 8% 4rem;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.back-link {
  font-family: var(--mono); font-size: .72rem; color: var(--text-dim);
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
  margin-bottom: 1.8rem; transition: color .2s;
}
.back-link::before { content: '←'; color: var(--green); }
.back-link:hover { color: var(--green); }
.page-hero-label {
  font-family: var(--mono); font-size: .68rem;
  color: var(--green); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: .4rem; opacity: .65;
}
.page-hero-label::before { content: '// '; }
.page-hero-title {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; color: var(--text); line-height: 1.1; margin-bottom: .7rem;
}
.page-hero-title span { color: var(--green); }
.page-hero-desc {
  font-size: .95rem; color: var(--text-dim);
  max-width: 660px; line-height: 1.75; margin-bottom: 1.5rem;
}
.page-hero-meta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.4rem; }
.meta-pill {
  font-family: var(--mono); font-size: .7rem; padding: .3rem .8rem;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-dim);
}
.meta-pill b { color: var(--green); }
.page-hero-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.hero-tag {
  font-family: var(--mono); font-size: .72rem; padding: .28rem .7rem;
  background: var(--green-glow); color: var(--green);
  border: 1px solid rgba(0,255,136,.18);
}
.page-hero-links { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-btn-live {
  font-family: var(--mono); font-size: .75rem; padding: .55rem 1.3rem;
  background: var(--green); color: #000; font-weight: 700;
  text-decoration: none; letter-spacing: .05em; transition: all .2s;
  clip-path: polygon(0 0,calc(100% - 6px) 0,100% 6px,100% 100%,6px 100%,0 calc(100% - 6px));
}
.hero-btn-live:hover { background: #fff; }
.hero-btn-outline {
  font-family: var(--mono); font-size: .75rem; padding: .55rem 1.3rem;
  border: 1px solid var(--border); color: var(--green);
  text-decoration: none; letter-spacing: .05em; transition: all .2s;
}
.hero-btn-outline:hover { border-color: var(--green); background: var(--green-glow); }

/* ── DETAIL SECTIONS ──────────────────────────────────────────── */
.detail-section { padding: 5rem 8%; }
.detail-section.alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-title {
  font-family: var(--mono); font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 1.8rem;
}
.detail-title span { color: var(--green); }

/* ── BROWSER WINDOW ───────────────────────────────────────────── */
.browser-window { border: 1px solid #1e1e1e; overflow: hidden; margin-bottom: 1.5rem; }
.browser-bar {
  background: #141414; padding: 8px 12px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid #1e1e1e;
}
.b-dots { display: flex; gap: 6px; }
.b-dot { width: 10px; height: 10px; border-radius: 50%; }
.b-dot.r{background:#ff5f57} .b-dot.y{background:#febc2e} .b-dot.g{background:#28c840}
.browser-url {
  flex: 1; margin-left: 10px; background: #0e0e0e;
  padding: 3px 12px; font-family: var(--mono); font-size: .65rem; color: #555;
  border-radius: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.browser-body { position: relative; overflow: hidden; }
.browser-body.frame { height: 540px; }
.browser-body.frame iframe { width: 100%; height: 100%; border: none; display: block; }

/* iframe fallback overlay */
.iframe-note {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(10,10,10,.85); backdrop-filter: blur(4px);
  padding: .6rem 1rem; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
}
.iframe-note p { font-family: var(--mono); font-size: .65rem; color: var(--text-dim); }
.iframe-note a {
  font-family: var(--mono); font-size: .65rem; color: var(--green);
  text-decoration: none; border: 1px solid rgba(0,255,136,.3);
  padding: .25rem .65rem; transition: all .2s; white-space: nowrap;
}
.iframe-note a:hover { background: var(--green-glow); }

/* ── SCREENSHOTS GRID ─────────────────────────────────────────── */
.screenshots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.screenshots-row.triple { grid-template-columns: 1fr 1fr 1fr; }
.screenshot-box { border: 1px solid #1e1e1e; overflow: hidden; }
.screenshot-label {
  background: #141414; padding: 6px 12px;
  font-family: var(--mono); font-size: .6rem; color: #444;
  border-bottom: 1px solid #1e1e1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── FEATURES GRID ────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 1rem; }
.feature-card {
  background: var(--bg3); border: 1px solid var(--border); padding: 1.2rem;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px; background: var(--green); opacity: .4;
}
.feature-icon { font-size: 1.3rem; margin-bottom: .5rem; }
.feature-name { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.feature-desc { font-size: .78rem; color: var(--text-dim); line-height: 1.55; }

/* ── TECH BREAKDOWN ───────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 1rem; }
.tech-card { background: var(--bg2); border: 1px solid var(--border); padding: 1.1rem; }
.tech-card-name { font-family: var(--mono); font-size: .82rem; font-weight: 600; color: var(--green); margin-bottom: .4rem; }
.tech-card-desc { font-size: .78rem; color: var(--text-dim); line-height: 1.55; }

/* ── PROJECT NAV FOOTER ───────────────────────────────────────── */
.project-nav-bar {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2rem 8%;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.pnav-btn {
  font-family: var(--mono); font-size: .75rem; color: var(--text-dim);
  text-decoration: none; border: 1px solid #222;
  padding: .6rem 1.2rem; transition: all .2s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.pnav-btn:hover { color: var(--green); border-color: var(--green); }
.pnav-btn .arr { color: var(--green); }
.pnav-all { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); text-decoration: none; transition: color .2s; }
.pnav-all:hover { color: var(--green); }

/* ── CONTACT PAGE ─────────────────────────────────────────────── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 5rem;
}
.contact-info-title { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 1.2rem; }
.cinfo-items { display: flex; flex-direction: column; gap: .9rem; }
.cinfo-item { display: flex; align-items: center; gap: .9rem; font-family: var(--mono); font-size: .8rem; color: var(--text-dim); }
.cinfo-item a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.cinfo-item a:hover { color: var(--green); }
.ci-icon {
  width: 34px; height: 34px; background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green); font-style: normal; font-size: .75rem; flex-shrink: 0;
}
.cinfo-note { margin-top: 2rem; font-family: var(--mono); font-size: .72rem; color: var(--text-dim); line-height: 1.7; }
.cinfo-note b { color: var(--green); }

.cform { display: flex; flex-direction: column; gap: 1.1rem; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.cform-group { display: flex; flex-direction: column; gap: .35rem; }
.cform-label { font-family: var(--mono); font-size: .62rem; color: var(--green); text-transform: uppercase; letter-spacing: .1em; opacity: .65; }
.cform-input, .cform-textarea {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: .82rem;
  padding: .75rem 1rem; outline: none; transition: border-color .2s; width: 100%;
}
.cform-input:focus, .cform-textarea:focus { border-color: var(--green); }
.cform-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300ff88' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.cform-select option { background: var(--bg3); color: var(--text); }
.cform-req { color: var(--green); font-style: normal; }
.cform-textarea { resize: vertical; min-height: 150px; }
.cform-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: var(--green); color: #000;
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
  border: none; cursor: pointer; padding: .9rem 2rem;
  letter-spacing: .06em; transition: all .2s; align-self: flex-start;
  clip-path: polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,8px 100%,0 calc(100% - 8px));
}
.cform-submit:hover { background: #fff; }
.cform-submit:disabled { opacity: .5; cursor: not-allowed; }
.cform-msg {
  font-family: var(--mono); font-size: .78rem; padding: .9rem 1.1rem;
  border-left: 3px solid; border-top: 1px solid; border-right: 1px solid; border-bottom: 1px solid;
  display: none; border-radius: 0 4px 4px 0; letter-spacing: .02em;
}
.cform-msg.success { border-color: var(--green); color: var(--green); background: rgba(0,255,136,.06); }
.cform-msg.error   { border-color: #ff4444; color: #ff4444; background: rgba(255,68,68,.06); }

/* ── FORM THANK-YOU STATE ───────────────────────────────────────── */
.cform-thanks { display: none; flex-direction: column; gap: 1rem; padding: 2rem 1.5rem; background: var(--bg3); border: 1px solid var(--green); border-left: 3px solid var(--green); border-radius: 0 4px 4px 0; }
.cform-thanks-icon { font-family: var(--mono); font-size: 2rem; color: var(--green); line-height: 1; }
.cform-thanks-title { font-family: var(--mono); font-size: 1.1rem; color: var(--text); font-weight: 600; }
.cform-thanks-line { font-family: var(--mono); font-size: .72rem; color: var(--green); opacity: .75; }
.cform-thanks-sub { font-size: .82rem; color: var(--text-dim); line-height: 1.6; margin: 0; }
.cform-thanks-reset { align-self: flex-start; background: none; border: 1px solid var(--border-mid); color: var(--text-dim); font-family: var(--mono); font-size: .72rem; padding: .55rem 1rem; cursor: pointer; transition: border-color .2s, color .2s; letter-spacing: .04em; }
.cform-thanks-reset:hover { border-color: var(--green); color: var(--green); }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1000px) { .screenshots-row.triple { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .screenshots-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  section { padding: 4rem 5%; }
  .detail-section { padding: 3.5rem 5%; }
  .page-hero { padding: 7rem 5% 3rem; }
  .contact-layout { padding: 3rem 5%; }
  .project-nav-bar { padding: 1.5rem 5%; }
  .projects-grid { grid-template-columns: 1fr; }
  .cform-row { grid-template-columns: 1fr; }
  footer { padding: 1.5rem 5%; }
}
@media (max-width: 520px) {
  .nav-links { display: none; position: absolute; }
  nav.open .nav-links {
    display: flex; flex-direction: column;
    top: 100%; left: 0; right: 0;
    background: rgba(10,10,10,.98); padding: 1rem 5%;
    gap: .6rem; border-bottom: 1px solid var(--border);
  }
  .nav-menu-btn { display: block; }
}

/* ================================================================
   ANIMATIONS — Custom cursor, loader, glitch, floating symbols
   ================================================================ */

/* ── HIDE DEFAULT CURSOR (desktop only) ──────────────────────── */
@media (pointer: fine) {
  body.cursor-enhanced,
  body.cursor-enhanced a,
  body.cursor-enhanced button {
    cursor: none !important;
  }
}

/* ── CUSTOM CURSOR ───────────────────────────────────────────── */
.cur-dot {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  top: 0; left: 0; mix-blend-mode: screen;
}
.cur-ring {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(0,255,136,.5);
  top: 0; left: 0;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.cur-ring.hovered {
  width: 48px; height: 48px;
  border-color: var(--green);
  background: rgba(0,255,136,0.06);
}

/* ── PAGE LOADER ─────────────────────────────────────────────── */
#page-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.65s ease;
}
.loader-terminal {
  font-family: var(--mono); font-size: .9rem;
  color: var(--green); max-width: 340px; width: 88%;
}
.loader-line { line-height: 2; white-space: nowrap; }
.loader-line:last-child::after { content: '_'; animation: blink .7s infinite; }

/* ── GLITCH EFFECT ───────────────────────────────────────────── */
.hero-name .accent { position: relative; }
.hero-name .accent::before,
.hero-name .accent::after {
  content: attr(data-glitch);
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; pointer-events: none;
}
.hero-name .accent.glitching::before {
  opacity: 1;
  color: #0ff; left: 3px;
  animation: glitch-a 0.45s steps(2) forwards;
  clip-path: inset(20% 0 55% 0);
}
.hero-name .accent.glitching::after {
  opacity: 1;
  color: #f0f; left: -3px;
  animation: glitch-b 0.45s steps(2) forwards;
  clip-path: inset(55% 0 15% 0);
}
@keyframes glitch-a {
  0%   { clip-path: inset(10% 0 70% 0); transform: translate(-3px, 2px) skewX(-3deg); }
  25%  { clip-path: inset(60% 0 10% 0); transform: translate(4px, -2px) skewX(2deg); }
  50%  { clip-path: inset(30% 0 45% 0); transform: translate(-2px, 3px); }
  75%  { clip-path: inset(80% 0 5% 0);  transform: translate(3px, -1px) skewX(-2deg); }
  100% { clip-path: inset(0 0 100% 0);  transform: translate(0); opacity: 0; }
}
@keyframes glitch-b {
  0%   { clip-path: inset(55% 0 25% 0); transform: translate(3px, -2px) skewX(2deg); }
  25%  { clip-path: inset(15% 0 65% 0); transform: translate(-4px, 1px); }
  50%  { clip-path: inset(70% 0 15% 0); transform: translate(2px, 3px) skewX(-3deg); }
  75%  { clip-path: inset(40% 0 40% 0); transform: translate(-2px, -1px); }
  100% { clip-path: inset(100% 0 0 0);  transform: translate(0); opacity: 0; }
}

/* ── SCANLINES ───────────────────────────────────────────────── */
.hero-scanlines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.022) 3px,
    rgba(0,0,0,0.022) 4px
  );
}

/* ── FLOATING CODE SYMBOLS ───────────────────────────────────── */
#float-symbols {
  position: fixed; inset: 0;
  overflow: hidden; z-index: 1; pointer-events: none;
}
@keyframes floatSym {
  from { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  to   { transform: translate3d(10px, -112vh, 0) rotate(12deg); opacity: 0; }
}

/* ── TIMELINE DOT PULSE ──────────────────────────────────────── */
.timeline-item::before {
  animation: dotPulse 2.2s ease infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px var(--green); }
  50%       { box-shadow: 0 0 22px var(--green), 0 0 40px rgba(0,255,136,0.35); }
}

/* ── SKILL TAG HOVER ─────────────────────────────────────────── */
.skill-tag { transition: all 0.2s; }
.skill-tag:hover {
  background: rgba(0,255,136,0.2);
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,255,136,0.15);
}

/* ── NAV UNDERLINE ANIMATION ─────────────────────────────────── */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--green);
  transition: width 0.22s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ── HERO NOISE OVERLAY ──────────────────────────────────────── */
#hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ================================================================
   STITCH MCP — NEON PROTOCOL DESIGN SYSTEM ADDITIONS
   ================================================================ */

/* ── GRAIN OVERLAY (full page) ───────────────────────────────── */
.grain-overlay {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ── CRT SCANLINE ────────────────────────────────────────────── */
.crt-scanline {
  position: fixed; left: 0; right: 0; height: 2px; z-index: 9996;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent,
    rgba(0,255,136,0.035) 50%,
    transparent
  );
}

/* ── HERO AURORA GLOW ────────────────────────────────────────── */
.hero-aurora {
  position: absolute; z-index: 0; pointer-events: none;
  width: 700px; height: 500px;
  top: -100px; left: -100px;
  background: radial-gradient(ellipse at 30% 40%,
    rgba(0,255,136,0.07) 0%,
    rgba(0,220,255,0.04) 40%,
    transparent 70%
  );
  filter: blur(60px);
  animation: auroraShift 12s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
  33%  { transform: translate(80px, 40px) scale(1.1); opacity: 1; }
  66%  { transform: translate(-40px, 80px) scale(0.95); opacity: 0.8; }
  100% { transform: translate(60px, -20px) scale(1.05); opacity: 0.9; }
}

/* ── HERO STATUS BADGE ───────────────────────────────────────── */
.hero-status {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .28rem .85rem;
  background: var(--bg4);
  border-left: 3px solid var(--green);
  font-family: var(--mono); font-size: .62rem;
  color: var(--green-pale); letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: dotPulse 1.8s ease infinite;
}

/* ── MARQUEE STRIP ───────────────────────────────────────────── */
.marquee-strip {
  width: 100%; overflow: hidden;
  background: var(--bg2);
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  padding: .75rem 0;
}
.marquee-inner {
  display: flex; white-space: nowrap; gap: 2.5rem;
  animation: marqueeScroll 28s linear infinite;
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .18em; color: var(--green-pale);
  text-transform: uppercase; opacity: .7;
}
.marquee-strip:hover .marquee-inner { animation-play-state: paused; }
.mq-sep { color: var(--green); opacity: .5; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── ABOUT — Stitch surface tiers ────────────────────────────── */
#about { background: var(--bg); }
.about-bio-card {
  background: var(--bg2);
  border-left: 3px solid var(--green-full);
  padding: 2rem; position: relative; overflow: hidden;
}
.about-bio-card::after {
  content: 'FILE: BIO.EXE';
  position: absolute; top: .85rem; right: 1rem;
  font-family: var(--mono); font-size: .5rem;
  color: var(--text-dim); opacity: .25; letter-spacing: .1em;
}
.about-cmd {
  margin-top: 1.5rem; font-family: var(--mono); font-size: .72rem;
  color: var(--green);
}
.about-cmd .cmd-out { color: var(--text-dim); }

/* Stat cards — Stitch: surface-container-high hover surface-bright */
.stat-card {
  background: var(--bg4); border: none; /* NO BORDERS per Stitch rule */
  padding: 1.4rem; position: relative; overflow: hidden;
  transition: background .25s;
}
.stat-card:hover { background: var(--bg-bright); }
.stat-card::before { display: none; } /* remove old left-border */
.stat-num {
  font-family: var(--mono); font-size: 2rem; font-weight: 700;
  color: var(--green-full); /* primary-container */
}
.stat-label {
  font-size: .62rem; color: var(--text-dim);
  font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .15em; margin-top: .3rem;
}

/* ── SKILLS — terminal list style ────────────────────────────── */
.skill-group { background: var(--bg3); border: none; padding: 1.4rem; }
.skill-group-title {
  font-family: var(--mono); font-size: .62rem;
  color: var(--green-dim); text-transform: uppercase;
  letter-spacing: .2em; margin-bottom: .9rem;
  border-bottom: 1px solid var(--border-mid); padding-bottom: .5rem;
}
.skill-tag {
  font-family: var(--mono); font-size: .72rem; padding: .28rem .65rem;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-mid); letter-spacing: .02em;
  transition: all .2s; cursor: default;
}
.skill-tag::before { content: '> '; color: var(--green-full); }
.skill-tag:hover {
  background: var(--bg5); color: var(--green-pale);
  border-color: var(--green); transform: translateX(4px);
}

/* ── EXPERIENCE — Stitch section headings ────────────────────── */
#experience { background: var(--bg2); }
.exp-section-num {
  font-family: var(--mono); font-size: .85rem;
  color: var(--green); margin-right: .6rem; vertical-align: middle;
}
.exp-company {
  font-family: var(--mono); font-size: 1rem; font-weight: 600;
  color: var(--text);
}
.exp-role { font-size: .82rem; color: var(--green-pale); margin-bottom: .7rem; font-weight: 500; }

/* ── PROJECT CARDS — Stitch bento grid ──────────────────────── */
#projects { background: var(--bg); }
.project-card {
  background: var(--bg2); border: none; /* NO BORDERS */
  border-bottom: 2px solid transparent;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .25s, background .25s;
  will-change: transform;
}
.project-card:hover {
  border-bottom-color: var(--green);
  background: var(--bg3);
}

/* Project stack tags — Stitch: hashtag style */
.project-stack span {
  font-family: var(--mono); font-size: .62rem; padding: .18rem .5rem;
  background: transparent; color: var(--green-pale);
  border: none;
}
.project-stack span::before { content: '#'; color: var(--green); }

/* ── CONTACT SECTION ─────────────────────────────────────────── */
#contact { background: var(--bg); border-top: 1px solid var(--border-mid); }
.contact-link {
  background: var(--bg4); border: none;
  transition: background .2s, color .2s;
}
.contact-link:hover { background: var(--bg-bright); color: var(--green-pale); }

/* ── NAV — Stitch glassmorphism nav ─────────────────────────── */
nav {
  background: rgba(14,14,14,0.82);
  border-bottom: none;
  box-shadow: 0 0 20px rgba(0,255,136,0.04);
}

/* ── FOOTER — Stitch status bar ─────────────────────────────── */
footer { background: var(--bg2); border-top: 1px solid var(--border-mid); }
.footer-status {
  font-family: var(--mono); font-size: .58rem;
  color: var(--text-dim); opacity: .5; letter-spacing: .08em;
}

/* ── SECTION HEADINGS — Stitch numbered style ───────────────── */
.section-num {
  font-family: var(--mono); font-size: .85rem;
  color: var(--green); margin-right: .5rem;
}

/* ── SPOTLIGHT CARD EFFECT ───────────────────────────────────── */
.project-card { position: relative; overflow: hidden; }
.project-card::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0,255,136,0.06), transparent 60%);
}
.project-card.spotlight-active::before { opacity: 1; }

/* ================================================================
   COMPLETE REDESIGN OVERRIDES (Stitch desktop + tablet + mobile)
   ================================================================ */

:root {
  --sans: 'Space Grotesk', 'Inter', sans-serif;
  --gutter: clamp(1rem, 4vw, 4.75rem);
}

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 255, 136, 0.12), transparent 60%),
    radial-gradient(900px 540px at -8% 18%, rgba(126, 230, 255, 0.08), transparent 70%),
    var(--bg);
  color: var(--text);
}

nav {
  padding: 0.85rem 4%;
  background: rgba(14, 14, 14, 0.78);
  border-bottom: 1px solid rgba(73, 72, 71, 0.45);
  backdrop-filter: blur(16px);
}

.nav-logo {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.nav-links {
  gap: 1.35rem;
}

.nav-links a {
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#hero {
  padding: 0 var(--gutter);
  /* padding-top controlled by media queries below */
}

.hero-content {
  max-width: min(760px, 90vw);
}

.hero-status {
  background: rgba(32, 31, 31, 0.75);
  border-left: 2px solid var(--green-full);
}

.hero-name {
  font-size: clamp(2.25rem, 8.4vw, 6rem);
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.hero-title {
  font-size: clamp(0.95rem, 2.7vw, 1.3rem);
}

.hero-desc {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  max-width: 58ch;
}

.btn-primary,
.btn-ghost,
.hero-btn-live,
.hero-btn-outline,
.hero-btn-ghost,
.project-link,
.project-detail-link,
.contact-link,
.cform-submit,
.pnav-btn,
.pnav-all {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary,
.hero-btn-live,
.cform-submit {
  border-radius: 0;
  clip-path: none;
}

.hero-btn-outline,
.hero-btn-ghost {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(73, 72, 71, 0.65);
  color: var(--green-pale);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(19, 19, 19, 0.7);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.hero-btn-outline:hover,
.hero-btn-ghost:hover {
  border-color: var(--green-full);
  color: var(--green-full);
  background: rgba(0, 255, 136, 0.08);
}

section {
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter);
}

.section-title {
  max-width: 15ch;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-label {
  letter-spacing: 0.24em;
}

#about {
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.86), rgba(14, 14, 14, 1));
}

.about-grid {
  gap: clamp(1.2rem, 3vw, 3.2rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.about-bio-card {
  background: linear-gradient(140deg, var(--bg2), var(--bg3));
}

.about-stats {
  gap: 0.8rem;
}

.stat-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#skills {
  background: var(--bg);
}

.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.skill-group {
  background: linear-gradient(160deg, rgba(26, 25, 25, 0.95), rgba(19, 19, 19, 0.95));
  min-height: 100%;
}

#experience {
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.95), rgba(26, 25, 25, 0.95));
}

.timeline {
  max-width: 1000px;
}

.timeline-item {
  padding-bottom: clamp(1.6rem, 2.3vw, 2.8rem);
}

.exp-header {
  gap: 0.75rem;
}

#projects {
  background: linear-gradient(180deg, var(--bg), rgba(19, 19, 19, 0.96));
}

.projects-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.6rem);
}

.project-card {
  background: linear-gradient(165deg, rgba(19, 19, 19, 1), rgba(26, 25, 25, 1));
}

.project-mock {
  min-height: clamp(180px, 23vw, 260px);
}

.project-info {
  padding: 1.05rem;
}

.project-name {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-desc {
  font-size: 0.8rem;
}

.project-actions {
  margin-top: 0.85rem;
}

#contact {
  background: linear-gradient(180deg, rgba(19, 19, 19, 1), rgba(14, 14, 14, 1));
}

.contact-grid {
  gap: 0.85rem;
}

.contact-link {
  border: 1px solid rgba(73, 72, 71, 0.35);
}

footer {
  padding: 1.15rem var(--gutter);
  border-top: 1px solid rgba(73, 72, 71, 0.5);
  background: rgba(19, 19, 19, 0.98);
  gap: 0.6rem;
}

footer p {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.57rem;
}

.footer-status {
  width: 100%;
  color: var(--green-pale);
  opacity: 0.78;
}

.page-hero {
  padding: 7.5rem var(--gutter) 3rem;
  background: linear-gradient(165deg, rgba(19, 19, 19, 0.95), rgba(14, 14, 14, 0.95));
}

.page-hero-title {
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

.page-hero-desc {
  max-width: 72ch;
}

.detail-section {
  padding: clamp(2.5rem, 6vw, 4.75rem) var(--gutter);
}

.detail-section.alt {
  background: linear-gradient(165deg, rgba(19, 19, 19, 0.9), rgba(26, 25, 25, 0.9));
}

.browser-window {
  border: 1px solid rgba(73, 72, 71, 0.45);
  background: var(--bg2);
}

.browser-body.mock-mode {
  background: #0a0a0a;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.browser-body.mock-mode > * {
  min-width: 980px;
}

.browser-body.frame {
  height: clamp(320px, 60vw, 560px);
}

.features-grid,
.tech-grid {
  gap: 0.8rem;
}

.feature-card,
.tech-card {
  border: none;
  background: linear-gradient(165deg, rgba(26, 25, 25, 1), rgba(19, 19, 19, 1));
}

.project-nav-bar {
  padding: 1.2rem var(--gutter);
  border-top: 1px solid rgba(73, 72, 71, 0.5);
  background: rgba(19, 19, 19, 0.98);
}

.contact-layout {
  padding: clamp(2.3rem, 5vw, 4.2rem) 0;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.25rem, 3vw, 3rem);
}

.cform-label {
  letter-spacing: 0.14em;
}

.cform-input,
.cform-textarea {
  border: none;
  border-bottom: 2px solid rgba(73, 72, 71, 0.7);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(19, 19, 19, 0.7));
  min-height: 44px;
}

.cform-input:focus,
.cform-textarea:focus {
  border-bottom-color: var(--green-full);
}

.cform-textarea {
  min-height: 160px;
}

@media (max-width: 1180px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  #hero {
    height: auto;
    min-height: unset;
    padding: 5.5rem var(--gutter) 3rem !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    overflow: hidden;
  }

  #three-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
  }

  .hero-portrait-wrap {
    order: -1;
    width: min(56vw, 320px);
    min-width: 210px;
    margin-bottom: 0.4rem;
  }

  .hero-name {
    font-size: clamp(2rem, 10vw, 4.2rem);
  }

  .page-hero {
    padding-top: 6.7rem;
  }

  .browser-body.frame {
    height: 420px;
  }

  .screenshots-row,
  .screenshots-row.triple {
    grid-template-columns: 1fr;
  }

  .project-nav-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .pnav-btn,
  .pnav-all {
    width: 100%;
  }
}

@media (max-width: 760px) {
  nav {
    padding: 0.6rem 5% !important;
  }

  .nav-logo-img { height: 34px; }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.6rem var(--gutter) 0.95rem;
    background: rgba(14, 14, 14, 0.98);
    border-bottom: 1px solid rgba(73, 72, 71, 0.5);
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-menu-btn {
    display: block;
    font-family: var(--mono);
    font-size: 1.18rem;
    line-height: 1;
    border: 1px solid rgba(73, 72, 71, 0.6);
    color: var(--green-pale);
    min-height: 40px;
    min-width: 44px;
    padding: 0;
  }

  nav.open .nav-links {
    display: flex;
  }

  .hero-btns {
    width: 100%;
  }

  .scroll-hint { display: none; }

  .hero-portrait-wrap {
    width: clamp(100px, 36vw, 160px);
    min-width: 100px;
    margin: 0 auto 0.5rem;
  }
  .hero-portrait-card {
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0,255,136,0.45), 0 0 28px rgba(0,255,136,0.2);
  }
  .hero-portrait-card::before { display: none; }
  .hero-portrait-glow { display: none; }

  .btn-primary,
  .btn-ghost {
    flex: 1 1 100%;
    text-align: center;
  }

  .section-title {
    max-width: none;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .projects-grid::-webkit-scrollbar { display: none; }

  .projects-grid .project-card {
    min-width: 84vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .projects-slider-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.45rem;
    padding: 0.15rem 0.1rem 0;
  }

  .projects-slider-hint {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(213,255,233,0.62);
  }

  .projects-slider-dots {
    display: flex;
    align-items: center;
    gap: 0.34rem;
  }

  .projects-slider-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(0,255,136,0.22);
    transition: width 0.2s ease, background-color 0.2s ease;
  }

  .projects-slider-dot.active {
    width: 18px;
    background: rgba(0,255,136,0.88);
  }

  .contact-grid {
    flex-direction: column;
  }

  .contact-link {
    width: 100%;
    justify-content: flex-start;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hero-meta,
  .page-hero-tags,
  .page-hero-links {
    gap: 0.45rem;
  }

  .hero-btn-live,
  .hero-btn-outline,
  .hero-btn-ghost {
    width: 100%;
  }

  .browser-body.frame {
    height: 360px;
  }

  .browser-body.mock-mode {
    max-height: 390px;
  }

  .browser-body.mock-mode > * {
    min-width: 860px;
  }

  .cform-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .marquee-inner {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
    gap: 1.3rem;
  }

  .hero-status {
    font-size: 0.52rem;
    letter-spacing: 0.05em;
    padding: 0.26rem 0.5rem;
  }

  .hero-desc,
  .page-hero-desc,
  .project-desc,
  .feature-desc,
  .tech-card-desc {
    font-size: 0.78rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid .project-card {
    min-width: 88vw;
  }

  .projects-slider-hint {
    font-size: 0.55rem;
    letter-spacing: 0.07em;
  }

  .project-mock {
    height: 170px;
  }

  .browser-body.frame {
    height: 290px;
  }

  .browser-body.mock-mode {
    max-height: 330px;
  }

  .browser-body.mock-mode > * {
    min-width: 760px;
  }

  .iframe-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}

/* ── TIMELINE LINE DRAW ──────────────────────────────────────── */
.timeline::before {
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline.line-drawn::before {
  transform: scaleY(1);
}

/* ── STAT COUNTER GLOW (fires when count finishes) ───────────── */
@keyframes statCountPulse {
  0%   { text-shadow: 0 0 0 rgba(0,255,136,0); }
  50%  { text-shadow: 0 0 18px rgba(0,255,136,0.75), 0 0 36px rgba(0,255,136,0.3); }
  100% { text-shadow: 0 0 8px rgba(0,255,136,0.22); }
}
.stat-card.counted .stat-num {
  animation: statCountPulse 0.7s ease-out forwards;
}

/* ── SKILL TAG SCAN SWEEP ────────────────────────────────────── */
@keyframes tagScan {
  0%   { background: transparent; color: var(--text-dim); border-color: var(--border-mid); box-shadow: none; }
  45%  { background: rgba(0,255,136,0.1); color: var(--green-pale); border-color: var(--green); box-shadow: 0 0 10px rgba(0,255,136,0.2), inset 0 0 8px rgba(0,255,136,0.07); }
  100% { background: transparent; color: var(--text-dim); border-color: var(--border-mid); box-shadow: none; }
}
.skill-tag.tag-scanned {
  animation: tagScan 0.6s ease-in-out forwards;
}

/* ── PORTRAIT OVERLAY CHIPS ──────────────────────────────────── */
.portrait-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  background: rgba(10, 12, 12, 0.82);
  border: 1px solid rgba(0, 255, 136, 0.32);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 0 12px rgba(0,255,136,0.08);
  pointer-events: none;
  animation: chipFloat 4s ease-in-out infinite;
}
.portrait-chip--tl { top: 28%; right: calc(100% - 14px); animation-delay: 0s; }
.portrait-chip--br { bottom: 25%; left: calc(100% - 14px); animation-delay: 1.8s; }
.portrait-chip b { color: var(--green); font-weight: 600; }
.pchip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dotPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.pchip-icon { color: var(--green); font-style: normal; font-size: 0.75rem; flex-shrink: 0; }
@keyframes chipFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.5; box-shadow: 0 0 12px var(--green); }
}

/* on mobile chips — small, top-left / bottom-right of portrait */
@media (max-width: 760px) {
  .portrait-chip {
    font-size: 0.5rem;
    padding: 0.25rem 0.45rem;
    gap: 0.3rem;
    border-radius: 4px;
    animation: none;
  }
  .portrait-chip--tl { top: 22%; right: calc(100% - 10px); transform: none; }
  .portrait-chip--br { bottom: 22%; left: calc(100% - 10px); transform: none; }
  .pchip-dot { width: 5px; height: 5px; }
}

/* honeypot — visually hidden, not display:none so bots see it */
.hp-wrap {
  position: absolute;
  left: -9999px; top: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
