/*
 * TEJAS DIXIT PORTFOLIO — style.css
 * Mobile-first rewrite of the Flask portfolio.
 *
 * KEY FIXES vs original:
 * 1.  font-size: 1rem (16px) on all inputs/textareas  → kills iOS Safari auto-zoom
 * 2.  terminal-card: white-space wraps              → no horizontal scroll on 320px screens
 * 3.  letter-spacing on h1/h2 relaxed for small vp  → legible at 320px
 * 4.  nav-menu: max-height + overflow-y scroll       → long menus don't overflow viewport
 * 5.  .section padding scaled via clamp()           → no wasted space on short mobile
 * 6.  touch targets ≥ 44×44px on all interactive    → WCAG 2.5.5
 * 7.  safe-area-inset padding for notched phones    → content behind iPhone home bar
 * 8.  project-grid single col → 2 col → 3 col       → readable at every width
 * 9.  hero min-height uses 100dvh (dynamic)         → no jump when mobile browser chrome hides
 * 10. metrics grid: auto-fit keeps 1–3 col          → never overflows
 * 11. social-grid 2→3→4 col at sensible breakpoints → legible labels
 * 12. .btn min-width removed; btn-block for forms    → no tiny tap targets
 * 13. prefers-reduced-motion respected              → accessibility
 * 14. color-scheme: dark declared                   → system UI matches
 */

/* ── Design Tokens ────────────────────────────────────── */
:root {
  /* Colors */
  --bg:        #0f111a;
  --bg2:       #151824;
  --panel:     #191d2b;
  --panel2:    #202436;
  --line:      #2b3044;
  --text:      #eef2ff;
  --muted:     #a9b1c7;
  --soft:      #7f89a7;
  --accent:    #a78bfa;
  --accent2:   #7dd3fc;
  --green:     #86efac;
  --danger:    #fb7185;

  /* Layout */
  --max:        1160px;
  --nav-h:      64px;
  --section-py: clamp(3.5rem, 8vw, 7rem);
  --container-px: clamp(1rem, 4vw, 1.5rem);
  --r:          24px;
  --r2:         16px;
  --r3:         12px;

  /* Typography */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, Segoe UI, sans-serif;

  /* Shadows */
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%,  rgba(167, 139, 250, .16), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(125, 211, 252, .08), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grid lines — decorative only */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 70%);
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }

/* FIX 1: font:inherit prevents 16px fallback — restate it explicitly */
button,
input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem; /* Prevent iOS Safari auto-zoom on inputs < 16px */
}

/* Focus ring — keyboard & screen reader */
:focus-visible {
  outline: 3px solid rgba(167, 139, 250, .85);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ── Skip link ───────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--accent);
  color: #080a12;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  z-index: 9999;
}
.skip-link:focus {
  left: 1rem;
}

/* ── Container ───────────────────────────────────────── */
.container {
  width: min(100% - (var(--container-px) * 2), var(--max));
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ── Section base ────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
}

/* ── Eyebrow ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: var(--accent2);
  font-weight: 800;
  margin: 0 0 1rem;
}

/* ── Headings ────────────────────────────────────────── */
h1,
h2 {
  line-height: 1.06;
  /* Relax letter-spacing at mobile (tight -0.055em is illegible at 320px) */
  letter-spacing: clamp(-0.02em, -0.04em + 0.5vw, -0.055em);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 11vw, 6.8rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.8rem, 7vw, 4.6rem);
  max-width: 14ch;
}

h3 {
  line-height: 1.22;
  margin: 0;
  /* No clamping needed — used only inside cards at fixed widths */
}

/* ── Body copy ───────────────────────────────────────── */
.lead {
  font-size: clamp(1rem, 3vw, 1.18rem);
  color: var(--muted);
  max-width: 68ch;
  margin: 1.25rem 0 0;
}

.lead strong { color: var(--text); }
.lead.small  { font-size: 1rem; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  /* FIX 6: ≥ 44px height for touch targets */
  min-height: 48px;
  padding: .75rem 1.25rem;
  border-radius: var(--r3);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s, background .22s, border-color .22s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #070913;
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(167, 139, 250, .22);
}

