/* ================================================================
   HENRY CHIA JING HERNG — Portfolio v5
   Aesthetic: Cinematic Terminal × Siena.film × Phosphor Hacker
   Fonts: Bebas Neue (cinematic display) + Share Tech Mono (terminal)
         + DM Sans (editorial body)
   ================================================================ */

/* Fonts loaded via <link> in HTML head — see each page's <head> */

/* ── Root tokens ── */
:root {
  --bg:          #030603;
  --bg2:         #060d06;
  --green:       #00ff41;
  --green-dim:   #00b32d;
  --green-dark:  #003d0f;
  --green-glow:  rgba(0,255,65,0.15);
  --amber:       #ffb000;
  --red:         #ff2d2d;
  --cyan:        #00e5ff;
  --text:        #c8ffda;
  --text-dim:    #3d7a4d;
  --border:      #0a2e10;
  --scan:        rgba(0,255,65,0.025);

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --nav-h:    60px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);

  --glow-xs: 0 0 6px rgba(0,255,65,0.35);
  --glow-sm: 0 0 14px rgba(0,255,65,0.3);
  --glow-md: 0 0 28px rgba(0,255,65,0.2), 0 0 60px rgba(0,255,65,0.08);
  --glow-lg: 0 0 50px rgba(0,255,65,0.3), 0 0 100px rgba(0,255,65,0.1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* ── Scanlines ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, var(--scan) 2px, var(--scan) 4px);
  pointer-events: none;
  z-index: 9000;
  opacity: 0.7;
}

/* ── Selection ── */
::selection { background: var(--green); color: var(--bg); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ── Screen reader only ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ================================================================
   CUSTOM CURSOR
   ================================================================ */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--green);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.15s ease, height 0.15s ease;
  box-shadow: var(--glow-sm);
  mix-blend-mode: screen;
}
.cursor.hover { width: 20px; height: 20px; background: var(--amber); }

/* ================================================================
   SCROLL PROGRESS
   ================================================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  z-index: 9001;
  transition: width 0.08s linear;
  box-shadow: var(--glow-xs);
}

/* ================================================================
   NAV — Siena-style: minimal, transparent, edge-to-edge
   ================================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  mix-blend-mode: normal;
  transition: background 0.3s ease, border-color 0.3s ease;
}

nav.scrolled {
  background: rgba(3, 6, 3, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--green);
  text-decoration: none;
  text-shadow: var(--glow-xs);
}
.nav-logo span { color: var(--text-dim); }

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover, .nav-links a.active { color: var(--green); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink-dot 2.5s ease infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,255,65,0.4); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px rgba(0,255,65,0); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}
.hamburger span { display: block; width: 20px; height: 1px; background: var(--green); transition: 0.25s; }

/* ================================================================
   SECTION SHARED
   ================================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--green-dim);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-eyebrow::before { content: '// '; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--green);
  text-transform: uppercase;
  text-shadow: var(--glow-sm);
}

.section-rule {
  width: 48px; height: 1px;
  background: var(--green);
  margin: 1.5rem 0;
  box-shadow: var(--glow-xs);
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.left { transform: translateX(-40px); }
.reveal.right { transform: translateX(40px); }
.reveal.scale { transform: scale(0.92); }
.reveal.visible { opacity: 1; transform: none; }

/* ================================================================
   HERO — Full viewport, matrix canvas background
   ================================================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#matrix-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
}

/* Bottom gradient to blend into next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 3rem 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-end;
  gap: 2rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--green);
  text-shadow: var(--glow-lg);
  text-transform: uppercase;
}

.hero-name-sub {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-end;
}

.hero-role-wrap {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-align: right;
}

.hero-role {
  display: block;
  font-size: 1rem;
  color: var(--green);
  min-height: 1.4em;
}

.typed-cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-certs-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cert-pill {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--green-dark);
  color: var(--green);
  background: rgba(0,255,65,0.04);
  text-transform: uppercase;
}
.cert-pill.elite { border-color: rgba(255,176,0,0.35); color: var(--amber); background: rgba(255,176,0,0.04); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  animation: fadeIn 1s ease 2.5s both;
}
.hero-scroll-hint::before {
  content: '';
  display: block;
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, transparent, var(--green));
  animation: scrollLine 2s ease infinite;
}
@keyframes scrollLine {
  0%,100% { opacity: 0.3; height: 50px; }
  50% { opacity: 1; height: 60px; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================
   ASCII SECTION HERO — large decorative text
   ================================================================ */
/* ================================================================
   ABOUT — Editorial split layout
   ================================================================ */
