/* ================================================
   ANIMAN PORTFOLIO — Redesigned
   Creatively minimal, distinctive, engineering-focused
   ================================================ */

/* --- Design Tokens --- */
:root {
  /* Typography */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;
  --text-4xl: 3.5rem;
  --text-5xl: clamp(2.5rem, 6vw, 4.5rem);

  /* Weights */
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-bold: 700;
  --w-black: 800;

  /* Leading */
  --l-tight: 1.1;
  --l-snug: 1.25;
  --l-normal: 1.5;
  --l-relaxed: 1.7;

  /* Spacing */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s8: 2rem;
  --s10: 2.5rem;
  --s12: 3rem;
  --s16: 4rem;
  --s20: 5rem;
  --s24: 6rem;
  --s32: 8rem;
  --s40: 10rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 9999px;

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-theme: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-w: 1080px;
  --pad: var(--s6);
  --gap-section: var(--s24);
}

/* --- DARK THEME (default) --- */
[data-theme="dark"] {
  --bg: #0c0c0c;
  --bg-alt: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text: #e8e8e8;
  --text-2: #999999;
  --text-3: #666666;
  --accent: #c8c8c8;
  --accent-strong: #ffffff;
  --accent-color: #7c8fff;
  --accent-color-dim: rgba(124, 143, 255, 0.15);
  --line: #222222;
  --line-hover: #333333;
  --badge-bg: rgba(124, 143, 255, 0.12);
  --badge-text: #a0aeff;
  --tag-bg: #1a1a1a;
  --tag-border: #2a2a2a;
  --nav-bg: rgba(12, 12, 12, 0.8);
  --project-num: #333333;
  --img-ring: #222222;
  --scrollbar-thumb: #333333;
}

/* --- LIGHT THEME --- */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f3f3f3;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8f8;
  --text: #1a1a1a;
  --text-2: #5c5c5c;
  --text-3: #999999;
  --accent: #555555;
  --accent-strong: #000000;
  --accent-color: #5b6acf;
  --accent-color-dim: rgba(91, 106, 207, 0.08);
  --line: #e8e8e8;
  --line-hover: #d0d0d0;
  --badge-bg: rgba(91, 106, 207, 0.08);
  --badge-text: #4a5abf;
  --tag-bg: #f3f3f3;
  --tag-border: #e2e2e2;
  --nav-bg: rgba(250, 250, 250, 0.8);
  --project-num: #d8d8d8;
  --img-ring: #e8e8e8;
  --scrollbar-thumb: #cccccc;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: var(--l-relaxed);
  color: var(--text);
  background: var(--bg);
  transition: background var(--t-theme), color var(--t-theme);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection {
  background: var(--accent-color);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ================================================
   SKIP LINK
   ================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s4);
  padding: var(--s2) var(--s4);
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  z-index: 1000;
}

.skip-link:focus { top: var(--s4); }

/* ================================================
   LAYOUT
   ================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: var(--gap-section) 0;
}

.section--alt {
  background: var(--bg-alt);
  transition: background var(--t-theme);
}

.section__label {
  margin-bottom: var(--s12);
  display: flex;
  align-items: center;
  gap: var(--s5);
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--t-theme);
}

.section__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  transition: background var(--t-theme);
}

.section__num {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--accent-color);
  font-weight: var(--w-medium);
  transition: color var(--t-theme);
}

/* ================================================
   HEADER / NAV
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background var(--t-theme), border-color var(--t-theme);
}

.header--scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  font-family: var(--mono);
  font-size: var(--text-md);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  transition: opacity var(--t-fast);
}

.nav__logo:hover { opacity: 0.7; }
.nav__logo-dot { color: var(--accent-color); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  color: var(--text-3);
  letter-spacing: 0.02em;
  transition: color var(--t-fast);
  position: relative;
}

.nav__link:hover,
.nav__link--active { color: var(--text); }

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent-color);
  border-radius: 1px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}

.theme-toggle:hover {
  background: var(--tag-bg);
}

.theme-toggle__icon { transition: opacity var(--t-fast); }
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: block; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.nav__hamburger-line {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.nav__hamburger.active .nav__hamburger-line:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.nav__hamburger.active .nav__hamburger-line:nth-child(2) {
  opacity: 0;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 var(--s16);
  position: relative;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s16);
  align-items: center;
}

.hero__overline {
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--accent-color);
  margin-bottom: var(--s3);
  letter-spacing: 0.02em;
  transition: color var(--t-theme);
}

.hero__name {
  font-size: var(--text-5xl);
  font-weight: var(--w-black);
  line-height: var(--l-tight);
  letter-spacing: -0.03em;
  color: var(--accent-strong);
  margin-bottom: var(--s5);
  transition: color var(--t-theme);
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero__name-break {
  display: block;
}

.hero__name-dot {
  color: var(--accent-color);
}

.hero__desc {
  font-size: var(--text-md);
  color: var(--text-2);
  line-height: var(--l-relaxed);
  max-width: 520px;
  margin-bottom: var(--s6);
  transition: color var(--t-theme);
}

.hero__highlight {
  color: var(--accent-color);
  font-weight: var(--w-medium);
}

.hero__links {
  display: flex;
  gap: var(--s3);
}

.hero__link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  border: 1px solid var(--line);
  transition: all var(--t-fast);
}

.hero__link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-color-dim);
}

/* Hero Image */
.hero__image-wrap {
  width: 220px;
  height: 220px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid var(--img-ring);
  transition: border-color var(--t-theme);
  flex-shrink: 0;
  position: relative;
  background: var(--accent-color-dim);
}

