:root {
  --bg: #303030;
  --lime-1: #d8ff00;
  --lime-2: #c0e200;
  --white: #ffffff;
  --white-dim: rgba(255, 255, 255, 0.85);
  --white-dimmer: rgba(255, 255, 255, 0.8);
  --cream: #fffefa;
  --gray-dark: #505050;
  --gray-mid: #5c5c5c;
  --black: #000000;
  --card-dark: #2e2e2e;
  --border-light: #dcdcdc;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: "Roboto", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* site nav — fixed over everything, no background of its own; js/site-nav.js
   tracks which section currently sits behind it (via each section's
   data-nav-theme) and toggles .site-nav--light so the text stays readable
   on both the dark and cream/white sections it floats over. */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem clamp(1.5rem, 4vw, 3rem);
  color: var(--white);
  transition: color 0.3s ease;
}

.site-nav--light {
  color: var(--black);
}

/* forced back to white (instead of following the page section behind it)
   while the full-screen menu is open, since at that point the nav is
   floating over .nav-overlay's own dark background, not the page. Two
   classes beats .site-nav--light's one regardless of source order. */
.site-nav.nav-open {
  color: var(--white);
}

.site-nav-logo {
  font-family: "Abril Fatface", serif;
  font-size: 1.375rem;
  color: inherit;
  white-space: nowrap;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav-cta {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.375rem;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--bg);
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* solid fill follows the section behind the nav — white on light sections,
   black on dark ones (see .site-nav--light / .site-nav.nav-open, same
   mechanism js/site-nav.js already drives for the nav's text color). */
.site-nav--light .site-nav-cta {
  border-color: var(--black);
  background: var(--white);
}

.site-nav.nav-open .site-nav-cta {
  border-color: var(--white);
  background: var(--bg);
}

.site-nav-cta:hover,
.site-nav--light .site-nav-cta:hover,
.site-nav.nav-open .site-nav-cta:hover {
  background: var(--lime-1);
  border-color: var(--lime-1);
  color: var(--black);
}

@media (max-width: 700px) {
  .site-nav-cta {
    display: none;
  }
}

.site-nav-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a66c2;
  color: var(--white);
  flex-shrink: 0;
}

.site-nav-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.site-nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-nav-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.site-nav-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* full-screen menu — hidden (opacity 0 + pointer-events: none) until
   js/nav-menu.js adds .is-open; kept in the DOM at inset: 0 the whole time
   so the fade transition has something to animate between. */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6vw, 4rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1rem);
}

.nav-overlay-link {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 96px);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  text-decoration-color: var(--lime-1);
  text-decoration-thickness: 0.06em;
  transition: color 0.25s ease;
}

.nav-overlay-link:hover,
.nav-overlay-link:focus-visible {
  color: var(--lime-1);
  text-decoration-line: line-through;
}

.nav-overlay-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-overlay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--white);
  flex-shrink: 0;
}

.nav-overlay-icon--linkedin {
  background: #0a66c2;
}

.nav-overlay-icon--medium {
  background: var(--black);
}

.nav-overlay-icon--mail {
  background: var(--black);
}