.btn.ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .08);
}

/* FIX 12: full-width button variant for contact form */
.btn-block {
  width: 100%;
}

/* ════════════════════════════════════════════════
   HEADER / NAV
   ════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 17, 26, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
  /* FIX 7: respect top safe-area (notch) */
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .32);
}

.nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px; /* touch target */
}

.brand span {
  font-family: var(--mono);
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 36px;
  padding: 0 .6rem;
  border-radius: var(--r3);
  background: rgba(167, 139, 250, .14);
  border: 1px solid rgba(167, 139, 250, .35);
  color: var(--accent);
  font-weight: 800;
  font-size: .8rem;
}

.brand strong {
  font-weight: 900;
  letter-spacing: -.02em;
  /* Hide on very small screens to save space */
  display: none;
}

/* Hamburger button */
.menu-btn {
  display: inline-grid;
  gap: 6px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  /* FIX 6: ≥ 44×44px touch target */
  min-width: 48px;
  min-height: 48px;
  padding: .85rem;
  color: var(--text);
  align-content: center;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}

.menu-btn:hover { background: rgba(255, 255, 255, .06); }

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}
.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

/* Mobile nav menu (default: hidden) */
.nav-menu {
  /* FIX 4: scrollable if content exceeds viewport */
  position: fixed;
  inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 12px auto 12px;
  display: none;
  list-style: none;
  margin: 0;
  padding: .6rem;
  background: rgba(25, 29, 43, .98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - 1rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-menu.is-open {
  display: block;
  animation: menuSlide .2s var(--ease);
}

@keyframes menuSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-menu a {
  display: flex;
  align-items: center;
  /* FIX 6: ≥ 44px touch target height */
  min-height: 48px;
  padding: .65rem 1rem;
  border-radius: var(--r3);
  color: var(--muted);
  font-weight: 700;
  transition: background .2s, color .2s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: rgba(167, 139, 250, .12);
  color: var(--text);
}

/* Resume link in nav — accent treatment */
.nav-resume a {
  color: var(--accent2);
  border-top: 1px solid var(--line);
  margin-top: .3rem;
  padding-top: .8rem;
}

/* ════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════ */
.hero {
  /* FIX 9: dvh collapses when mobile browser chrome hides; no layout jump */
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  place-items: center;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  width: 100%;
}

/* Eyebrow already defined above */

/* Hero copy */
.hero-copy {}

/* FIX 2: terminal card — let text wrap; no horizontal scroll */
.terminal-card {
  margin: 1.5rem 0 0;
  padding: 1rem clamp(.85rem, 3vw, 1.2rem);
  border-radius: var(--r2);
  background: #0b0d14;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
  font-family: var(--mono);
  font-size: clamp(.72rem, 2vw, .88rem);
  color: var(--green);
  overflow-x: auto;    /* allow horizontal scroll only when truly needed */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.terminal-card p {
  margin: .35rem 0;
  /* FIX: allow wrapping instead of forcing scrollbar */
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.terminal-card span { color: var(--accent2); }
.terminal-card code { font-family: inherit; }

/* Hero actions */
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1.75rem 0;
}

/* FIX: actions fill column width on mobile for easy tapping */
.hero-actions .btn {
  width: 100%;
}

/* Metrics / stats */
.metrics {
  /* FIX 10: auto-fit — 1 col on 320px, fills 3 col when space allows */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: .75rem;
  margin: 0;
}

.metrics div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}

.metrics dt {
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.03em;
}

.metrics dd {
  margin: 0;
  color: var(--soft);
  font-size: .82rem;
}

/* Profile card */
.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel), var(--panel2));
  box-shadow: var(--shadow);
  padding: 1rem;
}

.hero-card::before {
  content: "profile.md";
  display: block;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--soft);
  padding: 0 0 .75rem;
}

.hero-card img {
  border-radius: var(--r2);
  aspect-ratio: 1;
  object-fit: cover;
  /* Cap image on mobile so card doesn't dominate viewport */
  max-height: clamp(200px, 50vw, 320px);
  width: 100%;
}

