:root {
  --ink: #18211f;
  --muted: #64706b;
  --paper: #f6f2ea;
  --surface: #fffdf8;
  --line: rgba(24, 33, 31, 0.12);
  --teal: #0f766e;
  --coral: #d95b43;
  --gold: #ba8b38;
  --forest: #1f3d35;
  --shadow: 0 22px 70px rgba(22, 31, 29, 0.14);
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

.inner-page {
  padding-top: 76px;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px clamp(20px, 4vw, 56px);
  color: #fff;
  transition: background 420ms var(--ease), color 420ms var(--ease), box-shadow 420ms var(--ease);
}

.site-header.is-scrolled,
.site-header.menu-active,
.inner-page .site-header {
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(20, 25, 24, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.82rem;
}

.brand-text {
  font-size: 0.98rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  opacity: 0.82;
  transition: opacity 260ms var(--ease), color 260ms var(--ease);
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 260ms var(--ease);
}

.menu-active .menu-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-active .menu-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.section {
  position: relative;
  padding: clamp(76px, 10vw, 132px) 0;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 94vh;
  padding: 140px clamp(20px, 5vw, 72px) 56px;
  overflow: hidden;
  color: #fff;
  background: #091311;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img {
  transform: scale(1.04);
  animation: imageDrift 14s var(--ease) infinite alternate;
}

.hero-media video {
  opacity: 0;
  transition: opacity 640ms var(--ease);
}

.hero-media video.is-ready {
  opacity: 1;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 19, 17, 0.82), rgba(9, 19, 17, 0.32) 56%, rgba(9, 19, 17, 0.16)),
    linear-gradient(0deg, rgba(9, 19, 17, 0.62), rgba(9, 19, 17, 0.08) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd2c7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
  line-height: 1.28;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.65;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 5rem);
  text-wrap: initial;
}

.hero-title span,
.profile-title span {
  display: block;
  white-space: nowrap;
}

.profile-title {
  font-size: clamp(1.55rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  text-wrap: initial;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), background 260ms var(--ease);
}

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

.primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 16px 34px rgba(217, 91, 67, 0.28);
}

.secondary {
  border-color: rgba(255, 255, 255, 0.46);
  color: #fff;
}