/* hero */
.hero {
  min-height: max(680px, 100vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* nudges the whole block up within the section's centered layout */
  margin-bottom: 4rem;
}

.hero-hello {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(4rem, 18vw, 18rem);
  line-height: 1;
  background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* past this height the width-based clamp above has usually already hit its
   18rem cap, so this picks up from there and keeps growing with the
   viewport's height instead of staying capped — 38.4vh is chosen so it
   lines up with that 18rem cap right at the 750px threshold (continuous,
   no jump), then scales up further on taller viewports. */
@media (min-height: 750px) {
  .hero-hello {
    font-size: clamp(18rem, 38.4vh, 26rem);
  }
}

/* fixed size on narrow screens — placed after the min-height rule above so
   it wins the tie (same specificity) on viewports that are both narrow
   and tall. */
@media (max-width: 599px) {
  .hero-hello {
    font-size: 110px;
  }
}

.hero-sub {
  margin-top: 0;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

/* below this width js/hero-sub-width.js stops syncing max-width to the
   "Hello" text's rendered width (and clears its inline override), leaving
   this rule in charge instead. */
@media (max-width: 599px) {
  .hero-sub {
    max-width: 80vw;
  }
}

.hero-sub .dim {
  color: var(--white-dim);
}

.hero-sub .bright {
  color: var(--white);
}

.hero-email {
  margin-top: 0.5rem;
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-size: 1.125rem;
  background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.25s ease;
}

/* same mechanism as .hero-hello above: continuous at the 750px threshold
   (the vh multiplier equals each element's base font-size right at 750px),
   then scales up further with height, capped at the same 1.444x (26/18)
   ratio .hero-hello uses. Placed after both elements' base rules so the
   same-specificity tie resolves in this rule's favor regardless of order. */
@media (min-height: 750px) {
  .hero-sub {
    font-size: clamp(1.125rem, 2.4vh, 1.625rem);
  }

  .hero-email {
    font-size: clamp(1.125rem, 2.4vh, 1.625rem);
  }
}

.hero-email:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.hero-scroll {
  position: absolute;
  bottom: 0.5rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--white);
  transition: opacity 0.25s ease;
}

.hero-scroll:hover {
  opacity: 0.7;
}

/* the square stays put — only the arrow (82px tall, taller than the 67px
   square) bounces. It overlaps the square: starts 30px above the square's
   top edge and its arrowhead lands inside the square, 5px shy of its
   bottom. The wrapper only handles the one-time fade in (opacity); the
   arrow's own bounce is a separate looping animation on a different
   property so the two never fight each other. */
.hero-scroll-icon {
  position: relative;
  width: 48px;
  height: 97px;
  opacity: 0;
  animation: hero-scroll-fade-in 0.4s ease forwards;
}

.hero-scroll-square {
  position: absolute;
  left: 0;
  top: 30px;
}

/* the hover nudge lives on this wrapper (not the svg itself) since the svg
   already has its own continuous transform via the bounce animation — an
   animation always wins over a plain transform declared on the same
   element, so a hover transform here would just get ignored. Nesting them
   lets both transforms apply independently and compose visually. */
.hero-scroll-arrow-wrap {
  position: absolute;
  left: 16.5px;
  top: 0;
  display: block;
  transition: transform 0.2s ease;
}

.hero-scroll:hover .hero-scroll-arrow-wrap {
  transform: translateY(10px);
}

.hero-scroll-arrow {
  display: block;
  animation: hero-scroll-bounce 5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s infinite;
}

@keyframes hero-scroll-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* small bounce plays in the first ~16% of the 5s cycle, then holds still
   for the rest — repeating every 5s per spec. */
@keyframes hero-scroll-bounce {
  0%,
  84%,
  100% {
    transform: translateY(0);
  }
  4% {
    transform: translateY(8px);
  }
  10% {
    transform: translateY(-2px);
  }
  16% {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-arrow {
    animation: none;
  }
}

/* work */
.work {
  background: var(--cream);
  color: var(--black);
  padding: 7rem 1.5rem;
  overflow: hidden;
}

.work-header {
  max-width: 55rem;
  margin: 0 auto calc(4.5rem + 20px);
  text-align: center;
}

.work-title {
  display: flex;
  flex-direction: column;
}

.work-title-line {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(2.75rem, 9vw, 110px);
  line-height: 1.15;
  color: var(--gray-dark);
}

.work-subtitle {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--gray-mid);
}

.work-list {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: calc(6rem + 46px);
}

.work-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.work-thumb-frame {
  /* half the card + half the centered text block (34rem), plus 20px so the
     inner edge overshoots the text block's edge slightly (optical compensation) */
  width: calc(50% + 17rem + 20px);
  height: 420px;
  position: relative;
  overflow: hidden;
  align-self: flex-start;
}

.work-card:nth-child(even) .work-thumb-frame {
  align-self: flex-end;
}

.work-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--from), var(--to));
  transition: transform 0.6s ease;
}

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

