/* ============================================================
   AAKUX V2 — MAIN STYLESHEET
   Font: Inter
   Aesthetic: Dark-first, sophisticated minimalism (à la liquid.ai)
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Colour */
  --bg:          #0A0A0A;
  --bg-surface:  #111111;
  --bg-raised:   #1A1A1A;
  --border:      rgba(255,255,255,0.08);
  --border-mid:  rgba(255,255,255,0.14);
  --text:        #F2F2F2;
  --text-mid:    #A0A0A0;
  --text-soft:   #606060;
  --accent:      #3399FF;
  --accent-glow: rgba(51,153,255,0.18);

  /* Type */
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizing */
  --nav-h:       68px;
  --max-w:       1120px;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-pill: 100px;

  /* Motion */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:      0.18s;
  --t-mid:       0.35s;
  --t-slow:      0.55s;
}

/* ── Light theme overrides ───────────────────────────────────── */
[data-theme="light"] {
  --bg:          #F7F7F7;
  --bg-surface:  #FFFFFF;
  --bg-raised:   #EFEFEF;
  --border:      rgba(0,0,0,0.08);
  --border-mid:  rgba(0,0,0,0.14);
  --text:        #0A0A0A;
  --text-mid:    #404040;
  --text-soft:   #888888;
  --accent-glow: rgba(51,153,255,0.14);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; }

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

/* ── Skip link ───────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 16px; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─────────────────────────────────────────────────────────────
   NAVIGATION
   State 1 — full bar at page top
   State 2 — compact frosted pill on scroll
   State 3 — pill expands on hover
   ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none;   /* let clicks fall through the gap */
}

.nav {
  pointer-events: all;
  /* ── State 1: full bar ── */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 48px;
  background: transparent;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  transition:
    background    var(--t-mid) var(--ease),
    border-color  var(--t-mid) var(--ease),
    top           var(--t-mid) var(--ease),
    left          var(--t-mid) var(--ease),
    right         var(--t-mid) var(--ease),
    padding       var(--t-mid) var(--ease),
    border-radius var(--t-mid) var(--ease),
    box-shadow    var(--t-mid) var(--ease);
  will-change: left, right, top;
}

/* slight darkening once content starts scrolling under */
.nav.at-top {
  background: linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, transparent 100%);
  border-color: transparent;
}
[data-theme="light"] .nav.at-top {
  background: linear-gradient(to bottom, rgba(247,247,247,0.85) 0%, transparent 100%);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 0;
  transition: height var(--t-mid) var(--ease);
}

/* Logo */
.nav-logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color var(--t-fast);
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

/* Page label — "/ Home" style, only visible inside the pill */
.nav-page-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-left: 8px;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity var(--t-mid) var(--ease), max-width var(--t-mid) var(--ease), margin var(--t-mid) var(--ease);
}

/* Show inside collapsed pill */
.nav.scrolled .nav-page-label {
  opacity: 1;
  max-width: 120px;
  margin-left: 8px;
}

/* Hide again when pill expands on hover */
.nav.scrolled:hover .nav-page-label {
  opacity: 0;
  max-width: 0;
  margin-left: 0;
}

.nav-spacer { flex: 1; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 20px;
  transition: opacity var(--t-mid), max-width var(--t-mid);
  overflow: hidden;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.nav-links a:hover {
  background: var(--bg-raised);
  color: var(--text);
}
.nav-links a.active { color: var(--accent); }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-raised);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-right: 10px;
  flex-shrink: 0;
  transition: opacity var(--t-mid), max-width var(--t-mid);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-soft);
  transition: background var(--t-fast), color var(--t-fast);
  padding: 0;
}
.theme-btn svg { width: 14px; height: 14px; display: block; }
.theme-btn:hover { background: var(--bg-surface); color: var(--text); }
.theme-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}


/* Hide toggle inside collapsed pill, show on hover */
.nav.scrolled .theme-toggle {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: none;
}
.nav.scrolled:hover .theme-toggle {
  opacity: 1;
  max-width: 44px;
  pointer-events: all;
  margin-right: 10px;
  padding: 3px;
  border: 1px solid var(--border-mid);
}

/* CTA */
.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  transition: background var(--t-fast), color var(--t-fast), opacity var(--t-mid);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--accent); color: #000; }

