/* ============================================
   Tokens
   ============================================ */
:root {
  --paper:      #FFFFFF;
  --paper-dim:  #F2F2F2;
  --ink:        #0A0A0A;
  --ink-soft:   #4B5563;
  --blue:       #2563EB;
  --blue-tint:  #EAF1FF;
  --night:      #0A0A0A;
  --night-dim:  #171717;
  --night-ink:  #FFFFFF;
  --night-soft: #A3A3A3;
  --blue-bright: #5B8DEF;
  --line:       rgba(0, 0, 0, 0.12);
  --line-night: rgba(255, 255, 255, 0.16);

  --display: "Satoshi", -apple-system, sans-serif;
  --body:    "Satoshi", -apple-system, sans-serif;
  --mono:    "Satoshi", -apple-system, sans-serif;

  --max: 1180px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

/* ============================================
   Reset & base
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75em 1.25em; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.eyebrow--night { color: var(--blue-bright); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 5vw, 3.5rem);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-right { display: flex; align-items: center; gap: 0.9rem; }
.nav-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}
.nav-links { display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); }
.nav-links a {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  padding: 0.5em 1em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-resume {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  padding: 0.5em 1.1em;
  background: var(--blue);
  color: var(--paper);
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-resume:hover { background: var(--ink); transform: translateY(-1px); }

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

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 88vh;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(2rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3.5rem);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero-inner { max-width: 42rem; flex: 1 1 auto; }
.hero-name {
  font-size: clamp(3.25rem, 7vw, 6rem);
  margin-bottom: 1.5rem;
}
.hero-tagline {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.25rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.btn {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-block;
}
.btn-primary { background: var(--blue); color: var(--paper); }
.btn-primary:hover { transform: translateY(-2px); background: var(--ink); }
.btn-ghost { border: 1px solid var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }

/* Hero image carousel — tilted, spinning reveal */
.hero-carousel {
  position: relative;
  display: block;
  width: clamp(220px, 20vw, 320px);
  height: clamp(280px, 26vw, 400px);
  flex-shrink: 0;
  transform: rotate(5deg);
  perspective: 1200px;
  transition: transform 0.3s ease;
}
.hero-carousel:hover { transform: rotate(5deg) scale(1.03); }
.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: rotateY(-100deg);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}
.carousel-img.is-active {
  opacity: 1;
  transform: rotateY(0deg);
  z-index: 2;
}
.carousel-img.is-leaving {
  opacity: 0;
  transform: rotateY(100deg);
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-img { transition: opacity 0.3s ease; transform: none !important; }
}

@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .hero-carousel {
    width: clamp(200px, 55vw, 280px);
    height: clamp(260px, 65vw, 340px);
    margin-top: 1rem;
    align-self: center;
  }
}


/* ============================================
   Section head (shared)
   ============================================ */
.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.section-head h2, .work-page .section-head h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
.section-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
.work .section-sub { color: rgba(255, 255, 255, 0.7); }
.work-page .section-sub { color: var(--ink-soft); }

/* ============================================
   Work section (homepage) — blue gradient, dark to light
   ============================================ */
.work {
  background: linear-gradient(180deg, #1E3A8A 0%, #3B82F6 100%);
  max-width: none;
  margin: 0;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3.5rem);
}
.work > .section-head {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.work .eyebrow { color: rgba(255, 255, 255, 0.8); }
.work .section-head h2 { color: #FFFFFF; }

/* Work page (work.html) — white shell; each project below is its own
   full-bleed, alternating colour band instead of one long gradient */
.work-page {
  background: var(--paper);
  max-width: none;
  margin: 0;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem);
}
/* Wraps the page intro (section-head + work-index) using the exact same
   two-layer box model as .project/.project-inner below — padding on this
   outer, unconstrained-width layer, max-width + auto-margin on the inner —
   so "Portfolio" and the work index line up with "01 OMI" and every other
   project's left edge instead of drifting right on wide viewports. */
.work-head { padding: 0 clamp(1.25rem, 5vw, 3.5rem); }
.work-head-inner { max-width: var(--max); margin: 0 auto; }
.work-page .section-head { max-width: none; }
.work-page .eyebrow { color: var(--blue); }
.work-page .section-head h1 { color: var(--ink); }

/* Category rows */
.work-category {
  max-width: var(--max);
  margin: 0 auto clamp(3.5rem, 7vw, 5.5rem);
}
.work-category:last-child { margin-bottom: 0; }

.work-category-title {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.4rem;
}
.work-category-note {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.25rem;
}
.work-category-title + .work-scroll { margin-top: 1.25rem; }

/* Horizontal scroll row: ~2–2.5 items visible */
.work-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  margin: 0 -1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}
.work-scroll::-webkit-scrollbar { height: 6px; }
.work-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
.work-scroll::-webkit-scrollbar-track { background: transparent; }

