/* =========================================================
   Adesh Partap Singh — Portfolio
   Hand-built, no framework. Dark/light theming via [data-theme].
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #6366f1;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --accent-soft: rgba(139, 92, 246, 0.14);

  --bg: #09090f;
  --bg-2: #0c0c15;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ededf4;
  --heading: #ffffff;
  --muted: #9b9bb4;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.6);

  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

[data-theme="light"] {
  --accent: #7c3aed;
  --accent-2: #0891b2;
  --accent-3: #6d28d9;
  --accent-grad: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --accent-soft: rgba(124, 58, 237, 0.1);

  --bg: #f6f6fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f1fb;
  --border: rgba(20, 20, 50, 0.1);
  --border-strong: rgba(20, 20, 50, 0.18);
  --text: #2b2b3d;
  --heading: #14142b;
  --muted: #5e5e78;
  --shadow: 0 20px 50px -24px rgba(60, 40, 120, 0.35);
  --shadow-sm: 0 10px 28px -16px rgba(60, 40, 120, 0.28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
strong { color: var(--heading); font-weight: 600; }
em { font-style: italic; color: var(--text); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 28px -10px var(--accent); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px var(--accent); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.logo__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent-grad); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.02em; box-shadow: 0 8px 20px -8px var(--accent);
}
.logo__text { font-family: var(--font-head); font-size: 1rem; color: var(--heading); }

.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; position: relative; transition: color 0.2s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease); border-radius: 2px;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--heading); }
.nav__links a.is-active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { stroke: currentColor; fill: none; stroke-width: 2; }
.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; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 11px; border: 1px solid var(--border-strong); }
.nav__burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 60% 40%, #000 30%, transparent 75%);
  opacity: 0.5;
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.blob--1 { width: 460px; height: 460px; background: var(--accent); top: -120px; right: -80px; opacity: 0.32; animation: float 14s ease-in-out infinite; }
.blob--2 { width: 380px; height: 380px; background: var(--accent-2); bottom: -120px; left: -60px; opacity: 0.18; animation: float 18s ease-in-out infinite reverse; }
.blob--3 { width: 380px; height: 380px; background: var(--accent); top: -120px; right: -120px; opacity: 0.22; }

.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); font-size: 0.82rem; color: var(--muted); font-weight: 500;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); animation: pulse 2.4s infinite; }

.hero__title { font-size: clamp(3rem, 8vw, 5.4rem); font-weight: 700; margin: 22px 0 6px; letter-spacing: -0.03em; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__role { font-family: var(--font-head); font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--accent); font-weight: 500; margin-bottom: 18px; }
.hero__tagline { font-size: 1.1rem; color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__socials { display: flex; gap: 14px; }
.hero__socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); transition: all 0.25s var(--ease); }
.hero__socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.hero__socials svg { stroke: currentColor; }

/* Hero visual */
.hero__visual { position: relative; display: grid; place-items: center; }
.motif { width: min(100%, 400px); height: auto; overflow: visible; }
.motif .ring { fill: none; stroke: var(--border); stroke-width: 1.5; transform-box: view-box; transform-origin: 180px 180px; }
.motif .ring--outer { stroke: var(--border-strong); opacity: 0.55; }
.motif .ring--mid { stroke-dasharray: 2 12; animation: spin 72s linear infinite; }
.motif .ring--inner { stroke-dasharray: 2 9; opacity: 0.8; animation: spin 52s linear infinite reverse; }
.motif .ticks { opacity: 0.7; }
.motif .orbit { transform-box: view-box; transform-origin: 180px 180px; }
.motif .orbit--1 { animation: spin 26s linear infinite; }
.motif .orbit--2 { animation: spin 18s linear infinite reverse; }
.motif .orbit--3 { animation: spin 12s linear infinite; }
.motif .orbit circle { filter: drop-shadow(0 0 6px var(--accent)); }
.motif .core__body { filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent) 55%, transparent)); }
.motif .halo { transform-box: view-box; transform-origin: 180px 180px; animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.chip-cloud { position: absolute; inset: 0; pointer-events: none; }
.chip-cloud .chip { position: absolute; }
.chip-cloud .chip:nth-child(1) { top: 4%; left: 8%; animation: float 7s ease-in-out infinite; }
.chip-cloud .chip:nth-child(2) { top: 16%; right: 0%; animation: float 9s ease-in-out infinite reverse; }
.chip-cloud .chip:nth-child(3) { bottom: 22%; left: -4%; animation: float 8s ease-in-out infinite; }
.chip-cloud .chip:nth-child(4) { bottom: 4%; right: 6%; animation: float 10s ease-in-out infinite reverse; }
.chip-cloud .chip:nth-child(5) { top: 46%; right: -6%; animation: float 11s ease-in-out infinite; }
.chip-cloud .chip:nth-child(6) { bottom: 40%; left: 2%; animation: float 7.5s ease-in-out infinite reverse; }

.chip {
  display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); backdrop-filter: blur(6px); box-shadow: var(--shadow-sm);
}