.status {
  display: inline-flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1rem 0 .5rem;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}

.status span {
  width: .65rem;
  height: .65rem;
  margin-top: .35rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(134, 239, 172, .12);
  animation: pulse 1.7s ease-in-out infinite;
  flex-shrink: 0;
}

.code-line {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--green) !important;
  /* FIX: wrap if too long on narrow screens */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ════════════════════════════════════════════════
   TWO-COLUMN LAYOUT (About / Contact info side)
   ════════════════════════════════════════════════ */
.two-col,
.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2rem);
}

.copy {
  display: grid;
  gap: 1.1rem;
}

.copy p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.copy strong { color: var(--text); }

/* ════════════════════════════════════════════════
   SECTION BACKGROUNDS
   ════════════════════════════════════════════════ */
.about,
.projects,
.contact {
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .012));
}

/* ════════════════════════════════════════════════
   SKILL GRID
   ════════════════════════════════════════════════ */
.skill-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ── Shared card styles (panel / project / contact-form) ── */
.panel,
.project-card,
.contact-form {
  background: rgba(25, 29, 43, .88);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.25rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
  transition: transform .22s var(--ease), border-color .22s, background .22s;
}

.panel:hover,
.project-card:hover,
.social-grid a:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, .55);
  background: rgba(32, 36, 54, .96);
}

.panel-kicker,
.project-card > span:first-child {
  display: inline-block;
  font-family: var(--mono);
  color: var(--accent2);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
  margin-bottom: .65rem;
}

.panel h3,
.project-card h3 {
  font-size: clamp(1.05rem, 3vw, 1.22rem);
  letter-spacing: -.02em;
}

.panel p,
.project-card p {
  color: var(--muted);
  margin: .6rem 0 0;
  font-size: .95rem;
}

/* ════════════════════════════════════════════════
   PROJECTS
   ════════════════════════════════════════════════ */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* FIX 16: text-link won't clip */
.text-link {
  color: var(--accent2);
  font-weight: 900;
  font-family: var(--mono);
  font-size: .85rem;
  white-space: nowrap;
  align-self: flex-start;
}

.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card a {
  display: inline-flex;
  margin-top: 1.1rem;
  color: var(--accent);
  font-weight: 900;
  font-family: var(--mono);
  font-size: .88rem;
  /* FIX 6: ensure tap target height */
  min-height: 44px;
  align-items: center;
  transition: color .2s;
}

.project-card a:hover { color: var(--accent2); }

.project-card.featured {
  background: linear-gradient(145deg, rgba(167, 139, 250, .14), rgba(25, 29, 43, .94));
  border-color: rgba(167, 139, 250, .42);
}

/* ════════════════════════════════════════════════
   TIMELINE
   ════════════════════════════════════════════════ */
.timeline {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.timeline li {
  position: relative;
  margin-left: 1.25rem;
  padding: 0 0 2rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 6px);
  top: .35rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(167, 139, 250, .13);
}

.timeline time {
  font-family: var(--mono);
  color: var(--accent2);
  font-size: .82rem;
  font-weight: 800;
}

.timeline h3 {
  margin: .4rem 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
}

.timeline p {
  color: var(--muted);
  margin: .35rem 0 0;
  font-size: .95rem;
}

/* ════════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════════ */
.contact-lines {
  display: grid;
  gap: .5rem;
  margin: 1.25rem 0 0;
  font-style: normal;
  color: var(--muted);
}

.contact-lines a {
  color: var(--accent2);
  font-weight: 800;
  /* FIX 6: tap target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* FIX 11: social grid 2→3→4 columns */
.social-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  /* 2 cols on mobile */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
}

.social-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  /* FIX 6: ≥ 44px touch target */
  min-height: 52px;
  padding: .5rem .75rem;
  background: rgba(25, 29, 43, .88);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  color: var(--muted);
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  transition: transform .22s var(--ease), border-color .22s, background .22s, color .22s;
}

.social-grid a:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, .55);
  background: rgba(32, 36, 54, .96);
  color: var(--text);
}

