/* ═══════════════════════════════════════════════════════════════
   AMAR ABBAS — PORTFOLIO
   Direction: "Foundry" — Graphite & Copper
   Type: Fraunces (display) · Inter Tight (body) · JetBrains Mono (meta)

   Every colour is a token on :root. Dark is the base theme; light is a
   token swap. Do not hard-code a hex below the token block.
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   1. TOKENS
   ─────────────────────────────────────────────────────────────── */

:root {
  /* ── Dark (base) ── */
  --bg: #12161a;
  --bg-2: #0e1216;
  --surface: #1b222a;
  --surface-2: #222b34;

  --ink: #e9e6e1;
  --ink-2: #b4bac0;
  --ink-3: #8a939b;

  --rule: rgba(233, 230, 225, .13);
  --rule-2: rgba(233, 230, 225, .07);

  --accent: #e08a4f;
  --accent-hover: #ee9a61;
  --accent-ink: #12161a;
  --accent-soft: rgba(224, 138, 79, .13);
  --accent-line: rgba(224, 138, 79, .35);

  --second: #6ea4a1;
  --second-soft: rgba(110, 164, 161, .14);

  --danger: #e0685a;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .32);
  --shadow-3: 0 4px 8px rgba(0, 0, 0, .32), 0 24px 56px rgba(0, 0, 0, .4);

  /* ── Type ── */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* ── Geometry ── */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2rem);
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --nav-h: 72px;

  /* ── Motion ── */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: .15s var(--ease);
  --t: .2s var(--ease);

  /* ── Legacy aliases (older inline styles in blade views) ── */
  --text: var(--ink);
  --text2: var(--ink-2);
  --muted: var(--ink-3);
  --muted2: var(--ink-2);
  --card: var(--surface);
  --card2: var(--surface-2);
  --bg2: var(--bg-2);
  --bg3: var(--surface);
  --border: var(--rule-2);
  --border2: var(--rule);
  --border3: var(--accent-line);
  --accent2: var(--second);
  --cyan: var(--accent);
  --blue: var(--second);

  color-scheme: dark;
}

/* ── Light: OS preference (unless the visitor has forced dark) ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbfaf8;
    --bg-2: #f2f0ec;
    --surface: #ffffff;
    --surface-2: #f7f5f2;

    --ink: #14181c;
    --ink-2: #454c53;
    --ink-3: #6b747c;

    --rule: rgba(20, 24, 28, .14);
    --rule-2: rgba(20, 24, 28, .07);

    --accent: #a85a2c;
    --accent-hover: #8e4922;
    --accent-ink: #ffffff;
    --accent-soft: rgba(168, 90, 44, .09);
    --accent-line: rgba(168, 90, 44, .3);

    --second: #3d6260;
    --second-soft: rgba(61, 98, 96, .1);

    --danger: #b8362a;

    --shadow-1: 0 1px 2px rgba(20, 24, 28, .05);
    --shadow-2: 0 1px 2px rgba(20, 24, 28, .05), 0 10px 28px rgba(20, 24, 28, .07);
    --shadow-3: 0 2px 4px rgba(20, 24, 28, .06), 0 20px 48px rgba(20, 24, 28, .1);

    color-scheme: light;
  }
}

/* ── Light: explicit toggle (must beat the media query) ── */
:root[data-theme="light"] {
  --bg: #fbfaf8;
  --bg-2: #f2f0ec;
  --surface: #ffffff;
  --surface-2: #f7f5f2;

  --ink: #14181c;
  --ink-2: #454c53;
  --ink-3: #6b747c;

  --rule: rgba(20, 24, 28, .14);
  --rule-2: rgba(20, 24, 28, .07);

  --accent: #a85a2c;
  --accent-hover: #8e4922;
  --accent-ink: #ffffff;
  --accent-soft: rgba(168, 90, 44, .09);
  --accent-line: rgba(168, 90, 44, .3);

  --second: #3d6260;
  --second-soft: rgba(61, 98, 96, .1);

  --danger: #b8362a;

  --shadow-1: 0 1px 2px rgba(20, 24, 28, .05);
  --shadow-2: 0 1px 2px rgba(20, 24, 28, .05), 0 10px 28px rgba(20, 24, 28, .07);
  --shadow-3: 0 2px 4px rgba(20, 24, 28, .06), 0 20px 48px rgba(20, 24, 28, .1);

  color-scheme: light;
}