.about-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6rem;
  align-items: center;
}

/* Portrait */
.portrait-outer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: 380px;
}

.portrait-frame {
  position: relative;
  width: 100%;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid var(--green-dark);
  z-index: 0;
}

.portrait-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(10%) contrast(1.1) brightness(0.9);
  transition: filter 0.5s ease;
}
.portrait-img:hover { filter: grayscale(0%) contrast(1.05) brightness(1); }

/* Scan overlay */
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, rgba(0,255,65,0.018) 3px, rgba(0,255,65,0.018) 4px);
  z-index: 2;
  pointer-events: none;
}

.portrait-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--green);
  border-style: solid;
  z-index: 3;
}
.portrait-corner.tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.portrait-corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.portrait-corner.bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.portrait-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.portrait-id {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  width: 100%;
  text-align: center;
}
.portrait-id-name { color: var(--green); text-transform: uppercase; }
.portrait-id-clearance { color: var(--amber); border: 1px solid rgba(255,176,0,0.3); padding: 0.1rem 0.45rem; background: rgba(255,176,0,0.05); text-transform: uppercase; }

/* About text */
.about-text-wrap { display: flex; flex-direction: column; gap: 2rem; }

.about-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem;
  margin-bottom: 1rem;
}

.meta-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.meta-key { color: var(--green); min-width: 80px; text-transform: uppercase; letter-spacing: 0.1em; }
.meta-val { color: var(--text-dim); }

.about-body p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: 1.25rem;
  text-align: justify;
}
.about-body p strong { color: var(--green); font-weight: 500; }

/* ================================================================
   EXPERIENCE — Siena-style: each role owns a row
   ================================================================ */
.experience-section {
  padding: 8rem 0;
  position: relative;
}

.exp-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  position: relative;
  transition: all 0.3s ease;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease-out);
}

.exp-item:hover::before { transform: scaleY(1); }

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-top: 0.25rem;
  line-height: 1.6;
}
.exp-date-current { color: var(--amber); }

.exp-body { display: flex; flex-direction: column; gap: 0.6rem; }

.exp-role {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  letter-spacing: 0.04em;
  color: var(--green);
  text-transform: uppercase;
  line-height: 1;
  transition: text-shadow 0.3s ease;
}
.exp-item:hover .exp-role { text-shadow: var(--glow-sm); }

.exp-company {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 600px;
}
.exp-desc li { list-style: none; padding-left: 1rem; position: relative; margin-bottom: 0.25rem; }
.exp-desc li::before { content: '▸'; position: absolute; left: 0; color: var(--green); font-size: 0.65rem; }

.exp-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.exp-num {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--border);
  line-height: 1;
  letter-spacing: -0.02em;
  align-self: center;
  transition: color 0.3s ease;
}
.exp-item:hover .exp-num { color: var(--green-dark); }

/* ================================================================
   SKILLS
   ================================================================ */
.skills-section {
  padding: 8rem 0;
  background: linear-gradient(180deg, transparent, rgba(0,255,65,0.018), transparent);
}

.skills-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

.skill-col h3 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.skill-col h3::before { content: '> '; opacity: 0.5; }

.skill-bar-row { margin-bottom: 0.85rem; }
.skill-bar-label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.skill-bar-track { height: 2px; background: var(--border); overflow: hidden; }
.skill-bar-fill { height: 100%; background: var(--green); width: 0; transition: width 1.4s var(--ease-out); box-shadow: var(--glow-xs); }

.skill-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--green-dark);
  color: var(--text-dim);
  background: rgba(0,255,65,0.02);
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  cursor: none;
}
.chip:hover { border-color: var(--green); color: var(--green); background: rgba(0,255,65,0.06); box-shadow: var(--glow-xs); }

/* ================================================================
   EDUCATION
   ================================================================ */
.education-section { padding: 6rem 0 8rem; }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.edu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: all 0.3s ease;
}
.edu-card:hover { border-color: var(--green-dark); box-shadow: var(--glow-md); transform: translateY(-3px); }
.edu-year { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; color: var(--green-dim); margin-bottom: 0.5rem; }
.edu-degree { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.06em; color: var(--green); text-transform: uppercase; margin-bottom: 0.35rem; }
.edu-school { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.edu-grade { font-family: var(--font-mono); font-size: 0.68rem; color: var(--amber); padding-top: 0.75rem; border-top: 1px solid var(--border); line-height: 1.7; }

/* ================================================================
   TAG (shared)
   ================================================================ */
.tag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--green-dark);
  color: var(--text-dim);
  background: rgba(0,255,65,0.02);
  text-transform: uppercase;
}

