/* ============================================================
   RAHUL SHARMA — PORTFOLIO
   style.css
   Aesthetic: Brutalist-Luxury Dark Editorial
   Fonts: Bebas Neue (display) · Cormorant Garamond (body/italic) · JetBrains Mono (code)
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; }

/* ── CSS VARIABLES ── */
:root {
  /* Palette */
  --bg:        #050608;
  --bg2:       #0a0c10;
  --surface:   #0f1117;
  --surface2:  #161a22;
  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.14);
  --accent:    #c8ff00;     /* electric chartreuse */
  --accent2:   #ff4d00;     /* burnt orange flash */
  --text:      #f0f0ef;
  --muted:     #6a6e78;
  --muted2:    #9298a4;

  /* Type */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Cormorant Garamond', serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --container:   1200px;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
body.loading { overflow: hidden; }

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

/* ── CONTAINER ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
#loader.done {
  opacity: 0; pointer-events: none; transform: translateY(-4px);
}
.loader-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.loader-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: .25em;
  color: var(--text);
}
.loader-bar {
  width: 240px; height: 1px;
  background: var(--border2);
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .05s linear;
}
.loader-pct {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .12em;
}
.loader-pct::after { content: '%'; }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
#cursor { position: fixed; z-index: 9995; pointer-events: none; top: 0; left: 0; }
#cursor-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s;
}
#cursor-ring {
  position: absolute;
  width: 40px; height: 40px;
  border: 1px solid rgba(200, 255, 0, .4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), border-color .3s, transform .12s;
}
#cursor-text {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}
body.cursor-hover #cursor-dot { width: 10px; height: 10px; background: var(--accent); }
body.cursor-hover #cursor-ring {
  width: 64px; height: 64px;
  border-color: rgba(200, 255, 0, .7);
  mix-blend-mode: difference;
}
body.cursor-link #cursor-ring { width: 56px; height: 56px; border-color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 60px);
  transition: background .4s, border-color .4s, padding .4s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(5, 6, 8, .88);
  border-color: var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: 16px; padding-bottom: 16px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: .1em;
  color: var(--text);
}
.logo-dot { color: var(--accent); }
.nav-center {
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .1em;
  color: var(--muted2);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00ff88;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,.4); }
  50%       { box-shadow: 0 0 0 5px rgba(0,255,136,0); }
}
.nav-right { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 22px;
  border: 1px solid var(--border2);
  color: var(--text);
  transition: background .2s, border-color .2s, color .2s;
}
.nav-cta:hover {
  background: var(--accent); color: var(--bg);
  border-color: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(20px, 4vw, 60px) clamp(40px, 6vw, 80px);
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-content { position: relative; z-index: 2; }
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(30px, 5vw, 80px);
  align-items: end;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
  opacity: 0; animation: fadeUp .6s .8s forwards;
}
.eyebrow-line {
  display: block; width: 48px; height: 1px;
  background: var(--accent);
}
.eyebrow-text {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.2vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.01em;
  margin-bottom: 0;
}
.hero-identity {
  position: relative;
}

.hero-kicker {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}

.ascii-portrait {
  width: min(300px, 100%);
  margin-bottom: 10px;
  position: relative;
  opacity: 0;
  animation: fadeUp .8s 1.4s forwards;
}

.ascii-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .55rem;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}

.ascii-frame {
  min-height: 270px;
  padding: 18px 8px;
  background: rgba(5, 6, 8, .72);
  border-left: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  overflow: hidden;
}


.profile-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
}

.ascii-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  font-family: var(--font-mono);
  font-size: .52rem;
  letter-spacing: .08em;
  color: var(--muted);
}

.ascii-meta span:nth-child(1) {
  color: var(--accent);
}
.title-row {
  display: block;
  overflow: hidden;
}
.title-word {
  display: inline-block;
  opacity: 0; transform: translateY(110%);
  animation: slideUp .9s var(--ease-out) forwards;
}
.title-row:nth-child(1) .title-word { animation-delay: .9s; }
.title-row:nth-child(2) .title-word { animation-delay: 1.05s; }
.title-row:nth-child(3) .title-word { animation-delay: 1.2s; }
.title-accent {
  display: inline-block;
  color: var(--accent);
  margin-left: .08em;
  opacity: 0; transform: translateY(110%);
  animation: slideUp .9s var(--ease-out) 1.2s forwards;
}
.italic-row em {
  font-family: var(--font-body);
  font-style: italic; font-weight: 300;
  font-size: clamp(2.5rem, 6.2vw, 6.2rem);
  line-height: 1;
  color: var(--muted2);
}

.hero-bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp .7s 1.5s forwards;
}
.hero-desc p {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted2);
  max-width: 360px; line-height: 1.7;
}
.hero-ctas { display: flex; align-items: center; gap: 24px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px;
  background: var(--accent); color: var(--bg);
  font-family: var(--font-mono); font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  font-weight: 500;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  background: #d4ff33;
  box-shadow: 0 0 40px rgba(200,255,0,.3);
  transform: translateY(-2px);
}
.hero-socials { display: flex; gap: 12px; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border2);
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .06em;
  color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); }

.hero-scroll-indicator {
  position: absolute; bottom: clamp(32px, 5vw, 56px); right: clamp(20px, 4vw, 60px);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: fadeIn 1s 2s forwards;
}
.hero-scroll-indicator span {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .2em; color: var(--muted);
  writing-mode: vertical-lr;
}
.scroll-line {
  width: 1px; height: 64px;
  background: var(--border2); overflow: hidden;
}
.scroll-progress {
  width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

.hero-index {
  position: absolute; top: 50%; right: clamp(20px, 4vw, 60px);
  transform: translateY(-50%);
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .2em; color: var(--muted);
  writing-mode: vertical-lr;
  z-index: 2;
  opacity: 0; animation: fadeIn 1s 2s forwards;
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  background: var(--surface);
}
.marquee-track {
  display: flex; align-items: center; gap: 32px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.marquee-track .sep { color: var(--accent); font-size: .5rem; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
section { padding: var(--section-pad) 0; }
.section-header {
  display: flex; align-items: flex-start; gap: 20px;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.section-num {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .12em; color: var(--muted);
  padding-top: .7rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: .92; letter-spacing: .01em;
}
.section-title em {
  font-family: var(--font-body);
  font-style: italic; font-weight: 300;
  font-size: .85em;
  color: var(--muted2);
}

/* ── REVEAL ANIMATIONS ── */
.reveal-text {
  opacity: 0; transform: translateY(48px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal-text.visible { opacity: 1; transform: translateY(0); }

.reveal-fade {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal-fade.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   ABOUT
   ============================================================ */
#about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 340px 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}
.portrait-frame { position: relative; }
.portrait-placeholder {
  width: 280px; height: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
  filter: grayscale(100%);
}

.portrait-initials {
  font-family: var(--font-display);
  font-size: 5rem; letter-spacing: .1em;
  color: var(--border2); z-index: 1;
}
.portrait-rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--border);
  animation: ringPulse 4s ease-in-out infinite;
}
.r1 { width: 180px; height: 180px; animation-delay: 0s; }
.r2 { width: 260px; height: 260px; animation-delay: .6s; }
.r3 { width: 340px; height: 340px; animation-delay: 1.2s; }
@keyframes ringPulse {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .08; transform: scale(1.04); }
}
.portrait-caption {
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.caption-line {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; color: var(--muted);
}

.about-lead {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 300; line-height: 1.35;
  margin-bottom: 28px;
}
.about-lead em { color: var(--accent); font-style: italic; }
.about-body {
  font-size: 1.05rem; color: var(--muted2);
  line-height: 1.85; margin-bottom: 16px;
  max-width: 540px;
}
.about-stats {
  display: flex; gap: 40px; margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; }
.stat-n {
  font-family: var(--font-display);
  font-size: 3.5rem; line-height: 1;
  color: var(--text);
}
.stat-unit { font-family: var(--font-display); font-size: 2rem; color: var(--accent); }
.stat-l {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-top: 8px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-wrapper {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.skill-group {
  background: var(--surface);
  padding: 40px 36px;
  border: 1px solid var(--border);
  transition: border-color .3s;
}
.skill-group:hover { border-color: var(--border2); }
.sg-header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.sg-num {
  font-family: var(--font-mono); font-size: .65rem;
  color: var(--accent); letter-spacing: .1em;
}
.sg-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: .05em;
  font-weight: 400;
}
.sg-items { display: flex; flex-direction: column; gap: 16px; }
.si { display: flex; flex-direction: column; gap: 6px; }
.si span {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .06em; color: var(--muted2);
  display: flex; justify-content: space-between;
}
.si-bar {
  height: 2px; background: var(--border);
  overflow: hidden;
}
.si-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), rgba(200,255,0,.4));
  transition: width 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 0.1s);
}
.skill-group.visible .si-fill { width: var(--w); }