.secondary.dark {
  border-color: var(--line);
  color: var(--ink);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-panel {
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: 56px;
  z-index: 2;
  width: min(360px, calc(100% - 40px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.panel-label {
  display: block;
  margin-bottom: 8px;
  color: #ffd2c7;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-band,
.project-band {
  background: var(--surface);
}

.page-hero {
  padding: clamp(86px, 12vw, 150px) 0 clamp(62px, 8vw, 96px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(217, 91, 67, 0.08)),
    var(--paper);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: end;
}

.page-hero h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.96;
}

.page-contact h1 {
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.96;
}

.case-hero h1 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.96;
}

.page-hero-copy {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-hero-copy .button {
  margin-top: 18px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.7fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.intro-copy p,
.timeline-item p,
.skill-card p,
.contact-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.metric-strip {
  display: grid;
  gap: 12px;
}

.metric-strip div,
.skill-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
}

.metric-strip strong {
  display: block;
  color: var(--teal);
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  line-height: 1.08;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.home-preview {
  display: grid;
  gap: 6px;
}

.featured-marquee {
  display: flex;
  width: 100%;
  gap: 16px;
  overflow: hidden;
  padding: 8px 0 18px;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.featured-track {
  display: flex;
  min-width: max-content;
  gap: 16px;
  animation: featuredScroll 36s linear infinite;
}

.featured-marquee:hover .featured-track {
  animation-play-state: paused;
}

.preview-card {
  display: flex;
  flex-direction: column;
  width: clamp(280px, 28vw, 380px);
  min-height: 330px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(24, 33, 31, 0.08);
  transition: transform 320ms var(--ease), border-color 320ms var(--ease), box-shadow 320ms var(--ease);
}

.preview-card:hover {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.preview-card span {
  display: inline-block;
  margin-bottom: 38px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-card p {
  color: var(--muted);
  line-height: 1.65;
}

.preview-card img {
  width: 100%;
  margin-top: auto;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - 2px);
  object-fit: cover;
}

@keyframes featuredScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 16px));
  }
}

.section-heading {
  width: min(740px, 100%);
  margin-bottom: clamp(34px, 6vw, 62px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 28px 0;
}

.timeline.expanded {
  gap: 8px;
}

.timeline.expanded .timeline-item {
  padding: 36px 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  border: 7px solid var(--paper);
  border-radius: 50%;
  background: var(--teal);
}

.role,
.project-card p {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.65;
  list-style: none;
}

.clean-list li {
  position: relative;
  padding-left: 22px;
  transition: color 220ms var(--ease);
}

.clean-list li:hover {
  color: var(--coral);
}

.clean-list li::before {
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  transition: background 220ms var(--ease);
  content: "";
}

.clean-list li:hover::before {
  background: var(--coral);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 44px rgba(24, 33, 31, 0.08);
  transition: transform 360ms var(--ease), box-shadow 360ms var(--ease);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-card div {
  padding: 22px;
}

.project-card span {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}

.skills-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.5fr;
  gap: clamp(28px, 5vw, 72px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skills-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card {
  display: flex;
  min-height: 282px;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 28px;
  text-align: center;
  transition: transform 320ms var(--ease), border-color 320ms var(--ease);
}

.skill-card:hover {
  border-color: rgba(15, 118, 110, 0.36);
  transform: translateY(-5px);
}

.skill-card span {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--coral);
  font-weight: 850;
}

.skill-card h3 {
  min-height: 0;
  margin-bottom: 8px;
}

.skill-card p {
  margin-bottom: 16px;
}

.skill-card img,
.skill-card video {
  width: 100%;
  margin-top: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: rgba(24, 33, 31, 0.05);
  object-fit: contain;
  transition: opacity 260ms var(--ease);
}

.skill-card img.is-changing { opacity: 0.28; }
.skill-card img.is-preview-hidden { display: none; }

.skill-card video[data-skill-preview-video] { display: none; }
.skill-card video[data-skill-preview-video].is-preview-active { display: block; }

.skill-card-action {
  margin-top: 16px;
  margin-bottom: 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-card-action span {
  margin: 0;
  color: currentColor;
}

.skill-card:focus-visible,
.skills-modal button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.42);
  outline-offset: 4px;
}

.skills-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease);
}

.skills-modal.is-open { opacity: 1; pointer-events: auto; }
.skills-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 28, 25, 0.78); backdrop-filter: blur(8px); }
.skills-modal-panel { position: relative; z-index: 1; width: min(1280px, 100%); max-height: calc(100vh - 24px); overflow: auto; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 38px); transform: translateY(14px); transition: transform 240ms var(--ease); }
.skills-modal.is-open .skills-modal-panel { transform: translateY(0); }
.skills-modal-panel .eyebrow { margin-bottom: 7px; font-size: 0.68rem; }
.skills-modal-panel h2 { margin: 0 44px 14px 0; font-size: clamp(1.35rem, 2.7vw, 2.25rem); }
.skills-modal-close, .skills-modal-controls button { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.skills-modal-close { position: absolute; top: 24px; right: 24px; width: 42px; height: 42px; font-size: 1.7rem; line-height: 1; }
.skills-slideshow { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink); }
.skills-slide { display: none; margin: 0; }
.skills-slide.is-active { display: block; animation: skills-slide-in 360ms var(--ease); }
.skills-slide img, .skills-slide video { width: 100%; max-height: 72vh; object-fit: contain; }
.skills-slide figcaption { padding: 9px 13px; background: var(--ink); color: rgba(255,255,255,.76); font-size: .78rem; }
.skills-modal-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.skills-modal-controls button { width: 42px; height: 42px; font-size: 1.25rem; }
.skills-modal-controls button:hover, .skills-modal-close:hover { border-color: var(--teal); color: var(--teal); }
.skills-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.skills-dot { width: 9px; height: 9px; border: 0; border-radius: 50%; background: rgba(24,33,31,.22); cursor: pointer; padding: 0; }
.skills-dot.is-active { background: var(--coral); transform: scale(1.3); }
body.skills-modal-open { overflow: hidden; }
@keyframes skills-slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

.contact-section {
  background: var(--forest);
  color: #fff;
}

.page-contact {
  min-height: calc(100vh - 76px);
  padding: clamp(110px, 16vw, 190px) 0;
}