.work-thumb--photo {
  border-radius: 10px;
}

.work-thumb--photo::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.7);
}

/* character thumb: image overflows the top of the frame on purpose */
.work-thumb-frame--character {
  overflow: visible;
}

.work-character-img {
  position: absolute;
  bottom: -80px;
  left: 90%;
  height: 600px;
  width: auto;
  filter: drop-shadow(0 30px 24px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 2;
}

/* slide-in from the left + fade-in once the card scrolls into view.
   Overrides the generic [data-reveal] translateY/ease with our own
   translateX + ease-in-out, and carries its own transition so it beats
   the generic rule's transition on specificity rather than source order. */
.work-character-img[data-reveal] {
  opacity: 0;
  transform: translateX(calc(-50% - 150px));
  transition: opacity 0.9s ease-in-out, transform 0.9s ease-in-out;
}

.work-character-img[data-reveal].is-visible {
  opacity: 1;
  transform: translateX(-50%);
}

.work-card:hover .work-character-img {
  transform: translateX(-50%) translateY(-10px);
}

.work-logo-img {
  position: absolute;
  bottom: 0;
  left: 15%;
  height: 500px;
  width: auto;
  filter: drop-shadow(0 30px 24px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 2;
}

/* mirror of the character reveal: slides in from the right instead of the left */
.work-logo-img[data-reveal] {
  opacity: 0;
  transform: translateX(calc(-50% + 150px)) rotate(-10deg);
  transition: opacity 0.9s ease-in-out, transform 0.9s ease-in-out;
}

.work-logo-img[data-reveal].is-visible {
  opacity: 1;
  transform: translateX(-50%) rotate(-10deg);
}

.work-card:hover .work-logo-img {
  transform: translateX(-50%) translateY(-10px) rotate(-10deg);
}

.work-card-text {
  margin-top: 2rem;
  max-width: 34rem;
  text-align: center;
}

.work-eyebrow {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--gray-mid);
}

.work-headline {
  margin-top: 0.5rem;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 36px);
  line-height: 1.2;
  color: var(--black);
}

/* the title and the thumb image both open the same case-study modal — stays
   black, just underlines on hover (via the shared .work-card ancestor too,
   so hovering the thumb image underlines the title along with it). */
.work-headline-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  text-decoration: none;
}

.work-card:hover .work-headline-link,
.work-headline-link:hover,
.work-headline-link:focus-visible {
  text-decoration: underline;
}

.work-thumb-link {
  cursor: pointer;
}

.work-learn-more-link {
  display: inline-block;
  margin-top: 1.25rem;
  background: none;
  border: none;
  padding: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
  text-decoration: underline;
  cursor: pointer;
}

.work-learn-more-link:hover,
.work-learn-more-link:focus-visible {
  opacity: 0.7;
}

.work-text {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--gray-mid);
}

/* project case-study modal — js/project-modal.js populates it per project by
   reusing that card's own thumb (background + character/logo image) instead
   of duplicating any of it, and reading the rest from data-tags/
   data-case-title/data-game on the .work-card plus its existing .work-text. */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* no hero banner anymore — just a two-column layout: the text column
   scrolls on its own (.project-modal-scroll), while the image column next
   to it (.project-modal-visual) isn't part of that scroll area at all, so
   it stays put as the text scrolls past. overflow: visible on the dialog
   itself lets the featured image bleed past its rounded edge if it's
   taller than the column — border-radius still paints this box's own
   rounded corners regardless of that. */
