:root {
  --bg: #05060d;
  --bg-2: #0a0c18;
  --surface: rgba(18, 22, 40, 0.55);
  --surface-solid: #10142a;
  --border: rgba(140, 160, 255, 0.14);
  --border-strong: rgba(140, 160, 255, 0.3);
  --text: #e8ecff;
  --muted: #9aa3c7;
  --dim: #6b7399;
  --cyan: #38e1ff;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --gold: #f5c35b;
  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 55%, var(--pink) 100%);
  --radius: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(56, 225, 255, 0.3); }

/* ---------- background layers ---------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; z-index: 1; pointer-events: none; width: 520px; height: 520px; border-radius: 50%;
  left: 0; top: 0; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.13), transparent 62%);
  transition: opacity 0.4s; opacity: 0;
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted); font-size: 13px;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08); border-top-color: var(--cyan); border-right-color: var(--violet);
  animation: spin 0.9s linear infinite;
}
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 28px));
  display: flex; align-items: center; gap: 20px; padding: 10px 12px 10px 16px;
  border: 1px solid var(--border); border-radius: 16px;
  background: rgba(8, 10, 22, 0.55); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  z-index: 50; transition: transform 0.4s var(--ease), background 0.3s;
}
.nav.hidden { transform: translate(-50%, -130%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #05060d; font-weight: 700; font-size: 14px;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: 14.5px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font: 600 15px var(--font); cursor: pointer;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04); color: var(--text);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); }
.btn-primary { background: var(--grad); color: #060713; border: 0; box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.7); }
.btn-primary:hover { box-shadow: 0 14px 50px -8px rgba(56, 225, 255, 0.65); }
.btn-ghost { backdrop-filter: blur(8px); }
.btn-small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 120px 0 80px; position: relative;
}
.hero-inner { max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: rgba(10, 12, 26, 0.5); backdrop-filter: blur(8px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero-title { margin: 22px 0 18px; font-size: clamp(42px, 7.2vw, 88px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.hero-title .line { display: block; }
.role-line { font-size: 0.46em; letter-spacing: -0.02em; color: var(--muted); font-weight: 500; margin-top: 14px; min-height: 1.25em; }
.caret { color: var(--cyan); animation: blink 1s steps(2) infinite; margin-left: 2px; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 600px; margin: 0 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-social { display: flex; gap: 10px; margin-top: 34px; }
.icon-link {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: rgba(10, 12, 26, 0.5); color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.icon-link:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-3px); }
.icon-link svg { width: 20px; height: 20px; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); letter-spacing: 0.2em; text-transform: uppercase;
}
.mouse { width: 22px; height: 34px; border: 1.5px solid var(--dim); border-radius: 12px; display: flex; justify-content: center; padding-top: 6px; }
.mouse span { width: 3px; height: 7px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(10px); } }

/* hero entrance */
.hero-inner > * { opacity: 0; transform: translateY(24px); }
body.ready .hero-inner > * { animation: rise 1s var(--ease) forwards; }
body.ready .hero-inner > *:nth-child(2) { animation-delay: 0.1s; }
body.ready .hero-inner > *:nth-child(3) { animation-delay: 0.2s; }
body.ready .hero-inner > *:nth-child(4) { animation-delay: 0.3s; }
body.ready .hero-inner > *:nth-child(5) { animation-delay: 0.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
.section { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 110px 0; }
.section-tight { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.section-head h2 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -0.03em; line-height: 1.05; }
.idx { color: var(--cyan); font-size: 14px; }
.section-sub { color: var(--muted); margin: -30px 0 48px; max-width: 640px; }
.idx::after { content: " /"; color: var(--dim); }

.glass {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.about-grid > *, .exp-layout > *, .projects-grid > *, .skills-grid > * { min-width: 0; }
.photo-card { position: relative; transform-style: preserve-3d; }
.photo-frame {
  border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; position: relative;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(56, 225, 255, 0.06);
}
.photo-frame::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 26px; background: var(--grad); filter: blur(24px); opacity: 0.45;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: scale(1.45); transform-origin: 50% 64%; filter: saturate(0.95) contrast(1.05); }
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 13, 0.75)); }
.photo-badge {
  position: absolute; left: 18px; bottom: 18px; z-index: 2; transform: translateZ(40px);
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 8px 12px; border-radius: 10px;
  background: rgba(5, 6, 13, 0.7); border: 1px solid var(--border); backdrop-filter: blur(8px);
}
.about-text p { color: var(--muted); margin: 0 0 18px; }
.about-text .lead { color: var(--text); font-size: clamp(19px, 2vw, 23px); line-height: 1.5; }
.code-card { margin-top: 26px; padding: 22px 24px; font-size: 13.5px; line-height: 1.75; overflow-x: auto; }
.code-card { background: rgba(8, 10, 22, 0.75); border: 1px solid var(--border); border-radius: 16px; position: relative; }
.code-card::before { content: "prem.config.js"; position: absolute; top: 10px; right: 14px; font-size: 11px; color: var(--dim); }
.code-card pre { margin: 0; color: #c9d1f5; }
.code-card .k { color: var(--violet); }
.code-card .s { color: #7ee7c7; }
.code-card .n { color: var(--gold); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.stat { padding: 26px 22px; }
.stat-value { font-size: clamp(34px, 4vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card { padding: 26px; position: relative; overflow: hidden; transition: border-color 0.3s; }
.skill-card:hover { border-color: var(--border-strong); }
.skill-card::before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 0%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 225, 255, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.skill-card:hover::before { opacity: 1; }
.skill-card h3 { margin: 0 0 16px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.skill-card h3 .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--grad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 13px var(--mono); padding: 6px 11px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: #cdd4f7;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---------- experience ---------- */
.exp-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), transparent); }
.tl-item { position: relative; margin-bottom: 18px; padding: 22px 24px; }
.tl-item::before {
  content: ""; position: absolute; left: -29px; top: 28px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 16px rgba(56, 225, 255, 0.6);
}
.tl-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-item h3 { margin: 0; font-size: 19px; }
.tl-org { color: var(--cyan); font-size: 15px; }
.tl-period { font: 500 12.5px var(--mono); color: var(--dim); white-space: nowrap; padding-top: 4px; }
.tl-item ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 15.5px; }
.tl-item li { margin-bottom: 4px; }
.edu { display: grid; gap: 18px; position: sticky; top: 100px; }
.edu-card { padding: 24px; }
.edu-card .mono { font-size: 12.5px; color: var(--dim); }
.edu-card h3 { margin: 8px 0 4px; font-size: 18px; line-height: 1.35; }
.edu-card p { margin: 0; color: var(--muted); font-size: 15px; }
.edu-score { display: inline-block; margin-top: 14px; font: 600 14px var(--mono); padding: 6px 12px; border-radius: 8px; background: rgba(245, 195, 91, 0.1); color: var(--gold); border: 1px solid rgba(245, 195, 91, 0.3); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filter {
  font: 500 14px var(--font); padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(10, 12, 26, 0.5); color: var(--muted);
  transition: all 0.25s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter .count { opacity: 0.55; margin-left: 6px; font-size: 12px; }

/* ---------- projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; perspective: 1400px; }
.project { grid-column: span 2; padding: 28px; display: flex; flex-direction: column; position: relative; overflow: hidden; transform-style: preserve-3d; transition: border-color 0.3s, opacity 0.4s, transform 0.4s; }
.project.featured { grid-column: span 3; }
.project.featured:first-child { grid-column: span 6; }
.project.hide { display: none; }
.project:hover { border-color: var(--border-strong); }
.project .shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.14), transparent 45%);
}
.project:hover .shine { opacity: 1; }
.p-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.p-badge { font: 500 11.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 7px; color: var(--gold); background: rgba(245, 195, 91, 0.1); border: 1px solid rgba(245, 195, 91, 0.25); }
.p-year { font: 500 12.5px var(--mono); color: var(--dim); }
.project h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; transform: translateZ(30px); }
.project.featured:first-child h3 { font-size: clamp(28px, 3.4vw, 40px); }
.p-tag { color: var(--cyan); font-size: 15px; margin: 4px 0 14px; transform: translateZ(20px); }
.project ul { margin: 0 0 20px; padding-left: 18px; color: var(--muted); font-size: 15px; }
.project li { margin-bottom: 6px; }
.project.featured:first-child ul { columns: 2; column-gap: 36px; }
.project.featured:first-child li { break-inside: avoid; }
.p-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.p-stack .chip { font-size: 12px; padding: 4px 9px; }
.p-links { display: flex; gap: 10px; margin-top: 20px; }
.p-link { display: inline-flex; align-items: center; gap: 7px; font: 500 13.5px var(--mono); color: var(--text); padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border); transition: all 0.2s; }
.p-link:hover { border-color: var(--cyan); color: var(--cyan); }
.p-link svg { width: 16px; height: 16px; }
.more-link { margin-top: 36px; text-align: center; }

/* ---------- research ---------- */
.research-card {
  padding: clamp(28px, 4vw, 48px); border-radius: 24px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 225, 255, 0.1), rgba(139, 92, 246, 0.12) 50%, rgba(244, 114, 182, 0.08));
  border: 1px solid var(--border-strong);
}
.research-meta { font-size: 12.5px; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.research-card h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.02em; margin: 12px 0 14px; max-width: 900px; }
.research-card p { color: var(--muted); max-width: 820px; margin: 0 0 24px; }

/* ---------- achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ach { padding: 26px 24px; position: relative; overflow: hidden; cursor: default; transition: transform 0.4s var(--ease), border-color 0.3s; }
.ach.clickable { cursor: pointer; }
.ach:hover { transform: translateY(-6px); border-color: rgba(245, 195, 91, 0.4); }
.ach-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; background: rgba(245, 195, 91, 0.1); border: 1px solid rgba(245, 195, 91, 0.25); }
.ach h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.ach p { margin: 0; color: var(--muted); font-size: 14.5px; }
.ach .view { margin-top: 14px; font: 500 12.5px var(--mono); color: var(--gold); }

/* ---------- certifications ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert { padding: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform 0.4s var(--ease), border-color 0.3s; }
.cert:hover { transform: translateY(-6px) rotateX(4deg); border-color: var(--border-strong); }
.cert.hide { display: none; }
.cert-thumb { aspect-ratio: 16 / 11; overflow: hidden; background: #fff; position: relative; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.cert:hover .cert-thumb img { transform: scale(1.06); }
.cert-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(5, 6, 13, 0.45)); }
.cert-body { padding: 16px 18px 18px; }
.cert-body h3 { margin: 0 0 6px; font-size: 15.5px; line-height: 1.35; }
.cert-meta { display: flex; justify-content: space-between; gap: 8px; font: 500 12px var(--mono); color: var(--dim); }
.cert-meta .issuer { color: var(--cyan); }
.other-creds { color: var(--dim); font-size: 14.5px; margin-top: 26px; }
.other-creds strong { color: var(--muted); font-weight: 500; }

/* ---------- contact ---------- */
.contact { padding-bottom: 80px; }
.contact-card {
  text-align: center; padding: clamp(40px, 6vw, 80px) 24px; border-radius: 28px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.22), transparent 60%), rgba(10, 12, 26, 0.6);
  border: 1px solid var(--border-strong); backdrop-filter: blur(14px);
}
.contact-card h2 { font-size: clamp(32px, 5.4vw, 64px); letter-spacing: -0.035em; line-height: 1.05; margin: 14px 0 16px; }
.contact-card p { color: var(--muted); margin: 0 auto 28px; max-width: 520px; }
.contact-email { display: inline-block; font-size: clamp(18px, 2.6vw, 28px); font-weight: 600; border-bottom: 2px solid var(--violet); padding-bottom: 4px; transition: color 0.2s, border-color 0.2s; word-break: break-all; }
.contact-email:hover { color: var(--cyan); border-color: var(--cyan); }
.contact-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.footer {
  width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--dim); font-size: 12.5px; border-top: 1px solid var(--border);
}