.work-item {
  flex: 0 0 auto;
  width: min(440px, 78vw);
  scroll-snap-align: start;
}
.work-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.work-item--wide img { aspect-ratio: 3 / 2; }
.work-item--portrait img { aspect-ratio: 2 / 3; }
.work-item-label {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.6rem;
}

/* The text-led Insureware quote card, styled to match item width */
.work-item--quote { display: flex; }
.quote-card {
  background: var(--blue-tint);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2rem);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
.quote-card .work-tag {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.quote-card h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.quote-card blockquote {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.work-caption {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .work-item { width: min(320px, 82vw); }
}

/* Work page — full grid (all items, wraps, no horizontal scroll) */
.work-page { padding-bottom: clamp(3rem, 6vw, 5rem); }
.work-full-category {
  max-width: var(--max);
  margin: 0 auto clamp(3.5rem, 7vw, 5.5rem);
}
.work-full-category:last-of-type { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.work-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}
.work-full-grid .work-item { width: 100%; }
.work-full-grid .case-study { grid-column: 1 / -1; }

/* Featured case study block */
.case-study {
  background: #FFFFFF;
  border-radius: 12px;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.case-study-tag {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.case-study h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.case-study-intro {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 42rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}
.case-study-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.case-study-images img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.case-study-images img:hover { opacity: 0.9; }
.case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.case-study-block h4 {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.case-study-block p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .case-study-images { grid-template-columns: 1fr; }
  .case-study-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.work-closing {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.work-closing h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 1.75rem;
}
.work-closing .about-cta { justify-content: center; margin-top: 0; }
.work-all-cta {
  max-width: var(--max);
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
}

/* ============================================
   After Hours (night mode)
   ============================================ */
.after-hours {
  background: var(--night);
  color: var(--night-ink);
  padding: clamp(4.5rem, 11vw, 8rem) clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-night);
}
.after-hours .section-head { max-width: 42rem; margin-left: auto; margin-right: auto; text-align: center; }
.after-hours .eyebrow { margin-bottom: 1.5rem; }
.after-hours h2 { color: var(--night-ink); }
.after-hours-sub {
  color: var(--night-soft);
  margin-top: 1rem;
  font-size: 1.05rem;
}

.venues {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.6rem 0.9rem;
  max-width: 44rem; margin: 0 auto 3rem;
}
.venues span {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  padding: 0.5em 1em;
  border: 1px solid var(--line-night);
  border-radius: 999px;
  color: var(--night-soft);
}

.socials {
  display: flex; justify-content: center; gap: 2rem;
}
.socials a {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: var(--blue-bright);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.socials a:hover { border-color: var(--blue-bright); }

/* ============================================
   About
   ============================================ */
.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
}
.about-statement {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--blue);
  max-width: 36rem;
  margin-bottom: 1rem;
  line-height: 1.35;
}
.about-lede {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  max-width: 38rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}
.about-body {
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 2.5rem;
}
.facts {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2rem;
}
.facts li {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 0.5em;
}
.about-link {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  color: var(--blue);
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.about-link:hover { border-color: var(--blue); }

/* ============================================
   Experience — compact homepage snapshot (reuses .timeline below)
   ============================================ */
.skills-teaser {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem);
}
.skills-teaser .skills-grid { margin-bottom: 0; }

.experience-snap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem) clamp(4.5rem, 10vw, 7rem);
}
.timeline.timeline--compact {
  margin-top: 0;
  margin-bottom: 2rem;
  border-top: none;
}
.timeline--compact .timeline-item:last-child { border-bottom: none; }

/* ============================================
   About page (dedicated)
   ============================================ */
.about-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(6rem, 12vw, 9rem) clamp(1.25rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem);
}
.about-page h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin-top: 0.4rem;
}
.about-tagline {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--blue);
  margin-top: 0.75rem;
}
.about-page .about-lede { margin-top: 2rem; max-width: none; }
.about-page .about-body { max-width: none; }