.project-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 920px;
  height: 90vh;
  overflow: visible;
  background: var(--cream);
  border-radius: 24px;
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-modal.is-open .project-modal-dialog {
  transform: translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-modal-close:hover {
  background: var(--lime-1);
}

.project-modal-scroll {
  width: 70%;
  height: 100%;
  overflow-y: auto;
  border-radius: 24px 0 0 24px;
  /* scrolling still works — the bar itself is just hidden */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.project-modal-scroll::-webkit-scrollbar {
  display: none;
}

.project-modal-body {
  padding: 2.5rem 5rem 2.5rem 2.5rem;
}

.project-modal-visual {
  position: relative;
  width: 30%;
  flex-shrink: 0;
  height: 100%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 24px 24px 0;
}

/* each project's featured image gets its own hand-tuned size (and rotation,
   for Google's logo) via the modifier classes below — js/project-modal.js
   applies whichever one matches the open project. Centered in the visual
   column by default; a taller-than-usual one just overflows that column
   (and the dialog, since both are overflow: visible) instead of clipping. */
.project-modal-hero-character {
  width: auto;
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.project-modal-hero-character--star-wars {
  height: 570px;
}

.project-modal-hero-character--google {
  height: 360px;
  rotate: -15deg;
}

.project-modal-hero-character--farm-heroes {
  height: 570px;
}

.project-modal-tags {
  font-size: 1rem;
  color: var(--gray-mid);
}

.project-modal-title {
  margin-top: 0.5rem;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  color: var(--black);
}

.project-modal-game {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--gray-mid);
}

.project-modal-desc {
  margin-top: 1.5rem;
}

/* light gray, but still readable against the dialog's near-white
   background — not the darker --gray-mid/--gray-dark used for labels
   elsewhere on the site, this one's deliberately lighter. Inherits the
   site's sans-serif (Roboto) from body; no font-family override needed. */
.project-modal-subtitle {
  margin-top: 2rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a3a3a3;
}

/* the first subtitle already gets its spacing from .project-modal-desc's
   own margin-top, so it doesn't need this too */
.project-modal-desc > .project-modal-subtitle:first-child {
  margin-top: 0;
}

.project-modal-desc p {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--gray-mid);
}

.project-modal-desc ul {
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.project-modal-desc li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--gray-mid);
}

.project-modal-desc li + li {
  margin-top: 0.5rem;
}

.project-modal-subtitle + p {
  margin-top: 0.75rem;
}

.project-modal-gallery {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-modal-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.project-modal-gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--gray-mid);
}

.project-modal-cta {
  display: block;
  margin-top: 2.5rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: var(--lime-1);
  color: var(--bg);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.project-modal-cta:hover {
  opacity: 0.85;
}

@media (max-width: 600px) {
  /* no room for a side-by-side image column on a phone screen — straight
     to the text instead. */
  .project-modal-visual {
    display: none;
  }

  .project-modal-scroll {
    width: 100%;
  }

  .project-modal-body {
    /* extra top clearance so the full-width text on mobile starts below
       the close button instead of running under it */
    padding: 4rem 1.5rem 2rem;
  }
}

/* skills */
.skills {
  background: var(--cream);
  color: var(--black);
  padding: 7rem 0;
  /* no overflow here: setting even just overflow-x on this element makes the
     browser auto-compute overflow-y as "auto" (CSS quietly turns "clip one
     axis, leave the other visible" into "auto" on both), which turns .skills
     into its own scroll container and breaks position: sticky on
     .skills-row below. The horizontal clip instead lives on .skills-row
     itself (see below), which doesn't have that problem since it's the
     sticky element, not an ancestor of it. */
}

.skills-header {
  max-width: 55rem;
  margin: 0 auto calc(4.5rem + 20px);
  padding: 0 1.5rem;
  text-align: center;
}

.skills-title {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 60px);
  line-height: 1.2;
  color: var(--gray-dark);
}

.skills-title-alt {
  font-family: "Roboto", sans-serif;
  font-style: italic;
}

/* #skillsRow is the tall scroll track (height set by js/skills-open.js) —
   just a plain block, overflow: clip (not hidden/auto: clip doesn't create a
   scroll container, so it can't break sticky, and doesn't hit the Safari bug
   where position: sticky + overflow on the SAME element fails to stick).
   #skillsSticky is the actual sticky, centered frame inside it — kept
   overflow-free for that same Safari reason. js/skills-open.js positions the
   cards inside it so card 1 is centered on the page, and gives each card an
   individual transform that pulls it back on top of card 1 — that's the
   "stacked" look from step 1, just built with transforms instead of
   position: absolute this time, since we need it to animate away. Entering
   the section removes those per-card transforms (once, via IntersectionObserver),
   and the transition on .skill-card bounces them open into place. */