/* ---------- viewer ---------- */
.viewer {
  width: min(1000px, calc(100% - 24px)); height: min(88vh, 820px); padding: 0; border-radius: 18px;
  border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); overflow: hidden;
}
.viewer::backdrop { background: rgba(2, 3, 8, 0.8); backdrop-filter: blur(6px); }
.viewer[open] { display: flex; flex-direction: column; animation: pop 0.35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.viewer-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; gap: 8px; flex: none; }
.viewer-body { flex: 1; background: #1b1f33; display: grid; place-items: center; overflow: auto; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav-links { position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; padding: 12px; border-radius: 16px; background: rgba(8, 10, 22, 0.95); border: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  #navResume { margin-left: auto; }
  .menu-btn { display: grid; gap: 5px; place-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: transparent; cursor: pointer; }
  .menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .ach-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .exp-layout { grid-template-columns: 1fr; }
  .edu { position: static; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project, .project.featured { grid-column: span 1; }
  .project.featured:first-child { grid-column: span 2; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .photo-card { max-width: 380px; }
  .skills-grid, .projects-grid, .ach-grid { grid-template-columns: 1fr; }
  .project.featured:first-child { grid-column: span 1; }
  .project.featured:first-child ul { columns: 1; }
  .cert-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cert-body { padding: 12px; }
  .cert-body h3 { font-size: 14px; }
  .cert-meta { flex-direction: column; gap: 2px; font-size: 11px; }
  .brand-name { display: none; }
  .hero { padding-top: 110px; }
  .stat { padding: 20px 16px; }
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .hero-inner > * { opacity: 1; transform: none; }
}