.timeline {
  margin: clamp(3rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.timeline-title {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 1.75rem 0 0.5rem;
}
.timeline-item {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline-year {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex: 0 0 auto;
  width: 7rem;
  padding-top: 0.15rem;
}
.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.timeline-item p { color: var(--ink-soft); font-size: 0.95rem; }

.about-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

@media (max-width: 560px) {
  .timeline-item { flex-direction: column; gap: 0.35rem; }
  .timeline-year { width: auto; }
}

/* ============================================
   Contact / footer
   ============================================ */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 9vw, 6.5rem) clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-night);
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.contact .eyebrow { color: var(--blue-bright); }
.contact-email {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.75rem, 5vw, 3rem);
  display: inline-block;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--paper); }
.contact-links {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: var(--night-soft);
  display: flex; justify-content: center; gap: 0.6rem;
}
.contact-links a:hover { color: var(--paper); }
.dot { opacity: 0.5; }

.copyright {
  max-width: var(--max);
  margin: 3.5rem auto 0;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  color: var(--night-soft);
  text-align: center;
}

/* ============================================
   Lightbox
   ============================================ */
.work-item img { cursor: zoom-in; transition: opacity 0.2s ease; }
.work-item img:hover { opacity: 0.88; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 4.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 1.6rem;
  line-height: 1;
  font-family: var(--body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-prev svg,
.lightbox-next svg { display: block; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.05); }
.lightbox-prev { left: clamp(0.75rem, 3vw, 2rem); }
.lightbox-next { right: clamp(0.75rem, 3vw, 2rem); }
.lightbox-prev[hidden],
.lightbox-next[hidden] { display: none; }

.lightbox-counter {
  position: absolute;
  bottom: clamp(1rem, 3vw, 1.75rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.lightbox-counter[hidden] { display: none; }

@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.5rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

/* ============================================
   Work page — story text under each image
   ============================================ */
.work-item-story {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* ============================================
   Project case studies (Selected Work rebuild)
   Each project is a full-bleed band, alternating blue / white.
   ============================================ */
.project {
  width: 100%;
  margin: 0;
  padding: clamp(5.5rem, 9vw, 8.5rem) clamp(1.25rem, 5vw, 3.5rem);
  scroll-margin-top: 90px; /* keeps the sticky nav from covering the project title on an anchor jump */
}
.project-inner {
  max-width: var(--max);
  margin: 0 auto;
}

/* Small Work index — understated jump-list near the top of work.html,
   so the long alternating-band scroll reads as intentional. */
.work-index {
  margin: 0 0 clamp(3rem, 6vw, 4.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.work-index a {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.5em 1.1em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.work-index a:hover { background: var(--blue-tint); color: var(--blue); border-color: var(--blue); }

/* Project-number treatment — a clear "new project starts here" marker on
   every card, on top of the alternating colour band, so someone scrolling
   quickly always knows where one project ends and the next begins. */
.project-number {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.85rem;
}
.work-page .project:nth-of-type(even) .project-number { color: rgba(0, 0, 0, 0.32); }

/* CTA out of a condensed project card (Insureware → its full case study) */
.project-cta { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

/* Inverted button treatments — for use on the blue project bands, where
   the default ink-bordered ghost button and blue-fill primary button both
   read too close to the background to work as a clear call to action. */
.btn-invert-primary { background: #FFFFFF; color: var(--blue); }
.btn-invert-primary:hover { transform: translateY(-2px); background: var(--ink); color: #FFFFFF; }
.btn-ghost--invert { border: 1px solid rgba(255, 255, 255, 0.55); color: #FFFFFF; }
.btn-ghost--invert:hover { transform: translateY(-2px); background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }

.work-page .project:nth-of-type(odd) {
  background: linear-gradient(180deg, #1E3A8A 0%, #2F63E0 100%);
}
.work-page .project:nth-of-type(even) {
  background: var(--paper);
}

/* Dark text/border theme, used on the white (even) bands */
.work-page .project:nth-of-type(even) .project-tag { color: var(--blue); }
.work-page .project:nth-of-type(even) .project-header h2 { color: var(--ink); }
.work-page .project:nth-of-type(even) .project-discipline { color: var(--ink-soft); }
.work-page .project:nth-of-type(even) .project-meta {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}
.work-page .project:nth-of-type(even) .project-meta-block h4 { color: rgba(0, 0, 0, 0.55); }
.work-page .project:nth-of-type(even) .project-meta-block p { color: var(--ink-soft); }
.work-page .project:nth-of-type(even) .project-note { color: var(--ink-soft); }
.work-page .project:nth-of-type(even) .project-section { border-top-color: var(--line); }
.work-page .project:nth-of-type(even) .project-section-num { color: rgba(0, 0, 0, 0.52); }
.work-page .project:nth-of-type(even) .project-section h3 { color: var(--ink); }
.work-page .project:nth-of-type(even) .project-section p { color: var(--ink-soft); }

.project-header { margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.project-tag {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.6rem;
}
.project-header h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}
.project-discipline {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2rem);
  margin: clamp(1.75rem, 3.5vw, 2.5rem) 0;
}
.project-meta-block h4 {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.64);
  margin-bottom: 0.5rem;
}
.project-meta-block p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  line-height: 1.45;
}
@media (max-width: 900px) {
  /* Client + Role stay paired even as the layout narrows — they're short,
     and don't need a full row each before the reader reaches the artwork. */
  .project-meta { grid-template-columns: 1fr 1fr; }
}

.project-media {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 61%;
  margin-left: auto;
  margin-right: auto;
}
.project-media > * + * { margin-top: clamp(1.25rem, 2.5vw, 1.75rem); }
.project-section .project-media { margin-top: 1.25rem; }

.project-media img {
  width: 100%;
  display: block;
  border-radius: 10px;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.project-media img:hover { opacity: 0.92; }

.project-hero img { aspect-ratio: 16 / 9; object-fit: cover; }

.project-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.project-row-2 img { aspect-ratio: 4 / 3; object-fit: cover; }
/* Print-poster pairs (Insureware campaigns, Sound & Visual) are portrait —
   forcing a landscape 4:3 crop cuts off their headline/logo, so give them
   their own taller ratio instead. */
.project-row-2--portrait img { aspect-ratio: 3 / 4; object-fit: cover; }
/* Fashion Biz screen grabs (newsletter, Syzmik site) — device frame cropped
   away entirely, native screen ratio so cover crops nothing visible. */
.project-row-2--screens img { aspect-ratio: 388 / 557; object-fit: cover; }

/* Square treatment — OMI, Melbourne Coffee Co, The Jerk. Higher specificity
   (two classes) than the hero/row rules above, so it wins for every image
   in these three projects' media blocks, including the closing standalone shot. */
.project--square .project-media img { aspect-ratio: 1 / 1; object-fit: cover; }

.project-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.25rem);
}
.project-row-3 img { aspect-ratio: 1 / 1; object-fit: cover; }
/* Insureware's 3 poster images are natively ~7:10 portrait — the 1:1 default
   above crops them heavily top/bottom, cutting off headline and logo, so
   this override (placed after the default so it wins the cascade) gives
   them their true ratio instead. */
.project-row-3--portrait img { aspect-ratio: 7 / 10; object-fit: cover; }

/* Uneven pair — the defining brand mark gets more width than its supporting
   partner, instead of two images automatically reading as equally important. */
.project-row-uneven {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

@media (max-width: 720px) {
  .project-row-2, .project-row-3, .project-row-uneven { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .project-row-2, .project-row-3, .project-row-uneven { grid-template-columns: 1fr; }
}

/* Deliberately smaller/narrower media blocks — used to demote supporting
   evidence (a dated screenshot, a single food shot, a small ad application)
   below the project's hero and identity imagery. */
.project-media.project-poster-hero { max-width: 41%; margin-left: auto; margin-right: auto; margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.project-media.project-media--narrow { max-width: 50%; margin-left: auto; margin-right: auto; }
.project-media.project-media--small { max-width: 27%; margin-left: auto; margin-right: auto; }
/* Reserve space before these lazy-loaded images arrive — without an
   aspect-ratio here, each collapses to zero height until it loads, so the
   page's total height keeps changing after an anchor jump (e.g. a
   work.html#the-jerk link from the homepage) lands, and the browser's
   already-computed scroll position drifts off target as Insureware's
   posters above it pop in. Approximate ratio + cover crops an imperceptible
   sliver rather than distorting the image. */
.project-media.project-poster-hero img { aspect-ratio: 7 / 10; object-fit: cover; }
.project-media--narrow > img { aspect-ratio: 1600 / 844; object-fit: cover; }
@media (max-width: 720px) {
  .project-media.project-poster-hero,
  .project-media.project-media--narrow { max-width: 85%; }
  .project-media.project-media--small { max-width: 55%; }
}
@media (max-width: 480px) {
  .project-media.project-poster-hero,
  .project-media.project-media--narrow,
  .project-media.project-media--small { max-width: 100%; }
}

/* Sound & Visual — the two posters get a wider canvas than the sitewide
   default so their typography and gradients read at real scale. */
.project--wide-media .project-media { max-width: 79%; }

.project-note--spaced { margin-top: clamp(2.5rem, 5vw, 3.5rem) !important; }

.project-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  max-width: 42rem;
  margin-top: 0.75rem;
}

/* Numbered sections — used for the consolidated Insureware case study */
.project-sections { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.project-section {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.75rem, 3vw, 2.25rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.project-section:last-child { padding-bottom: 0; }
.project-section-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 0.2rem;
}
.project-section h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #FFFFFF;
  margin-bottom: 0.6rem;
}
.project-section p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 42rem;
}
.project-section .project-row-2,
.project-section .project-row-3 {
  margin-top: 1.25rem;
}
@media (max-width: 640px) {
  .project-section { grid-template-columns: 1fr; }
  .project-section-num { padding-top: 0; }
}

/* Dedicated case-study page (insureware.html) — reuses .project/.project-header/
   .project-meta/.project-sections as-is (their default styling already assumes
   a dark/blue background), just needs that background supplied since it isn't
   sitting inside .work-page's alternating nth-of-type bands. */
.project--case-study {
  background: linear-gradient(180deg, #1E3A8A 0%, #2F63E0 100%);
  min-height: calc(100vh - 74px);
  padding-top: clamp(6.5rem, 11vw, 9rem);
}
.case-back {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.case-back:hover { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.6); }
.case-closing {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}
.case-closing .eyebrow { color: rgba(255, 255, 255, 0.8); }
.case-closing h2 { color: #FFFFFF; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.case-closing .about-cta { justify-content: center; margin-top: 1.25rem; }

/* Lighter-weight project (Adriatic tier — supporting evidence, not a full case study) */
.project--light .project-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.project--light .project-media img { aspect-ratio: 16 / 10; object-fit: cover; }

/* ============================================
   More Work — compact archive, no case-study treatment
   Sits on the white work-page shell, after the last (blue) project band.
   ============================================ */
.more-work {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.more-work-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.more-work-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 38rem;
  margin-bottom: 1.75rem;
}
.more-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.more-work-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.more-work-item img:hover { opacity: 0.88; }
.more-work-item p {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

/* ============================================
   Homepage Selected Work — three square-crop anchors (OMI, Melbourne
   Coffee Co., The Jerk) plus a portrait pair (Insureware, Sound & Visual)
   shown at their own native ratio so the full poster/screen is visible
   rather than cropped into a landscape box.
   ============================================ */
.selected-grid-featured {
  max-width: 90%;
  margin: 0 auto clamp(2.25rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
.selected-grid {
  max-width: 74%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.25rem);
}
.selected-grid--portrait {
  max-width: 58%;
  grid-template-columns: repeat(2, 1fr);
}
.selected-card { display: block; }
.selected-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.selected-card--featured img { aspect-ratio: 1 / 1; }
/* Insureware and Sound & Visual use tall poster/screen imagery. Rather
   than cropping them into a landscape box, this pair gets its own row at
   the image's native portrait ratio — both cards share the same ratio,
   so the row still stays uniform and neither card shows the full image
   cropped away. */
.selected-card--portrait img { aspect-ratio: 7 / 10; object-fit: cover; object-position: top; }
.selected-card:hover img { opacity: 0.92; transform: translateY(-2px); }
.selected-card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #FFFFFF;
  margin-top: 0.85rem;
}
.selected-card--featured .selected-card-title { font-size: 1.3rem; }
.selected-card-discipline {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.2rem;
}
.selected-card-blurb {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  margin-top: 0.6rem;
  max-width: 34rem;
}

@media (max-width: 1100px) {
  .selected-grid-featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .selected-grid-featured { grid-template-columns: 1fr; max-width: 100%; }
  .selected-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }
  .selected-grid--portrait { grid-template-columns: 1fr 1fr; max-width: 100%; }
}
@media (max-width: 560px) {
  .selected-grid { grid-template-columns: 1fr; }
  .selected-grid--portrait { grid-template-columns: 1fr; }
}

/* ============================================
   About page — experience callout
   ============================================ */
.experience-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: var(--blue);
  background: var(--blue-tint);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  margin-bottom: 1.5rem;
}

/* ============================================
   Skills page (skills.html)
   ============================================ */
.skills-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem);
}
.skills-page .section-head { max-width: 44rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.skill-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.5rem, 2.5vw, 1.85rem);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.skill-block:hover { border-color: var(--ink); transform: translateY(-2px); }
.skill-block-num {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.skill-block h3 {
  font-size: 1.15rem;
  color: var(--blue);
  margin-bottom: 1rem;
}
.skill-written {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tag {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
  border-radius: 999px;
  padding: 0.4em 0.85em;
}
.skill-support {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.skill-support a {
  color: var(--blue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.skill-support a:hover { border-color: var(--blue); }

/* Tools & Technology — visually distinct, full-width block */
.skill-block--tools {
  grid-column: 1 / -1;
  background: var(--ink);
  border-color: var(--ink);
}
.skill-block--tools h3 { color: var(--blue-bright); }
.skill-block--tools .skill-block-num { color: var(--night-soft); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
}
.tools-group h4 {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--night-soft);
  margin-bottom: 0.75rem;
}
.tools-group .skill-tags {
  margin-left: -0.6em;
}
.tools-group .skill-tag {
  background: var(--night-dim);
  color: var(--night-ink);
}
.tools-group--ai .skill-tag {
  background: transparent;
  border: 1px solid var(--line-night);
  color: var(--blue-bright);
}

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* End-to-End Design — process flow */
.process-section {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}
.process-section .section-head { max-width: 44rem; }
.process-flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.process-step {
  flex: 1 1 140px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.1rem;
}
.process-step-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.process-step-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.process-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .process-flow { flex-direction: column; }
  .process-arrow { transform: rotate(90deg); padding: 0.1rem 0; }
}

