/* ===================================================================
   Ashwini Sharma — Portfolio
   =================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0f;
  --bg-soft: #11111a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ecedf2;
  --text-soft: #a6a8b8;
  --text-dim: #6f7184;

  --violet: #8b5cf6;
  --violet-bright: #a78bfa;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --emerald: #34d399;

  --grad: linear-gradient(120deg, #a78bfa 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(167,139,250,.18), rgba(34,211,238,.18));

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1160px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Space Grotesk', var(--font);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(10, 10, 30, 0.02);
  --surface-2: rgba(10, 10, 30, 0.04);
  --border: rgba(10, 10, 35, 0.10);
  --border-strong: rgba(10, 10, 35, 0.18);
  --text: #14151f;
  --text-soft: #4a4d60;
  --text-dim: #777a8c;
  --violet: #7c3aed;
  --violet-bright: #6d28d9;
  --cyan: #0891b2;
  --shadow: 0 24px 50px -24px rgba(40, 30, 90, 0.25);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Background FX ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .5;
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: .35; pointer-events: none;
}
.bg-glow-1 { width: 50vw; height: 50vw; top: -15vw; right: -10vw; background: radial-gradient(circle, var(--violet), transparent 70%); }
.bg-glow-2 { width: 40vw; height: 40vw; top: 40vh; left: -12vw; background: radial-gradient(circle, var(--cyan), transparent 70%); opacity: .22; }
[data-theme="light"] .bg-glow { opacity: .25; }

/* ---------- Layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 24px;
}
.section-head { max-width: 760px; margin-bottom: 56px; }
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--violet-bright);
  display: inline-block; margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -.02em;
}
.section-desc { margin-top: 18px; color: var(--text-soft); font-size: 1.05rem; max-width: 640px; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: .92rem;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-primary {
  background: var(--grad); color: #0a0a12; border: none;
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .6);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(34, 211, 238, .55); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--violet); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad); color: #0a0a12; font-size: .85rem; letter-spacing: -.02em;
}
.brand-text { font-size: 1rem; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--text-soft);
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--violet); transform: rotate(15deg); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

.scroll-progress { height: 2px; width: 0%; background: var(--grad); transition: width .1s linear; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 48px; align-items: center; padding: 120px 24px 80px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; font-weight: 500; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 26px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 var(--emerald); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.5)} 70%{box-shadow:0 0 0 9px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }
.hero-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.05; letter-spacing: -.03em;
}
.hero-sub { margin-top: 24px; font-size: 1.1rem; color: var(--text-soft); max-width: 540px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-tags span {
  font-family: var(--font-mono); font-size: .76rem; color: var(--violet-bright);
  border: 1px solid var(--border); background: var(--surface); padding: 5px 11px; border-radius: 8px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { margin-top: 28px; font-size: .9rem; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-meta a { color: var(--text-soft); transition: color .2s; }
.hero-meta a:hover { color: var(--violet-bright); }
.hero-meta .dot { opacity: .5; }

/* Hero panel */
.hero-panel { position: relative; }
.panel-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(10px);
}
.panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.panel-dots { display: flex; gap: 6px; }
.panel-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); display: block; }
.panel-dots i:nth-child(1){ background:#ff5f57 } .panel-dots i:nth-child(2){ background:#febc2e } .panel-dots i:nth-child(3){ background:#28c840 }
.panel-file { font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); }
.panel-code { padding: 22px; font-family: var(--font-mono); font-size: .82rem; line-height: 1.9; overflow-x: auto; color: var(--text-soft); }
.c-key { color: var(--pink); } .c-fn { color: var(--cyan); } .c-prop { color: var(--violet-bright); }
.c-str { color: var(--emerald); } .c-com { color: var(--text-dim); font-style: italic; } .c-arrow { color: var(--pink); }