/* ============================================================
   WORK / PROJECTS
   ============================================================ */
#work { background: var(--bg2); }
.projects-list { display: flex; flex-direction: column; gap: 2px; }

.project-item {
  display: grid; grid-template-columns: 120px 1fr 280px;
  gap: 40px; align-items: start;
  padding: 48px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: border-color .4s, background .4s;
  cursor: none;
}
.project-item::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.project-item:hover { border-color: rgba(200,255,0,.2); background: rgba(15,17,23,.9); }
.project-item:hover::before { transform: scaleX(1); }

.pi-left { padding-top: 4px; }
.pi-num {
  font-family: var(--font-display);
  font-size: 3.5rem; line-height: 1;
  color: var(--border2);
  display: block; margin-bottom: 20px;
  transition: color .3s;
}
.project-item:hover .pi-num { color: var(--accent); }
.pi-tags { display: flex; flex-direction: column; gap: 8px; }
.pi-tags span {
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  display: inline-block; width: fit-content;
}

.pi-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  line-height: 1.0; letter-spacing: .03em;
  margin-bottom: 16px;
  transition: color .3s;
}
.project-item:hover .pi-title { color: var(--accent); }
.pi-desc {
  font-size: 1rem; color: var(--muted2);
  line-height: 1.75; max-width: 480px;
  margin-bottom: 20px;
}
.pi-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
  padding-bottom: 2px;
}
.pi-link:hover { border-color: var(--accent); }

