/* ============================================================
   Kevin Grennan Portfolio — Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600&family=Inter:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: #fff;
  color: #302f2b;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }

/* ── Container ── */
.container {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px;
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 60px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-nav a {
  pointer-events: all;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}

.nav-name { color: #302f2b; }
.nav-about { color: rgba(48, 47, 43, 0.4); }
.nav-name:hover { opacity: 0.65; }
.nav-about:hover { color: #302f2b; }

/* ═══════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════ */

/* Hero */
.home-hero {
  padding: 120px 60px 48px;
  max-width: 1270px;
  margin: 0 auto;
}

.home-hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(44px, 6.2vw, 72px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.01em;
  max-width: 1050px;
  color: #302f2b;
}

/* Logo Strip */
.logo-strip {
  max-width: 1270px;
  margin: 0 auto;
  padding: 24px 60px 64px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.logo-strip-label {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48,47,43,0.45);
  margin-bottom: 24px;
}

.logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.logos img {
  height: 44px;
  width: auto;
  opacity: 0.25;
  object-fit: contain;
}

/* ── Logo text (Atlassian wordmark) ── */
.logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: rgba(48, 47, 43, 0.25);
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}

/* ── Project Grid ── */
.projects-grid {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 420px;
  gap: 14px;
}

/* Base card */
.grid-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.22s ease;
  text-decoration: none;
  color: inherit;
}

.grid-card:hover {
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.11), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Span-2 cards (Slipcast row 1, AI Proto row 2) — 2/3 width */
.grid-card--span2 {
  grid-column: span 2;
}

/* Visual / image area */
.grid-card-visual {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 150px;
  overflow: hidden;
}

.grid-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Slipcast GIF cycling ── */
.slipcast-visual {
  background: #0c0c0c;
}

.slipcast-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slipcast-gif.visible {
  opacity: 1;
}

/* ── Dialectic image zoom — crop ~15% from sides + bottom, anchor top ── */
.dialectic-img {
  transform: scale(1.35);
  transform-origin: top center;
}

/* ── Card video ── */
.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "Personal Project / Webflow" label overlaid on the visual */
.grid-card-label-overlay {
  position: absolute;
  top: 18px;
  left: 20px;
}

.grid-card-visual-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.28);
  padding: 4px 9px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Card body */
.grid-card-body {
  height: 175px;
  flex-shrink: 0;
  padding: 20px 24px 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.grid-card-tag {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48, 47, 43, 0.38);
}

.grid-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.grid-card-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 400;
  line-height: 1.1;
  color: #302f2b;
  margin-bottom: 7px;
}

.grid-card--span2 .grid-card-title {
  font-size: clamp(22px, 2vw, 32px);
}

.grid-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(48, 47, 43, 0.55);
  max-width: 520px;
}

.grid-card-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: rgba(48, 47, 43, 0.22);
  transition: color 0.2s, transform 0.2s;
}

.grid-card:hover .grid-card-arrow {
  color: rgba(48, 47, 43, 0.5);
  transform: translateX(2px);
}

/* ── Legacy Section ── */
.legacy-section {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 100px;
}

.legacy-label {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48, 47, 43, 0.35);
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(48, 47, 43, 0.07);
}

.legacy-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.legacy-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.legacy-card-visual {
  height: 110px;
  overflow: hidden;
}

.legacy-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.legacy-card--text .legacy-card-body {
  background: rgba(48, 47, 43, 0.025);
  min-height: 110px;
}

.legacy-card-body {
  padding: 12px 14px 14px;
}

.legacy-card-co {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48, 47, 43, 0.38);
  margin-bottom: 5px;
}

.legacy-card-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(48, 47, 43, 0.65);
}

/* ── Project Detail Modal ── */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 14, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  width: calc(100% - 120px);
  max-width: 680px;
  max-height: 82vh;
  border-radius: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-overflow-scrolling: touch;
}

.project-modal.is-open .modal-panel {
  transform: none;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 20px 20px -20px 0;
  z-index: 10;
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(48, 47, 43, 0.07);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(48, 47, 43, 0.55);
  transition: background 0.15s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(48, 47, 43, 0.13);
  color: #302f2b;
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.modal-inner {
  padding: 32px 48px 52px;
  clear: both;
}

.modal-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48, 47, 43, 0.38);
  margin-bottom: 10px;
}

.modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #302f2b;
  margin-bottom: 10px;
}

.modal-desc {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(48, 47, 43, 0.55);
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(48, 47, 43, 0.08);
}

.modal-body p {
  font-size: 15px;
  line-height: 1.78;
  color: rgba(48, 47, 43, 0.82);
  margin-bottom: 18px;
}

.modal-body p:last-child { margin-bottom: 0; }

.modal-body em { font-style: italic; }

.modal-body blockquote {
  margin: 24px 0;
  padding: 0 0 0 18px;
  border-left: 3px solid rgba(48, 47, 43, 0.12);
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(48, 47, 43, 0.6);
}

.modal-link {
  display: inline-block;
  margin-top: 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #302f2b;
  text-decoration: none;
  border-bottom: 1px solid rgba(48, 47, 43, 0.25);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.modal-link:hover {
  border-color: #302f2b;
}

body.modal-open {
  overflow: hidden;
}

/* ── Modal image grid ── */
.modal-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 28px;
  margin-bottom: 4px;
}

/* Odd image count: last child spans full width */
.modal-images > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.modal-image-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  cursor: zoom-in;
  border: none;
  padding: 0;
  background: rgba(48, 47, 43, 0.04);
  display: block;
  width: 100%;
  transition: opacity 0.15s, transform 0.15s;
}

.modal-image-thumb:hover {
  opacity: 0.85;
  transform: scale(1.01);
}

.modal-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
}

/* ── Image lightbox ── */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.img-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.img-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.93);
  cursor: zoom-out;
}

.img-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  display: block;
}

.img-lightbox-close,
.img-lightbox-nav {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.img-lightbox-close:hover,
.img-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.img-lightbox-close {
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
}

.img-lightbox-close svg {
  width: 18px;
  height: 18px;
}

.img-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}

.img-lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.img-lightbox-prev { left: 20px; }
.img-lightbox-next { right: 20px; }

.img-lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

/* Footer credit */
.site-footer {
  text-align: center;
  padding: 40px 0 60px;
  font-size: 12px;
  color: rgba(48,47,43,0.35);
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: rgba(48,47,43,0.6); }

/* ═══════════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════════ */

.about-hero {
  padding: 160px 60px 56px;
  max-width: 1270px;
  margin: 0 auto;
}

.about-bio {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
  color: #302f2b;
  max-width: 680px;
}

.about-stats {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 56px;
  display: flex;
  gap: 60px;
}

.about-stat dt {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48,47,43,0.45);
  margin-bottom: 4px;
}

.about-stat dd {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: #302f2b;
}

.about-history {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 100px;
  border-top: 1px solid rgba(48,47,43,0.1);
}

.work-label {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48,47,43,0.45);
  padding-top: 32px;
  margin-bottom: 40px;
}

.work-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(48,47,43,0.08);
}

.work-dates {
  font-size: 13px;
  color: rgba(48,47,43,0.45);
  padding-top: 3px;
  font-family: 'Inter', sans-serif;
}

.work-title {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 2px;
  color: #302f2b;
}

.work-role {
  font-size: 13px;
  color: rgba(48,47,43,0.55);
  margin-bottom: 12px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
}

.work-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(48,47,43,0.8);
  max-width: 620px;
}

