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

:root {
  --black: #000000;
  --dark: #141414;
  --mid: #262626;
  --light-mid: #282828;
  --white: #ffffff;
  --muted: #bfbfbf;
  --accent: #d6c31b;
  --radius: 25px;
  --nav-height: 72px;
  --font-display: 'Gloock', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

nav.scrolled {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  display: grid;
  opacity: 0;
  animation: fadeDown 0.6s ease 0.2s forwards;
  cursor: pointer;
}

.nav-logo-icon,
.nav-logo-text {
  grid-area: 1 / 1;
  align-self: center;
  transition: opacity 0.35s ease;
}

.nav-logo-icon {
  height: 36px;
  width: auto;
  display: block;
  opacity: 1;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0;
}

nav.past-hero .nav-logo-icon { opacity: 0; }
nav.past-hero .nav-logo-text { opacity: 1; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  opacity: 0;
  animation: fadeDown 0.6s ease 0.4s forwards;
}

.nav-links a {
  font-size: 1rem;
  letter-spacing: 0.02em;
  opacity: 1;
  color: var(--white);
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--mid);
  background-image: url('../media/Zach_Profile2.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.hero-name {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 160px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.hero-name span {
  display: block;
  transform: translateY(110%);
  animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-tagline {
  flex: 1;
  font-size: clamp(14px, 1.3vw, 22px);
  line-height: 1.6;
  max-width: 375px;
  padding: 0 40px;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.9s forwards;
}

.hero-scroll {
  flex: none;
  opacity: 0;
  animation: fadeIn 0.6s ease 1.1s forwards;
}

.hero-scroll-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  animation: down_arrow_bounce 2.3s infinite;
  transition: border-color 0.2s;
}

.hero-scroll-arrow:hover { border-color: var(--white); }

/* ── STACKING CARD REVEAL FIX ── */
/* Cards are driven by JS stacking — prevent .reveal from interfering with transforms */
.portfolio-stack .portfolio-card.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ── WORK SECTION ── */
#work {
  background: var(--black);
  padding: 80px 40px 40px;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 40px;
}

.portfolio-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portfolio-card {
  position: sticky;
  top: var(--nav-height);
  border-radius: var(--radius);
  overflow: hidden;
  height: 80vh;
  display: block;
  background: var(--dark);
  will-change: transform, filter;
  transform-origin: top center;
  margin-bottom: 4px;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.33, 1);
}

.portfolio-card:hover img {
  transform: scale(1.03);
}

.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,10,10,0.45) 0%,
    rgba(10,10,10,0.1) 35%,
    rgba(10,10,10,0.1) 60%,
    rgba(10,10,10,0.55) 100%);
}

.portfolio-card-content {
  position: absolute;
  inset: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.portfolio-card-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.portfolio-card-date {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

.portfolio-card-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.portfolio-card-excerpt {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  opacity: 0.75;
  max-width: 600px;
  line-height: 1.5;
}

.portfolio-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 100px;
  padding: 4px 12px;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tool-tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 3px 10px;
  opacity: 0.6;
}

.detail-section.light-bg .tool-tag {
  border-color: rgba(0,0,0,0.2);
  color: var(--black);
}

.tool-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  opacity: 0.6;
}

.tool-logo svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.tool-logo-name {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-section.light-bg .tool-logo {
  color: var(--black);
}

/* ── EXPERIENCE SECTION ── */
#experience {
  background: var(--black);
  padding: 10% 40px 6%;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 96px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
  overflow: hidden;
  padding-bottom: 0.2em;
}

.section-heading span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading.visible span { transform: translateY(0); }
.section-heading.visible span:nth-child(2) { transition-delay: 0.08s; }

.experience-list {
  list-style: none;
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 60px;
  padding: 32px 0;
  position: relative;
  align-items: start;
}

/* Divider line draws left to right on scroll */
.experience-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 1px;
  background: var(--white);
  width: 0;
  transition: width 0.9s cubic-bezier(0.25, 1, 0.33, 1);
}

.experience-item.visible::before { width: 100%; }

.experience-item:last-child::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  background: var(--white);
  width: 0;
  transition: width 0.9s cubic-bezier(0.25, 1, 0.33, 1) 0.1s;
}