/* ── Dark: explicit toggle ── */
:root[data-theme="dark"] {
  --bg: #12161a;
  --bg-2: #0e1216;
  --surface: #1b222a;
  --surface-2: #222b34;

  --ink: #e9e6e1;
  --ink-2: #b4bac0;
  --ink-3: #8a939b;

  --rule: rgba(233, 230, 225, .13);
  --rule-2: rgba(233, 230, 225, .07);

  --accent: #e08a4f;
  --accent-hover: #ee9a61;
  --accent-ink: #12161a;
  --accent-soft: rgba(224, 138, 79, .13);
  --accent-line: rgba(224, 138, 79, .35);

  --second: #6ea4a1;
  --second-soft: rgba(110, 164, 161, .14);

  --danger: #e0685a;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .32);
  --shadow-3: 0 4px 8px rgba(0, 0, 0, .32), 0 24px 56px rgba(0, 0, 0, .4);

  color-scheme: dark;
}


/* ───────────────────────────────────────────────────────────────
   2. RESET & BASE
   ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 99px;
  border: 3px solid var(--bg-2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

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

/* Retired decoration — guard against cached compiled Blade views */
.cursor,
.cursor-follower,
.orb,
.hero-bg-grid,
.photo-ring,
.photo-badge {
  display: none !important;
}


/* ───────────────────────────────────────────────────────────────
   3. TYPE PRIMITIVES & LAYOUT
   ─────────────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.017em;
  text-wrap: balance;
}

p {
  max-width: 68ch;
}

strong,
b {
  font-weight: 650;
  color: var(--ink);
}

code {
  font-family: var(--font-mono);
  font-size: .88em;
}

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

.section-pad {
  padding-block: var(--section-pad);
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: clamp(2.2rem, 4.5vw, 3.5rem);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-tag::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent-line);
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  max-width: 22ch;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-sub {
  color: var(--ink-2);
  font-size: 1.02rem;
  max-width: 60ch;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}


/* ───────────────────────────────────────────────────────────────
   4. BUTTONS
   ─────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-ghost,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.005em;
  padding: .78rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--t), border-color var(--t), color var(--t), transform var(--t-fast);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-ghost:hover {
  border-color: var(--ink-3);
  background: var(--surface);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-line);
}

.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .92rem;
  color: var(--ink-3);
  padding: .78rem .25rem;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: color var(--t), text-decoration-color var(--t);
}

.btn-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent-line);
}


/* ───────────────────────────────────────────────────────────────
   5. NAVIGATION
   ─────────────────────────────────────────────────────────────── */

.nav-wrap {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t);
}

.nav-wrap.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--rule-2);
}

.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-right: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
}

.logo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-right: .5rem;
}

.nav-links a {
  display: block;
  font-size: .89rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  transition: color var(--t), background-color var(--t);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-hire {
  font-size: .88rem;
  font-weight: 600;
  padding: .58rem 1.05rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  white-space: nowrap;
  transition: background-color var(--t), transform var(--t-fast);
}

.nav-hire:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .85rem;
  flex-shrink: 0;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* Icon swap follows the resolved theme */
.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="dark"]) .theme-toggle .icon-moon {
    display: none;
  }
}

/* Hamburger */
.nav-hamburger {
  display: none;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-hamburger:hover {
  border-color: var(--accent-line);
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem var(--gutter);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-overlay ul {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  max-width: 420px;
  width: 100%;
  margin-inline: auto;
}

.mobile-overlay a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-2);
  transition: color var(--t), padding-left var(--t);
}