.contact-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.contact-copy {
  width: min(720px, 100%);
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.7);
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.contact-details a {
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.contact-details a:hover {
  color: #ffd2c7;
  border-color: #ffd2c7;
}

.page-contact h1 {
  color: #fff;
}

.case-hero {
  padding: clamp(76px, 11vw, 136px) 0 clamp(50px, 8vw, 86px);
  background: var(--surface);
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.case-grid p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.case-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.45fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.detail-stats {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 12px;
}

.detail-stats div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 2rem;
  line-height: 1;
}

.detail-stats span {
  color: var(--muted);
  line-height: 1.45;
}

.detail-content {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-content p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-content .button {
  margin-top: 30px;
}

.detail-content h3 {
  margin-top: 34px;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.media-tile {
  min-height: 210px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.media-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-tile figcaption,
.video-slot span {
  display: block;
  padding: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.case-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.case-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: caseSlideshowFade 16s infinite;
}

.case-slideshow img:nth-child(1) { animation-delay: 0s; }
.case-slideshow img:nth-child(2) { animation-delay: 4s; }
.case-slideshow img:nth-child(3) { animation-delay: 8s; }
.case-slideshow img:nth-child(4) { animation-delay: 12s; }
.case-slideshow img:nth-child(5) { animation-delay: 16s; }

.case-slideshow.has-3 img { animation-duration: 12s; }
.case-slideshow.has-5 img { animation-duration: 20s; }

@keyframes caseSlideshowFade {
  0%, 100% { opacity: 0; }
  3% { opacity: 1; }
  22% { opacity: 1; }
  27% { opacity: 0; }
}

.masonry-gallery {
  column-count: 3;
  column-gap: 10px;
  margin-top: 18px;
}

.masonry-gallery img,
.masonry-gallery video {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  break-inside: avoid;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 460ms var(--ease), transform 460ms var(--ease);
}

.masonry-gallery img:not(.is-visible),
.masonry-gallery video:not(.is-visible) {
  transition-delay: var(--stagger, 0ms);
}

.masonry-gallery img.is-visible,
.masonry-gallery video.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.masonry-gallery img {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13.5' cy='13.5' r='9' fill='rgba(17,24,22,0.18)'/%3E%3Ccircle cx='13' cy='13' r='9' fill='%23fbf7f0' stroke='%230f766e' stroke-width='2.5'/%3E%3Cline x1='13' y1='8.5' x2='13' y2='17.5' stroke='%23d95b43' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='8.5' y1='13' x2='17.5' y2='13' stroke='%23d95b43' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='19.4' y1='19.4' x2='26.5' y2='26.5' stroke='%2318211f' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-in;
}

.masonry-gallery img:hover {
  opacity: 0.88;
  transition-duration: 200ms;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(15, 15, 15, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease);
}

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

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13.5' cy='13.5' r='9' fill='rgba(17,24,22,0.18)'/%3E%3Ccircle cx='13' cy='13' r='9' fill='%23fbf7f0' stroke='%230f766e' stroke-width='2.5'/%3E%3Cline x1='8.5' y1='13' x2='17.5' y2='13' stroke='%23d95b43' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='19.4' y1='19.4' x2='26.5' y2='26.5' stroke='%2318211f' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

.video-slot {
  display: grid;
  place-items: center;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.22), rgba(217, 91, 67, 0.2)),
    var(--forest);
}

.video-slot span {
  color: #fff;
}

.life-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 120px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.life-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 44px rgba(24, 33, 31, 0.08);
}

.life-grid.mixed .life-card {
  min-height: 100%;
}

.life-grid.mixed .life-card:nth-child(1) {
  grid-column: span 3;
  grid-row: span 3;
}

.life-grid.mixed .life-card:nth-child(2) {
  grid-column: span 2;
  grid-row: span 2;
}

.life-grid.mixed .life-card:nth-child(3) {
  grid-column: span 1;
  grid-row: span 2;
}

.life-grid.mixed .life-card:nth-child(4) {
  grid-column: span 2;
  grid-row: span 3;
}

.life-grid.mixed .life-card:nth-child(5) {
  grid-column: span 2;
  grid-row: span 2;
}

.life-grid.mixed .life-card:nth-child(6) {
  grid-column: span 2;
  grid-row: span 2;
}

.life-card img,
.video-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.22), rgba(217, 91, 67, 0.2)),
    var(--forest);
  color: #fff;
  font-weight: 850;
}

.video-placeholder.alt {
  background:
    linear-gradient(135deg, rgba(186, 139, 56, 0.28), rgba(15, 118, 110, 0.26)),
    #24352f;
}

.life-card div:last-child {
  padding: 22px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 4vw, 56px);
  background: #111816;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.site-footer a {
  color: #fff;
  font-weight: 750;
}

.footer-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  transition: color 200ms var(--ease);
}

.footer-contact a:hover {
  color: #fff;
}

.footer-contact span {
  color: rgba(255, 255, 255, 0.3);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  z-index: 30;
  transition: width 120ms linear;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

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

@keyframes imageDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.5%, 1%, 0);
  }
}

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

@media (max-width: 920px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 76px 16px auto;
    display: grid;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 16px 12px;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 34px;
  }

  .intro-grid,
  .skills-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .page-hero-grid,
  .case-grid,
  .detail-layout,
  .skills-grid.wide,
  .media-gallery {
    grid-template-columns: 1fr;
  }

  .masonry-gallery {
    column-count: 2;
  }

  .life-grid {
    grid-auto-rows: 92px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .life-grid.mixed .life-card:nth-child(1) {
    grid-column: span 4;
    grid-row: span 3;
  }

  .life-grid.mixed .life-card:nth-child(2),
  .life-grid.mixed .life-card:nth-child(4),
  .life-grid.mixed .life-card:nth-child(5),
  .life-grid.mixed .life-card:nth-child(6) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .life-grid.mixed .life-card:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .detail-stats {
    position: static;
  }

  .contact-layout {
    display: grid;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .masonry-gallery {
    column-count: 1;
  }

  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .site-nav {
    inset: 68px 12px auto;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 112px 20px 42px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.1rem);
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .intro-grid,
  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .life-grid {
    grid-auto-rows: 86px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .life-grid.mixed .life-card:nth-child(n) {
    grid-column: span 1;
    grid-row: span 2;
  }

  .life-grid.mixed .life-card:nth-child(1),
  .life-grid.mixed .life-card:nth-child(4) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .skill-card h3 {
    min-height: auto;
  }

  .timeline-item {
    grid-template-columns: 42px 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
