/* =================================================================
   Tegar Nusantara — Portfolio
   styles.css
================================================================= */

@import url('fonts.css');

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

:root {
  --brand: #FA6800;
  --text-primary: #2E4150;
  --text-secondary: #ACACAC;
  --bg-main: #FAFCFD;
  --bg-card: #F6F6F6;
  --bg-btn: #E0E0E0;
  --frame-max: 1220px;
  --nav-height: 103px;
  /* Shared side gutter — grows with the viewport instead of staying pinned
     at a mobile-sized 23px on wide desktop screens. */
  --page-pad-x: clamp(20px, 5vw, 64px);
}

/* Design frame: everything except the navbar lives inside this centered column */
.page {
  width: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
}

/* ── Scroll-in reveal animation ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

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

/* Hero elements animate on load ("on appear") via a real animation — reliable
   on first paint, unlike a transition that can be skipped. */
@keyframes appear-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}

.hero__yoe-pill-inner,
.hero__heading,
.hero .social-links,
.hero__cta,
.hero__photo {
  opacity: 0;
  animation: appear-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero__yoe-pill-inner                   { animation-delay: 0.19s; }
.hero__heading                          { animation-delay: 0.30s; }
.hero .social-links                     { animation-delay: 0.41s; }
.hero__cta                              { animation-delay: 0.52s; }
.hero__photos .hero__photo:nth-child(1) { animation-delay: 0.63s; }
.hero__photos .hero__photo:nth-child(2) { animation-delay: 0.74s; }
.hero__photos .hero__photo:nth-child(3) { animation-delay: 0.85s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nav,
  .hero__yoe-pill-inner,
  .hero__heading,
  .hero .social-links,
  .hero__cta,
  .hero__photo {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

/* ── Page transitions (fade in on load, fade out on navigate) ── */
@media (prefers-reduced-motion: no-preference) {
  body { animation: page-fade-in 0.45s ease; }
}
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
body.is-leaving { opacity: 0; transition: opacity 0.35s ease; }

/* ── Lenis smooth scroll ─────────────────────────────────────── */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  overscroll-behavior: none;
}

img { display: block; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
/* Sticky positioning shell: reserves normal in-flow space (so page content
   is pushed down, not overlapped) and centers the floating pill within it. */
.nav-dock {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.nav {
  background: #fff;
  border: 1px solid #F1F1F1;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border-radius: 38px;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 12px 20px 12px 16px;
  animation: nav-enter 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* Hidden state when scrolling down */
.nav--hidden { transform: translateY(-150%); }

@keyframes nav-enter {
  from { opacity: 0; transform: translateY(-150%); }
  to   { opacity: 1; transform: none; }
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav__avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--brand);
  overflow: hidden;
  flex-shrink: 0;
}
.nav__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav__links {
  margin: 0;
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.56px;
}

.nav__links a {
  text-decoration: none;
  color: var(--text-primary);
  line-height: 1.42;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--brand); }

/* Divider between nav links and copy-email button */
.nav__sep {
  display: block;
  width: 1px;
  height: 16px;
  background: #E5E5E5;
  flex-shrink: 0;
  align-self: center;
}

/* Copy Email button */
.nav__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.56px;
  line-height: 1.42;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.nav__copy:hover { opacity: 0.75; }

.nav__copy:active {
  transform: scale(0.96);
}

@keyframes copy-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.91); }
  65%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.nav__copy.is-copied {
  animation: copy-pop 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.nav__copy-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__copy-icon svg { width: 16px; height: 16px; }

/* Smooth transition for label / icon during copy switch */
.nav__copy-label,
.cinfo-card__pill-label {
  display: inline-block;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav__copy-icon {
  display: inline-flex;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.is-switching .nav__copy-label,
.is-switching .nav__copy-icon,
.is-switching .cinfo-card__pill-label {
  opacity: 0;
  transform: translateY(4px);
}


/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px 14px 30px;
  border-radius: 38px;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Manrope', sans-serif;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-2px); }

/* Glossy inset highlight along the top edge, per the CTA restyle. */
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.42);
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
/* Lift + orange glow + dimmed gloss on hover. */
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(250, 104, 0, 0.4);
}
.btn--primary .btn__arrow { stroke: #fff; }

/* Resume (no arrow) — dark outline appears on hover. */
.btn--ghost {
  background: var(--bg-btn);
  color: var(--text-primary);
  padding: 14px 30px;
  gap: 0;
}
.btn--ghost:hover { border-color: var(--text-primary); }

.btn__arrow {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover: the diagonal ↗ arrow rotates clockwise to point right →. */
.btn:hover .btn__arrow { transform: rotate(45deg); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  padding: 0 var(--page-pad-x) 125px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 129px;
}

/* Wraps intro + photos; hosts the faint column-grid background. */
.hero__top {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Soft directional shadow behind the hero — full-bleed and scales with the
   viewport (width in vw, height follows via the image's own aspect ratio).
   Positioned against the document root (not the nav/hero flow) so it always
   starts flush with the true top of the page. */
.hero__shadow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -100;
  pointer-events: none;
}

.hero__shadow img {
  display: block;
  width: 100%;
  height: auto;
}

.hero__grid {
  position: absolute;
  top: -103px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  bottom: 0;
  display: flex;
  z-index: 0;
  pointer-events: none;
  animation: grid-reveal 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
}

@keyframes grid-reveal {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0% 0); }
}

.hero__grid span {
  flex: 1 1 0;
  border-right: 1px solid #D8D8D8;
}

.hero__grid span:first-child { border-left: 1px solid #D8D8D8; }

.hero__top > .hero__intro,
.hero__top > .hero__photos { position: relative; z-index: 1; }

/* Intro (heading + socials + CTA) occupies ~75vh so the photos below it
   are only partially revealed on first load, even on tall screens. */
.hero__intro {
  /* Caps at 75vh normally, but on short viewports switches to leaving a
     guaranteed ~60px peek of the photos row below, instead of shrinking
     the peek away to nothing. (189px = nav clearance (105) + the photos'
     own compensating margin-top (24) + the desired peek (60).) */
  min-height: min(75vh, calc(100vh - 189px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Matches .nav-dock's own bottom padding (24px), which is the fixed gap
   between the visible pill and where .hero__top actually starts — without
   this, "navbar-to-heading" and "cta-to-photos" differ by exactly that
   constant at every viewport height. */
.hero__photos { margin-top: 24px; }
.hero__bio { margin-top: 0; } /* Spacing is now handled by .hero gap, or we add gap to .hero natively */

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 966px;
  text-align: center;
}

.hero__heading {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -1.92px;
  color: var(--text-primary);
  max-width: 652px;
}

.hero__heading .muted { color: var(--text-secondary); }

/* The pill floats above the heading instead of taking up flow space, so the
   heading itself — not the pill — is what the hero centers around. This is
   what keeps "navbar-to-heading" and "cta-to-photos" the same distance,
   regardless of viewport height (see .hero__photos margin-top below). */
.hero__headline {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__heading .accent { color: var(--brand); }
.hero__heading .underline { text-decoration: underline; }

/* Positioning only — the appear-up animation (applied to the -inner span)
   sets transform:none on its own element when it finishes, which would
   otherwise clobber a translateX(-50%) centering transform declared here. */
.hero__yoe-pill {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%);
}

.hero__yoe-pill-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.32px;
  white-space: nowrap;
}

.hero__yoe-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 16.655px;
  align-items: center;
}

.social-links__item {
  display: flex;
  align-items: center;
  gap: 8.327px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 18.505px;
  font-weight: 500;
  letter-spacing: -0.74px;
  line-height: 1.42;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.social-links__item:hover {
  color: var(--text-primary);
}
.social-links__item img {
  width: 22.206px;
  height: 22.206px;
  transition: filter 0.2s ease;
}
.social-links__item:hover img {
  filter: brightness(0) saturate(100%) invert(21%) sepia(21%) saturate(1051%) hue-rotate(167deg) brightness(97%) contrast(92%);
}

.hero__cta {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hero__photos {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  justify-content: center;
}

.hero__photo {
  flex: 1 1 0;
  aspect-ratio: 385 / 386;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8ee;
}

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

.hero__bio {
  max-width: 776px;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  color: var(--text-primary);
}

.hero__bio .muted { color: var(--text-secondary); }

/* ── TICKER ─────────────────────────────────────────────────── */
.ticker {
  position: relative;
  overflow: hidden;
  height: 99px;
  /* Full-bleed: break out of the centered .page frame to span the viewport. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.ticker__track {
  display: flex;
  align-items: center;
  height: 99px;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 20s linear infinite;
}

/* Each set carries its own trailing gap (margin-right), so the two sets tile
   perfectly and translateX(-50%) loops endlessly with no jump. */
.ticker__set {
  display: flex;
  align-items: center;
  gap: 42px;
  margin-right: 42px;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 67px;
  flex-shrink: 0;
}

.ticker__logo img {
  height: 67px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
}

.ticker__fade {
  position: absolute;
  top: 0;
  height: 100%;
  width: 300px;
  pointer-events: none;
  z-index: 1;
}

.ticker__fade--left {
  left: 0;
  background: linear-gradient(to right, var(--bg-main) 18.75%, transparent);
}

.ticker__fade--right {
  right: 0;
  background: linear-gradient(to left, var(--bg-main) 19%, transparent);
}

/* ── SECTION SIDEBAR LABEL ──────────────────────────────────── */
.sidebar {
  width: 177px;
  flex-shrink: 0;
}

.sidebar--sticky {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  transition: top 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Nav auto-hides on scroll-down; collapse the offset so content doesn't
   sit in the empty space the hidden navbar left behind. */
html.nav-is-hidden .sidebar--sticky {
  top: 24px;
}

.sidebar__title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: normal;
}

.sidebar__sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: normal;
  margin-top: 10px;
}

/* ── CASE STUDIES ───────────────────────────────────────────── */
.case-studies {
  padding: 154px var(--page-pad-x) 36px;
  display: flex;
  align-items: flex-start;
  gap: 21px;
}

/* Shown only on mobile (where the sidebar is hidden). */
.case-studies__heading {
  display: none;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.42;
  letter-spacing: -1.6px;
  color: var(--text-primary);
}

.case-studies__stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 19px;
  min-width: 0;
}

.case-card {
  display: block;
  background: #FFFFFF;
  border: 1px solid #E3E3E3;
  border-radius: 26px;
  height: 405px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.case-card__image {
  position: absolute;
  left: 24px;
  top: 22px;
  width: 47.2%;
  height: 361px;
  border-radius: 32px;
  overflow: hidden;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Thumbnail zooms in slightly when the whole card is hovered. */
.case-card:hover .case-card__image img { transform: scale(1.06); }

.case-card__content {
  position: absolute;
  left: 52.5%;
  top: 28px;
  right: 32px;
}

.case-card__title {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.48px;
  line-height: 1.3;
  max-width: 400px;
  margin-bottom: 10px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.case-card:hover .case-card__title { text-decoration-color: currentColor; }

.case-card__role {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: normal;
}

.case-card__divider {
  position: absolute;
  left: 52.5%;
  top: 154px;
  right: 32px;
  height: 1px;
  background: #D5D5D5;
}

.case-card__meta {
  position: absolute;
  left: 52.5%;
  top: 172px;
  display: flex;
  gap: 46px;
  align-items: flex-start;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 112px;
}

.meta-col__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: normal;
}

.meta-col__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: normal;
  height: 27px;
}

.meta-col__icon {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.meta-col__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.case-card__tags {
  position: absolute;
  left: 52.5%;
  top: 355px;
  right: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-card__tag {
  background: rgba(23, 21, 15, 0.06);
  border: 1px solid #D8D0C0;
  border-radius: 100px;
  padding: 5px 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: #4A453B;
  line-height: 1.4;
  white-space: nowrap;
}

/* ── WORK EXPERIENCE ────────────────────────────────────────── */
.experience {
  padding: 84px var(--page-pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.experience__heading {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.42;
  letter-spacing: -1.6px;
  color: var(--text-primary);
}

.exp-list {
  width: 100%;
  border-top: 1px solid var(--text-secondary);
}

/* Each row draws its own bottom line (incl. the last row, REDEK). */
.exp-item { border-bottom: 1px solid var(--text-secondary); }

.exp-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0;
  cursor: pointer;
  user-select: none;
}

.exp-item__left {
  display: flex;
  align-items: center;
  gap: 122px;
}

.exp-item__year {
  font-family: 'Geist Mono', monospace;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
  width: 169px;
  flex-shrink: 0;
  white-space: nowrap;
}

.exp-item__company {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Auto-width so the role + arrow always hug the right edge instead of
   reserving a fixed block that collides with the company at mid widths. */
.exp-item__right {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
}

.exp-item__role {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  /* Fixed-width column so all job titles start at the same x (left-aligned),
     with the arrow sitting at the far right. */
  width: 250px;
  text-align: left;
}

.exp-item__toggle {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.exp-item__toggle svg {
  width: 46px;
  height: 46px;
  stroke: var(--text-primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Closed: arrow points down-right (matches Figma). Open: points up-right. */
.exp-item.is-open .exp-item__toggle { transform: rotate(-90deg); }

/* Smooth dropdown via grid-rows 0fr → 1fr (animatable height). */
.exp-item__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.exp-item__body-inner {
  overflow: hidden;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: none;
  padding-left: 0;
}

.exp-item__list {
  margin: 0;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exp-item__list li { padding-left: 4px; }

.exp-item.is-open .exp-item__body { grid-template-rows: 1fr; }

/* Open row: 24px gap between the header line and the bullet list. */
.exp-item.is-open .exp-item__row { padding-bottom: 24px; }

/* Add bottom space only when open (keeps closed rows tight). */
.exp-item__body-inner { padding-bottom: 0; transition: padding-bottom 0.35s; }
.exp-item.is-open .exp-item__body-inner { padding-bottom: 34px; }

/* "More on my resume" link row */
.exp-resume {
  display: flex;
  justify-content: flex-end;
  padding: 34px 0;
  width: 100%;
}

.exp-resume__link {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: underline;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.exp-resume__link:hover { opacity: 0.6; }

/* ── MISC CARDS ─────────────────────────────────────────────── */
.misc {
  padding: 42px var(--page-pad-x) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 46px;
}

.misc__heading {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.42;
  letter-spacing: -1.6px;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
}

.misc__row {
  width: 100%;
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.misc-card {
  background: #F6F6F6;
  border: 1px solid #E3E3E3;
  border-radius: 26px;
  flex: 1;
  height: 538px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.misc-card__photos {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid #F1F1F1;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Per-card thumbnail background colors (from Figma node 2163:10944) */
.misc__row .misc-card:nth-child(1) .misc-card__photos { background: #CAF3E7; }
.misc__row .misc-card:nth-child(2) .misc-card__photos { background: #DFD8F4; }
.misc__row .misc-card:nth-child(3) .misc-card__photos { background: #FDFBE9; }

/* Rotated photo tiles positioned as % of the panel, so the collage scales with
   card width. On hover they grow and fan out slightly (per Figma), so left/top/
   width/height/transform/box-shadow all transition together. */
.misc-card__tile {
  position: absolute;
  border: 3px solid #F7F7F7;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition:
    left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    top 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.misc-card__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.misc-card__tile--a {
  left: 31.75%;
  top: 42.92%;
  width: 42.94%;
  height: 41.57%;
  transform: translate(-50%, -50%) rotate(-15deg);
  z-index: 1;
}

.misc-card__tile--b {
  left: 66.72%;
  top: 45.19%;
  width: 44.4%;
  height: 42.99%;
  transform: translate(-50%, -50%) rotate(15deg);
  z-index: 2;
}

.misc-card__tile--c {
  left: 52.8%;
  top: 59.75%;
  width: 42.69%;
  height: 41.33%;
  transform: translate(-50%, -50%) rotate(4.83deg);
  z-index: 3;
}

/* Hover: tiles enlarge and fan outward, shadow deepens (Figma hover state). */
.misc-card:hover .misc-card__tile--a {
  left: 21.94%;
  top: 43.42%;
  width: 48.35%;
  height: 46.81%;
  transform: translate(-50%, -50%) rotate(-15deg);
  box-shadow: 0 4px 22.1px rgba(0, 0, 0, 0.13);
}

.misc-card:hover .misc-card__tile--b {
  left: 78.21%;
  top: 46.12%;
  width: 47.02%;
  height: 45.53%;
  transform: translate(-50%, -50%) rotate(14.56deg);
  box-shadow: 0 4px 22.1px rgba(0, 0, 0, 0.13);
}

.misc-card:hover .misc-card__tile--c {
  left: 52.8%;
  top: 57.39%;
  width: 51.36%;
  height: 49.72%;
  transform: translate(-50%, -50%) rotate(11.04deg);
  box-shadow: 0 4px 22.1px rgba(0, 0, 0, 0.13);
}

.misc-card__info {
  flex: 1;
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* Link hugs its label, and sits pinned to the bottom of the card. */
.misc-card__info > .misc-card__link { margin-top: auto; }

/* Title + description block spans the full card width with proper spacing. */
.misc-card__text {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.misc-card__title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: normal;
}

.misc-card__desc {
  font-size: 16px;
  font-weight: 400;
  color: #737373;
  line-height: 1.4;
}

.misc-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: text-decoration-color 0.2s ease;
}

.misc-card:hover .misc-card__link { text-decoration-color: currentColor; }

.misc-card__arrow {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(45deg); /* idle: → */
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.misc-card:hover .misc-card__arrow { transform: rotate(0deg); /* hover: ↗ */ }

/* ── CONTACT / FOOTER ───────────────────────────────────────── */
.contact {
  padding: 44px var(--page-pad-x) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: var(--frame-max);
  margin: 0 auto;
  container-type: inline-size;
}

.contact-card {
  background: var(--bg-card) url(../assets/footer-blob.png) center / cover no-repeat;
  border-radius: 38px;
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 64px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.contact-card__heading {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -1.92px;
  max-width: 807px;
  position: relative;
}

.contact-card__cta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn--copy-email {
  background: #fff;
  color: var(--text-primary);
  border-color: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--copy-email:hover {
  transform: translateY(-1px);
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.btn--copy-email.is-copied {
  animation: copy-pop 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.footer__copy-label,
.footer__copy-icon {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.footer__copy.is-switching .footer__copy-label,
.footer__copy.is-switching .footer__copy-icon {
  opacity: 0;
  transform: translateY(4px);
}

.footer__copy-icon {
  justify-content: center;
  flex-shrink: 0;
}

.footer__copy-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-socials {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  width: 100%;
}

.contact-socials__links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-socials__item {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.64px;
  line-height: 1.42;
  transition: opacity 0.2s;
}

.contact-socials__item:hover { opacity: 0.7; }
.contact-socials__item img { width: 24px; height: 24px; }

.footer-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-nav__item {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.56px;
  line-height: 1.42;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.footer-nav__item:hover { opacity: 0.7; }

/* Thin divider between the meta row and the socials row */
.footer-divider {
  height: 1px;
  width: 100%;
  background: #D5D5D5;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.footer-meta__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: var(--text-primary);
}
.footer-meta__col p { margin: 0; }
.footer-meta__col--right { text-align: right; }

/* Giant decorative wordmark, faded top-to-bottom, clipped so it never
   overflows the page. Purely visual — hidden from assistive tech. */
/* Clipped to roughly two-thirds of a line so the wordmark visibly "sinks"
   out of view at the bottom, instead of sitting fully revealed (which would
   also stretch the page with a lot of empty scroll space beneath it). */
.footer-watermark {
  width: 100%;
  height: clamp(54px, 22.4cqw, 261px);
  margin: 0;
  overflow: hidden;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 16vw, 230px);
  font-size: clamp(48px, 19.6cqw, 230px);
  line-height: 1.42;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  background: radial-gradient(67% 100% at 50% 115.8%, rgba(0, 0, 0, 0.02) 15.6074%, rgba(0, 0, 0, 0.12) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 700px) {
  .contact-card { padding: 48px 24px; gap: 24px; }
  .footer-meta { flex-direction: column; gap: 16px; }
  .footer-meta__col--right { text-align: left; }
}

/* ── CONTACT PAGE ───────────────────────────────────────────── */

/* Centered hero — fills the viewport below the 80px navbar */
/* ── CONTACT PAGE — load animations (mirrors hero appear-up pattern) ── */
.contact-info__label,
.contact-info__heading {
  opacity: 0;
  animation: appear-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.contact-info__label   { animation-delay: 0.15s; }
.contact-info__heading { animation-delay: 0.28s; }

.contact-section__left .cinfo-card:nth-child(1),
.contact-section__left .cinfo-card:nth-child(2),
.contact-section__right {
  opacity: 0;
  animation: appear-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.contact-section__left .cinfo-card:nth-child(1) { animation-delay: 0.38s; }
.contact-section__left .cinfo-card:nth-child(2) { animation-delay: 0.50s; }
.contact-section__right                          { animation-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
  .contact-info__label,
  .contact-info__heading,
  .contact-section__left .cinfo-card:nth-child(1),
  .contact-section__left .cinfo-card:nth-child(2),
  .contact-section__right { animation: none; opacity: 1; }
}

/* ── CONTACT PAGE — new layout (intro + left cards + right form) ── */
.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  padding: 44px var(--page-pad-x) 60px;
  max-width: var(--frame-max);
  margin: 0 auto;
  width: 100%;
}

.contact-section__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 607px;
}

.contact-section__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.contact-section__left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 0 0 378px;
}

.contact-section__right {
  flex: 1;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 26px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Info cards (email + book a call) — hover flips to dark with pill */
.cinfo-card {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 26px;
  padding: 24px;
  height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  text-align: left;
  width: 100%;
  transition: background-color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cinfo-card:hover { background: var(--text-primary); border-color: var(--text-primary); }

.cinfo-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cinfo-card__icon {
  width: 38px;
  height: 38px;
  background: #F4F4F4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cinfo-card:hover .cinfo-card__icon { background: #fff; }
.cinfo-card__icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.cinfo-card__pill {
  background: #fff;
  border-radius: 24px;
  padding: 8px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.cinfo-card:hover .cinfo-card__pill {
  opacity: 1;
  transform: none;
}
.cinfo-card:active .cinfo-card__pill {
  transform: scale(0.93);
}


.cinfo-card__bottom {
  display: flex;
  align-items: flex-end;
  width: 100%;
}

.cinfo-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cinfo-card__label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.72px;
  color: var(--text-secondary);
  line-height: 1.42;
  transition: color 0.35s ease;
}
.cinfo-card:hover .cinfo-card__label { color: rgba(255,255,255,0.65); }

.cinfo-card__value {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  line-height: 1.42;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.35s ease;
}
.cinfo-card:hover .cinfo-card__value { color: #fff; }
.cinfo-card__value svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Contact form (right column) */
.contact-form__title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: normal;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 44px;
  align-items: flex-end;
  width: 100%;
}

.contact-form__fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.contact-form__field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: var(--text-secondary);
  line-height: 1.42;
}

.cf-num {
  width: 24px;
  height: 24px;
  border: 1px solid var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.56px;
  flex-shrink: 0;
  line-height: 1;
}

.cf-required {
  color: #fa0000;
  font-size: 14px;
  letter-spacing: -0.56px;
  line-height: 1;
}

.contact-form__field input,
.contact-form__field textarea {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--text-primary);
  border-radius: 0;
  outline: none;
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  padding: 10px 0;
  width: 100%;
  min-height: 64px;
  transition: border-color 0.2s;
  resize: none;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-bottom-color: var(--brand);
}

.contact-form__field input[aria-invalid="true"],
.contact-form__field textarea[aria-invalid="true"] {
  border-bottom-color: #ef4444;
}

.contact-form__field-err {
  font-size: 13px;
  color: #ef4444;
  min-height: 18px;
}

.contact-form__footer {
  display: flex;
  justify-content: flex-end;
}

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

.contact-form__sent {
  display: none;
  padding: 14px 26px 14px 30px;
  border-radius: 38px;
  border: 1px solid #e3e3e3;
  background: #f5f5f5;
  box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.42);
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: #2b2b2b;
  line-height: 1.42;
  pointer-events: none;
  cursor: default;
}

.contact-form__error-banner {
  display: none;
  align-items: center;
  gap: 12px;
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #991b1b;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
  animation: slide-down-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Disable submit button while submitting */
[data-fs-submit-btn]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Legacy .contact-info__intro kept for alignment */
.contact-info__intro {
  width: 100%;
  max-width: 642px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info__label {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-info__heading {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -1.92px;
  color: var(--text-primary);
}
.contact-info__heading .accent { color: var(--brand); }

/* 6 contact cards — 3 columns, centered */
.cc-grid {
  width: 100%;
  max-width: 1172px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
}

.cc-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 6px;
  padding: 16px 24px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}

.cc-card--link { cursor: pointer; }
.cc-card--link:hover { border-color: var(--text-primary); }

.cc-card__label {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.42;
  color: var(--text-secondary);
}

.cc-card__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.42;
  color: var(--text-primary);
  word-break: break-word;
}

.cc-card__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cc-card__icon svg { width: 16px; height: 16px; display: block; }
.cc-card__icon--brand svg { width: 15px; height: 15px; }

/* Hover-revealed open-link arrow, top-right */
.cc-card__arrow {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.cc-card__arrow svg { width: 100%; height: 100%; display: block; }
.cc-card--link:hover .cc-card__arrow { opacity: 1; transform: none; }

/* Book a call */
.contact-info__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.contact-info__cta-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
}
.contact-info__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 20px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-info__cta-link svg { width: 22px; height: 22px; }

/* Map */
.contact-map {
  padding: 25px 25px 0;
}
.contact-map__canvas {
  width: 100%;
  height: 496px;
  border-radius: 19px;
  overflow: hidden;
  background: var(--bg-card);
}
.contact-map__canvas .leaflet-container { background: #e8edf0; }


@media (max-width: 920px) {
  .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; }
  /* Stack contact section columns on tablet */
  .contact-section__body { flex-direction: column; }
  .contact-section__left { flex: none; width: 100%; flex-direction: row; }
  .cinfo-card { flex: 1; }
  .contact-section__right { width: 100%; flex: none; }
}

@media (max-width: 620px) {
  .contact-section__left { flex-direction: column; }
  .cinfo-card { height: 186px; }
}

@media (max-width: 560px) {
  .cc-grid { grid-template-columns: 1fr; }
  .contact-info__cta { justify-content: center; text-align: center; }
  .contact-map__canvas { height: 360px; }
  .contact-section { padding: 32px 16px 48px; gap: 32px; }
  .contact-form__footer { justify-content: stretch; }
  .contact-form__footer .btn { width: 100%; justify-content: space-between; }
  .contact-info__label { font-size: 16px; }
  .contact-info__heading { font-size: 30px; letter-spacing: -1px; }
  .cinfo-card__value svg { display: none; }
  .contact-socials__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
  }
}

/* Mobile-only line break helper — visible only in the 560px breakpoint below */
.br-mobile { display: none; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .hero { padding: 80px 20px; gap: 90px; }
  .hero__grid { top: -160px; }
  .case-studies, .experience { padding: 36px 20px; }
}

/* ── Case card: switch from absolute-positioned to CSS grid at ≤1100px.
   This fixes the title-overflow-into-divider overlap that happens at
   intermediate widths while keeping the horizontal image-left / text-right
   layout intact on tablet. ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .case-card {
    height: auto;
    min-height: 280px;
    /* 4 rows: title+role | divider | meta | cta */
    display: grid;
    grid-template-columns: 42% 1fr;
    grid-template-rows: auto auto auto 1fr;
  }

  /* Image spans all four rows in the left column */
  .case-card__image {
    position: static;
    grid-column: 1;
    grid-row: 1 / 5;
    width: auto;
    height: auto;
    min-height: 280px;
    border-radius: 0;
    margin: 0;
  }

  /* Right column — each element sits in its own row */
  .case-card__content {
    position: static;
    grid-column: 2;
    grid-row: 1;
    padding: 24px 20px 0;
  }
  .case-card__divider {
    position: static;
    grid-column: 2;
    grid-row: 2;
    width: auto;
    margin: 14px 20px 0;
  }
  .case-card__meta {
    position: static;
    grid-column: 2;
    grid-row: 3;
    padding: 14px 20px 0;
    gap: 16px;
  }
  .case-card__tags {
    position: static;
    grid-column: 2;
    grid-row: 4;
    margin: 16px 20px 20px;
    width: calc(100% - 40px);
    align-self: end;
  }

  .case-card__title { max-width: none; font-size: 22px; }
  .meta-col { width: auto; flex: 1 1 0; }
}

@media (max-width: 900px) {
  .nav__links { gap: 28px; }
  .nav__email { display: none; }

  /* Smaller, contained hero on tablet so the heading doesn't span full width. */
  .hero__intro { min-height: 60vh; justify-content: flex-start; padding-top: 10vh; }
  .hero__heading { font-size: 34px; letter-spacing: -1.2px; }
  .hero__text { max-width: 560px; }

  .case-studies__heading,
  .experience__heading,
  .misc__heading { font-size: 32px; }

  .hero__photos { flex-wrap: wrap; }

  /* Hide the sidebar — case cards go full-width in a single column */
  .case-studies { flex-direction: column; align-items: stretch; }
  .sidebar--sticky { position: static; }
  .case-studies .sidebar { display: none; }
  /* Full-width stack — no artificial cap, cards fill the content area */
  .case-studies__stack { max-width: none; margin-inline: 0; }
  /* Show the heading above the stack in place of the hidden sidebar */
  .case-studies__heading { display: block; width: 100%; }
  /* Cards keep the horizontal grid layout from the ≤1100px breakpoint;
     just shrink the image column a bit for the tighter width */
  .case-card { grid-template-columns: 38% 1fr; }
  .case-card__title { font-size: 20px; }

  /* Stacked layout (matches the mobile Figma): year + arrow on top,
     "Company — Role" on the line below, everything left-aligned. */
  .exp-item__left,
  .exp-item__right { display: contents; }
  .exp-item__row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 10px;
    align-items: center;
  }
  /* Year spans the full top row so it doesn't stretch the company column —
     that keeps the em-dash hugging the company name on the line below. */
  .exp-item__year {
    grid-row: 1;
    grid-column: 1 / -1;
    width: auto;
    font-size: 16px;
  }
  .exp-item__toggle {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    width: 32px;
    height: 32px;
  }
  .exp-item__toggle svg { width: 32px; height: 32px; }
  .exp-item__company {
    grid-row: 2;
    grid-column: 1;
    font-size: 24px;
  }
  .exp-item__role {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
    width: auto;
    font-size: 24px;
  }
  .exp-item__role::before { content: '— '; }

  .exp-item__body-inner { padding-left: 0; }
  .exp-resume__link { font-size: 22px; }

  .contact-card__heading { font-size: 30px; letter-spacing: -1px; }
}

/* Tablet: stack cards vertically, switch each to horizontal layout */
@media (max-width: 1024px) {
  .misc__row { flex-direction: column; align-items: stretch; }

  .misc-card {
    flex-direction: row;
    align-items: stretch;
    height: 180px;
    padding: 6px;
    gap: 0;
  }

  /* Left image slot: fixed width, keeps its own aspect-locked collage */
  .misc-card__photos {
    flex: 0 0 280px;
    width: 280px;
    height: auto;
    align-self: stretch;
    aspect-ratio: auto;
  }

  /* Right text area fills remaining space */
  .misc-card__info {
    flex: 1;
    padding: 24px 28px;
    gap: 14px;
    justify-content: center;
  }

  .misc-card__info > .misc-card__link { margin-top: 0; }
}

/* Smaller tablets: shrink the image slot proportionally */
@media (max-width: 768px) {
  .misc-card { height: 160px; }
  .misc-card__photos { flex: 0 0 220px; width: 220px; }
  .misc-card__info { padding: 18px 22px; gap: 12px; }
}

/* Mobile: revert back to vertical stacked layout */
@media (max-width: 560px) {
  .misc-card {
    flex-direction: column;
    height: auto;
  }
  .misc-card__photos {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .misc-card__info {
    padding: 16px;
    gap: 20px;
    justify-content: flex-start;
  }
  .misc-card__info > .misc-card__link { margin-top: auto; }
}

@media (max-width: 560px) {
  .nav__links { display: none; }
  /* Drop the ticker edge fades on mobile. */
  .ticker__fade { display: none; }
  .ticker__logo { height: 40px; }
  .ticker__logo img { height: 40px; max-width: 180px; }
  .hero__grid { display: none; }
  .hero__intro { min-height: min(75vh, calc(100vh - 160px)); padding-top: 24px; justify-content: center; }
  .br-mobile { display: inline; }
  .hero__heading { font-size: 30px; letter-spacing: -1px; }
  .hero__photo { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .social-links {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 16px 24px;
    justify-content: center;
  }

  .hero__cta .btn {
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 30px;
  }
  .hero__cta .btn--primary {
    padding: 12px 20px 12px 24px;
  }
  .hero__cta .btn__arrow {
    width: 15px;
    height: 15px;
  }

  .hero {
    padding-top: 0;
  }

  /* Keep the hero text/CTA from forcing the layout wider than the screen. */
  .hero__intro {
    width: 100%;
    max-width: 100%;
  }
  .hero__text { width: 100%; max-width: 100%; }
  .hero__heading { max-width: 100%; }
  /* Side-by-side CTAs on mobile, hugging content */
  .hero__cta { flex-direction: row; align-items: center; justify-content: center; width: auto; gap: 12px; flex-wrap: wrap; }
  .hero__cta .btn { justify-content: center; width: auto; }

  /* Footer CTA: compact side-by-side on mobile (fits within card padding) */
  .contact-card__cta { gap: 10px; flex-wrap: nowrap; }
  .contact-card__cta .btn { font-size: 12px; padding: 10px 14px 10px 16px; border-radius: 24px; gap: 8px; }
  .contact-card__cta .btn__arrow { width: 12px; height: 12px; }
  .contact-card__cta .footer__copy-icon svg { width: 12px; height: 12px; }

  /* Revert to vertical stacking on phones */
  .case-card {
    display: block;
    height: auto;
    padding: 0;
  }
  .case-card__image {
    position: static;
    width: 100%;
    height: 200px;
    border-radius: 0;
    margin: 0;
  }
  .case-card__content,
  .case-card__divider,
  .case-card__meta,
  .case-card__tags {
    position: static;
    left: auto; right: auto; top: auto;
    margin: 0 0 16px;
    padding: 0;
  }
  .case-card__content { padding: 18px 20px 0; margin-bottom: 0; }
  .case-card__divider { margin: 14px 20px 0; width: auto; }
  .case-card__meta { padding: 14px 20px 0; gap: 16px; width: 100%; justify-content: space-between; margin-bottom: 0; }
  .meta-col { flex: 1 1 0; width: auto; }
  .case-card__tags {
    margin: 16px 20px 20px;
    width: calc(100% - 40px);
  }
  .case-card__title { font-size: 22px; max-width: none; }

  /* Slightly smaller company/role text on the narrowest phones. */
  .exp-item__company,
  .exp-item__role { font-size: 20px; }
}