.mobile-overlay a:hover {
  color: var(--accent);
  padding-left: .5rem;
}

.mobile-hire {
  color: var(--accent) !important;
  border-bottom: 0 !important;
  margin-top: .75rem;
}

.mobile-close {
  position: absolute;
  top: 1.25rem;
  right: var(--gutter);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1rem;
}

.mobile-close:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}


/* ───────────────────────────────────────────────────────────────
   6. HERO
   ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6.5rem));
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  padding-inline: var(--gutter);
  overflow: hidden;
}

/* One ambient wash replaces three animated orbs */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 78% 18%, var(--accent-soft) 0%, transparent 62%);
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: .36rem .8rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--second);
  box-shadow: 0 0 0 3px var(--second-soft);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: -.9rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.028em;
  max-width: 15ch;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  max-width: 52ch;
}

.hero-desc strong {
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  margin-top: .25rem;
}

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .95rem 1.05rem;
  border-right: 1px solid var(--rule-2);
}

.stat:last-child {
  border-right: 0;
}

.stat-n {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-l {
  font-family: var(--font-mono);
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.35;
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 380px;
}

.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface);
  aspect-ratio: 4 / 5;
  z-index: 1;
}

/* Offset accent rule behind the frame */
.hero-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  z-index: 0;
  pointer-events: none;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: var(--surface-2);
  text-align: center;
  padding: 1.5rem;
}

.photo-placeholder span {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.03em;
}

.photo-placeholder p {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--ink-3);
  text-transform: uppercase;
  line-height: 1.6;
}

.scroll-hint {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-line), transparent);
}


/* ───────────────────────────────────────────────────────────────
   7. ABOUT
   ─────────────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.about-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.about-left p {
  color: var(--ink-2);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-2);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  margin-top: 1rem;
}

.highlight-item {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--bg);
}

.hi-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .85rem;
}

.highlight-item strong {
  font-size: .92rem;
  font-weight: 650;
}

.highlight-item small {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  line-height: 1.5;
}

/* Tech stack card */
.about-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.tech-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.tech-card-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rule-2);
  background: var(--surface-2);
}

.tc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.tc-red {
  background: #e05f4f;
}

.tc-yellow {
  background: #e0b64f;
}

.tc-green {
  background: #6ea471;
}

.tc-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  letter-spacing: .03em;
}

.tech-card-body {
  padding: 1.15rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .5rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem .4rem;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: border-color var(--t), background-color var(--t), transform var(--t-fast);
}

.tech-item:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.tech-item i {
  font-size: 1.1rem;
  color: var(--ink-2);
  transition: color var(--t);
}

.tech-item:hover i {
  color: var(--accent);
}

.tech-item small {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  line-height: 1.3;
}

/* Summary cells */
.exp-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.esc-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .9rem 1rem;
  border-right: 1px solid var(--rule-2);
}

.esc-item:last-child {
  border-right: 0;
}

.esc-n {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -.025em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.esc-l {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* ───────────────────────────────────────────────────────────────
   8. EXPERIENCE TIMELINE
   ─────────────────────────────────────────────────────────────── */

.timeline {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: grid;
  grid-template-columns: 8.5rem 1.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
}

/* Date column */
.tl-when {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  text-align: right;
  padding-top: .1rem;
}

.tl-period {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.tl-item.tl-current .tl-period {
  color: var(--accent);
}

.tl-duration {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Rail */
.tl-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.tl-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

.tl-item:first-child .tl-rail::before {
  top: .55rem;
}

.tl-item:last-child .tl-rail::before {
  bottom: auto;
  height: .55rem;
}

.tl-node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-top: .38rem;
  box-shadow: 0 0 0 4px var(--bg);
  transition: background-color var(--t), box-shadow var(--t);
}

.tl-item.tl-current .tl-node {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent-soft);
}

/* Body */
.tl-body {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.tl-item:last-child .tl-body {
  padding-bottom: 0;
}

.tl-role {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.3;
}

.tl-company {
  display: inline-block;
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: .15rem;
}

.tl-now {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--second);
  background: var(--second-soft);
  border-radius: 99px;
  padding: .15rem .5rem;
  margin-left: .5rem;
  vertical-align: 2px;
}

.tl-location {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  margin-top: .3rem;
}

.tl-bullets {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: .9rem;
}

.tl-bullets li {
  position: relative;
  padding-left: 1.05rem;
  font-size: .94rem;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 66ch;
}

.tl-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-line);
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .95rem;
}