.skills-row {
  position: relative;
  overflow: clip;
}

.skills-sticky {
  position: sticky;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  will-change: transform;
  /* js/skills-open.js drives the walk from window scroll position, and lets
     the user drag a card sideways to move that scroll position directly —
     touch-action: none stops the browser's own touch scrolling/panning from
     fighting the drag on touch devices. */
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.skills-sticky.is-dragging {
  cursor: grabbing;
}

.skill-card {
  flex: 0 0 auto;
  width: min(450px, 80vw);
  aspect-ratio: 1;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--card-dark);
  border-radius: 32px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill-title {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 48px);
  line-height: 1.2;
  color: var(--white);
}

.skill-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--white);
}

/* below this width the card's own width formula (min(450px, 80vw)) starts
   shrinking below its 450px desktop cap, so aspect-ratio: 1 gives each card
   less room than its (differently-sized) skill-text needs — some cards'
   content overflows the square and pushes their own box taller than the
   others. Swapping to a fixed height keeps every card identical regardless
   of how much its own text wraps. */
@media (max-width: 560px) {
  .skill-card {
    aspect-ratio: auto;
    /* never taller than 50% of the screen — still capped at the previous
       600px too, so it doesn't grow past that on unusually tall phones. */
    height: min(600px, 50vh);
    padding: 1.75rem;
  }

  .skill-title {
    font-size: clamp(1.375rem, 6vw, 1.75rem);
  }

  .skill-text {
    font-size: 1rem;
    line-height: 1.6;
  }
}

@media (max-width: 690px) {
  .work-thumb-frame {
    width: 100%;
    align-self: center;
  }

  /* background image thumb: 90% of the actual screen width (not 90% of
     .work's padded content box), centered */
  .work-thumb-frame--character {
    width: 90vw;
    align-self: center;
  }

  /* .work-card:nth-child(even) .work-thumb-frame sets align-self: flex-end
     at (0,3,0) specificity, beating the center above (0,1,0). Match that
     specificity here so both cards center the same way regardless of
     odd/even position. */
  .work-card:nth-child(even) .work-thumb-frame--character {
    align-self: center;
  }

  /* character/logo centered instead of offset to a side; keeps the same
     bottom/height so it still leaks out of the frame */
  .work-character-img[data-reveal],
  .work-logo-img[data-reveal] {
    left: 50%;
  }

  .work-card-text {
    margin-top: 4rem;
  }
}

/* experience */
.experience {
  background: var(--white);
  color: var(--black);
  padding: 7rem 1.5rem;
  overflow: hidden;
}

.experience-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 4rem;
}

.experience-title {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  color: var(--gray-dark);
}

.experience-intro {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-mid);
}

.experience-divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border-light);
}

.experience-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.experience-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--black);
  transition: opacity 0.2s ease;
}

.experience-link:hover {
  opacity: 0.6;
}

.experience-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.experience-extra {
  margin-top: 1.75rem;
}

.experience-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-dark);
}

.experience-extra-item {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--gray-mid);
}

.experience-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

.experience-col {
  display: flex;
  flex-direction: column;
  /* no gap here: js/experience-columns.js sets each card's margin-top (and
     this column's own offset) individually, once real per-card heights are
     known, so every card starts exactly where the card beside it in the
     other column ends. A flex gap would just add on top of that. */
  gap: 0;
}

.experience-card {
  border: 1px solid var(--border-light);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.experience-meta {
  font-size: 0.8rem;
  color: var(--gray-mid);
}

.experience-company {
  margin-top: 0.75rem;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  color: var(--black);
}

.experience-role {
  margin-top: 0.4rem;
  font-size: 1rem;
  color: var(--black);
}

.experience-desc {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-mid);
}