/* ================================================================
   BUTTON
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
  z-index: 0;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--bg); }
.btn > * { position: relative; z-index: 1; }

/* ================================================================
   TERMINAL BLOCK
   ================================================================ */
.terminal {
  background: #010801;
  border: 1px solid var(--border);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.6rem 1rem;
  background: #000;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot:nth-child(1){background:#ff5f57} .t-dot:nth-child(2){background:#febc2e} .t-dot:nth-child(3){background:#28c840}
.t-title { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); margin: 0 auto; }
.terminal-body { padding: 1.5rem; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.9; }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--amber); }
.t-out { color: var(--text-dim); padding-left: 1.5rem; display: block; }
.t-ok { color: var(--green); }
.t-info { color: var(--cyan); }

/* ================================================================
   CONTACT
   ================================================================ */
.contact-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 5rem;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 0; }

.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: none;
}
.contact-channel:hover { padding-left: 0.5rem; }

.ch-icon {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--green);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.contact-channel:hover .ch-icon { border-color: var(--green); box-shadow: var(--glow-xs); }

.ch-text { display: flex; flex-direction: column; gap: 0.1rem; }
.ch-label { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.2em; color: var(--text-dim); text-transform: uppercase; }
.ch-value { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); }
.contact-channel:hover .ch-value { color: var(--green); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em; color: var(--text-dim); text-transform: uppercase; }
.form-label::before { content: '> '; color: var(--green); }
.form-input, .form-textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.85rem 1rem;
  outline: none;
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(0,255,65,0.07); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); opacity: 0.4; }
.form-textarea { min-height: 130px; }
.form-honeypot { display: none !important; }
.form-status { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.75rem 1rem; display: none; }
.form-status.success { display: block; background: rgba(0,255,65,0.06); border: 1px solid var(--green-dark); color: var(--green); }
.form-status.error { display: block; background: rgba(255,45,45,0.06); border: 1px solid rgba(255,45,45,0.3); color: var(--red); }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  padding: 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
footer a { color: var(--green-dim); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--green); }

/* ================================================================
   GLITCH
   ================================================================ */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; }
.glitch::before { color: var(--cyan); clip-path: polygon(0 25%, 100% 25%, 100% 45%, 0 45%); animation: g1 5s infinite; }
.glitch::after  { color: var(--red);  clip-path: polygon(0 65%, 100% 65%, 100% 80%, 0 80%); animation: g2 5s infinite; }
@keyframes g1 { 0%,89%,100%{opacity:0;transform:none} 90%{opacity:0.8;transform:translateX(-3px)} 93%{opacity:0.8;transform:translateX(3px)} 96%{opacity:0;transform:none} }
@keyframes g2 { 0%,86%,100%{opacity:0;transform:none} 87%{opacity:0.8;transform:translateX(3px)} 91%{opacity:0.8;transform:translateX(-3px)} 94%{opacity:0;transform:none} }

/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 2rem; }
  nav { padding: 0 2rem; }
  .hero-content { padding: 0 2rem 5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait-outer { max-width: 280px; }
  .skills-cols { grid-template-columns: 1fr 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: 1rem; }
  .exp-num { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  nav { padding: 0 1.25rem; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(3,6,3,0.97);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: all; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 0.85rem 1.5rem; font-size: 0.7rem; }
  .hamburger { display: flex; }
  .nav-status { display: none; }

  .hero-content { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-name { font-size: clamp(3rem, 14vw, 7rem); }

  .skills-cols { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-content { padding: 0 1rem 4rem; }
  .about-section, .experience-section, .skills-section, .education-section, .contact-section { padding: 5rem 0; }
  .section-title { font-size: clamp(2.5rem, 12vw, 5rem); }
}

/* ── Testimonials grid responsive ── */
@media (max-width: 768px) {
  .about-section div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .exp-item { padding: 2rem 0; }
}

/* ── Honeypot — never visible, never takes space ── */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tab-index: -1 !important;
}

/* ── Ensure about-section doesn't leak absolutely positioned children ── */
.about-section { isolation: isolate; }

/* ── Inner pages: ensure main content clears fixed nav ── */
main > section:first-child {
  scroll-margin-top: var(--nav-h);
}

/* ── Inner page hero header — clears fixed nav reliably ── */
.page-hero-header {
  padding-top: 9rem;   /* nav (~60px) + breathing room */
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.page-hero-header .container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 768px) {
  .page-hero-header { padding-top: 7rem; }
}