.hero__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, transparent 60%, var(--accent-color-dim));
  pointer-events: none;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
}

/* Scroll Hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--s10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 1.2s;
}

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: var(--line);
  position: relative;
  transition: background var(--t-theme);
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
  background: var(--accent-color);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

.hero__scroll-text {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(20px); opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ================================================
   ABOUT
   ================================================ */
.about__content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s16);
  align-items: start;
}

.about__lead {
  font-size: var(--text-xl);
  font-weight: var(--w-semibold);
  color: var(--text);
  line-height: var(--l-snug);
  margin-bottom: var(--s5);
  transition: color var(--t-theme);
}

.about__lead em {
  color: var(--accent-color);
  font-style: normal;
}

.about__body {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: var(--l-relaxed);
  transition: color var(--t-theme);
}

.about__side {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

.about__edu {
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t-theme);
}

.about__edu-degree {
  font-weight: var(--w-semibold);
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: var(--s1);
  transition: color var(--t-theme);
}

.about__edu-school {
  font-size: var(--text-sm);
  color: var(--text-2);
  transition: color var(--t-theme);
}

.about__edu-minor {
  font-size: var(--text-sm);
  color: var(--text-3);
  transition: color var(--t-theme);
}

.about__edu-when {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: var(--s2);
  transition: color var(--t-theme);
}

.about__focus {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.about__focus-tag {
  font-family: var(--mono);
  font-size: var(--text-xs);
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--text-2);
  transition: all var(--t-fast);
}

.about__focus-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-color-dim);
}

/* ================================================
   SKILLS — Column Layout
   ================================================ */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s10);
}

.skill-col__title {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--w-medium);
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s4);
  transition: color var(--t-theme);
}

.skill-col__title--spaced {
  margin-top: var(--s6);
}

.skill-col__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
}

.skill-col__list li {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--l-normal);
  transition: color var(--t-theme);
}

.skill-col__list li::after {
  content: '·';
  margin-left: var(--s3);
  color: var(--text-3);
}

.skill-col__list li:last-child::after {
  content: none;
}

/* ================================================
   PROJECTS — Vertical List Layout
   ================================================ */
.projects__list {
  display: flex;
  flex-direction: column;
}

.project {
  padding: var(--s10) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--t-theme);
}

.project:first-child {
  padding-top: 0;
}

.project:last-child {
  border-bottom: none;
}

.project__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}

.project__num {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--project-num);
  font-weight: var(--w-medium);
  transition: color var(--t-theme);
}

.project__links {
  display: flex;
  gap: var(--s4);
}

.project__link {
  color: var(--text-3);
  transition: color var(--t-fast);
  display: flex;
  align-items: center;
}

.project__link:hover {
  color: var(--accent-color);
}

.project__title {
  font-size: var(--text-2xl);
  font-weight: var(--w-bold);
  color: var(--accent-strong);
  margin-bottom: var(--s3);
  letter-spacing: -0.01em;
  transition: color var(--t-theme);
}

.project__desc {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: var(--l-relaxed);
  max-width: 720px;
  margin-bottom: var(--s5);
  transition: color var(--t-theme);
  overflow-wrap: break-word;
}

.project__badge {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--w-medium);
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 2px var(--s2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  display: inline;
  transition: all var(--t-theme);
}

.project__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.project__stats span {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-3);
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  transition: all var(--t-theme);
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.project__stack span {
  font-size: var(--text-sm);
  color: var(--text-2);
  transition: color var(--t-theme);
}

.project__stack span::after {
  content: '·';
  margin-left: var(--s3);
  color: var(--text-3);
}

.project__stack span:last-child::after {
  content: none;
}

/* ================================================
   RESEARCH
   ================================================ */