.tl-tag {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .22rem .48rem;
  transition: color var(--t), border-color var(--t);
}

.tl-item:hover .tl-tag {
  border-color: var(--accent-line);
  color: var(--ink-2);
}


/* ───────────────────────────────────────────────────────────────
   9. PROJECT CARDS
   ─────────────────────────────────────────────────────────────── */

.proj-grid-home,
.proj-full-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.75rem);
}

.proj-card-home,
.proj-full-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.proj-card-home:hover,
.proj-full-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* Featured card spans two columns */
.proj-card-home.is-featured {
  grid-column: span 2;
}

.proj-card-home.is-featured .proj-img-wrap {
  aspect-ratio: 16 / 9;
}

.proj-img-wrap,
.pfc-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.proj-img,
.pfc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}

.proj-card-home:hover .proj-img,
.proj-full-card:hover .pfc-img {
  transform: scale(1.03);
}

.proj-img-placeholder,
.pfc-img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: -.03em;
  text-transform: uppercase;
}

/* Hover overlay */
.proj-overlay,
.pfc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--t);
}

.proj-card-home:hover .proj-overlay,
.proj-full-card:hover .pfc-overlay,
.proj-overlay:focus-within,
.pfc-overlay:focus-within {
  opacity: 1;
}

.proj-view-btn,
.pfc-btn {
  font-size: .84rem;
  font-weight: 600;
  padding: .58rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  white-space: nowrap;
  transition: background-color var(--t);
}

.proj-view-btn:hover,
.pfc-btn:hover {
  background: var(--accent-hover);
}

.proj-live-btn,
.pfc-btn-outline {
  font-size: .84rem;
  font-weight: 600;
  padding: .58rem 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  white-space: nowrap;
  transition: border-color var(--t), color var(--t);
}

.proj-live-btn:hover,
.pfc-btn-outline:hover {
  border-color: var(--ink);
}

.pfc-badge {
  position: absolute;
  top: .7rem;
  left: .7rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 4px;
  padding: .22rem .5rem;
}

/* Card body */
.proj-info,
.pfc-info {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.1rem 1.2rem 1.35rem;
  flex: 1;
}

.proj-category,
.pfc-category {
  font-family: var(--font-mono);
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.proj-title-card,
.pfc-title {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.28;
}

.proj-excerpt,
.pfc-desc {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.6;
  flex: 1;
}

/* Impact line — turns a screenshot grid into a case-study grid */
.proj-impact {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  font-size: .87rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}

.proj-impact::before {
  content: "→";
  font-family: var(--font-mono);
  font-size: .8rem;
  flex-shrink: 0;
}

.proj-tech-list,
.pfc-tech {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .2rem;
}

.proj-tech-list span,
.pfc-tech span {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .2rem .45rem;
  transition: border-color var(--t), color var(--t);
}

.proj-card-home:hover .proj-tech-list span,
.proj-full-card:hover .pfc-tech span {
  border-color: var(--accent-line);
  color: var(--ink-2);
}


/* ───────────────────────────────────────────────────────────────
   10. PAGE HERO (inner pages)
   ─────────────────────────────────────────────────────────────── */

.page-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 5.5rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule-2);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 15% 0%, var(--accent-soft) 0%, transparent 60%);
}

.page-hero-sm {
  padding-top: calc(var(--nav-h) + 1.75rem);
  padding-bottom: 1.25rem;
}