@media (max-width: 800px) {
  .experience-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* stack every card in chronological order (Zynga, King, Google, Klarna...)
     instead of showing the whole left column then the whole right column.
     display: contents unwraps the two .experience-col divs so their cards
     become direct flex children here, and the order rules below put them
     back in date order. */
  .experience-columns {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .experience-col,
  .experience-col--offset {
    display: contents;
  }

  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(1) {
    order: 1;
  }
  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(2) {
    order: 3;
  }
  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(3) {
    order: 5;
  }
  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(4) {
    order: 7;
  }
  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(5) {
    order: 9;
  }
  .experience-col:not(.experience-col--offset) > .experience-card:nth-child(6) {
    order: 11;
  }

  .experience-col--offset > .experience-card:nth-child(1) {
    order: 2;
  }
  .experience-col--offset > .experience-card:nth-child(2) {
    order: 4;
  }
  .experience-col--offset > .experience-card:nth-child(3) {
    order: 6;
  }
  .experience-col--offset > .experience-card:nth-child(4) {
    order: 8;
  }
  .experience-col--offset > .experience-card:nth-child(5) {
    order: 10;
  }
}

/* about */
.about {
  background: var(--bg);
  color: var(--white);
}

/* .about-track is the tall scroll track (height set by js/about-scroll.js)
   that gives the photo-to-center move room to happen; overflow: clip lives
   here (not on .about-sticky) since clip doesn't create a scroll container
   and so can't break position: sticky on a descendant — unlike hidden/auto,
   and unlike putting any overflow value on .about-sticky itself, which hits
   a Safari bug where sticky + overflow on the SAME element fails to stick. */
.about-track {
  position: relative;
  overflow: clip;
}

.about-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 7rem 1.5rem;
  display: flex;
  align-items: center;
}

.about-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* gentle floating drift for the background sparkles — each group gets its
   own duration/delay/distance so they don't all move in lockstep. */
.about-decor-group {
  animation: about-decor-float 9s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.about-decor-group--1 {
  animation-duration: 10s;
  animation-delay: 0s;
}

.about-decor-group--2 {
  animation-duration: 8s;
  animation-delay: -3s;
}

.about-decor-group--3 {
  animation-duration: 12s;
  animation-delay: -6s;
}

@keyframes about-decor-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(6px, -8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-decor-group {
    animation: none;
  }
}

/* groups the finale text, the photo, and the hire button into one unit —
   on desktop it's a full-bleed absolute layer (matching the old behavior
   of its children being direct absolute children of .about-sticky), but on
   narrow screens (see the max-width: 600px block below) it switches to a
   normal-flow block so the group can be reordered after .about-layout and
   stack instead of scroll-jacking. */
.about-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* photo starts bled off the left edge of the screen (shifted left by half
   its own rendered width, so only its right half is on screen at first),
   then js/about-scroll.js takes over its transform on scroll, sliding it to
   the center of the screen and holding it there. */
.about-photo-frame {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: translateX(-50%);
  z-index: 1;
}

.about-photo {
  height: 100%;
  width: auto;
  display: block;
}

.about-layout {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  /* leaves room on the left for the bleeding photo's visible half */
  padding-left: clamp(200px, 32vw, 460px);
}

/* the payoff state: revealed as the photo reaches center (opacity driven by
   the same scroll progress that fades .about-title/.about-bio out, just
   inverted) — sits behind the photo so the centered head visually overlaps
   the big title and the marquee line, matching the reference screenshot. */
.about-finale {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
}

.about-finale-title {
  width: 100%;
  margin: 0;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(3rem, 43vw, 240px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-marquee {
  width: 100%;
  overflow: hidden;
  opacity: 0.8;
}

.about-marquee-track {
  display: flex;
  width: max-content;
  animation: about-marquee-scroll 55s linear infinite;
}

.about-marquee-track span {
  flex: 0 0 auto;
  font-size: clamp(1.1rem, 2.4vw, 1.75rem);
  color: var(--white);
  white-space: nowrap;
}

@keyframes about-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-marquee-track {
    animation: none;
  }
}

.about-hire-btn {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--lime-1);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
}

.about-hire-btn.is-interactive {
  pointer-events: auto;
}

/* same pill as .about-hire-btn, but sitting in normal flow after the bio
   text instead of overlaid on the photo — js/about-scroll.js fades it in
   alongside the title/bio (opacity: t) instead of with the finale. */
.about-hire-btn-inline {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--lime-1);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
}