/* ── State 2: scrolled → pill ── */
.nav.scrolled {
  top: 12px;
  left: calc(50vw - 140px);
  right: calc(50vw - 140px);
  padding: 0 20px;
  background: rgba(17,17,17,0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mid);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(255,255,255,0.82);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.nav.scrolled .nav-inner {
  height: 48px;
}

/* In pill: hide links + CTA, show just logo */
.nav.scrolled .nav-links {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
  margin: 0;
  gap: 0;
}
.nav.scrolled .nav-cta {
  opacity: 0;
  pointer-events: none;
  max-width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
.nav.scrolled .nav-spacer { display: none; }

/* ── State 3: scrolled + hovered → pill expands ── */
.nav.scrolled:hover {
  left: calc(50vw - 350px);
  right: calc(50vw - 350px);
  padding: 0 28px;
}

.nav.scrolled:hover .nav-inner { gap: 0; }

.nav.scrolled:hover .nav-links {
  opacity: 1;
  max-width: 500px;
  pointer-events: all;
  margin-right: 16px;
  margin-left: 24px;
  gap: 4px;
}
.nav.scrolled:hover .nav-cta {
  opacity: 1;
  pointer-events: all;
  max-width: 120px;
  padding: 8px 20px;
}
.nav.scrolled:hover .nav-spacer { display: block; flex: 1; }

/* ─────────────────────────────────────────────────────────────
   HERO SECTION
   ──────────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 100px;
  overflow: hidden;
}

/* Subtle dot-grid background texture */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: background-image var(--t-mid);
}
[data-theme="light"] .hero-bg-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
}
  /* Fade: visible at top-left / bottom-right, disappear toward center */
  mask-image: linear-gradient(135deg,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.4) 25%,
    rgba(0,0,0,0)   48%,
    rgba(0,0,0,0)   52%,
    rgba(0,0,0,0.4) 75%,
    rgba(0,0,0,0.9) 100%);
  -webkit-mask-image: linear-gradient(135deg,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.4) 25%,
    rgba(0,0,0,0)   48%,
    rgba(0,0,0,0)   52%,
    rgba(0,0,0,0.4) 75%,
    rgba(0,0,0,0.9) 100%);
  pointer-events: none;
}

/* Subtle radial glow behind heading */
.hero-section::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(51,153,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 820px;
}

/* Pills below heading */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  margin-bottom: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: var(--bg-raised);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
}

/* Main heading */
.hero-heading {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-heading em {
  color: var(--accent);
  /* slight italic lean */
  font-style: italic;
  font-weight: 800;
}

/* Sub copy */
.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 40px;
}

/* CTA row */
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--t-fast), color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-mid);
}
.btn-ghost:hover {
  border-color: var(--text-mid);
  color: var(--text);
  background: var(--bg-raised);
}

/* Scroll cue */
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--border-mid), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0; transform: scaleY(0.4) translateY(-8px); }
  50%       { opacity: 1; transform: scaleY(1)   translateY(0); }
}

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(51,153,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-title {
  position: relative;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

/* ── Section utility ─────────────────────────────────────────── */
section { padding: 96px 0; }

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────────────────────
   FEATURED SECTION
   ──────────────────────────────────────────────────────────── */
.featured-section {
  padding: 96px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  text-decoration: none;
  transition: background var(--t-fast);
}
.feat-card:hover {
  background: var(--bg-raised);
}

/* Image container — shows the full image */
.feat-img-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--bg-raised);
}

.feat-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.feat-card:hover .feat-img { transform: scale(1.03); }

/* Title row below the image */
.feat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 12px;
}

.feat-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.feat-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-soft);
  flex-shrink: 0;
  transition: color var(--t-fast), transform var(--t-mid) var(--ease);
}
.feat-card:hover .feat-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ─────────────────────────────────────────────────────────────
   SKILLS SECTION
   ──────────────────────────────────────────────────────────── */
.skills-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-top: 8px;
  margin-bottom: 48px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;                        /* hairline grid lines */
  background: var(--border);       /* grid line colour */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-card {
  background: var(--bg-surface);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--t-fast);
}
.skill-card:hover { background: var(--bg-raised); }

/* Icon container — 72×72 display */
.skill-icon-wrap {
  width: 72px;
  height: 72px;
  position: relative;
  flex-shrink: 0;
}
.skill-icon-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity var(--t-fast);
}

/* Dark theme (default) → dark icons */
.icon-light { opacity: 0; }
.icon-dark  { opacity: 1; }

/* Light theme → light icons */
[data-theme="light"] .icon-light { opacity: 1; }
[data-theme="light"] .icon-dark  { opacity: 0; }

.skill-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.skill-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  flex: 1;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.skill-tag {
  display: inline-flex;
  padding: 3px 10px;
  background: rgba(51,153,255,0.1);
  border: 1px solid rgba(51,153,255,0.25);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   VIBEMAGIC SECTION
   ──────────────────────────────────────────────────────────── */
.vibemagic-section {
  padding: 48px 0 96px;
}

.vibemagic-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 48px;
}

.vibemagic-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* Video — rounded corners, subtle border */
.vibemagic-video {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

/* Copy side */
.vibemagic-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.vibemagic-copy p {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.vibemagic-live {
  font-weight: 600;
  color: var(--accent) !important;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-link:hover { opacity: 0.8; }

.vibemagic-cta { margin-top: 8px; align-self: flex-start; }

/* ─────────────────────────────────────────────────────────────
   CREDENTIALS SECTION
   ──────────────────────────────────────────────────────────── */
.cred-section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cred-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 36px;
  background: var(--bg-surface);
  transition: background var(--t-fast);
}
.cred-card:hover { background: var(--bg-raised); }

.cred-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
}

.cred-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.cred-title a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity var(--t-fast);
}
.cred-title a:hover { opacity: 0.75; }