.page-hero-sm::before {
  display: none;
}

.page-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.page-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -.025em;
  line-height: 1.06;
}

.page-hero-desc {
  color: var(--ink-2);
  max-width: 62ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.breadcrumb a {
  color: var(--ink-2);
  transition: color var(--t);
}

.breadcrumb a:hover {
  color: var(--accent);
}


/* ───────────────────────────────────────────────────────────────
   11. FILTERS & PAGINATION
   ─────────────────────────────────────────────────────────────── */

.proj-filters,
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: .45rem .95rem;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}

.filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.filter-btn.active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.25rem, 4.5vw, 3.25rem);
}

.pagination-wrap a,
.pagination-wrap span {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-2);
}

.pagination-wrap a {
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: .5rem .95rem;
  margin: 0 .2rem;
  display: inline-block;
  transition: border-color var(--t), color var(--t);
}

.pagination-wrap a:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}


/* ───────────────────────────────────────────────────────────────
   12. PROJECT DETAIL
   ─────────────────────────────────────────────────────────────── */

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.pd-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.pd-category {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.pd-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -.025em;
  line-height: 1.06;
}

.pd-type {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-3);
  letter-spacing: .03em;
}

.pd-main-img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-top: .5rem;
}

.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
}

.pd-gallery {
  width: 100%;
  margin-top: 1.25rem;
}

.pd-gallery h4 {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .85rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .7rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule-2);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  opacity: 0;
  transition: opacity var(--t);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.pd-description {
  width: 100%;
  margin-top: 1.5rem;
}

.pd-description h3 {
  font-size: 1.3rem;
  margin-bottom: .7rem;
}

.pd-body {
  color: var(--ink-2);
  line-height: 1.8;
  max-width: 68ch;
}

/* Sidebar */
.pd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.pd-info-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.2rem;
}

.pd-info-card h4 {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .9rem;
}

.pd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-2);
  font-size: .88rem;
}

.pd-info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pd-info-row span {
  color: var(--ink-3);
}

.pd-info-row strong {
  font-weight: 600;
  text-align: right;
}

.status-completed {
  color: var(--second) !important;
}

.status-ongoing,
.status-in-progress {
  color: var(--accent) !important;
}

.pd-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.pd-tech-pill {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .25rem .5rem;
}

.pd-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.pd-btn {
  width: 100%;
}

/* Related */
.related-section {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule-2);
}

.related-title {
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--t), transform var(--t);
}

.related-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.related-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
}

.related-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem 1rem 1rem;
}

.related-info span {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.related-info strong {
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.3;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgba(0, 0, 0, .88);
}

.lightbox.active {
  display: grid;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 1.1rem;
}

.lightbox-close:hover {
  border-color: #fff;
}


/* ───────────────────────────────────────────────────────────────
   13. SKILLS
   ─────────────────────────────────────────────────────────────── */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.35rem 1.4rem 1.5rem;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--t), transform var(--t);
}

.skill-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .95rem;
}

.skill-group-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.01em;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--rule-2);
}

.skill-pills {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}

.skill-pill {
  position: relative;
  padding-left: .95rem;
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.skill-pill::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-line);
}


/* ───────────────────────────────────────────────────────────────
   14. TESTIMONIALS
   ─────────────────────────────────────────────────────────────── */

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.testi-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--t), transform var(--t);
}

.testi-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.testi-quote {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: .6;
  color: var(--accent-line);
  height: 1rem;
}

.testi-text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  flex: 1;
  max-width: none;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-2);
}

.testi-avatar,
.testi-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
}

.testi-avatar-placeholder {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .92rem;
  font-weight: 500;
  text-transform: uppercase;
}

.testi-author strong {
  display: block;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.3;
}

.testi-author small {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  line-height: 1.4;
}


/* ───────────────────────────────────────────────────────────────
   15. BLOG
   ─────────────────────────────────────────────────────────────── */

/* Home: hairline list */
.blog-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-2);
}

