/* ==========================================================================
   Jaysheel Patel portfolio
   Dark theme by default, light theme via [data-theme="light"] on <html>.
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --surface: #141820;
  --surface-2: #1a1f29;
  --line: #232a36;
  --line-2: #2e3746;
  --text: #e9edf3;
  --text-2: #a5afbd;
  --muted: #6f7a8a;
  --accent: #4d8dff;
  --accent-2: #7cc4ff;
  --accent-ink: #ffffff;
  --warn: #f6a01a;
  --grid: rgba(120, 150, 200, .06);
  --glow: rgba(77, 141, 255, .22);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1180px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --line: #e3e7ee;
  --line-2: #d3d9e3;
  --text: #0f141b;
  --text-2: #3e4856;
  --muted: #6b7584;
  --accent: #1f5eff;
  --accent-2: #1f5eff;
  --grid: rgba(30, 60, 120, .055);
  --glow: rgba(31, 94, 255, .12);
  --shadow: 0 18px 50px rgba(20, 30, 50, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Blueprint grid backdrop */
.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  font: 600 13px/1 var(--mono); color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 6px 20px var(--glow);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  text-decoration: none; color: var(--text-2); font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px; background: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49; background: var(--bg);
  padding: 24px; display: none; flex-direction: column; gap: 4px;
}
.mobile-menu a {
  text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  padding: 14px 4px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
}
.mobile-menu a span { font: 500 12px var(--mono); color: var(--muted); align-self: center; }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { display: flex; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: #fff; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  box-shadow: 0 8px 24px var(--glow);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px var(--glow); }
.btn svg { width: 16px; height: 16px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn-ghost:hover { border-color: var(--text-2); box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.chip, .tags li {
  display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono);
  color: var(--text-2); border: 1px solid var(--line-2); background: var(--surface);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.18); }

.kicker {
  font: 500 12.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2);
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { letter-spacing: -.025em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 700; letter-spacing: -.045em; line-height: 1.0; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 650; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 680px; margin: 0; }
.lead strong { color: var(--text); font-weight: 600; }
.grad {
  background: linear-gradient(100deg, var(--text) 10%, var(--accent-2) 60%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Page header ---------- */
.page-head { padding: 88px 0 48px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(38px, 6vw, 68px); margin-bottom: 18px; }
.page-head::after {
  content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%;
  background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none;
}
.crumbs { font: 500 12.5px var(--mono); color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-2); }

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { color: var(--text-2); max-width: 520px; margin: 12px 0 0; }
.link-arrow { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { color: var(--accent-2); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; padding: 56px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 78% 40%, var(--glow), transparent 70%),
    radial-gradient(500px 300px at 10% 90%, rgba(124,196,255,.07), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero h1 { margin: 0 0 22px; }
.hero .lead { margin-bottom: 32px; }
.hero-status { display: flex; width: fit-content; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--text-2); margin-bottom: 28px;
  padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hero-visual { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.hero-visual canvas { width: 100% !important; height: 100% !important; cursor: grab; touch-action: pan-y; }
.hero-visual canvas:active { cursor: grabbing; }
.callout {
  position: absolute; font: 500 11.5px/1.5 var(--mono); color: var(--text-2); letter-spacing: .04em;
  padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px); pointer-events: none; white-space: nowrap;
}
.callout b { color: var(--text); font-weight: 600; display: block; }
.callout.c1 { top: 10%; left: 0; }
.callout.c2 { bottom: 12%; right: 0; }
.hero-visual .spin-hint { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); font: 500 11px var(--mono); color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: var(--text-2); font-size: 14px; }

/* ---------- Project cards (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); overflow: hidden; isolation: isolate;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(124,196,255,.10), transparent 40%);
}
.card:hover::before { opacity: 1; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.bento .card-media { aspect-ratio: auto; height: 300px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.045); }
.card-media .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.badge { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: rgba(10,12,16,.72); border: 1px solid rgba(255,255,255,.14); padding: 6px 9px; border-radius: 6px; backdrop-filter: blur(6px); }
.badge.is-3d { background: var(--accent); border-color: transparent; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .02em; }
.card h3 { font-size: 21px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.card .tags { margin-top: auto; padding-top: 8px; }
.card .arrow { position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10,12,16,.6); color: #fff; border: 1px solid rgba(255,255,255,.15);
  transform: translate(4px,-4px); opacity: 0; transition: .25s; }
.card .arrow svg { width: 16px; height: 16px; }
.card:hover .arrow { opacity: 1; transform: none; }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; } .span-6 { grid-column: span 6; }
.card.wide { flex-direction: row; }
.card.wide .card-media { aspect-ratio: auto; flex: 1.25; min-height: 320px; }
.card.wide .card-body { flex: 1; padding: 32px; justify-content: center; }
.card.wide h3 { font-size: 28px; }

/* ---------- 3D teaser band ---------- */
.band {
  position: relative; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%);
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center;
}
.band-copy { padding: 48px; }
.band-copy h2 { margin-bottom: 14px; }
.band-copy p { color: var(--text-2); margin: 0 0 28px; }
.band-shot { position: relative; height: 100%; min-height: 320px; background: #fff; border-left: 1px solid var(--line); }
.band-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* ---------- Timeline (experience) ---------- */
.timeline { position: relative; display: grid; gap: 16px; }
.xp {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 28px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.xp-when { font: 500 13px/1.6 var(--mono); color: var(--muted); }
.xp-when b { display: block; color: var(--accent-2); font-weight: 600; font-size: 13px; }
.xp h3 { margin-bottom: 4px; }
.xp .org { color: var(--text-2); margin: 0 0 14px; font-size: 15px; }
.xp ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.xp li { margin-bottom: 8px; }
.xp li::marker { color: var(--accent); }
.xp .tags { margin-top: 16px; }

/* ---------- Skills ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skill-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.skill-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.skill-ico svg { width: 20px; height: 20px; }
.skill .tags li { font-size: 12.5px; }
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.edu .when { font: 500 12.5px var(--mono); color: var(--accent-2); }
.edu h3 { margin: 10px 0 6px; }
.edu p { color: var(--text-2); margin: 0; }
.certs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.contact-card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 6px; text-decoration: none; transition: border-color .2s, transform .2s; }
a.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card .label { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.contact-card .value { font-size: clamp(20px, 2.4vw, 28px); font-weight: 650; letter-spacing: -.02em; word-break: break-word; }
.contact-card p { color: var(--text-2); margin: 6px 0 0; }
.contact-stack { display: grid; gap: 16px; }
.copy-btn { align-self: flex-start; margin-top: 14px; }

.cta {
  text-align: center; padding: 72px 24px; border: 1px solid var(--line); border-radius: 20px; position: relative; overflow: hidden;
  background: radial-gradient(600px 260px at 50% 0%, var(--glow), transparent 70%), var(--surface);
}
.cta h2 { margin-bottom: 14px; }
.cta p { color: var(--text-2); margin: 0 auto 28px; max-width: 520px; }
.cta .actions { justify-content: center; }

/* ---------- Project detail ---------- */
.proj-hero { padding: 72px 0 40px; }
.proj-hero h1 { font-size: clamp(36px, 5.6vw, 64px); margin: 0 0 18px; }
.spec {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-top: 36px; overflow: hidden;
}
.spec div { padding: 18px 20px; border-right: 1px solid var(--line); }
.spec div:last-child { border-right: 0; }
.spec dt { font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.spec dd { margin: 0; font-weight: 550; font-size: 15px; }
.media-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.media-main video, .media-main img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery.g3 { grid-template-columns: repeat(3, 1fr); }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s; }
.gallery button:hover img { transform: scale(1.05); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.compare figure { margin: 0; }
.compare button { padding: 0; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: #fff; }
.compare img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.compare figcaption { font: 500 12px var(--mono); color: var(--muted); margin-top: 8px; }
.wwr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wwr > div { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wwr .n { font: 600 12px var(--mono); color: var(--accent-2); letter-spacing: .08em; }
.wwr h3 { margin: 10px 0 10px; }
.wwr p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.next-proj { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.next-proj a { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color .2s; }
.next-proj a:hover { border-color: var(--accent); }
.next-proj small { font: 500 12px var(--mono); color: var(--muted); display: block; margin-bottom: 6px; }
.next-proj strong { font-size: 18px; }
.next-proj a:last-child { text-align: right; }
.block-title { font: 600 12.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 16px; }

/* ---------- Footer: engineering title block ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 48px; }
.titleblock { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; font-family: var(--mono); }
.titleblock > div { padding: 14px 16px; border-right: 1px solid var(--line-2); }
.titleblock > div:last-child { border-right: 0; }
.titleblock small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.titleblock span, .titleblock a { font-size: 13px; color: var(--text); text-decoration: none; }
.titleblock a:hover { color: var(--accent-2); }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Lightbox ---------- */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(5,7,10,.9); backdrop-filter: blur(4px); }
dialog.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; }
dialog.lightbox p { color: #c9d1dc; font-size: 14px; text-align: center; margin: 10px 0 0; }
dialog.lightbox .close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.5); color: #fff; font-size: 24px; cursor: pointer; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-top: 48px; }
  .hero-visual { max-width: 560px; margin: 0 auto; aspect-ratio: 4 / 3; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-4, .span-3, .span-2 { grid-column: span 1; }
  .span-6 { grid-column: span 2; }
  .card.wide { flex-direction: column; }
  .card.wide .card-media { min-height: 0; aspect-ratio: 16 / 9; }
  .band { grid-template-columns: 1fr; }
  .band-shot { border-left: 0; border-top: 1px solid var(--line); min-height: 240px; }
  .xp { grid-template-columns: 1fr; gap: 14px; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div { border-bottom: 1px solid var(--line-2); }
  .titleblock > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links, .nav-actions .btn { display: none; }
  .menu-btn { display: inline-grid; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .spec { grid-template-columns: repeat(2, 1fr); }
  .spec div:nth-child(2) { border-right: 0; }
  .spec div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .wwr, .skill-grid, .edu-grid, .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento .card-media { height: 220px; }
  .span-6 { grid-column: span 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery.g3 { grid-template-columns: repeat(2, 1fr); }
  .gallery.g3 button:last-child { grid-column: span 2; }
  .compare { grid-template-columns: 1fr; }
  .band-copy { padding: 28px 22px; }
  .page-head { padding: 56px 0 36px; }
  .proj-hero { padding: 48px 0 28px; }
  .next-proj { grid-template-columns: 1fr; }
  .next-proj a:last-child { text-align: left; }
  .callout { display: none; }
  .section { padding: 56px 0; }
  .stat { padding: 20px 16px; }
  .xp, .skill, .edu, .contact-card, .wwr > div { padding: 22px; }
  .cta { padding: 48px 20px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Mobile splash: suggests desktop, lets visitors continue ---------- */
.splash { display: none; }
html.show-splash body { overflow: hidden; }
html.show-splash .splash {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; padding: 24px;
  background: radial-gradient(500px 380px at 50% 30%, var(--glow), transparent 70%), var(--bg);
  background-image:
    radial-gradient(500px 380px at 50% 30%, var(--glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  background-color: var(--bg);
}
.splash-inner { width: 100%; max-width: 360px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.splash-mark { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; margin-bottom: 28px; }
.splash-load { width: 100%; }
.splash-bar { height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .25s ease; }
.splash-status { font: 500 12px var(--mono); color: var(--muted); margin: 12px 0 0; letter-spacing: .04em; }
.splash-msg { display: none; flex-direction: column; align-items: center; animation: splashIn .5s cubic-bezier(.2,.7,.2,1); }
.splash.is-ready .splash-load { display: none; }
.splash.is-ready .splash-msg { display: flex; }
.splash-msg h2 { font-size: 28px; margin: 0 0 12px; }
.splash-msg p { color: var(--text-2); margin: 0 0 28px; font-size: 15.5px; }
.splash-msg p strong { color: var(--text); }
.splash-go { width: 100%; justify-content: center; }
.splash-note { font: 500 12.5px var(--mono); color: var(--muted); margin-top: 10px; }
.splash-copy { margin-top: 22px; background: none; border: 0; color: var(--accent-2); font: 600 14px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@keyframes splashIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .splash-msg { animation: none; } }