.research__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin-bottom: var(--s10);
}

.research-item {
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.research-item:hover {
  border-color: var(--accent-color);
  background: var(--accent-color-dim);
}

.research-item__title {
  font-size: var(--text-base);
  font-weight: var(--w-semibold);
  color: var(--text);
  margin-bottom: var(--s2);
  transition: color var(--t-theme);
}

.research-item__desc {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: var(--l-relaxed);
  transition: color var(--t-theme);
}

.research__papers {
  border-top: 1px solid var(--line);
  padding-top: var(--s8);
  transition: border-color var(--t-theme);
}

.research__papers-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s4);
  transition: color var(--t-theme);
}

.research__papers-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.research__papers-list li {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--l-relaxed);
  padding-left: var(--s5);
  position: relative;
  transition: color var(--t-theme);
}

.research__papers-list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  transition: color var(--t-theme);
}

/* ================================================
   LEADERSHIP
   ================================================ */
.leadership {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s10);
  align-items: start;
}

.leadership__title {
  font-size: var(--text-lg);
  font-weight: var(--w-semibold);
  color: var(--text);
  margin-bottom: var(--s1);
  transition: color var(--t-theme);
}

.leadership__org {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--s5);
  transition: color var(--t-theme);
}

.leadership__list li {
  position: relative;
  padding-left: var(--s5);
  margin-bottom: var(--s2);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--l-normal);
  transition: color var(--t-theme);
}

.leadership__list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  transition: color var(--t-theme);
}

.leadership__awards {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.leadership__award {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
}

.leadership__award-badge {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--w-medium);
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: var(--s1) var(--s3);
  border-radius: var(--r-full);
  white-space: nowrap;
  transition: all var(--t-theme);
}

.leadership__award-text {
  font-size: var(--text-sm);
  color: var(--text-2);
  transition: color var(--t-theme);
}

/* ================================================
   CONTACT
   ================================================ */
.contact {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.contact__heading {
  font-size: var(--text-3xl);
  font-weight: var(--w-bold);
  color: var(--accent-strong);
  margin-bottom: var(--s4);
  letter-spacing: -0.02em;
  transition: color var(--t-theme);
}

.contact__body {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: var(--l-relaxed);
  margin-bottom: var(--s8);
  transition: color var(--t-theme);
}

.contact__email {
  font-family: var(--mono);
  font-size: var(--text-md);
  color: var(--accent-color);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all var(--t-fast);
  word-break: break-all;
}

.contact__email:hover {
  border-bottom-color: var(--accent-color);
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: var(--s6);
  margin-top: var(--s10);
}

.contact__social {
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  color: var(--text-3);
  transition: color var(--t-fast);
}

.contact__social:hover {
  color: var(--accent-color);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  padding: var(--s8) 0;
  border-top: 1px solid var(--line);
  transition: border-color var(--t-theme);
}

.footer__text {
  text-align: center;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-3);
  letter-spacing: 0.04em;
  transition: color var(--t-theme);
}

/* ================================================
   REVEAL ANIMATION
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero__scroll-line::after { animation: none; }
  .hero__scroll-hint { animation: none; opacity: 1; }
}

/* ================================================
   RESPONSIVE — Tablet & below (900px)
   ================================================ */
@media (max-width: 900px) {
  :root {
    --pad: var(--s5);
    --gap-section: var(--s16);
    --text-5xl: clamp(2.25rem, 7vw, 3.5rem);
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(280px, 80vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--s8);
    background: var(--bg);
    border-left: 1px solid var(--line);
    padding: var(--s8);
    transition: right var(--t-base), background var(--t-theme);
    z-index: 50;
  }

  .nav__links.open { right: 0; }
  .nav__hamburger { display: flex; }
  .nav__link { font-size: var(--text-lg); }

  .hero {
    min-height: auto;
    padding: 100px 0 var(--s16);
    justify-content: center;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--s10);
    align-items: start;
  }

  .hero__image-wrap {
    width: 140px;
    height: 140px;
    order: -1;
    margin: 0 auto;
  }

  .hero__text {
    text-align: center;
  }

  .hero__overline {
    font-size: var(--text-xs);
    margin-bottom: var(--s2);
  }

  .hero__name {
    font-size: clamp(2.25rem, 8vw, 3.25rem);
    margin-bottom: var(--s4);
  }

  .hero__desc {
    font-size: var(--text-base);
    max-width: 100%;
    margin: 0 auto var(--s6) auto;
  }

  .hero__links {
    justify-content: center;
  }

  .hero__scroll-hint { display: none; }

  .about__content {
    grid-template-columns: 1fr;
    gap: var(--s8);
  }

  .about__lead {
    font-size: var(--text-lg);
  }

  .about__body {
    font-size: var(--text-sm);
  }

  .skills__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s6);
  }

  .skill-col__list li {
    font-size: var(--text-sm);
  }

  .project__title {
    font-size: var(--text-xl);
  }

  .project__desc {
    font-size: var(--text-sm);
  }

  .project__stats span {
    font-size: 0.6875rem;
  }

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

  .research-item {
    padding: var(--s5);
  }

  .leadership {
    grid-template-columns: 1fr;
    gap: var(--s8);
  }

  .leadership__title {
    font-size: var(--text-base);
  }

  .contact__heading {
    font-size: var(--text-2xl);
  }
}