.blog-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule-2);
  transition: background-color var(--t), padding-inline var(--t);
}

.blog-row:hover {
  background: var(--surface);
  padding-inline: 1rem;
}

.blog-row-date {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.blog-row-main {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.blog-row-title {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.3;
  transition: color var(--t);
}

.blog-row:hover .blog-row-title {
  color: var(--accent);
}

.blog-row-excerpt {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 62ch;
}

.blog-row-meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Blog index cards */
.blog-grid,
.blog-full-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.75rem);
}

.blog-card,
.blog-full-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.blog-card:hover,
.blog-full-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.blog-img-wrap,
.bfc-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.blog-img,
.bfc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}

.blog-card:hover .blog-img,
.blog-full-card:hover .bfc-img {
  transform: scale(1.03);
}

.blog-img-placeholder,
.bfc-img-placeholder,
.bf-img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 1.5rem;
}

.blog-category-tag {
  position: absolute;
  top: .7rem;
  left: .7rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .22rem .5rem;
}

.blog-info,
.bfc-info {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.1rem 1.2rem 1.35rem;
  flex: 1;
}

.blog-date,
.bfc-date {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.blog-title-card,
.bfc-title {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.3;
}

.blog-excerpt,
.bfc-excerpt {
  font-size: .89rem;
  color: var(--ink-2);
  line-height: 1.6;
  flex: 1;
}

.blog-read,
.bfc-read {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--accent);
  margin-top: .2rem;
}

/* Featured post */
.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: center;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule-2);
}

.bf-img-wrap {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule-2);
  background: var(--surface-2);
}

.bf-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bf-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
}

.bf-content .blog-category-tag {
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bf-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -.022em;
  line-height: 1.12;
}

.bf-excerpt {
  color: var(--ink-2);
  font-size: .98rem;
}

.bf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Post detail */
.bp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.bp-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bp-content .blog-category-tag {
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin-bottom: .9rem;
}

.bp-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -.025em;
  line-height: 1.07;
  margin-bottom: .8rem;
}

.bp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-bottom: 2rem;
}

.bp-hero-img {
  width: 100%;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.25rem;
}

.bp-hero-img img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.bp-body {
  color: var(--ink-2);
  line-height: 1.85;
  font-size: 1.0625rem;
  max-width: 68ch;
}

.bp-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bp-author {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.4rem;
  margin-top: 2.75rem;
}

.bp-author-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
}

.bp-author strong {
  font-size: 1rem;
}

.bp-author p {
  font-size: .87rem;
  color: var(--ink-2);
  margin-top: .2rem;
}

.bp-author-links {
  display: flex;
  gap: .85rem;
  margin-top: .5rem;
}

.bp-author-links a {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--accent);
}

.bp-author-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Post sidebar */
.bp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.bp-widget {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.2rem;
}

.bp-widget h4 {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .9rem;
}

.bp-widget-stack {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.share-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  background: transparent;
  transition: border-color var(--t), color var(--t), background-color var(--t);
}

.share-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.bp-author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
}

.bp-author-card .bp-author-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.1rem;
}

.bp-author-card p {
  font-size: .84rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.related-post {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule-2);
  transition: opacity var(--t);
}

.related-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.related-post:hover {
  opacity: .75;
}

.related-post img,
.related-post .rp-placeholder {
  width: 56px;
  height: 46px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.related-post .rp-placeholder {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: .9rem;
}

.related-post span {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.related-post p {
  font-size: .85rem;
  color: var(--ink);
  line-height: 1.4;
  margin-top: 2px;
}


/* ───────────────────────────────────────────────────────────────
   16. CONTACT
   ─────────────────────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
}

.contact-info p {
  color: var(--ink-2);
}

.contact-items {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-top: 1px solid var(--rule-2);
  margin-top: .75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem .25rem;
  border-bottom: 1px solid var(--rule-2);
  transition: padding-left var(--t), background-color var(--t);
}

.contact-item:hover {
  padding-left: .75rem;
  background: var(--surface);
}

.ci-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .85rem;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}

.contact-item:hover .ci-icon {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.ci-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

.contact-item strong {
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
}

.ci-value {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--ink-3);
  word-break: break-word;
}

/* Form */
.contact-form-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: var(--shadow-2);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-row label {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-row select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--ink-3);
  opacity: .75;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-error {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .03em;
  color: var(--danger);
}

.form-success {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--second);
  background: var(--second-soft);
  border: 1px solid color-mix(in srgb, var(--second) 35%, transparent);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
}

.form-btn {
  align-self: flex-start;
  margin-top: .25rem;
}

.form-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}


