:root {
  /* Colors — bright pure white and light greys */
  --bg: #ffffff;
  --bg-header: #ffffff;
  --bg-hero: #ffffff;
  --bg-content: #ffffff;
  --bg-footer: #fafafa;
  --bg-card: #ffffff;
  --paper-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  --dot-grid: radial-gradient(circle at center, rgba(0,0,0,0.06) 1px, transparent 1px);
  --dot-grid-size: 28px 28px;
  --border-soft: #e5e5e5;
  --text-main: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #f5df7b;
  --accent-soft: #e5ecf6;
  --primary: #242b60;
  --primary-rgb: 36, 43, 96;
  --radius-xl: 32px;
  --tape-size: 48px; /* Pattern: 1 centered on every main card (hero, work, skills, about-hero, about-scene, about-links, background). */

  /* Typography — Design system */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale */
  --text-h1-size: 3rem;      /* 48px — hero / page title */
  --text-h1-weight: 600;
  --text-h1-line: 1.1;
  --text-h1-spacing: -0.02em;

  --text-h2-size: 1.75rem;  /* 28px — section titles */
  --text-h2-weight: 600;
  --text-h2-line: 1.2;
  --text-h2-spacing: -0.01em;

  --text-h3-size: 1.25rem;  /* 20px — subsections */
  --text-h3-weight: 600;
  --text-h3-line: 1.3;

  --text-body-size: 1.0625rem;    /* 17px */
  --text-body-weight: 400;
  --text-body-line: 1.6;

  --text-body-lg-size: 1.125rem;  /* 18px — lead / intro */
  --text-body-lg-weight: 400;
  --text-body-lg-line: 1.55;

  --text-small-size: 0.875rem;   /* 14px — captions, nav, labels */
  --text-small-weight: 500;
  --text-small-line: 1.5;

  --text-overline-size: 0.75rem;  /* 12px — kickers, overlines */
  --text-overline-weight: 500;
  --text-overline-line: 1.4;
  --text-overline-spacing: 0.12em;
}

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

/* Remove tap highlight (white/gray circle) on mobile */
* {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

/* Ensure images load and display correctly on mobile */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-reveal,
  .animate-hero-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .nav-drawer,
  .nav-backdrop {
    transition: none;
  }
  .scroll-progress {
    display: none;
  }
  .back-to-top {
    transition: none;
  }
}

/* Entrance animations — scroll reveals + hero stagger */
.animate-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.animate-reveal-delay-1 { transition-delay: 0.08s; }
.animate-reveal-delay-2 { transition-delay: 0.16s; }
.animate-reveal-delay-3 { transition-delay: 0.24s; }

.animate-hero-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-ready .animate-hero-item {
  opacity: 1;
  transform: translateY(0);
}

.hero-text > .animate-hero-item:nth-child(1) { transition-delay: 0.05s; }
.hero-text > .animate-hero-item:nth-child(2) { transition-delay: 0.14s; }
.hero-text > .animate-hero-item:nth-child(3) { transition-delay: 0.23s; }
.hero-text > .animate-hero-item:nth-child(4) { transition-delay: 0.32s; }
.hero-text > .animate-hero-item:nth-child(5) { transition-delay: 0.41s; }
.hero-image .animate-hero-item { transition-delay: 0.5s; }

/* Scroll progress bar — shows reading progress (UX: feedback, orientation) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--primary);
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* Color fill overlay — water-in-glass effect when picking accent */
.color-fill-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  z-index: 9999;
  pointer-events: none;
  transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.color-fill-overlay.color-fill-active {
  height: 0;
}

.color-fill-overlay.color-fill-fill {
  height: 100vh;
}

.color-fill-overlay.color-fill-done.color-fill-fade {
  opacity: 0;
  height: 100vh;
  transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .color-fill-overlay {
    transition-duration: 0.2s;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line);
  background: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
}


/* ── Logo ticker ─────────────────────────────────────────────────── */
/* 16 copies of 1.png in a flex row. Animating to -50% scrolls      */
/* exactly 8 image-widths (~5940px) — covers any display up to 4K.  */
.ticker-band {
  height: 52px;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid rgba(var(--primary-rgb), 0.35);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.35);
}