.floaty {
  position: absolute; font-family: var(--font-head); font-weight: 700; font-size: .92rem;
  padding: 10px 16px; border-radius: 12px; background: var(--bg-soft);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.floaty-1 { top: -22px; right: 14px; color: var(--violet-bright); }
.floaty-2 { bottom: 40px; left: -28px; color: var(--cyan); animation-delay: 1.5s; }
.floaty-3 { bottom: -20px; right: 40px; color: var(--emerald); animation-delay: 3s; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-12px) } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about-lead p { color: var(--text-soft); font-size: 1.06rem; margin-bottom: 18px; }
.about-lead strong { color: var(--text); }
.about-lead em { color: var(--violet-bright); font-style: normal; font-weight: 600; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px; transition: transform .3s, border-color .3s, background .3s;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.mini-ic { font-size: 1.5rem; margin-bottom: 10px; }
.mini-card h4 { font-family: var(--font-head); font-size: 1rem; margin-bottom: 6px; }
.mini-card p { font-size: .88rem; color: var(--text-soft); line-height: 1.55; }

/* ---------- Building Now ---------- */
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.now-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; overflow: hidden;
  transition: transform .3s, border-color .3s, background .3s;
}
.now-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .45s;
}
.now-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.now-card:hover::before { transform: scaleX(1); }
.now-card.feature {
  grid-column: span 2;
  background: linear-gradient(150deg, var(--grad-soft), var(--surface));
  border-color: var(--border-strong);
}
.now-card.feature::before { transform: scaleX(1); }
.now-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.now-ic {
  font-size: 1.5rem; width: 50px; height: 50px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px;
}
.now-flag {
  font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em;
  color: #0a0a12; background: var(--grad); padding: 5px 12px; border-radius: 999px; font-weight: 700;
}
.now-card h3 { font-family: var(--font-head); font-size: 1.18rem; margin-bottom: 10px; line-height: 1.3; }
.now-card.feature h3 { font-size: 1.5rem; }
.now-card p { font-size: .92rem; color: var(--text-soft); line-height: 1.62; }
.now-card p strong { color: var(--text); font-weight: 600; }
.now-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.now-tags li {
  font-size: .74rem; color: var(--violet-bright); background: var(--surface-2);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.now-card:hover .now-tags li { border-color: color-mix(in srgb, var(--violet) 40%, transparent); }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 28px 22px; text-align: center; position: relative; overflow: hidden;
  transition: transform .3s, border-color .3s;
}
.stat::before {
  content:''; position:absolute; inset:0; background: var(--grad-soft); opacity:0; transition: opacity .3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.stat:hover::before { opacity: 1; }
.stat-num {
  position: relative; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { position: relative; margin-top: 10px; font-size: .85rem; color: var(--text-soft); }

/* ---------- Charts ---------- */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 48px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .3s;
}
.chart-card:hover { border-color: var(--border-strong); }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h3 { font-family: var(--font-head); font-size: 1.15rem; }
.chart-cap { color: var(--text-dim); font-size: .85rem; margin-bottom: 18px; }
.chart-box { position: relative; height: 320px; }
.chart-box.tall { height: 420px; }

/* ---------- Skill clusters ---------- */
.skill-clusters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cluster {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px;
}
.cluster h4 {
  font-family: var(--font-head); font-size: .95rem; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); color: var(--violet-bright);
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: .8rem; color: var(--text-soft); background: var(--surface-2);
  border: 1px solid var(--border); padding: 5px 11px; border-radius: 8px;
  transition: color .2s, border-color .2s, background .2s;
}
.chips li:hover { color: var(--text); border-color: var(--violet); background: var(--grad-soft); }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 980px; margin: 0 auto; }
.timeline::before {
  content:''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--violet), var(--cyan), transparent);
  transform: translateX(-50%);
}
.tl-item { position: relative; width: 50%; padding: 0 42px 44px; }
.tl-item[data-side="left"] { left: 0; text-align: right; }
.tl-item[data-side="right"] { left: 50%; text-align: left; }
.tl-dot {
  position: absolute; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--violet); z-index: 2;
}
.tl-item[data-side="left"] .tl-dot { right: -8px; }
.tl-item[data-side="right"] .tl-dot { left: -8px; }
.tl-dot.now { border-color: var(--emerald); box-shadow: 0 0 0 0 var(--emerald); animation: pulse 2s infinite; background: var(--emerald); }
.tl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px; transition: transform .3s, border-color .3s, background .3s;
}
.tl-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }
.tl-date { font-family: var(--font-mono); font-size: .76rem; color: var(--cyan); letter-spacing: .03em; }
.tl-card h3 { font-family: var(--font-head); font-size: 1.08rem; margin-top: 8px; line-height: 1.3; }
.tl-org { display: inline-block; margin: 4px 0 12px; font-weight: 600; color: var(--violet-bright); font-size: .92rem; }
.tl-card p { font-size: .9rem; color: var(--text-soft); line-height: 1.6; }
.tl-card p strong { color: var(--text); }
.tl-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tl-item[data-side="left"] .tl-tags { justify-content: flex-end; }
.tl-tags li { font-size: .72rem; color: var(--text-dim); border: 1px solid var(--border); padding: 3px 9px; border-radius: 7px; }