.experience-item:last-child.visible::after { width: 100%; }

/* Items are always visible — only the line animates */
.experience-item.reveal {
  opacity: 1;
  transform: none;
}

.exp-left, .exp-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-company {
  font-size: 1.1rem;
  font-weight: 700;
}

.exp-desc {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.exp-role {
  font-size: 0.9rem;
  font-weight: 400;
}

.exp-years {
  font-size: 0.9rem;
  font-weight: 400;
}

/* ── ABOUT SECTION ── */
#about {
  background: var(--dark);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.about-text {
  padding: 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.about-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.5vw, 40px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 32px;
}

.about-body {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.8;
  margin-bottom: 32px;
}

.about-body s { opacity: 0.5; }

.about-links {
  display: flex;
  gap: 0;
}

.about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-left: -10px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.about-link:first-child { margin-left: 0; }
.about-link:hover { opacity: 1; }

.about-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-photo {
  position: relative;
  overflow: hidden;
  background: var(--mid);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.33, 1);
}

.about-photo:hover img {
  transform: scale(1.03);
}

/* ── PORTFOLIO DETAIL PAGES ── */
.detail-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(0,0,0,0.0);
  transition: background 0.4s ease;
}

.detail-nav.scrolled {
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.back-link {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  opacity: 1;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.back-link:hover { opacity: 0.75; }

.detail-hero {
  background: var(--black);
  padding-top: var(--nav-height);
}

.detail-header {
  padding: 6% 40px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 104px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
  padding-right: 20%;
}

.detail-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 20px;
  align-items: end;
}

.detail-meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
}

.detail-meta-value {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 600;
  white-space: nowrap;
}

.detail-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-hero-image {
  width: 100%;
  max-height: 85vh;
  object-fit: cover;
}

.detail-section {
  padding: 6% 40px;
  background: var(--black);
}

.detail-section.dark { background: var(--dark); }
.detail-section.light-bg { background: var(--white); color: var(--black); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.two-col-even {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.two-col-label {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}

.detail-body-text {
  font-size: clamp(0.95rem, 1.5vw, 1.3rem);
  line-height: 1.7;
  opacity: 0.85;
  padding-right: 15%;
}

.detail-section.challenge .detail-body-text {
  font-size: clamp(1.6rem, 2.8vw, 3rem);
  line-height: 1.35;
  opacity: 1;
  padding-right: 5%;
}

.detail-h3 {
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 24px;
}

.detail-section.light-bg .detail-h3 { color: var(--black); }

.detail-body-col {
  padding: 10%;
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 80px;
  padding-left: 0;
}

.outcome-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.outcome-item p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.7;
}

.outcome-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding: 8% 40px;
  background: var(--white);
  color: var(--black);
}

.outcome-section-label {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  padding-right: 10%;
}

.principles-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding: 8% 40px;
  background: var(--black);
}

.principles-label {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 72px);
  font-weight: 400;
  line-height: 1;
}

.principles-label p {
  font-size: 0.9rem;
  margin-top: 20px;
  opacity: 0.7;
  line-height: 1.6;
  font-weight: 400;
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 7%;
}

.principle-num {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  opacity: 0.4;
  margin-bottom: 8px;
}

.principle-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.principle-desc {
  font-size: 0.85rem;
  opacity: 0.65;
  line-height: 1.6;
}

.full-image {
  width: 100%;
  display: block;
}

.rounded-image {
  border-radius: 32px;
  overflow: hidden;
  width: 100%;
}

.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 40px;
  background: var(--black);
}

.next-project {
  padding: 80px 40px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.next-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 12px;
}

.next-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 400;
}

.next-arrow {
  font-size: 2rem;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
}

.next-project:hover .next-arrow {
  opacity: 1;
  transform: translateX(8px);
}

/* ── FOOTER ── */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 40px 80px;
  container-type: inline-size;
}

.footer-copyright {
  font-family: var(--font-display);
  font-size: 23cqw; /* JS overrides this precisely after fonts load */
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
}