.ticker-inner {
  display: flex;
  width: max-content;
  animation: ticker-scroll 70s linear infinite;
  will-change: transform;
}

.ticker-img {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .ticker-inner { animation-play-state: paused; }
}

/* Section background bands */
.header-band {
  background: transparent;
  padding-bottom: 14px;
}

.hero-band {
  background: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    rgba(var(--primary-rgb), 0.07) 27px,
    rgba(var(--primary-rgb), 0.07) 28px
  );
  background-attachment: fixed;
}

/* In-page anchors: leave room under sticky nav when scrolling */
#home,
#work,
#about,
#skills {
  scroll-margin-top: 100px;
}

.content-region {
  background: var(--bg-content);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    rgba(var(--primary-rgb), 0.07) 27px,
    rgba(var(--primary-rgb), 0.07) 28px
  );
  background-attachment: fixed;
  min-height: 24vh;
  padding: 32px 20px 40px;
}

/* About section */

.about-main {
  max-width: 1120px;
  margin: 40px auto 56px;
  padding: 0 20px;
}

.about-page-title {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  letter-spacing: var(--text-h2-spacing);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: none;
  display: inline-block;
  position: relative;
  z-index: 0;
}

.about-page-title::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 5%;
  bottom: 10%;
  height: auto;
  background: linear-gradient(
    105deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--primary-rgb), 0.27) 18%,
    rgba(var(--primary-rgb), 0.22) 48%,
    rgba(var(--primary-rgb), 0.29) 78%,
    rgba(var(--primary-rgb), 0.1) 100%
  );
  z-index: -1;
  transform: skewX(-5deg) rotate(-0.7deg);
  border-radius: 3px 8px 5px 4px / 6px 4px 8px 3px;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.07), 0 -1px 6px rgba(var(--primary-rgb), 0.05);
}

.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
  padding: 40px 36px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(var(--primary-rgb), 0.08);
  overflow: visible;
}

.about-hero::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 10;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

.about-hero-text {
  min-width: 0;
  padding-right: 12px;
  display: flex;
  align-items: center;
}

.about-hero-headline {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 12px;
}

.about-intro {
  font-family: var(--font-body);
  font-size: 1.375rem;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0;
  font-weight: 400;
}

.about-scene {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.about-scene::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 10;
  pointer-events: none;
  transform: rotate(-6deg);
  transform-origin: center bottom;
}

.about-scene img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.about-section-heading {
  font-family: var(--font-body);
  font-size: var(--text-overline-size);
  font-weight: 600;
  letter-spacing: var(--text-overline-spacing);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.about-links + .about-section-heading {
  margin-top: 48px;
}

.about-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.about-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  padding: 24px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: visible;
}

.about-link-card::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

.about-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.2), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.5);
}

.about-link-image {
  position: relative;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 8px;
}

.about-link-image img {
  display: block;
  max-height: 140px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.about-link-image-placeholder {
  min-height: 140px;
  min-width: 120px;
  background: var(--border-soft);
  border-radius: 6px;
}

.about-link-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.about-link-card:hover .about-link-image::after {
  transform: translateX(100%) skewX(-15deg);
}

.about-link-title {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: 600;
  text-align: center;
}

.about-link-subtitle {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  text-align: center;
}

.about-badges {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 40px;
  padding: 40px 32px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(var(--primary-rgb), 0.08);
  align-items: start;
  overflow: visible;
}

.about-badges::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

.about-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  min-width: 0;
}

.about-badge .about-badge-logo {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.about-badge .about-badge-logo img {
  display: block;
  max-height: 52px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Fixed row heights so title, role, and date align across all columns */
.about-badge-label {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  min-height: 1.35em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
}

.about-badge-role {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
  min-height: 2.9em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin-bottom: 4px;
  padding: 0 4px;
  box-sizing: border-box;
}

.about-badge-role:empty {
  min-height: 0;
}

.about-badge-date:empty {
  min-height: 0;
}

.about-badge-date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
  min-height: 1.4em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  opacity: 0.9;
}

/* Base typography — use these classes or elements */
h1, .text-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1-size);
  font-weight: var(--text-h1-weight);
  line-height: var(--text-h1-line);
  letter-spacing: var(--text-h1-spacing);
  margin: 0;
}

