/* ================================================================
   styles.css — Pranati Kompella portfolio
   Design system: Bitter (headers) + Instrument Sans (UI/body)
   ================================================================ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  /* Colours */
  --c-bg:           #ffffff;
  --c-surface:      #F7F6F3;
  --c-surface-2:    #EEECEA;
  --c-text:         #111111;
  --c-muted:        #6B6B6B;
  --c-subtle:       #9A9A9A;
  --c-accent:       #294DB1;
  --c-accent-light: #E6EFF5;
  --c-border:       #E2E2DE;
  --c-white:        #ffffff;

  /* Typography */
  --font-display: 'Bitter', Georgia, serif;
  --font-bitter:  'Bitter', Georgia, serif;
  --font-sans:    'Instrument Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  80px;
  --space-10: 120px;

  /* Layout */
  --max-w:      1100px;
  --nav-h:      56px;
  --radius:     8px;
  --radius-sm:  4px;
  --radius-pill:100px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur:  0.2s;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: #F5F4F2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Landing page: a very subtle colour drift as the page scrolls */
body.page-home {
  background: linear-gradient(
    to bottom,
    #F7F6F3 0%,
    #F1F7FA 20%,
    #F9F8ED 40%,
    #E4F1F9 70%,
    #F5F4F2 100%
  );
}

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

a {
  color: var(--c-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Layout Utilities ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ================================================================
   NAVIGATION
   ================================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  padding-top: 25px;
}

/* Overlay variant: floats transparently on top of a full-bleed hero image
   (used on the case study template) instead of pushing content down. */
.site-nav--overlay {
  position: sticky;
  left: 0;
  right: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Pill container */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-pill);
  padding: 4px 5px;
}

/* Individual nav link */
.nav-link {
  position: relative; /* Added to anchor the absolute underline */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--c-text);
  text-decoration: none; /* Cleaned up empty animation property */
}

/* --- Underline Animation Setup --- */
.nav-link span {
  position: relative;
}

.nav-link span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1.5px; /* Matches your active thickness */
  bottom: -5px;  /* Matches your active offset */
  left: 0;
  background-color: #2B5CE6; /* Matches your active color */
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform var(--dur) var(--ease); /* Uses your existing design tokens */
}

/* Trigger animation on hover */
.nav-link:hover span::after {
  transform: scaleX(1);
  opacity: 0.65;
}

/* --- Active State Integration --- */
.nav-link.active {
  color: #2B5CE6;
  background: transparent;
  font-weight: 500;
  text-decoration: none; /* Removed native underline to use the pseudo-element instead */
}

/* Forces the underline to stay fully visible when active */
.nav-link.active span::after {
  transform: scaleX(1);
}

/* --- SVG Styling --- */
.nav-link svg {
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity var(--dur) var(--ease);
}

.nav-link:hover svg {
  opacity: 1;
}

.nav-link.active svg {
  opacity: 1;
  color: #2B5CE6;
}


/* Hamburger toggle (mobile fallback) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  flex-shrink: 0;
  position: absolute;
  right: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  z-index: 99;
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.nav-drawer.open {
  display: block;
}

.nav-drawer a {
  display: block;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--c-text);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.nav-drawer a:last-child {
  border-bottom: none;
}

.nav-drawer a:hover,
.nav-drawer a.active {
  color: var(--c-accent);
  text-decoration: none;
}

/* ================================================================
   HERO — homepage
   ================================================================ */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  min-height: 100vh;
  align-items: center;
}

.hero {
  padding-block: var(--space-10);
}

.hero-side {
  padding-block: var(--space-10);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--c-text);
  color: var(--c-white);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.hero-cta:hover {
  background: var(--c-accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-experience {
  margin-top: var(--space-8);
}

.hero-experience-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-subtle);
  margin-bottom: var(--space-4);
}

.hero-exp-item {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--c-border);
}

.hero-exp-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.hero-exp-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 2px;
}

.hero-exp-item p {
  font-size: 0.8125rem;
  color: var(--c-muted);
  margin: 0;
}

.hero-heading {
  font-family: var(--font-bitter);
  font-size: clamp(1rem, 2.75vw, 1.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-text);
  max-width: 820px;
  margin-bottom: 1.75rem;
  animation: hero-fade-up 0.7s var(--ease) both;
}

.hero-blue {
  font-style: italic;
  color: #2B5CE6;
}

.hero-green {
  font-style: italic;
  color: #3D8B57;
}