/* ── Contact form ─────────────────────────────── */
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  color: var(--soft);
  font-size: .82rem;
}

.form-head strong { color: var(--green); }

.field {
  display: grid;
  gap: .4rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--muted);
}

.req { color: var(--accent); }

/* FIX 1: font-size ≥ 16px prevents iOS Safari zoom on focus */
input,
textarea,
select {
  width: 100%;
  /* min font-size 16px enforced here — iOS Safari zooms viewport if < 16px */
  font-size: max(1rem, 16px);
  font-family: inherit;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: #0b0d14;
  color: var(--text);
  border-radius: var(--r3);
  padding: .85rem 1rem;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
  /* Appearance reset for mobile Safari */
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .12);
  outline: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, .1);
}

.field-error {
  display: block;
  min-height: 1.2rem;
  color: var(--danger);
  font-size: .78rem;
  font-weight: 600;
}

.form-status {
  min-height: 1.5rem;
  color: var(--green);
  font-weight: 700;
  font-size: .9rem;
  margin-top: .5rem;
}

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  /* FIX 7: safe-area-inset-bottom for iPhone home bar */
  padding-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  color: var(--soft);
  font-size: .88rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer a {
  color: var(--accent2);
  font-weight: 800;
  /* FIX 6: tap target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ════════════════════════════════════════════════
   REVEAL ANIMATION
   ════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ════════════════════════════════════════════════
   KEYFRAMES
   ════════════════════════════════════════════════ */
@keyframes pulse {
  50% { transform: scale(1.25); opacity: .68; }
}

/* ════════════════════════════════════════════════
   BREAKPOINT — ≥ 480px  (large phones landscape)
   ════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .brand strong { display: inline; }

  /* Actions row on wide enough phones */
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 180px;
  }
}

/* ════════════════════════════════════════════════
   BREAKPOINT — ≥ 560px  (small tablets)
   ════════════════════════════════════════════════ */
@media (min-width: 560px) {
  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ════════════════════════════════════════════════
   BREAKPOINT — ≥ 760px  (tablets landscape)
   ════════════════════════════════════════════════ */
@media (min-width: 760px) {
  .skill-grid       { grid-template-columns: repeat(2, 1fr); }
  .project-grid     { grid-template-columns: repeat(2, 1fr); }
  .social-grid      { grid-template-columns: repeat(4, 1fr); }

  .section-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Slightly larger panel padding on tablets */
  .panel,
  .project-card,
  .contact-form {
    padding: 1.65rem;
  }
}

/* ════════════════════════════════════════════════
   BREAKPOINT — ≥ 980px  (desktop)
   ════════════════════════════════════════════════ */
@media (min-width: 980px) {
  :root {
    --nav-h: 72px;
  }

  /* Desktop: show nav links inline, hide hamburger */
  .menu-btn { display: none; }

  .nav-menu {
    /* Reset all mobile-specific overrides */
    position: static;
    inset: auto;
    display: flex !important; /* override .is-open */
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    gap: 4px;
    max-height: none;
    overflow: visible;
    animation: none;
  }

  .nav-menu a {
    min-height: 40px;
    padding: .55rem .8rem;
    font-size: .9rem;
  }

  .nav-resume { display: none; } /* Resume in hero CTA — redundant in desktop nav */

  /* Hero two-column */
  .hero-grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(280px, .78fr);
    align-items: center;
  }

  /* About + contact two-column */
  .two-col,
  .contact-grid {
    grid-template-columns: .78fr 1.22fr;
    align-items: start;
  }

  /* Sticky section title */
  .sticky-title {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
  }

  /* Skill grid 3-col on desktop */
  .skill-grid { grid-template-columns: repeat(3, 1fr); }

  /* Projects 3-col */
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ════════════════════════════════════════════════
   REDUCED MOTION  (WCAG 2.3.3 — prefers)
   ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ════════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════════ */
@media print {
  .site-header,
  .hero-actions,
  .social-grid,
  .contact-form,
  .footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 1.5rem 0;
  }
}