h2, .text-h2 {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-spacing);
  margin: 0;
}

h3, .text-h3 {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: var(--text-h3-weight);
  line-height: var(--text-h3-line);
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.text-body-lg {
  font-size: var(--text-body-lg-size);
  font-weight: var(--text-body-lg-weight);
  line-height: var(--text-body-lg-line);
}

.text-small {
  font-size: var(--text-small-size);
  font-weight: var(--text-small-weight);
  line-height: var(--text-small-line);
}

.text-overline {
  font-size: var(--text-overline-size);
  font-weight: var(--text-overline-weight);
  line-height: var(--text-overline-line);
  letter-spacing: var(--text-overline-spacing);
  text-transform: uppercase;
}

/* Top navigation — white pill bar, light grey text */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 8px 32px;
  gap: 32px;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
}

.brand-name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.top-nav .nav-links a {
  color: var(--text-muted);
}

.top-nav .nav-links a:hover {
  color: var(--primary);
}

.top-nav .link-pill {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.top-nav .link-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.top-nav .link-text {
  color: var(--text-muted);
}

.top-nav .link-text:hover {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 1rem;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  padding-bottom: 2px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.is-active {
  color: var(--primary);
}

.nav-links a.is-active::after {
  width: 100%;
}

.nav-accent-picker {
  display: flex;
  align-items: center;
}

.nav-accent-picker .accent-picker-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-accent-picker .accent-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}

.nav-accent-picker .accent-picker-custom,
.nav-accent-picker .accent-picker-custom input[type="color"] {
  -webkit-tap-highlight-color: transparent;
}

.nav-accent-picker .accent-swatch:hover {
  transform: scale(1.2);
}

.nav-accent-picker .accent-picker-custom input[type="color"] {
  width: 16px;
  height: 16px;
  padding: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.nav-accent-picker .accent-picker-custom input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 1px;
}

.nav-accent-picker .accent-picker-custom input[type="color"]::-webkit-color-swatch {
  border-radius: 2px;
  border: none;
}

.nav-accent-picker .accent-picker-custom input[type="color"]:focus {
  outline: none;
}

.nav-accent-picker .accent-swatch[data-active] {
  border-color: var(--text-main);
  box-shadow: 0 0 0 1px var(--text-main);
}

.nav-extra {
  display: none; /* shown only in mobile drawer */
}

/* Drawer & backdrop — hidden on desktop, overlay on mobile */
.nav-backdrop {
  display: none;
}

.nav-drawer {
  display: contents; /* children flow into top-nav on desktop */
}

.nav-drawer-accent {
  display: none; /* desktop uses nav-accent-desktop */
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.top-nav.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.top-nav.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.top-nav.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 1rem;
}

.link-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text-main);
}

.link-text {
  text-decoration: none;
  color: var(--text-muted);
}

/* Hero layout */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  max-width: 1120px;
  margin: 56px auto 48px;
  padding: 32px 44px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(var(--primary-rgb), 0.12);
  overflow: visible;
}

.hero::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 540px;
  align-self: start;
  padding-top: 185px;
  padding-bottom: 5px;
  
}

.hero-title {
  display: none;
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: var(--text-h1-size);
  font-weight: 600;
  line-height: var(--text-h1-line);
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.hero-signature {
  position: absolute;
  top: -70px;
  left: -200px;
  width: calc(100% + 200px);
  max-width: 860px;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

.hero-role {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 500;
  letter-spacing: var(--text-h2-spacing);
  color: var(--text-muted);
}

.hero-subtitle {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: var(--text-body-lg-size);
  font-weight: var(--text-body-lg-weight);
  line-height: var(--text-body-lg-line);
  color: var(--text-muted);
}

.highlight {
  position: relative;
  display: inline;
  z-index: 0;
  padding: 0 2px;
}

.highlight::after {
  content: '';
  position: absolute;
  left: -5px;
  right: -5px;
  top: 5%;
  bottom: 8%;
  height: auto;
  background: linear-gradient(
    105deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--primary-rgb), 0.27) 18%,
    rgba(var(--primary-rgb), 0.22) 48%,
    rgba(var(--primary-rgb), 0.29) 78%,
    rgba(var(--primary-rgb), 0.1) 100%
  );
  z-index: -1;
  transform: skewX(-5deg) rotate(-0.7deg);
  border-radius: 3px 8px 5px 4px / 6px 4px 8px 3px;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.07), 0 -1px 6px rgba(var(--primary-rgb), 0.05);
}

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