.hero-sub {
  font-size: clamp(0.8125rem, 1.6vw, 1.2rem);
  font-weight: 400;
  color: #8A8A8A;
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 0;
  animation: hero-fade-up 0.7s var(--ease) 0.2s both;
}

/* ================================================================
   SECTION HEADERS
   ================================================================ */
.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-subtle);
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--c-border);
}

.section-header {
  margin-bottom: var(--space-7);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 540px;
  line-height: 1.6;
}

/* ================================================================
   PROJECT GRID (homepage)
   ================================================================ */
.projects-section {
  padding-bottom: var(--space-10);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--space-7);
}

/* ── Project Card ─── */
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease);
}

.project-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-5px);
}

.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-surface);
  margin-bottom: var(--space-5);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-accent-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-text);
  margin-bottom: var(--space-2);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);

  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--dur) var(--ease);
}

.card-cta:hover {
  text-decoration: none;
  gap: var(--space-2);
  transform: translateX(3px);
}

/* ================================================================
   PAGE HERO (inner pages)
   ================================================================ */
.page-hero {
  padding: var(--space-10) 0 var(--space-7);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--space-8);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--c-text);
  max-width: 700px;
  margin-bottom: var(--space-4);
}

.page-hero p {
  font-size: 1.0625rem;
  color: var(--c-muted);
  max-width: 560px;
  line-height: 1.65;
}

/* ================================================================
   CASE STUDY PAGE
   ================================================================ */

/* Hero image — first thing on the page, full-bleed edge-to-edge.
   The overlay nav floats on top of it (see .site-nav--overlay). */
.cs-hero-band {
  width: 100%;
}

.cs-hero-full-img {
  width: 100%;
  aspect-ratio: 2.4 / 1;
  max-height: 62vh;
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-subtle);
  font-size: 0.875rem;
}

/* Wider side margins for everything except the full-bleed hero image */
.cs-page-container {
  padding-inline: clamp(24px, 10vw, 220px);
}

/* Title + meta block, above the outline/content split */
.cs-title-block {
  padding: var(--space-8) 0 var(--space-7);
}

.cs-title-block h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-text);
  max-width: 760px;
  margin-bottom: 1rem;
}

.cs-title-block .cs-dek {
  font-size: 1.0625rem;
  color: var(--c-muted);
  max-width: 620px;
  line-height: 1.65;
}

.cs-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--c-border);
}

/* Content column — the outline nav now lives fixed in the left margin
   (see .cs-outline below), so this is a single-column layout. */
.cs-layout {
  padding-bottom: var(--space-9);
}

/* Jump-to-section nav: pinned in the leftmost margin of the page */
.cs-outline {
  position: sticky;
  top: 50%;
  left: var(--space-6);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 170px;
  z-index: 20;
}

.cs-outline a {
  font-size: 0.8125rem;
  color: var(--c-subtle);
  text-decoration: none;
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  border-left: 2px solid var(--c-border);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.cs-outline a:hover {
  color: var(--c-text);
  text-decoration: none;
}

.cs-outline a.active {
  color: var(--c-text);
  font-weight: 600;
  border-left-color: var(--c-accent);
}

.cs-outline-back {
  margin-top: var(--space-5);
  padding-top: var(--space-5) !important;
  border-top: 1px solid var(--c-border);
  border-left: none !important;
  color: var(--c-muted) !important;
  font-weight: 500 !important;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cs-meta-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-subtle);
}

.cs-meta-value {
  font-size: 0.9375rem;
  color: var(--c-text);
}

/* Hero image full-bleed */
.cs-hero-img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--c-surface-2);
  margin-bottom: var(--space-8);
}

.cs-hero-img-placeholder {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-subtle);
  font-size: 0.875rem;
  margin-bottom: var(--space-8);
}

/* Case study body sections */
.cs-section {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--c-border);
}

.cs-section:last-of-type {
  border-bottom: none;
}

.cs-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-3);
}

.cs-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--space-5);
}

.cs-section p {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.75;
  max-width: 680px;
  margin-bottom: var(--space-4);
}

.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
}

.cs-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.cs-img-placeholder {
  aspect-ratio: 4 / 3;
  background: var(--c-surface-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-subtle);
  font-size: 0.8125rem;
}

.pullquote {
  margin: var(--space-7) 0;
  padding: var(--space-5) var(--space-7);
  border-left: 3px solid var(--c-accent);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-style: italic;
  color: var(--c-text);
  line-height: 1.55;
}

/* Outcome cards */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.outcome-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.outcome-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--c-accent);
  margin-bottom: var(--space-2);
}

.outcome-card p {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.5;
  margin: 0;
}