.footer-char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.footer-char.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── CURSOR CHIP ── */
.cursor-chip {
  position: fixed;
  pointer-events: none;
  z-index: 500;
  background: rgba(60, 60, 60, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  will-change: left, top;
}

.cursor-chip.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── VIDEO PLAYER ── */
.video-player {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0 0;
  background: #000;
  cursor: pointer;
}

.video-player video {
  width: 100%;
  display: block;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-player:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.06);
}

.video-player.playing .video-play-btn {
  opacity: 0;
}

/* ── ANIMATIONS ── */
@keyframes slideUp {
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

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

@keyframes down_arrow_bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px); }
  60% { transform: translateY(-6px); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 1, 0.33, 1), transform 0.7s cubic-bezier(0.25, 1, 0.33, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── WORD MARKER HIGHLIGHT ── */
mark.word-marker {
  background: linear-gradient(rgba(255, 165, 30, 0.45) 0%, rgba(255, 165, 30, 0.45) 100%);
  background-size: 0% 38%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  color: inherit;
  transition: background-size 0.9s cubic-bezier(0.25, 1, 0.33, 1);
}

mark.word-marker.visible {
  background-size: 100% 38%;
}

/* ── STAT CALLOUT ── */
.stat-callout {
  text-align: center;
  padding: 48px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
  opacity: 0.9;
}

.impact-stat {
  text-align: center;
  padding: 64px 40px 0;
}

.impact-stat-number {
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 180px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.impact-stat-number.counting {
  opacity: 1;
  transform: translateY(0);
}

.impact-stat-label {
  margin-top: 16px;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ── QUOTE BLOCK ── */
.quote-block {
  padding: 80px 40px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 1000px;
  text-align: center;
  margin: 0 auto;
}

/* ── PHOTO MASONRY ── */
.photo-masonry {
  background: #000;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.photo-masonry .rounded-image {
  overflow: hidden;
  margin-bottom: 0;
}

.photo-masonry .rounded-image:not(:first-child) {
  aspect-ratio: 1;
}

.photo-masonry .rounded-image:first-child {
  grid-row: 1 / 3;
}

.photo-masonry .rounded-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── EXPLORE MORE WORK ── */
.explore-more {
  background: var(--black);
  padding: 80px 40px 120px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.explore-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.explore-more-label {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.explore-more-nav {
  display: none;
  gap: 8px;
  align-items: center;
}

.explore-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
}

.explore-nav-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

.explore-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.explore-more .portfolio-card {
  position: static;
  margin-bottom: 0;
  will-change: auto;
  height: auto;
  aspect-ratio: 3 / 4;
}

.explore-more .portfolio-card-title {
  font-size: clamp(20px, 2.8vw, 42px);
}

.explore-more .portfolio-card-content {
  padding: 24px;
}

/* ── NUMBERED LIST ── */
.numbered-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  counter-reset: item;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}

.numbered-list li {
  position: relative;
  padding-left: 52px;
  counter-increment: item;
  font-size: 0.95rem;
  line-height: 1.65;
}

.numbered-list li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  display: inline-block;
  text-align: center;
  line-height: 32px;
  font-size: 0.75rem;
}

.numbered-list li strong {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
}

.detail-section.light-bg .numbered-list li::before { border-color: rgba(0,0,0,0.35); }

/* ── CHAPTER BREAK (light, DM Sans Bold) ── */
.chapter-break {
  background: var(--white);
  color: var(--black);
  padding: 100px 40px;
  text-align: center;
}

.chapter-break p {
  font-family: var(--font-body);
  font-size: clamp(36px, 4.5vw, 72px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto;
}

/* ── SECTION HEADER (dark, Gloock — used by Security Center) ── */
.section-header {
  padding: 80px 40px 60px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 100px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ── DETAIL SECTION HEADING (within a section, e.g. light-bg sections) ── */
.detail-section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: inherit;
}

/* ── INSIGHT PAIR (research insight + design approach) ── */
.insight-pair {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

/* Vertical stack — inside left column of a two-col-adaptive section */
.insight-pair.col {
  flex-direction: column;
  gap: 20px;
}

/* Full-width, inlined below body text in a light section */
.insight-pair.inlined {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.12);
}

.insight-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0;
  font-family: var(--font-body);
  color: inherit;
}

.insight-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.insight-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.insight-body {
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.75;
  margin: 0;
  color: inherit;
}

/* ── DETAIL SUBSECTION HEADING (within a section, smaller than section-header) ── */
.detail-subsection-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: inherit;
}

/* ── TWO-COL ADAPTIVE (reorders to heading>image>body>insight at ≤999px) ── */
.two-col-adaptive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "col-heading col-image"
    "col-body    col-image"
    "col-insight col-image";
  column-gap: 40px;
}