.hero-accent-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(250, 250, 250, 0.9);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-accent-picker:hover {
  background: rgba(252, 252, 252, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

.hero-accent-picker .accent-picker-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-muted);
  opacity: 0.85;
}

.hero-accent-picker .accent-picker-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-accent-picker .accent-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.hero-accent-picker .accent-swatch:hover {
  transform: scale(1.15);
}

.hero-accent-picker .accent-picker-custom input[type="color"] {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.hero-accent-picker .accent-swatch[data-active] {
  border-color: var(--text-main);
  box-shadow: 0 0 0 1px var(--text-main);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.35);
}

.btn-primary .arrow {
  transform: translateY(1px);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-link {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
}

.btn-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-link:hover {
  color: var(--primary);
}

.btn-link:hover::after {
  width: 100%;
}

/* Hero image */

.hero-image {
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: end;
  margin-bottom: -32px; /* match hero padding-bottom so image sits flush with card edge */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.portrait-frame {
  position: relative;
  /* no background or circle; let image blend into the white card */
}

.portrait-frame img {
  max-width: 560px;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  transform: scale(1.28);
  transform-origin: bottom center;
}

/* Section layout */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 56px 64px;
}

.content-section {
  padding: 48px 24px 40px;
}

.section-inner {
  max-width: 720px;
}

.section-title {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-spacing);
  margin: 0 0 32px;
  color: var(--text-main);
}

.section-lead {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  color: var(--text-muted);
  margin: 0;
}

/* Resume section */

.resume-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.06);
}

.resume-block {
  margin-bottom: 36px;
}

.resume-block:last-child {
  margin-bottom: 0;
}

.resume-heading {
  font-family: var(--font-body);
  font-size: var(--text-overline-size);
  font-weight: 600;
  letter-spacing: var(--text-overline-spacing);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.resume-item {
  margin-bottom: 28px;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-item-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.resume-company {
  font-weight: 600;
  color: var(--text-main);
}

.resume-meta {
  font-size: var(--text-small-size);
  color: var(--text-muted);
}

.resume-role {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: 600;
  color: var(--text-main);
}

.resume-date {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.resume-bullets {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.6;
}

.resume-bullets li {
  margin-bottom: 6px;
}

.resume-bullets li:last-child {
  margin-bottom: 0;
}

.skills-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-muted);
  line-height: 1.8;
}

.skills-list li {
  margin-bottom: 4px;
}

/* Skills section */

.skills-section {
  padding: 32px 0 40px;
}

.skills-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skills-title {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-spacing);
  color: var(--text-main);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: none;
  display: inline-block;
  position: relative;
  z-index: 0;
}

.skills-title::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 5%;
  bottom: 10%;
  height: auto;
  background: linear-gradient(
    105deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--primary-rgb), 0.27) 18%,
    rgba(var(--primary-rgb), 0.22) 48%,
    rgba(var(--primary-rgb), 0.29) 78%,
    rgba(var(--primary-rgb), 0.1) 100%
  );
  z-index: -1;
  transform: skewX(-5deg) rotate(-0.7deg);
  border-radius: 3px 8px 5px 4px / 6px 4px 8px 3px;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.07), 0 -1px 6px rgba(var(--primary-rgb), 0.05);
}

.skills-intro {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line);
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 640px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.skill-card {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(var(--primary-rgb), 0.08);
  overflow: visible;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

#work .skill-card {
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: visible;
}

#work .work-card-link .skill-card::before {
  content: none !important;
}