/* ---------- Research ---------- */
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.pub-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: transform .3s, border-color .3s, background .3s; position: relative; overflow: hidden;
}
.pub-card::after {
  content:''; position:absolute; top:0; left:0; right:0; height:3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.pub-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.pub-card:hover::after { transform: scaleX(1); }
.pub-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pub-type { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); border: 1px solid var(--border); padding: 4px 10px; border-radius: 7px; }
.pub-date { font-size: .82rem; color: var(--text-dim); }
.pub-card h3 { font-family: var(--font-head); font-size: 1.18rem; line-height: 1.35; margin-bottom: 10px; }
.pub-pub { color: var(--text-soft); font-size: .92rem; margin-bottom: 16px; }
.pub-keys { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.pub-keys span { font-size: .74rem; color: var(--violet-bright); background: var(--grad-soft); padding: 4px 10px; border-radius: 7px; }
.pub-link { margin-top: auto; font-weight: 600; font-size: .88rem; color: var(--violet-bright); }

.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 24px; transition: border-color .3s; }
.edu-card:hover { border-color: var(--border-strong); }
.edu-yr { font-family: var(--font-mono); font-size: .78rem; color: var(--cyan); margin-bottom: 8px; }
.edu-card h4 { font-family: var(--font-head); font-size: 1.05rem; }
.edu-track { color: var(--violet-bright); font-weight: 500; }
.edu-org { color: var(--text-soft); font-size: .9rem; margin: 4px 0 10px; }
.edu-card p { font-size: .88rem; color: var(--text-soft); }

/* ---------- Media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.media-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: transform .3s, border-color .3s, background .3s;
}
.media-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.media-card.feature { grid-row: span 2; grid-column: span 1; padding: 0; overflow: hidden; }
.media-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.media-card.feature:hover .media-thumb img { transform: scale(1.06); }
.play {
  position: absolute; inset: 0; margin: auto; width: 60px; height: 60px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(139,92,246,.92); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.play svg { fill: #fff; stroke: none; }
.media-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.media-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; margin-bottom: 16px; font-size: 1rem;
  background: var(--surface-2); border: 1px solid var(--border);
}
.media-icon.ms { background: #fff; }
.media-icon.tr { background: linear-gradient(135deg,#6d28d9,#22d3ee); color:#fff; }
.media-icon.li, .media-icon.tmf { background: #0a66c2; color: #fff; font-size: .8rem; }
.media-tag {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); margin-bottom: 10px; display: inline-block;
}
.media-tag.tag-video { color: var(--pink); }
.media-tag.tag-li { color: #4d9fff; }
.media-card h3 { font-family: var(--font-head); font-size: 1.08rem; line-height: 1.35; margin-bottom: 10px; }
.media-card p { font-size: .88rem; color: var(--text-soft); flex: 1; }
.media-link { margin-top: 16px; font-weight: 600; font-size: .85rem; color: var(--violet-bright); }

/* ---------- Countries ---------- */
.countries { display: flex; flex-wrap: wrap; gap: 12px; }
.country {
  font-size: .95rem; font-weight: 500; padding: 12px 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
  transition: transform .25s, border-color .25s, color .25s, background .25s;
}
.country:hover { transform: translateY(-3px); border-color: var(--violet); color: var(--text); background: var(--grad-soft); }

/* ---------- Contact ---------- */
.contact { display: flex; justify-content: center; }
.contact-card {
  width: 100%; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 26px; padding: 64px 32px;
  position: relative; overflow: hidden;
}
.contact-card::before {
  content:''; position: absolute; inset: 0; background: var(--grad-soft); opacity: .6; z-index: 0;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card h2 { font-family: var(--font-head); font-size: clamp(1.9rem,4vw,3rem); margin-bottom: 18px; }
.contact-card > p { color: var(--text-soft); max-width: 560px; margin: 0 auto 32px; font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-links { display: flex; gap: 22px; justify-content: center; margin-top: 30px; }
.contact-links a { color: var(--text-soft); font-size: .9rem; font-weight: 500; transition: color .2s; border-bottom: 1px solid transparent; }
.contact-links a:hover { color: var(--violet-bright); border-bottom-color: var(--violet); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 60px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: var(--text-dim);
}
.footer-tag { font-family: var(--font-mono); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 130px; gap: 60px; }
  .hero-panel { max-width: 460px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .charts-grid { grid-template-columns: 1fr; }
  .now-grid { grid-template-columns: 1fr 1fr; }
  .now-card.feature { grid-column: 1 / -1; }
  .skill-clusters { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .media-card.feature { grid-row: auto; grid-column: 1 / -1; }
  .research-grid, .edu-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 66px; right: 16px;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px;
    padding: 10px; gap: 2px; box-shadow: var(--shadow); min-width: 180px;
  }
  .nav-burger { display: flex; }

  /* timeline → single column */
  .timeline::before { left: 18px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 36px 48px; }
  .tl-item .tl-dot { left: 10px !important; right: auto !important; }
  .tl-item[data-side="left"] .tl-tags { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .section { padding: 72px 18px; }
  .skill-clusters, .media-grid, .now-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .floaty-2 { left: 0; } .floaty-1 { right: 0; }
  .brand-text { display: none; }
  .contact-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