/* ---------- Stats ---------- */
.stats { padding: 10px 0 30px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  padding: 26px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center;
}
.stat__num, .stat__prefix, .stat__suffix { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat__prefix, .stat__suffix { display: inline; }
.stat__label { flex-basis: 100%; margin-top: 8px; font-size: 0.86rem; color: var(--muted); font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 92px 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section__head { max-width: 720px; margin-bottom: 50px; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.section__sub { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.muted { color: var(--muted); font-weight: 400; }
.micro-label { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.about__bio p { color: var(--muted); margin-bottom: 18px; font-size: 1.04rem; }
.about__expertise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 30px; }
.exp-card { padding: 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: transform 0.25s var(--ease), border-color 0.25s; }
.exp-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.exp-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.exp-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

.about__side { position: sticky; top: 96px; }
.edu-card { padding: 28px; }
.edu-card h3 { font-size: 1.2rem; margin: 8px 0 4px; }
.edu-card__school { color: var(--accent); font-weight: 600; }
.edu-card__date { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.edu-card hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.course-list { display: flex; flex-direction: column; gap: 9px; }
.course-list li { position: relative; padding-left: 22px; font-size: 0.92rem; color: var(--text); }
.course-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-grad); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.timeline__item { position: relative; padding-left: 38px; margin-bottom: 26px; }
.timeline__marker { position: absolute; left: 0; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.section--alt .timeline__marker { background: var(--bg-2); }
.timeline__card { padding: 24px 26px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.timeline__card:hover { transform: translateX(4px); border-color: var(--border-strong); }
.timeline__top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.timeline__top h3 { font-size: 1.2rem; }
.timeline__date { font-size: 0.84rem; color: var(--muted); font-weight: 500; font-family: var(--font-head); white-space: nowrap; }
.timeline__org { color: var(--accent); font-weight: 600; margin: 4px 0 14px; }
.timeline__card ul { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.timeline__card li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.96rem; }
.timeline__card li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--tag { font-size: 0.76rem; padding: 5px 11px; background: var(--accent-soft); border-color: transparent; color: var(--accent); box-shadow: none; backdrop-filter: none; }
[data-theme="light"] .chip--tag { color: var(--accent-3); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-weight: 500; font-size: 0.9rem; transition: all 0.22s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -10px var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, opacity 0.4s, scale 0.4s;
  display: flex; flex-direction: column; text-align: left;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-card.is-hidden { display: none; }
.project-card.is-featured { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); }

.project-card__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface-2); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.07); }
.project-card__cover { width: 100%; height: 100%; display: grid; place-items: center; background:
  radial-gradient(120% 120% at 0% 0%, var(--accent) 0%, transparent 55%),
  radial-gradient(120% 120% at 100% 100%, var(--accent-3) 0%, transparent 55%), var(--bg-2); }
.project-card__cover svg { width: 64px; height: 64px; stroke: #fff; opacity: 0.92; fill: none; stroke-width: 1.5; }
.project-card__cat { position: absolute; top: 12px; left: 12px; font-size: 0.72rem; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; }
.project-card__code { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; }
.project-card__code svg { display: block; }

.project-card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-card__body h3 { font-size: 1.12rem; }
.project-card__body p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; flex: 1; }
.project-card__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-card__more { margin-left: auto; font-size: 0.82rem; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group { padding: 26px; }
.skill-group h3 { font-size: 1.1rem; margin-bottom: 16px; }
.skill-group .chips { gap: 9px; }
.skill-group .chip--tag { font-size: 0.82rem; padding: 7px 13px; }

.leadership { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.lead-card { padding: 28px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.lead-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.lead-card h3 { font-size: 1.18rem; margin: 8px 0 10px; }
.lead-card p { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 110px; }
.contact__card { position: relative; overflow: hidden; padding: 56px clamp(24px, 5vw, 64px); border-radius: 28px; background: var(--surface); border: 1px solid var(--border); text-align: center; box-shadow: var(--shadow); }
.contact__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.contact__card > * { position: relative; z-index: 1; }
.contact__sub { color: var(--muted); max-width: 560px; margin: 14px auto 32px; font-size: 1.06rem; }
.contact__methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; text-align: left; }
.contact__method { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); transition: transform 0.25s var(--ease), border-color 0.25s; }
.contact__method:hover:not(.contact__method--static) { transform: translateY(-3px); border-color: var(--accent); }
.contact__method svg { color: var(--accent); flex-shrink: 0; }
.contact__method span { display: flex; flex-direction: column; font-size: 0.94rem; min-width: 0; }
.contact__method span strong { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact__socials { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 48px 0 30px; background: var(--bg-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; }
.footer__tag { color: var(--muted); max-width: 360px; margin-top: 14px; font-size: 0.92rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; align-content: start; }
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.84rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.is-open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(4px); animation: fade 0.25s ease; }
.modal__panel { position: relative; z-index: 1; width: min(680px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); animation: pop 0.32s var(--ease); }
.modal__close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); font-size: 1.5rem; line-height: 1; color: #fff; display: grid; place-items: center; }
.modal__close:hover { background: var(--accent); }
.modal__media { width: 100%; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; max-height: 52vh; overflow-y: auto; }
.modal__media img { width: 100%; height: 300px; object-fit: cover; display: block; flex: none; }
.modal__media img:only-child { height: auto; max-height: 360px; }
.modal__body { padding: 26px 28px 30px; }
.modal__body h3 { font-size: 1.5rem; margin: 12px 0 12px; }
.modal__body > p { color: var(--muted); margin-bottom: 18px; }
.modal__highlights { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.modal__highlights li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.modal__highlights li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.modal__links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.modal__link { display: inline-flex; align-items: center; gap: 8px; }
.modal__link svg { flex-shrink: 0; }
.chip--cat { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-size: 0.74rem; font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); } 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0.05); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; max-width: 320px; margin-inline: auto; }
  .about__grid { grid-template-columns: 1fr; }
  .about__side { position: static; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills__grid { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
  .nav__links {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0; padding: 12px 24px 24px;
    background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__links a::after { display: none; }
  .nav__burger { display: flex; }
  .logo__text { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .about__expertise { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .leadership { grid-template-columns: 1fr; }
  .contact__methods { grid-template-columns: 1fr; }
  .timeline__top { gap: 4px; }
  .section { padding: 70px 0; }
}

@media (max-width: 420px) {
  .container { padding-inline: 18px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .motif .wave { stroke-dashoffset: 0; }
}

/* Print */
@media print {
  .nav, .hero__bg, .modal, .theme-toggle, .nav__burger { display: none !important; }
  body { background: #fff; color: #000; }
}