.about-hire-btn-inline.is-interactive {
  pointer-events: auto;
}

.about-content {
  max-width: 640px;
}

.about-title {
  margin-top: 1rem;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 48px);
  line-height: 1.15;
  background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-bio {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--white-dim);
}

@media (max-width: 600px) {
  /* the edge-bleed-to-center treatment needs the width a two-column desktop
     layout gives it to look intentional; below that it's a normal stacked
     column instead — title + bio first, then the photo (with the "LET'S
     WORK" finale behind it and the hire button) — and js/about-scroll.js
     bails out entirely on narrow screens so it doesn't fight this. */
  .about-sticky {
    flex-direction: column;
    height: auto;
    /* no bottom padding: this is the last section on the page, and the
       photo (last item in the stack) should sit flush against the very
       bottom of the site instead of leaving a gap under it. */
    padding: 4rem 1.5rem 0;
  }

  .about-layout {
    order: 1;
    padding-left: 0;
  }

  .about-visual {
    order: 2;
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 2.5rem;
  }

  .about-photo-frame {
    position: relative;
    left: auto;
    top: auto;
    height: auto;
    max-width: 320px;
    margin: 0 auto;
    transform: none !important;
  }

  .about-photo {
    width: 100%;
    height: auto;
  }

  /* the finale's absolute inset: 0 now resolves against .about-visual,
     which (on this narrow layout) is only as tall as the in-flow photo —
     so it lands right behind it instead of spanning the whole viewport. */
  .about-finale {
    justify-content: center;
    padding-top: 0;
    /* nudges the centered group up so it lands higher on the head instead
       of dead-center on the photo. */
    padding-bottom: 18%;
    gap: 0.5rem;
    opacity: 1;
    pointer-events: auto;
  }

  .about-finale-title {
    font-size: clamp(2.25rem, 14vw, 3.75rem);
  }

  /* stays hidden here on mobile — it overlaps too much of the photo on
     small screens. .about-hire-btn-inline (after the bio text) is the one
     Hire me button shown on this layout instead. */
  .about-hire-btn {
    display: none;
  }

  .about-hire-btn-inline {
    display: inline-block;
    opacity: 1;
    pointer-events: auto;
  }
}

/* talks and keynotes / coaching and courses */
.talks {
  background: var(--bg);
  color: var(--white);
  padding: 7rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.talks-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
}

.talks-col {
  text-align: right;
  /* js/talks-hover.js toggles .is-active on whichever column the cursor is
     over; the transform is what gives it the "leve levantada" lift. */
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.talks-col--right {
  text-align: left;
}

.talks-col.is-active {
  transform: translateY(-10px);
}

/* higher specificity than [data-reveal].is-visible (same tie the about
   photo hit earlier) — without this, the lift gets overwritten back to
   translateY(0) the moment the column's scroll-reveal has played. */
[data-reveal].talks-col.is-active {
  transform: translateY(-10px);
}

.talks-title {
  display: flex;
  flex-direction: column;
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 64px);
  line-height: 1.15;
  color: var(--gray-mid);
  transition: color 0.3s ease;
}

.talks-col.is-active .talks-title {
  background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.talks-text {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--white-dim);
}

.talks-cta {
  display: block;
  width: max-content;
  margin: 4rem auto 0;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  background: var(--lime-1);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 800px) {
  .talks-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .talks-col,
  .talks-col--right {
    text-align: left;
  }
}

/* no cursor to track on touch devices — both titles stay lime instead of
   one being highlighted over the other, and there's no lift without a
   hover to trigger it (js/talks-hover.js also bails out in this case). */
@media (hover: none) {
  .talks-title {
    background: linear-gradient(156deg, var(--lime-1) 0%, var(--lime-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .talks-col {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talks-col {
    transition: none;
  }
}

/* scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