.two-col-adaptive-heading { grid-area: col-heading; }
.two-col-adaptive-image   { grid-area: col-image; align-self: start; }
.two-col-adaptive-body    { grid-area: col-body; }
.two-col-adaptive-insight { grid-area: col-insight; }

/* ── RESPONSIVE ── */
@media (max-width: 999px) {
  nav, .detail-nav { padding: 0 24px; }

  .hero-inner {
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 0 24px;
    gap: 12px 20px;
  }

  .hero-name { flex: 1; order: 1; }

  .hero-scroll { order: 2; }

  .hero-tagline {
    flex: 0 0 100%;
    order: 3;
    padding: 0;
    max-width: 100%;
  }

  #work { padding: 60px 24px 40px; }

  .portfolio-card { height: 60vw; min-height: 300px; }

  .portfolio-card-content { padding: 24px; }

  .portfolio-card-title { font-size: clamp(32px, 6vw, 72px); }

  #experience { padding: 14% 24px 8%; }

  .experience-item { gap: 16px 32px; }

  #about { grid-template-columns: 1fr; }

  .about-photo { height: 60vw; min-height: 300px; }

  .detail-header { padding: 8% 24px; padding-top: calc(var(--nav-height) + 40px); }

  .detail-meta-row { grid-template-columns: 1fr 1fr; }

  .detail-cats { justify-content: flex-start; margin-top: 20px; }

  .two-col, .outcome-section, .principles-section { grid-template-columns: 1fr; gap: 40px; }

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

  .detail-body-text { padding-right: 0; }

  .outcome-grid { grid-template-columns: 1fr; gap: 40px; }

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

  .detail-section { padding: 8% 24px; }

  .detail-body-col { padding: 40px 24px; }

  .outcome-section, .principles-section { padding: 8% 24px; }

  .photo-masonry { grid-template-columns: repeat(2, 1fr); padding: 24px; gap: 12px; }
  .photo-masonry .rounded-image:first-child { grid-row: 1 / 3; }

  .explore-more { padding: 60px 24px 80px; }

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

  .explore-more .portfolio-card { aspect-ratio: 2/3; }

  .explore-more-grid .portfolio-card:nth-child(3) { display: none; }

  .numbered-list { grid-template-columns: 1fr 1fr; gap: 36px 32px; }

  .chapter-break { padding: 70px 24px; }

  .two-col-adaptive {
    grid-template-columns: 1fr;
    grid-template-areas:
      "col-heading"
      "col-image"
      "col-body"
      "col-insight";
  }

  .two-col-adaptive-image { margin-bottom: 24px; }

  .quote-block { padding: 60px 24px; }
}

@media (max-width: 690px) {
  .nav-links { display: none; }

  .portfolio-stack .portfolio-card { height: 85vh; }

  .section-heading { margin-bottom: 32px; }

  .experience-item { grid-template-columns: 1fr; }

  .detail-meta-row { grid-template-columns: 1fr; }

  .numbered-list { grid-template-columns: 1fr; gap: 28px; }
  .chapter-break { padding: 56px 24px; }

  .photo-masonry { grid-template-columns: 1fr; }
  .photo-masonry .rounded-image:first-child { grid-row: auto; }
  .photo-masonry .rounded-image:not(:first-child) { aspect-ratio: auto; }

  /* Stack the full-width side-by-side insight pair on mobile */
  .insight-pair:not(.col) { flex-direction: column; }

  .explore-more-nav { display: flex; }

  .explore-more-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
  }

  .explore-more-grid::-webkit-scrollbar { display: none; }

  .explore-more-grid .portfolio-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 3/4;
  }

  .explore-more-grid .portfolio-card:nth-child(3) { display: block; }
}