.about-contact {
  max-width: 1270px;
  margin: 0 auto;
  padding: 40px 60px 80px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-contact a {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  text-decoration: none;
  color: rgba(48,47,43,0.5);
  transition: color 0.2s;
}

.about-contact a:hover { color: #302f2b; }

/* ═══════════════════════════════════════
   CASE STUDY PAGES
═══════════════════════════════════════ */

.cs-hero {
  padding: 160px 60px 48px;
  max-width: 1270px;
  margin: 0 auto;
}

.cs-hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(36px, 5vw, 80px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.01em;
  max-width: 900px;
  color: #302f2b;
}

.cs-hook {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 48px;
}

.cs-hook p {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  color: #302f2b;
  max-width: 760px;
}

/* Full-width hero image */
.cs-hero-image {
  width: 100%;
  max-width: 1270px;
  margin: 0 auto 64px;
  padding: 0 60px;
}

.cs-hero-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* Story layout: 2-col on desktop */
.cs-story {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  margin-bottom: 72px;
}

.cs-narrative { /* left column */ }

.cs-narrative p {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(48,47,43,0.85);
  margin-bottom: 28px;
}

.cs-narrative .lead {
  font-size: 18px;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: #302f2b;
  margin-bottom: 36px;
}

.cs-narrative h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #302f2b;
  margin: 48px 0 16px;
}

.cs-narrative h3:first-child { margin-top: 0; }

.cs-narrative img {
  width: 100%;
  border-radius: 8px;
  margin: 32px 0;
}

.cs-narrative blockquote {
  margin: 40px 0;
  padding: 0 0 0 20px;
  border-left: 3px solid rgba(48,47,43,0.15);
}

.cs-narrative blockquote p {
  font-size: 17px;
  font-style: italic;
  color: rgba(48,47,43,0.8);
  margin-bottom: 8px;
}

.cs-narrative blockquote footer {
  font-size: 13px;
  color: rgba(48,47,43,0.45);
}

/* Right sidebar */
.cs-sidebar {
  padding-top: 4px;
}

.cs-meta-item {
  margin-bottom: 28px;
}

.cs-meta-label {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48,47,43,0.4);
  margin-bottom: 4px;
}

.cs-meta-value {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #302f2b;
}

.cs-summary-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(48,47,43,0.7);
  border-top: 1px solid rgba(48,47,43,0.1);
  padding-top: 24px;
  margin-top: 40px;
}

/* Gallery */
.cs-gallery {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 60px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.cs-gallery-full {
  grid-column: 1 / -1;
}

.cs-gallery figure {
  display: flex;
  flex-direction: column;
}

.cs-gallery figure img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.cs-gallery figcaption {
  font-size: 13px;
  color: rgba(48,47,43,0.5);
  line-height: 1.5;
}

/* See Also */
.cs-see-also {
  max-width: 1270px;
  margin: 0 auto;
  padding: 40px 60px 100px;
  border-top: 1px solid rgba(48,47,43,0.1);
}

.see-also-label {
  font-size: 11px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48,47,43,0.4);
  margin-bottom: 24px;
}

.see-also-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* Small "see also" cards */
.see-also-card {
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: rgba(0,0,0,0.06) 0 1px 20px 2px;
  transition: transform 0.2s ease;
  min-height: 100px;
}

.see-also-card:hover { transform: translateY(-2px); }

.see-also-company {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
}

.see-also-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  color: #fff;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

@media (max-width: 1023px) {
  .container,
  .home-hero,
  .logo-strip,
  .projects-grid,
  .legacy-section,
  .about-hero,
  .about-stats,
  .about-history,
  .about-contact,
  .cs-hero,
  .cs-hook,
  .cs-hero-image,
  .cs-story,
  .cs-gallery,
  .cs-see-also { padding-left: 32px; padding-right: 32px; }

  .site-nav { padding: 20px 32px; }

  .cs-story { grid-template-columns: 1fr; gap: 48px; }
  .cs-sidebar { display: none; }

  .see-also-grid { grid-template-columns: repeat(3, 1fr); }

  /* 3-col → 2-col on tablet */
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-card--span2 { grid-column: 1 / -1; }

  .legacy-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .container,
  .home-hero,
  .logo-strip,
  .projects-grid,
  .legacy-section,
  .about-hero,
  .about-stats,
  .about-history,
  .about-contact,
  .cs-hero,
  .cs-hook,
  .cs-hero-image,
  .cs-story,
  .cs-gallery,
  .cs-see-also { padding-left: 20px; padding-right: 20px; }

  .site-nav { padding: 20px; }

  /* Single column grid on mobile */
  .projects-grid { grid-template-columns: 1fr; }
  .grid-card--span2 { grid-column: auto; }

  .grid-card-visual { min-height: 200px; }

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

  .modal-panel { width: calc(100% - 32px); border-radius: 16px; }
  .modal-inner { padding: 24px 24px 40px; }
  .modal-title { font-size: 28px; }

  .logos { gap: 20px; flex-wrap: wrap; justify-content: flex-start; }

  .about-stats { flex-direction: column; gap: 24px; }
  .work-entry { grid-template-columns: 1fr; gap: 8px; }

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

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