/* ================================================
   RESPONSIVE — Phone (480px)
   ================================================ */
@media (max-width: 480px) {
  :root {
    --pad: var(--s4);
    --gap-section: var(--s12);
    --text-5xl: clamp(1.875rem, 9vw, 2.75rem);
  }

  body {
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .nav {
    height: 56px;
  }

  .nav__logo {
    font-size: 1rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: 90px 0 var(--s12);
    min-height: 70vh;
    min-height: 70dvh;
    justify-content: center;
  }

  .hero__inner {
    gap: var(--s10);
  }

  .hero__image-wrap {
    width: 120px;
    height: 120px;
    border-radius: var(--r-md);
  }

  .hero__overline {
    font-size: 0.6875rem;
    margin-bottom: var(--s2);
  }

  .hero__name {
    font-size: clamp(1.875rem, 10vw, 2.5rem);
    margin-bottom: var(--s3);
  }

  .hero__desc {
    font-size: 0.9375rem;
    margin-bottom: var(--s5);
  }

  .hero__links {
    gap: var(--s3);
  }

  .hero__link {
    width: 44px;
    height: 44px;
  }

  .section__label {
    font-size: 0.6875rem;
    margin-bottom: var(--s8);
  }

  .section {
    padding: var(--s12) 0;
  }

  .about__lead {
    font-size: var(--text-base);
    line-height: var(--l-snug);
  }

  .about__body {
    font-size: 0.875rem;
  }

  .about__edu {
    padding: var(--s4);
  }

  .about__focus-tag {
    font-size: 0.6875rem;
    padding: var(--s1) var(--s2);
  }

  .skills__grid {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }

  .skill-col__title {
    font-size: 0.6875rem;
  }

  .skill-col__list {
    gap: var(--s1) var(--s2);
  }

  .skill-col__list li {
    font-size: 0.8125rem;
  }

  .skill-col__list li::after {
    margin-left: var(--s2);
  }

  .project {
    padding: var(--s6) 0;
  }

  .project__meta {
    margin-bottom: var(--s3);
  }

  .project__title {
    font-size: var(--text-lg);
    margin-bottom: var(--s2);
  }

  .project__desc {
    font-size: 0.875rem;
    margin-bottom: var(--s4);
  }

  .project__badge {
    display: inline-block;
    margin-top: var(--s2);
  }

  .project__stats {
    flex-wrap: wrap;
    gap: var(--s2);
    margin-bottom: var(--s3);
  }

  .project__stats span {
    font-size: 0.625rem;
    padding: 2px var(--s2);
  }

  .project__stack span {
    font-size: 0.8125rem;
  }

  .research-item__title {
    font-size: 0.9375rem;
  }

  .research-item__desc {
    font-size: 0.8125rem;
  }

  .research__papers-list li {
    font-size: 0.8125rem;
    padding-left: var(--s4);
  }

  .leadership__list li {
    font-size: 0.875rem;
  }

  .leadership__award {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
  }

  .leadership__award-text {
    font-size: 0.8125rem;
  }

  .contact {
    padding-top: var(--s4);
  }

  .contact__heading {
    font-size: var(--text-xl);
    margin-bottom: var(--s3);
  }

  .contact__body {
    font-size: 0.875rem;
    margin-bottom: var(--s6);
  }

  .contact__email {
    font-size: var(--text-sm);
    word-break: break-all;
  }

  .contact__socials {
    gap: var(--s5);
    margin-top: var(--s8);
  }

  .footer {
    padding: var(--s6) 0;
  }

  .footer__text {
    font-size: 0.625rem;
  }
}

/* ================================================
   RESPONSIVE — Large Screens (1280px+)
   ================================================ */
@media (min-width: 1280px) {
  :root { --max-w: 1120px; }
  .hero__image-wrap {
    width: 260px;
    height: 260px;
  }
}

/* ================================================
   MOBILE NAV OVERLAY
   ================================================ */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}