/* Next project nav */
.cs-next {
  padding: var(--space-8) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cs-next a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cs-next a:hover {
  text-decoration: none;
  gap: var(--space-3);
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-bottom: var(--space-9);
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--c-surface-2);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--c-surface-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-subtle);
  font-size: 0.875rem;
}

.about-body h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--space-5);
}

.about-body p {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.75;
  margin-bottom: var(--space-4);
  max-width: 600px;
}

.about-section {
  border-top: 1px solid var(--c-border);
  padding-top: var(--space-7);
  margin-top: var(--space-7);
}

.about-section h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-subtle);
  margin-bottom: var(--space-5);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-pill {
  font-size: 0.875rem;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
}

.edu-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--c-border);
}

.edu-item:last-child { border-bottom: none; }

.edu-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--space-1);
}

.edu-item p {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin: 0;
}

/* ================================================================
   RESUME PAGE
   ================================================================ */
.resume-section {
  padding: var(--space-9) 0;
}

.resume-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  margin-bottom: var(--space-8);
}

.resume-cta:hover {
  background: #5c33a0;
  text-decoration: none;
  transform: translateY(-1px);
}

.resume-rule {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-5) var(--space-7);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--c-border);
}

.resume-rule:last-child { border-bottom: none; }

.resume-rule-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-subtle);
  padding-top: 2px;
}

.resume-rule-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--space-1);
}

.resume-rule-content .role {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-bottom: var(--space-2);
}

.resume-rule-content p {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.65;
  max-width: 560px;
}

/* ================================================================
   PUBLICATIONS + READING (stub pages)
   ================================================================ */
.pubs-list {
  padding-bottom: var(--space-10);
}

.pub-item {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--c-border);
}

.pub-item:first-child { border-top: 1px solid var(--c-border); }

.pub-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.pub-item .pub-authors {
  font-size: 0.875rem;
  color: var(--c-muted);
  margin-bottom: var(--space-1);
}

.pub-item .pub-venue {
  font-size: 0.8125rem;
  color: var(--c-subtle);
  font-style: italic;
}

.pub-item a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-3);
}

.pub-item a:hover { text-decoration: underline; }

.reading-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-10);
}

.reading-col h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-5);
}

.reading-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--c-border);
}

.reading-item:last-child { border-bottom: none; }

.reading-item h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: var(--space-1);
}

.reading-item span {
  font-size: 0.8125rem;
  color: var(--c-subtle);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: var(--space-7) 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-left {
  font-size: 0.875rem;
  color: var(--c-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

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

/* ================================================================
   SCROLL REVEAL (driven by main.js IntersectionObserver)
   ================================================================ */
.will-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.will-reveal.revealed {
  opacity: 1;
  transform: none;
}

/* stagger delay applied via inline style in main.js */

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet → ≤ 900px */
@media (max-width: 900px) {
  .projects-grid {
    gap: var(--space-7) var(--space-6);
  }

  .cs-two-col {
    grid-template-columns: 1fr;
  }

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

  .cs-page-container {
    padding-inline: var(--space-5);
  }

  .cs-outline {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    padding-bottom: var(--space-6);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--c-border);
  }

  .cs-outline a {
    border-left: none;
    padding: var(--space-1) 0;
    border-bottom: 2px solid transparent;
  }

  .cs-outline a.active {
    border-left: none;
    border-bottom-color: var(--c-accent);
  }

  .cs-outline-back {
    margin-top: 0;
    padding-top: var(--space-1) !important;
    border-top: none;
  }

  .about-grid {
    grid-template-columns: 180px 1fr;
    gap: var(--space-6);
  }

  .reading-categories {
    grid-template-columns: 1fr;
  }

  .resume-rule {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* Mobile → ≤ 640px */
@media (max-width: 640px) {
  :root { --space-10: 80px; }

  /* Nav: icon-only pill on small screens */
  .nav-link span { display: none; }
  .nav-link { padding: 9px 12px; gap: 0; }
  .nav-toggle { display: none; }

  /* Hero */
  .hero-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: var(--space-7);
  }

  .hero, .hero-side {
    padding-block: var(--space-8) var(--space-7);
  }

  .hero-heading {
    font-size: clamp(1.625rem, 7vw, 2.125rem);
  }

  /* Projects grid: single column */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo,
  .about-photo-placeholder {
    aspect-ratio: 4 / 3;
    max-width: 320px;
  }

  /* Case study */
  .cs-meta-bar { gap: var(--space-5); }
  .cs-image-grid { grid-template-columns: 1fr; }
  .outcome-grid  { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