.skill-card-image {
  min-height: 200px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.skill-card-image img {
  display: block;
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.skill-card-body {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.skill-card-title {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: 600;
  line-height: var(--text-h3-line);
  color: var(--text-main);
  margin: 0 0 10px;
}

.skill-card-desc {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: var(--text-body-line);
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.skill-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  opacity: 0.9;
}

/* Work + Skills cards: one shared typography block so they always match */
#work .skill-card-body,
#skills .skill-card-body {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: var(--text-body-line);
}

#work .skill-card-title,
#skills .skill-card-title {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: 600;
  line-height: var(--text-h3-line);
  letter-spacing: normal;
  color: var(--text-main);
  margin: 0 0 10px;
}

#work .skill-card-desc,
#skills .skill-card-desc {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: var(--text-body-line);
  color: var(--text-muted);
  margin: 0;
}

#work .skill-meta,
#skills .skill-meta {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--text-muted);
  opacity: 0.9;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

/* Work card: same as skill card but image is project thumbnail (aspect ratio + cover) */
.skill-card .work-card-image {
  min-height: 0;
  padding: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg);
  line-height: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.skill-card .work-card-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center top;
}

.work-card-link {
  position: relative;
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.work-card-link::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -24px;
  width: var(--tape-size);
  height: var(--tape-size);
  background: url("assets/tape.png") no-repeat center / contain;
  z-index: 10;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
}

#work .skills-grid .work-card-link .skill-card {
  flex: 1;
  min-height: 0;
}

#work .work-card-link:hover .skill-card {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.2), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.5);
}

.work-card-link .work-card-image {
  position: relative;
  overflow: hidden;
}

.work-card-link .work-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.work-card-link:hover .work-card-image::after {
  transform: translateX(100%) skewX(-15deg);
}

#work .work-card-image::after {
  display: none;
}


/* Footer */

.site-footer {
  margin-top: 0;
  padding: 32px 20px 28px;
  background: var(--bg-footer);
  border-top: 1px solid var(--border-soft);
}