/* ───────────────────────────────────────────────────────────────
   17. FOOTER
   ─────────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--rule-2);
  margin-top: clamp(3rem, 6vw, 5rem);
}

.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2.75rem, 5vw, 4rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-brand p {
  font-size: .87rem;
  color: var(--ink-3);
  line-height: 1.7;
  margin-top: .6rem;
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .9rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-links a {
  font-size: .88rem;
  color: var(--ink-2);
  transition: color var(--t);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-contact p {
  font-size: .87rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .9rem;
  transition: color var(--t), border-color var(--t), background-color var(--t), transform var(--t-fast);
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--rule-2);
}

.footer-bottom p {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1.25rem var(--gutter);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  text-align: center;
}


/* ───────────────────────────────────────────────────────────────
   17b. ERROR PAGES
   ─────────────────────────────────────────────────────────────── */

.error-page {
  position: relative;
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vw, 5rem));
  padding-bottom: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.error-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 20% 15%, var(--accent-soft) 0%, transparent 62%);
}

.error-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  width: 100%;
}

/* The code itself, set large in the display face */
.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 17vw, 12rem);
  font-weight: 650;
  line-height: .82;
  letter-spacing: -.055em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.error-code span {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.error-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.05rem;
}

.error-title {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  letter-spacing: -.025em;
  line-height: 1.08;
  max-width: 18ch;
}

.error-desc {
  color: var(--ink-2);
  font-size: 1.02rem;
  max-width: 52ch;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: .3rem;
}

/* Suggested destinations — more useful than a lone "go home" button */
.error-links {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule-2);
}

.error-links h2 {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .8rem;
}

.error-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1.5rem;
}

.error-links a {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
  color: var(--ink-2);
  padding: .45rem 0;
  border-bottom: 1px solid var(--rule-2);
  transition: color var(--t), padding-left var(--t);
}

.error-links a:hover {
  color: var(--accent);
  padding-left: .4rem;
}

.error-links a i {
  width: 15px;
  font-size: .78rem;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: color var(--t);
}

.error-links a:hover i {
  color: var(--accent);
}

@media (max-width: 860px) {
  .error-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .error-code {
    line-height: .9;
  }

  .error-code span {
    margin-top: .9rem;
    padding-top: .9rem;
  }
}

@media (max-width: 560px) {
  .error-links ul {
    grid-template-columns: 1fr;
  }

  .error-actions .btn-primary,
  .error-actions .btn-ghost {
    flex: 1 1 auto;
  }
}


/* ───────────────────────────────────────────────────────────────
   18. SCROLL REVEAL
   ─────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}

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


/* ───────────────────────────────────────────────────────────────
   19. RESPONSIVE — 1024 / 860 / 640 / 420
   ─────────────────────────────────────────────────────────────── */