.cred-desc {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.cred-year {
  font-size: 0.875rem;
  color: var(--text-soft);
  margin-top: auto;
}

/* ─────────────────────────────────────────────────────────────
   PUBLICATIONS SECTION
   ──────────────────────────────────────────────────────────── */
.pub-section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

/* ── Featured card ── */
.pub-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
}

.pub-featured-img {
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  transition: background var(--t-fast);
}
.pub-featured-img img {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}
.pub-featured:hover .pub-featured-img img {
  transform: translateY(-6px) rotate(-1deg);
}
.pub-featured::after {
  content: '↗';
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1rem;
  color: var(--accent);
  opacity: 0;
  transform: translate(4px, -4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}
.pub-featured:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.pub-featured-body {
  background: var(--bg-surface);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  transition: background var(--t-fast);
}
.pub-featured:hover .pub-featured-body { background: var(--bg-raised); }

.pub-featured-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.pub-featured-body p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.75;
}

.pub-cta { align-self: flex-start; margin-top: 8px; }

/* ── 2×2 grid ── */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.pub-card {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  transition: background var(--t-fast);
}
.pub-card:hover { background: var(--bg-raised); }
.pub-card::after {
  content: '↗';
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1rem;
  color: var(--accent);
  opacity: 0;
  transform: translate(4px, -4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}
.pub-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.pub-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 24px;
  background: inherit;
}
.pub-card-img img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}
.pub-card:hover .pub-card-img img {
  transform: translateY(-4px) rotate(-1deg);
}

.pub-card-body {
  padding: 0 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pub-card-desc {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────
   MENTORSHIP SECTION
   ──────────────────────────────────────────────────────────── */
.mentor-section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.mentor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.mentor-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mentor-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.mentor-meta {
  font-size: 0.9rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

.mentor-body {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.mentor-img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

/* ─────────────────────────────────────────────────────────────
   BRANDING CAROUSEL
   ──────────────────────────────────────────────────────────── */
.branding-section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.brand-group {
  margin-top: 48px;
}

.brand-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-card {
  background: var(--bg-surface);
  overflow: hidden;
  transition: background var(--t-fast);
  cursor: pointer;
}

.brand-card:hover {
  background: var(--bg-raised);
}

.brand-logo {
  background: #fff;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.brand-card:hover .brand-logo img {
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
}

.brand-footer {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
}

.brand-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.brand-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.brand-year {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-soft);
  flex-shrink: 0;
}

.brand-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.01em;
  width: fit-content;
}

.tag-inuse    { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tag-creative { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.tag-timed    { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  padding: 64px 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-name {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
}

.footer-links a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s, color 0.2s;
}

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

/* ─────────────────────────────────────────────────────────────
   HAMBURGER / MOBILE MENU
   ──────────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 4px;
  color: var(--fg);
  line-height: 0;
  border-radius: 8px;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg-raised); }
.nav-hamburger .icon-close { display: none; }
.nav-hamburger[aria-expanded="true"] .icon-menu  { display: none; }
.nav-hamburger[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  padding: 96px 32px 48px;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav-links li:first-child a { border-top: 1px solid var(--border); }
.mobile-nav-links a {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--t-fast);
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active { color: var(--accent); }

.mobile-menu-theme {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mobile-menu-theme-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}
.mobile-menu .theme-toggle {
  display: flex;
  margin-right: 0;
}
.mobile-menu .theme-btn {
  width: 36px;
  height: 36px;
}
.mobile-menu .theme-btn svg {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .nav { padding: 0 20px; }
  .nav.scrolled:hover { max-width: 95vw; }
  .nav-links    { display: none; }
  .nav-cta      { display: none; }
  .nav-page-label { display: none; }
  .theme-toggle { display: none; }
  .nav-hamburger  { display: flex; }

  .hero-heading { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .hero-sub     { font-size: 0.95rem; }

  .featured-grid    { grid-template-columns: 1fr; }
  .pub-featured     { grid-template-columns: 1fr; }
  .pub-grid         { grid-template-columns: 1fr; }
  .vibemagic-body   { grid-template-columns: 1fr; gap: 36px; }
  .cred-grid        { grid-template-columns: 1fr; }
  .mentor-grid      { grid-template-columns: 1fr; gap: 40px; }
  .mentor-img       { order: -1; }
  .footer-inner     { grid-template-columns: 1fr; }
  .footer-links     { align-items: flex-start; }

  .skills-grid  { grid-template-columns: 1fr; }
  .skill-card   { padding: 28px 24px; }

  /* Nav pill spans full width on mobile */
  .nav.scrolled {
    left: 12px;
    right: 12px;
    border-radius: var(--radius);
  }
  .nav.scrolled:hover {
    left: 12px;
    right: 12px;
  }
}