#contact {
  scroll-margin-top: 100px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-spacing);
  color: var(--text-main);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
  align-self: flex-start;
  position: relative;
  z-index: 0;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 5%;
  bottom: 10%;
  height: auto;
  background: linear-gradient(
    105deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--primary-rgb), 0.27) 18%,
    rgba(var(--primary-rgb), 0.22) 48%,
    rgba(var(--primary-rgb), 0.29) 78%,
    rgba(var(--primary-rgb), 0.1) 100%
  );
  z-index: -1;
  transform: skewX(-5deg) rotate(-0.7deg);
  border-radius: 3px 8px 5px 4px / 6px 4px 8px 3px;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.07), 0 -1px 6px rgba(var(--primary-rgb), 0.05);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.contact-form-card {
  margin: 24px 0 28px;
  padding: 28px 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 520px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

.contact-form-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form-label {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.contact-form-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.contact-form-input {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-input:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
}

.contact-form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.contact-form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.contact-form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form-btn {
  align-self: flex-start;
  margin-top: 8px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(var(--primary-rgb), 0.4);
}

.contact-form-btn:active {
  transform: translateY(0);
}

.contact-form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.contact-form-success {
  display: none;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-main);
}


.contact-form-error {
  display: none;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(184, 40, 40, 0.08);
  border: 1px solid rgba(184, 40, 40, 0.25);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: #b82828;
}

.contact-form-field-error {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #b82828;
  min-height: 1em;
}

.contact-form-input[aria-invalid="true"] {
  border-color: #b82828;
  box-shadow: 0 0 0 3px rgba(184, 40, 40, 0.12);
}

.footer-contact-links {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
}

.accent-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.accent-picker-label {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
}

.accent-picker-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.accent-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--border-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.accent-swatch:hover {
  transform: scale(1.1);
  border-color: var(--text-muted);
}

.accent-swatch[data-active] {
  border-color: var(--text-main);
  box-shadow: 0 0 0 1px var(--text-main);
}

.accent-picker-custom {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.accent-picker-custom input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 2px solid var(--border-soft);
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.accent-picker-custom input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.accent-picker-custom input[type="color"]::-webkit-color-swatch {
  border-radius: 50%;
  border: none;
}

.accent-picker-custom input[type="color"]:hover {
  border-color: var(--text-muted);
  transform: scale(1.1);
}

.footer-contact-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-contact-links a:hover {
  color: var(--primary);
}

.footer-sep {
  margin: 0 8px;
  opacity: 0.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Back to top — appears when scrolled (UX: wayfinding, ease of navigation) */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
  z-index: 100;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Project pages (how2, personal-branding) */

.project-main {
  min-height: 60vh;
  padding-bottom: 48px;
  background: var(--bg-content);
}

.project-hero {
  padding: 48px 20px 40px;
  background: var(--bg);
}

.project-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.project-back {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 20px;
}

.project-back:hover {
  color: var(--primary);
}

.project-title {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.project-category {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.project-meta {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  margin: 0 0 4px;
  line-height: 1.5;
}

.project-role {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  margin: 24px 0 0;
  line-height: 1.5;
}

.project-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

.project-section {
  margin-bottom: 36px;
}

.project-section-title {
  font-family: var(--font-body);
  font-size: var(--text-h2-size);
  font-weight: 600;
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-spacing);
  color: var(--text-main);
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}

.project-section p {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  color: var(--text-main);
  margin: 0 0 16px;
}

.project-section p:last-child {
  margin-bottom: 0;
}

.project-section .project-list {
  margin: 0 0 16px;
  padding-left: 1.5em;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  color: var(--text-main);
}

.project-section .project-list li {
  margin-bottom: 8px;
}

.project-section .project-list li:last-child {
  margin-bottom: 0;
}

.project-section .project-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-h3-size);
  font-weight: 600;
  color: var(--text-main);
  margin: 20px 0 8px;
}

.project-section .project-subtitle:first-of-type {
  margin-top: 0;
}

.project-image-block {
  margin: 40px 0 48px;
  text-align: center;
}

.project-image-block figcaption {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  text-align: center;
}

.project-thank-you {
  margin: 48px 0 32px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.project-thank-you img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.project-thank-you-text {
  font-family: var(--font-body);
  font-size: var(--text-body-lg-size);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.project-image-block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
}

.project-video-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin: 40px 0 48px;
}

@media (max-width: 640px) {
  .project-video-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.project-video-text {
  padding-right: 8px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  overflow-y: auto;
}

.project-video-text p {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  color: var(--text-muted);
  margin: 0;
}

.project-video-side {
  margin: 0;
}

.project-video-block .project-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.project-video-block iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-video-block figcaption {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  color: var(--text-muted);
  text-align: center;
}

.project-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.project-doc-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.project-doc-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.project-back-link {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.project-back-link a {
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-back-link a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Responsive */

/* Medium desktop — signature ink hits viewport edge; swap to text, keep two columns */
@media (max-width: 1280px) {
  .hero {
    margin: 40px 20px 40px;
    padding: 28px 32px;
    gap: 32px;
  }

  .hero-text {
    padding-top: 0;
    align-self: center;
  }

  .hero-signature {
    display: none;
  }

  .hero-title {
    display: block;
  }

  .portrait-frame img {
    max-width: 420px;
    transform: scale(1.2);
  }
}

@media (max-width: 900px) {
  .top-nav {
    margin: 24px 14px 0;
    padding: 12px 20px;
    gap: 0;
    position: relative;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .nav-accent-desktop {
    display: none !important;
  }

  .nav-cta {
    display: none;
  }

  /* Drawer becomes overlay panel */
  .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    max-height: 100vh;
    padding: 24px;
    padding-top: 80px;
    background: var(--bg-card);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
    visibility: hidden;
    overflow-y: auto;
  }

  .top-nav.nav-open .nav-drawer {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-drawer-accent {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-drawer-accent-label {
    font-family: var(--font-body);
    font-size: var(--text-overline-size);
    font-weight: 600;
    letter-spacing: var(--text-overline-spacing);
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .nav-drawer .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 0;
  }

  .nav-drawer .nav-links a {
    padding: 14px 0;
    color: var(--text-main);
    font-size: 1.0625rem;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-drawer .nav-links a::after {
    display: none;
  }

  .nav-drawer .nav-links a:hover {
    color: var(--primary);
  }

  .nav-drawer .nav-extra {
    display: block;
    font-weight: 500;
  }

  .nav-drawer .nav-extra:first-of-type {
    border-top: 1px solid var(--border-soft);
    margin-top: 8px;
    padding-top: 14px;
  }

  /* Backdrop */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  .top-nav.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* Drawer accent picker sizing */
  .nav-drawer .accent-picker-controls .accent-swatch {
    width: 24px;
    height: 24px;
  }

  .nav-drawer .accent-picker-custom input[type="color"] {
    width: 24px;
    height: 24px;
  }

  @media (max-width: 400px) {
    .nav-drawer {
      width: 100%;
      padding: 20px;
      padding-top: 72px;
    }
  }

  /* Remove focus outline on tap (keep for keyboard) */
  .nav-toggle:focus,
  .nav-links a:focus,
  .accent-swatch:focus,
  .accent-picker-custom input:focus {
    outline: none;
  }

  .nav-toggle:focus-visible,
  .nav-links a:focus-visible,
  .accent-swatch:focus-visible,
  .accent-picker-custom input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 20px 18px 12px;
    margin: 24px 14px 36px;
    align-items: center;
  }

  .hero-text {
    padding-top: 0;
  }

  .hero-signature {
    display: none;
  }

  .hero-title {
    display: block;
    font-size: 2.25rem;
  }

  .hero-image {
    order: 2;
    justify-self: center;
    align-self: center;
    margin: 12px 0 -12px;
  }

  .portrait-frame img {
    max-width: 380px; /* keep portrait larger on mobile */
    min-width: 0;
    width: 100%;
    transform: none; /* remove scale so head and text don't get cut off */
  }

  .section,
  .content-section {
    padding: 24px 16px 36px;
  }

  .section-title {
    font-size: 1.5rem; /* 24px */
  }

  .header-band {
    padding-bottom: 10px;
  }

  .content-region {
    padding: 24px 14px 32px;
    min-height: 16vh;
  }

  .site-footer {
    margin-top: 0;
    padding: 20px 16px 28px;
  }

  .contact-form-card {
    padding: 20px 20px;
    margin: 20px 0 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .brand-logo {
    height: 34px;
    max-width: 100px;
  }

  .footer-tagline,
  .footer-contact-links {
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
  }

  .footer-links {
    justify-content: center;
    gap: 20px;
  }

  .project-hero {
    padding: 32px 16px 28px;
  }

  .project-content {
    padding: 28px 16px 0;
  }

  .project-title {
    font-size: 1.75rem;
  }

  .skills-section {
    padding: 24px 0 32px;
  }

  .skills-inner {
    padding: 0 14px;
  }

  .skills-title {
    font-size: 1.5rem;
  }

  .skills-intro {
    margin-bottom: 20px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .skill-card-image {
    min-height: 160px;
    padding: 10px 8px;
  }

  .skill-card-image img {
    max-height: 180px;
  }

  .skill-card-body {
    padding: 20px 20px 24px;
  }

  .about-main {
    margin: 28px auto 40px;
    padding: 0 16px;
  }

  .about-page-title {
    margin-bottom: 10px;
  }

  .about-hero-headline {
    font-size: 0.875rem;
    margin-bottom: 10px;
  }

  .about-intro {
    margin-bottom: 28px;
    font-size: var(--text-body-size);
  }

  .about-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
    padding: 24px 20px;
  }

  .about-hero-text {
    order: 1;
  }

  .about-scene {
    order: 2;
  }

  .about-links + .about-section-heading {
    margin-top: 36px;
  }

  .about-links {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
  }

  .about-link-card {
    padding: 24px 20px;
  }

  .about-link-image img {
    max-height: 120px;
  }

  .about-badges {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 20px;
  }

  .about-badge .about-badge-logo {
    height: 48px;
    margin-bottom: 14px;
  }

  .about-badge .about-badge-logo img {
    max-height: 48px;
  }
}

/* Small phones — extra tightening below 520px */
@media (max-width: 520px) {
  .hero {
    margin: 16px 10px 28px;
    padding: 20px 16px 10px;
    border-radius: 20px;
  }

  .hero-title {
    font-size: 1.875rem;
  }

  .hero-role {
    font-size: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .portrait-frame img {
    max-width: 300px;
    transform: scale(1.15);
  }

  .skills-title,
  .about-page-title {
    font-size: 1.375rem;
  }

  .animate-reveal {
    transform: translateY(14px);
  }

  .animate-hero-item {
    transform: translateY(12px);
  }
}