/* ── ≤1024px : tablet landscape ── */
@media (max-width: 1024px) {
  :root {
    --nav-h: 66px;
  }

  .nav-links {
    display: none;
  }

  .nav-logo {
    margin-right: auto;
  }

  .theme-toggle {
    order: 1;
  }

  .nav-hire {
    order: 2;
  }

  .nav-hamburger {
    display: flex;
    order: 3;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hero-photo-wrap {
    order: -1;
    max-width: 300px;
    justify-self: start;
  }

  .hero-photo-wrap::after {
    inset: 14px -14px -14px 14px;
  }

  .hero-title {
    max-width: 18ch;
  }

  .about-grid,
  .contact-grid,
  .blog-featured,
  .pd-grid,
  .bp-grid {
    grid-template-columns: 1fr;
  }

  .about-right,
  .pd-sidebar,
  .bp-sidebar {
    position: static;
  }

  .proj-grid-home,
  .proj-full-grid,
  .blog-grid,
  .blog-full-grid,
  .skills-grid,
  .testi-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── ≤860px : tablet portrait ── */
@media (max-width: 860px) {
  .hero-stats {
    max-width: none;
  }

  .tl-item {
    grid-template-columns: 7rem 1.25rem minmax(0, 1fr);
    gap: 0 1rem;
  }

  .blog-row {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .blog-row-meta {
    grid-column: 2;
    margin-top: .3rem;
  }

  /* Testimonials become a swipe rail — CSS scroll-snap, no carousel library */
  .testi-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    gap: .9rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: .5rem;
    scrollbar-width: none;
  }

  .testi-grid::-webkit-scrollbar {
    display: none;
  }

  .testi-card {
    flex: 0 0 min(86%, 340px);
    scroll-snap-align: start;
  }
}

/* ── ≤640px : phone ── */
@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  :root {
    --section-pad: clamp(3.25rem, 11vw, 4.5rem);
  }

  .hero {
    padding-top: calc(var(--nav-h) + 2.5rem);
  }

  .hero-title {
    max-width: none;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    flex: 1 1 auto;
  }

  .hero-photo-wrap {
    max-width: 240px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  /* Timeline: date moves above the role, rail hugs the left edge */
  .tl-item {
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0 .85rem;
  }

  .tl-when {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
    align-items: baseline;
    gap: .55rem;
    text-align: left;
    margin-bottom: .35rem;
  }

  .tl-rail {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .tl-body {
    grid-column: 2;
    grid-row: 2;
  }

  .tl-node {
    margin-top: .3rem;
  }

  .proj-grid-home,
  .proj-full-grid,
  .blog-grid,
  .blog-full-grid,
  .skills-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .proj-card-home.is-featured {
    grid-column: span 1;
  }

  .proj-card-home.is-featured .proj-img-wrap {
    aspect-ratio: 16 / 10;
  }

  .blog-row {
    grid-template-columns: 1fr;
    gap: .45rem;
  }

  .blog-row-meta {
    grid-column: 1;
    margin-top: 0;
  }

  .blog-row:hover {
    padding-inline: .65rem;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Overlays are hover affordances — there is no hover on touch, so the
     buttons move below the image and stay permanently visible. */
  .proj-img-wrap,
  .pfc-img-wrap {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
  }

  .proj-img,
  .pfc-img,
  .proj-img-placeholder,
  .pfc-img-placeholder {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .proj-overlay,
  .pfc-overlay {
    position: static;
    opacity: 1;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    justify-content: flex-start;
    padding: 1.1rem 1.2rem 0;
  }
}

/* ── ≤420px : small phone ── */
@media (max-width: 420px) {
  :root {
    --gutter: 1rem;
  }

  .hero-stats,
  .exp-summary-cards {
    grid-template-columns: 1fr;
  }

  .stat,
  .esc-item {
    border-right: 0;
    border-bottom: 1px solid var(--rule-2);
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
  }

  .stat:last-child,
  .esc-item:last-child {
    border-bottom: 0;
  }

  .mobile-overlay a {
    font-size: 1.35rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .bp-author {
    flex-direction: column;
    gap: .9rem;
  }
}


/* ───────────────────────────────────────────────────────────────
   20. MOTION & PRINT
   ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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

@media print {
  .nav-wrap,
  .mobile-overlay,
  .scroll-hint,
  .footer-social,
  .contact-form-wrap,
  .proj-overlay,
  .pfc-overlay {
    display: none !important;
  }

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

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