/* Project Visuals */
.pi-visual {
  width: 100%; height: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}
.pv-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3px; width: 100%; height: 100%; padding: 16px;
}
.pv-cell {
  border-radius: 2px;
  transition: opacity 1s;
}
.pv-cell.thermal  { background: linear-gradient(135deg, #1a0a00, #8b3a00, #ff6600); }
.pv-cell.optical  { background: linear-gradient(135deg, #001a1a, #005566, #00aacc); }
.pv-cell.enhanced { background: linear-gradient(135deg, #0d1a00, #336600, #88cc00); }
.pv-cell.result   { background: linear-gradient(135deg, #1a1a00, #665500, var(--accent)); }

.pv-waveform {
  display: flex; align-items: center; gap: 5px;
  padding: 16px; width: 100%; height: 100%;
}
.wave-bar {
  flex: 1; height: var(--h);
  background: linear-gradient(180deg, var(--accent), rgba(200,255,0,.2));
  border-radius: 1px;
  animation: waveAnim 2s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * .1s);
}
@keyframes waveAnim {
  from { transform: scaleY(.6); }
  to   { transform: scaleY(1); }
}

.pv-chart {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 16px 20px 20px; width: 100%; height: 100%;
}
.chart-bar {
  flex: 1; height: var(--h);
  background: linear-gradient(180deg, var(--accent), rgba(200,255,0,.1));
  transition: height .6s var(--ease-out);
  transition-delay: var(--delay);
}

.pv-network {
  padding: 10px; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.pv-network svg { width: 100%; height: 100%; }

.pi-status {
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.pi-status.ongoing { color: var(--accent); }

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.ach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.ach-card {
  background: var(--surface);
  padding: 40px 36px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 20px;
  position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.ach-card:hover { border-color: rgba(200,255,0,.3); transform: translateY(-4px); }
.ach-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.ach-card:hover::after { transform: scaleX(1); }
.ach-icon { font-size: 1.8rem; line-height: 1; }
.ach-body h4 {
  font-family: var(--font-display);
  font-size: 1.3rem; letter-spacing: .04em;
  margin-bottom: 10px;
}
.ach-body p { font-size: .95rem; color: var(--muted2); line-height: 1.7; }
.ach-year {
  margin-top: auto;
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .12em; color: var(--muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact { background: var(--bg); overflow: hidden; position: relative; }
#contact::before {
  content: 'CONTACT';
  position: absolute; bottom: -40px; right: -20px;
  font-family: var(--font-display);
  font-size: clamp(8rem, 20vw, 22rem);
  color: var(--border);
  line-height: 1; pointer-events: none;
  letter-spacing: -.02em;
}
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
  position: relative; z-index: 1;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: .9; letter-spacing: .01em;
}
.contact-title em {
  font-family: var(--font-body);
  font-style: italic; font-weight: 300;
  color: var(--accent);
  font-size: .85em;
}
.contact-sub {
  font-size: 1.05rem; color: var(--muted2);
  line-height: 1.75; margin-bottom: 36px;
  max-width: 400px;
}
.contact-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border2);
  font-family: var(--font-mono); font-size: .85rem;
  letter-spacing: .04em; color: var(--text);
  transition: border-color .2s, background .2s, color .2s;
  margin-bottom: 24px;
}
.contact-cta:hover {
  border-color: var(--accent); background: rgba(200,255,0,.04); color: var(--accent);
}
.contact-socials { display: flex; gap: 24px; }
.cs-link {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.cs-link:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-inner span {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .1em; color: var(--muted);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(110%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait-frame {
    display: block;
    width: min(280px, 100%);
    margin: 0 auto;
  }

  .portrait-placeholder {
    width: min(280px, 100%);
    height: auto;
    aspect-ratio: 280 / 340;
  }
  .skills-wrapper { grid-template-columns: 1fr 1fr; }
  .project-item { grid-template-columns: 80px 1fr; }
  .pi-right { display: none; }
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }

  .hero-main {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
  }

  .hero-title {
    font-size: clamp(3.2rem, 7.2vw, 6.6rem);
  }

  .italic-row em {
    font-size: clamp(2.5rem, 6vw, 6rem);
  }

  .ascii-portrait { width: 280px; }
  .ascii-frame { min-height: 250px; }
}

@media (max-width: 900px) {
  #hero {
    min-height: auto;
    padding-top: 110px;
  }

  .hero-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-identity { order: 1; }
  .ascii-portrait {
    order: 2;
    width: min(100%, 430px);
  }

  .ascii-frame {
    min-height: 250px;
  }

  .hero-bottom {
    margin-top: 34px;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-center, .nav-right .nav-link { display: none; }

  .portrait-frame {
    width: min(240px, 100%);
  }

  .portrait-placeholder {
    width: 100%;
    aspect-ratio: 280 / 340;
  }
  .skills-wrapper { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: 1fr; }
  .project-item { grid-template-columns: 1fr; padding: 32px 24px; }
  .pi-left { display: flex; gap: 16px; align-items: center; }
  .pi-num { font-size: 2rem; margin-bottom: 0; }

  #hero {
    padding: 88px 20px 44px;
  }

  .hero-eyebrow {
    margin-bottom: 22px;
    gap: 10px;
  }

  .eyebrow-text {
    font-size: .62rem;
    letter-spacing: .1em;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 5.4rem);
    line-height: .9;
  }

  .italic-row em {
    font-size: clamp(2.2rem, 11vw, 4.4rem);
  }

  .hero-kicker { display: none; }

  .ascii-portrait {
    width: 100%;
    max-width: 100%;
  }

  .ascii-frame {
    min-height: 210px;
    padding: 14px 5px;
  }

  .hero-bottom {
    margin-top: 24px;
    gap: 24px;
  }

  .hero-desc p {
    font-size: .92rem;
    line-height: 1.6;
  }

  .hero-ctas {
    width: 100%;
    justify-content: space-between;
  }

  .btn-primary {
    padding: 14px 26px;
  }

  .hero-scroll-indicator { display: none; }

  .about-stats { flex-direction: column; gap: 24px; }
  #contact::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
