:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.14);
  --accent: #0071e3;
  --max: 1280px;
  --nav: 52px;
}
html[data-theme="dark"] {
  --bg: #000;
  --surface: #161617;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #2997ff;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter,
    Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.nav {
  height: var(--nav);
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%;
  max-width: var(--max);
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 25px;
  font-size: 12px;
  color: var(--text);
}
.nav-links a {
  opacity: 0.8;
}
.nav-links a:hover,
.nav-links .active {
  opacity: 1;
}
.nav-tools {
  display: flex;
  gap: 14px;
  align-items: center;
}
.theme {
  border: 0;
  background: none;
  color: inherit;
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
}
.menu {
  display: none;
  background: none;
  border: 0;
  color: inherit;
  font-size: 20px;
}
.mobile-menu {
  display: none;
}
.mobile-nav {
  display: none;
}
.hero {
  min-height: 100svh;
  padding: calc(var(--nav) + 72px) 24px 72px;
  display: flex;
  align-items: center;
  max-width: var(--max);
  margin: auto;
}
.hero-copy {
  width: 52%;
  position: relative;
  z-index: 2;
}
.eyebrow {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(68px, 9.2vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.075em;
  margin: 0;
  font-weight: 700;
}
.hero h1 span {
  display: block;
}
.hero-lead {
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  max-width: 720px;
  margin: 38px 0 0;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 24px 0;
}
.hero-media {
  width: 48%;
  min-height: 650px;
  position: relative;
  margin-left: -4%;
  border-radius: 28px;
  overflow: hidden;
  /*background: #111;*/
}
.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 650px;
  object-fit: cover;
}
.page-top {
  padding-top: 180px;
}
.hero-media:after {
  content: "";
  position: absolute;
  inset: 0;
  /*background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.32));*/
}
.section {
  padding: 150px 24px;
  max-width: var(--max);
  margin: auto;
}
.section-dark {
  background: #000;
  color: #f5f5f7;
  max-width: none;
}
.section-inner {
  max-width: var(--max);
  margin: auto;
}
.display {
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin: 0;
  font-weight: 650;
}
.display em {
  font-style: normal;
  color: var(--muted);
}
.intro {
  font-size: clamp(25px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 900px;
  margin: 30px 0 0;
}
.media-wide {
  margin-top: 70px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
}
.media-wide img {
  width: 100%;
  max-height: 760px;
  object-fit: cover;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}
.copy p {
  font-size: 17px;
  color: var(--muted);
  max-width: 620px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 17px;
  margin-top: 18px;
}
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 700px;
  align-items: center;
  gap: 8vw;
  padding: 110px 0;
  border-top: 1px solid var(--line);
}
.project:nth-child(even) {
  direction: rtl;
}
.project:nth-child(even) > * {
  direction: ltr;
}
.project img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  border-radius: 26px;
}
.project h2 {
  font-size: clamp(42px, 5.5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  margin: 10px 0 24px;
}
.project p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}
.meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
}
.timeline {
  border-top: 1px solid var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 35px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-row strong {
  font-size: 17px;
}
.timeline-row span {
  color: var(--muted);
  font-size: 15px;
}
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 70px;
  border-radius: 32px;
  overflow: hidden;
}
.skills .skill:first-child {
  border-radius: 32px 0 0 0;
}
.skills .skill:nth-child(2) {
  border-radius: 0 32px 0 0;
}
.skills .skill:nth-child(3) {
  border-radius: 0 0 0 32px;
}
.skills .skill:last-child {
  border-radius: 0 0 32px 0;
}
.skill {
  background: var(--bg);
  padding: 35px;
}
.skill h3 {
  font-size: 22px;
  margin: 0 0 10px;
}
.skill p {
  color: var(--muted);
  margin: 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 70px;
}
.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
}
.gallery figure:nth-child(1),
.gallery figure:nth-child(6) {
  grid-column: span 7;
}
.gallery figure:nth-child(2),
.gallery figure:nth-child(7) {
  grid-column: span 5;
}
.gallery figure:nth-child(n + 3):not(:nth-child(6)):not(:nth-child(7)) {
  grid-column: span 4;
}
.gallery img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery figure:hover img {
  transform: scale(1.035);
}
.contact {
  min-height: calc(100svh - var(--nav));
  display: flex;
  align-items: center;
}
.contact h1 {
  font-size: clamp(65px, 10vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 0;
}
.contact p {
  font-size: 22px;
  color: var(--muted);
  max-width: 650px;
}
.contact-email {
  font-size: clamp(24px, 3vw, 42px);
  color: var(--accent);
}
footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px;
  color: var(--muted);
  font-size: 12px;
}
footer .footer-inner {
  max-width: var(--max);
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.on {
  opacity: 1;
  transform: none;
}
@media (max-width: 800px) {
  .nav-links {
    display: none;
  }
  .mobile-menu {
    display: block;
    position: relative;
  }
  .mobile-menu > summary {
    list-style: none;
    cursor: pointer;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 6px;
  }
  .mobile-menu > summary::marker {
    content: "";
  }
  .mobile-menu > summary::-webkit-details-marker {
    display: none;
  }
  .mobile-menu[open] > summary {
    display: none;
  }
  .mobile-nav {
    position: fixed;
    display: flex;
    top: 52px;
    left: 0;
    right: 0;
    padding: 22px 20px 28px;
    flex-direction: column;
    gap: 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 19px;
    z-index: 101;
  }
  .mobile-nav a {
    display: block;
  }
  .hero {
    display: block;
    padding-top: 100px;
  }
  .hero-copy {
    width: 100%;
  }
  .hero h1 {
    font-size: 21vw;
  }
  .hero-lead {
    font-size: 26px;
    margin-top: 28px;
  }
  .hero-media {
    width: 100%;
    margin: 55px 0 0;
    min-height: 62svh;
  }
  .hero-media img {
    min-height: 62svh;
  }
  .section {
    padding: 90px 20px;
  }
  .split,
  .project,
  .resume-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .project {
    min-height: auto;
    padding: 75px 0;
  }
  .project:nth-child(even) {
    direction: ltr;
  }
  .project img {
    height: 62svh;
  }
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .skills {
    grid-template-columns: 1fr;
  }
  .gallery {
    display: block;
  }
  .gallery figure {
    margin-bottom: 14px;
  }
  .gallery img {
    height: 68svh;
  }
  footer .footer-inner {
    display: block;
  }
  footer .footer-inner div + div {
    margin-top: 10px;
  }
  .nav-inner {
    padding: 0 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery img {
    transition: none;
  }
  .mobile-nav {
    transition: none;
  }
  .project img {
    transition: none;
  }
}

/* --- Interactive portfolio redesign --- */
:root {
  --nav: 64px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
}
html {
  background: var(--bg);
}
body {
  transition:
    background-color 0.45s var(--ease),
    color 0.45s var(--ease);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: var(--bg);
  transform: translateY(100%);
}
body.page-enter::before {
  animation: page-enter 0.9s var(--ease-slow) both;
}
body.page-leave::before {
  animation: page-leave 0.65s var(--ease-slow) both;
}
@keyframes page-enter {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}
@keyframes page-leave {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}
.nav {
  height: var(--nav);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  transition:
    background-color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease);
}
.nav-inner {
  max-width: 1400px;
}
.brand {
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.brand:hover {
  opacity: 0.7;
  transform: translateX(2px);
}
.nav-links {
  gap: 30px;
}
.nav-links a {
  position: relative;
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease);
}
.nav-links a:hover {
  transform: translateY(-1px);
}
.nav-links a:hover::after,
.nav-links .active::after {
  right: 0;
}
.theme {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition:
    transform 0.35s var(--ease),
    background-color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.theme:hover {
  transform: rotate(20deg) scale(1.08);
  background: var(--surface);
}
.mobile-menu > summary {
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease);
}
.mobile-menu[open] > summary {
  transform: rotate(90deg);
}
.hero-media,
.media-wide,
.project img,
.gallery figure {
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.08);
  transition:
    box-shadow 0.6s var(--ease),
    border-radius 0.6s var(--ease);
}
html[data-theme="dark"] .hero-media,
html[data-theme="dark"] .media-wide,
html[data-theme="dark"] .project img,
html[data-theme="dark"] .gallery figure {
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}
.hero-media:hover,
.media-wide:hover,
.gallery figure:hover {
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.13);
}
html[data-theme="dark"] .hero-media:hover,
html[data-theme="dark"] .media-wide:hover,
html[data-theme="dark"] .gallery figure:hover {
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.5);
}
.hero-media img,
.media-wide img {
  transform: scale(1.035);
  transition:
    transform 1.1s var(--ease-slow),
    filter 0.7s var(--ease);
}
.hero-media:hover img,
.media-wide:hover img {
  transform: scale(1.055);
}
.project img {
  transition:
    transform 1s var(--ease-slow),
    box-shadow 0.6s var(--ease);
}
.project:hover img {
  transform: scale(1.025);
}
.section {
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.display,
.hero h1,
.contact h1 {
  text-wrap: balance;
}
.link {
  position: relative;
  transition:
    gap 0.35s var(--ease),
    opacity 0.35s var(--ease);
}
.link:hover {
  gap: 14px;
  opacity: 0.78;
}
.gallery figure {
  position: relative;
}
.gallery figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.12));
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.gallery figure:hover::after {
  opacity: 1;
}
.reveal {
  transition:
    opacity 0.9s var(--ease-slow),
    transform 0.9s var(--ease-slow),
    filter 0.9s var(--ease-slow);
  filter: blur(4px);
}
.reveal.on {
  filter: blur(0);
}
.mobile-nav {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  animation: menu-in 0.45s var(--ease-slow) both;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 800px) {
  :root {
    --nav: 56px;
  }
  .nav {
    height: var(--nav);
  }
  .mobile-nav {
    top: var(--nav);
  }
  .hero {
    padding-top: calc(var(--nav) + 44px);
  }
  .theme {
    width: 30px;
    height: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    display: none;
  }
  .nav-links a,
  .brand,
  .theme,
  .mobile-menu > summary,
  .link {
    transition: none;
  }
  .hero-media img,
  .media-wide img,
  .project img {
    transition: none;
    transform: none;
  }
  .reveal {
    filter: none;
    transition: none;
  }
  .mobile-nav {
    animation: none;
  }
}
/* --- Apple-style section flow --- */
main > .section {
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--max)) / 2 + 24px));
  padding-right: max(24px, calc((100vw - var(--max)) / 2 + 24px));
  background: var(--surface);
  transition:
    background-color 0.8s var(--ease),
    color 0.8s var(--ease);
  overflow: hidden;
}
main > .section + .section {
  background: var(--bg);
}
main > .section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  opacity: 0.7;
}
main > .section .section,
main > .section .section-inner {
  max-width: var(--max);
}
.section .media-wide {
  transform: translateZ(0);
}
.section .display,
.section .intro,
.section > .eyebrow,
.section > .split,
.section > .resume-grid,
.section > .skills,
.section > .gallery,
.section > .project,
.section > .contact-email {
  position: relative;
}
.project {
  position: relative;
  transition:
    transform 0.8s var(--ease-slow),
    background-color 0.8s var(--ease);
}
.project:nth-of-type(even) {
  background: var(--bg);
}
.project:nth-of-type(odd) {
  background: var(--surface);
}
.project::before {
  content: "";
  position: absolute;
  left: calc((var(--max) - 100vw) / 2 - 24px);
  right: calc((var(--max) - 100vw) / 2 - 24px);
  top: 0;
  bottom: 0;
  z-index: -1;
  background: inherit;
}
.timeline,
.skills {
  transition:
    background-color 0.8s var(--ease),
    border-color 0.8s var(--ease);
}
.skill {
  transition:
    background-color 0.8s var(--ease),
    transform 0.5s var(--ease);
}
.skill:hover {
  transform: translateY(-3px);
}
.gallery figure {
  transition:
    transform 0.7s var(--ease-slow),
    box-shadow 0.6s var(--ease);
}
.gallery figure:hover {
  transform: translateY(-4px);
}
.hero-media img,
.media-wide img,
.project img {
  --parallax-y: 0px;
  transform: translate3d(0, var(--parallax-y), 0) scale(1.035);
}
.hero-media:hover img,
.media-wide:hover img {
  transform: translate3d(0, var(--parallax-y), 0) scale(1.055);
}
.project:hover img {
  transform: translate3d(0, var(--parallax-y), 0) scale(1.025);
}
@media (max-width: 800px) {
  main > .section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .project::before {
    left: -20px;
    right: -20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  main > .section {
    transition: none;
  }
  .project,
  .skill,
  .gallery figure {
    transition: none;
  }
  .gallery figure:hover,
  .skill:hover {
    transform: none;
  }
  .hero-media img,
  .media-wide img,
  .project img {
    transform: scale(1.035);
  }
}

/* --- Visible section bands --- */
:root {
  --section-a: #ffffff;
  --section-b: #f1f1f3;
}
html[data-theme="dark"] {
  --section-a: #000000;
  --section-b: #111113;
}
main > .section:nth-of-type(1) {
  background: var(--section-a);
}
main > .section:nth-of-type(2n) {
  background: var(--section-b);
}
main > .section:nth-of-type(2n + 1) {
  background: var(--section-a);
}
main > .section {
  position: relative;
  isolation: isolate;
}
main > .section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--section-a));
  pointer-events: none;
  z-index: -1;
}
main > .section:nth-of-type(2n)::after {
  background: linear-gradient(to bottom, transparent, var(--section-b));
}
main > .section + .section {
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(29, 29, 31, 0.035);
}
html[data-theme="dark"] main > .section + .section {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* =========================================================
   Modern editorial layer
   ========================================================= */
:root {
  --section-a: #fff;
  --section-b: #f1f1f3;
  --ink-soft: rgba(29, 29, 31, 0.08);
  --glass: rgba(245, 245, 247, 0.72);
  --hero-glow: rgba(0, 113, 227, 0.07);
}
html[data-theme="dark"] {
  --section-a: #000;
  --section-b: #111113;
  --ink-soft: rgba(255, 255, 255, 0.09);
  --glass: rgba(20, 20, 22, 0.72);
  --hero-glow: rgba(41, 151, 255, 0.1);
}

/* 01 — refined navigation */
.nav {
  height: var(--nav);
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
  transition:
    height 0.5s var(--ease),
    background-color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}
body.nav-scrolled .nav {
  height: 58px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.045);
}
html[data-theme="dark"] body.nav-scrolled .nav {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}
.nav-inner {
  transition: height 0.5s var(--ease);
}
.nav-links {
  gap: 28px;
}
.nav-links a::after {
  bottom: -7px;
  height: 1px;
}
.theme {
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

/* 02 — hero composition */
.hero {
  position: relative;
  min-height: 100svh;
  max-width: 1400px;
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 680px;
  max-height: 680px;
  right: -12vw;
  top: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 68%);
  pointer-events: none;
}
.hero-copy {
  width: 55%;
  z-index: 3;
}
.hero-media {
  width: 45%;
  margin-left: -1%;
  border-radius: 32px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .hero-media {
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.48);
}
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  filter: saturate(0.96) contrast(1.01);
}
.hero .eyebrow {
  transition: letter-spacing 0.7s var(--ease);
}
.hero:hover .eyebrow {
  letter-spacing: 0.045em;
}
.hero-lead {
  max-width: 680px;
}
.hero-sub {
  max-width: 560px;
}

/* 03 — quieter, more editorial section transitions */
main > .section {
  position: relative;
  isolation: isolate;
}
main > .section:nth-of-type(odd) {
  background: var(--section-a);
}
main > .section:nth-of-type(even) {
  background: var(--section-b);
}
main > .section::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  opacity: 0.45;
}
main > .section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, currentColor 2%, transparent)
  );
  pointer-events: none;
  z-index: -1;
}
.section .display {
  max-width: 1100px;
}
.section .media-wide {
  border-radius: 32px;
}

/* 04 — stronger project/case-study presentation */
.project {
  padding: clamp(90px, 10vw, 150px) 0;
  min-height: 760px;
  border-top: 0;
}
.project:first-of-type {
  margin-top: 35px;
}
.project .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.project .meta::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.project h2 {
  transition: letter-spacing 0.5s var(--ease);
}
.project:hover h2 {
  letter-spacing: -0.075em;
}
.project img {
  border-radius: 32px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
}
html[data-theme="dark"] .project img {
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.42);
}
.project > div {
  position: relative;
}
.project > div::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(var(--line), transparent);
  opacity: 0.5;
}

/* 05 — premium resume skill grid */
.skills {
  border-radius: 32px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.045);
}
html[data-theme="dark"] .skills {
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.28);
}
.skill {
  padding: clamp(28px, 3vw, 42px);
  min-height: 190px;
}
.skill h3 {
  letter-spacing: -0.025em;
}
.skill p {
  max-width: 360px;
}

/* 06 — exhibition-style art gallery */
.gallery {
  gap: 20px;
}
.gallery figure {
  cursor: zoom-in;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.055);
}
.gallery figure img {
  transition:
    transform 1s var(--ease-slow),
    filter 0.7s var(--ease);
}
.gallery figure:hover img {
  transform: scale(1.045);
  filter: saturate(1.04);
}
.gallery figure::after {
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.22));
}

/* 07 — smoother page transitions */
body::before {
  background: var(--bg);
  will-change: transform;
}
body.page-leave::before {
  animation: page-leave 0.52s var(--ease-slow) both;
}
body.page-enter::before {
  animation: page-enter 0.8s var(--ease-slow) both;
}
@keyframes page-enter {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}
@keyframes page-leave {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* 08 — scroll reveal and micro-motion */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.992);
  filter: blur(5px);
  transition:
    opacity 0.9s var(--ease-slow) var(--delay, 0ms),
    transform 0.9s var(--ease-slow) var(--delay, 0ms),
    filter 0.9s var(--ease-slow) var(--delay, 0ms);
}
.reveal.on {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.section > .display.reveal,
.section > .intro.reveal {
  transform: translateY(34px);
}
.section > .display.reveal.on,
.section > .intro.reveal.on {
  transform: none;
}

/* 09 — dark mode as a designed theme */
html[data-theme="dark"] body {
  background: #000;
}
html[data-theme="dark"] .nav {
  background: color-mix(in srgb, #000 70%, transparent);
}
html[data-theme="dark"] .theme {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.13);
}
html[data-theme="dark"] .hero-media,
html[data-theme="dark"] .media-wide,
html[data-theme="dark"] .gallery figure {
  background: #0d0d0f;
}
html[data-theme="dark"] .section .media-wide {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .timeline {
  border-color: rgba(255, 255, 255, 0.13);
}
html[data-theme="dark"] .timeline-row {
  border-color: rgba(255, 255, 255, 0.11);
}
html[data-theme="dark"] footer {
  background: #000;
  border-color: rgba(255, 255, 255, 0.1);
}

/* 10 — footer / fine details */
footer {
  background: var(--bg);
  transition:
    background-color 0.6s var(--ease),
    border-color 0.6s var(--ease);
}
footer .footer-inner {
  min-height: 24px;
  align-items: center;
}
footer .footer-inner > div {
  transition: opacity 0.3s var(--ease);
}
footer:hover .footer-inner > div {
  opacity: 0.92;
}

/* Lightbox */
.art-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(24px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--ease),
    visibility 0.45s var(--ease);
}
html[data-theme="dark"] .art-lightbox {
  background: rgba(0, 0, 0, 0.92);
}
.art-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.art-lightbox img {
  max-width: min(94vw, 1500px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.25);
  transform: scale(0.97) translateY(10px);
  transition: transform 0.55s var(--ease-slow);
}
.art-lightbox.is-open img {
  transform: none;
}
.art-lightbox button {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}
.art-lightbox .lightbox-count {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
@media (max-width: 800px) {
  .hero {
    display: block;
    padding-top: calc(var(--nav) + 52px);
    min-height: auto;
    padding-bottom: 70px;
  }
  .hero-copy,
  .hero-media {
    width: 100%;
  }
  .hero-media {
    margin: 54px 0 0;
    min-height: 62svh;
  }
  .hero::before {
    width: 90vw;
    height: 90vw;
    right: -35vw;
    top: 24%;
  }
  .project {
    min-height: auto;
    padding: 85px 0;
  }
  .project > div::before {
    display: none;
  }
  .gallery {
    gap: 14px;
  }
  .art-lightbox {
    padding: 18px;
  }
  .art-lightbox img {
    max-width: 96vw;
    max-height: 82vh;
    border-radius: 14px;
  }
  .art-lightbox button {
    top: 14px;
    right: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav-inner {
    transition: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .hero:hover .eyebrow {
    letter-spacing: 0.01em;
  }
  .art-lightbox,
  .art-lightbox img {
    transition: none;
  }
}

/* =========================================================
   Final polish — editorial portfolio system
   ========================================================= */
:root {
  --section-a: #f5f5f7;
  --section-b: #f0f0f2;
  --content-max: 1400px;
  --hairline: rgba(29, 29, 31, 0.1);
}
html[data-theme="dark"] {
  --section-a: #000;
  --section-b: #0f0f11;
  --hairline: rgba(255, 255, 255, 0.1);
}

/* Keep every page on the same spatial grid. */
main {
  overflow: hidden;
}
main > .section {
  max-width: var(--content-max);
  padding-left: clamp(24px, 4vw, 56px);
  padding-right: clamp(24px, 4vw, 56px);
}
main > .section[style] {
  padding-top: 128px !important;
}

/* Page headers: less empty space, stronger entry point. */
main > .section > .eyebrow:first-child {
  margin-bottom: 24px;
}
main > .section > .display:first-of-type {
  max-width: 1000px;
}
main > .section > .intro {
  max-width: 760px;
}

/* Projects: tighter composition and stronger visual rhythm. */
.project {
  position: relative;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(42px, 6vw, 92px);
  min-height: 640px;
  padding: 88px 0;
  border-top: 1px solid var(--hairline);
}
.project:first-of-type {
  margin-top: 42px;
}
.project img {
  height: 560px;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.09);
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}
html[data-theme="dark"] .project img {
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
}
.project > div {
  max-width: 560px;
  padding: 10px 0;
}
.project h2 {
  margin-top: 14px;
  margin-bottom: 22px;
}
.project p {
  max-width: 500px;
  line-height: 1.65;
}
.project .link {
  margin-top: 24px;
  position: relative;
}
.project .link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transition: right 0.45s var(--ease);
}
.project .link:hover::after {
  right: 0;
}

/* Full-bleed tonal bands without turning sections into cards. */
.project:nth-of-type(2) {
  background: var(--section-b);
  box-shadow: 0 0 0 100vmax var(--section-b);
  clip-path: inset(0 -100vmax);
}
.project:nth-of-type(3) {
  background: var(--section-a);
  box-shadow: 0 0 0 100vmax var(--section-a);
  clip-path: inset(0 -100vmax);
}

/* Give the project sequence a quiet editorial index. */
.project .meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.project .meta::before {
  width: 26px;
  opacity: 0.4;
}

/* About: image feels like part of the composition, not a card. */
.about-image,
.split > div:last-child img {
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.1);
}
html[data-theme="dark"] .about-image,
html[data-theme="dark"] .split > div:last-child img {
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.4);
}

/* Resume: make the information hierarchy quieter and more premium. */
.resume-grid {
  gap: clamp(50px, 7vw, 110px);
  margin-top: 88px !important;
}
.timeline-row {
  min-height: 82px;
  align-items: start;
}
.skills {
  margin-top: 82px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.055);
}
html[data-theme="dark"] .skills {
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
}
.skill {
  min-height: 205px;
  padding: clamp(30px, 3.2vw, 46px);
}

/* Art: exhibition wall rather than a conventional image grid. */
.gallery {
  gap: 24px;
  margin-top: 76px;
}
.gallery figure {
  border-radius: 28px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.065);
  transition:
    transform 0.65s var(--ease),
    box-shadow 0.65s var(--ease);
}
.gallery figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.11);
}
html[data-theme="dark"] .gallery figure {
  box-shadow: 0 18px 65px rgba(0, 0, 0, 0.32);
}
html[data-theme="dark"] .gallery figure:hover {
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.45);
}

/* Contact: make the final page feel deliberately sparse. */
.contact {
  max-width: var(--content-max) !important;
  min-height: calc(100svh - var(--nav));
  padding-top: clamp(110px, 15vh, 180px) !important;
  padding-bottom: clamp(110px, 15vh, 180px) !important;
}
.contact > div {
  max-width: 900px;
}
.contact-email {
  display: inline-block;
  margin-top: 12px;
  position: relative;
}
.contact-email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: currentColor;
  transition: right 0.45s var(--ease);
}
.contact-email:hover::after {
  right: 0;
}

/* Home: make the first fold feel intentional rather than merely full-screen. */
.hero {
  max-width: var(--content-max);
  padding-left: clamp(24px, 4vw, 56px);
  padding-right: clamp(24px, 4vw, 56px);
}
.hero-copy {
  width: 54%;
}
.hero-media {
  width: 46%;
  margin-left: -2%;
}
.hero-media img {
  transform: translateY(var(--parallax-y, 0)) scale(1.002);
}

/* Section boundaries stay visible but quiet. */
main > .section + .section {
  border-top: 1px solid var(--hairline);
}
main > .section::before {
  opacity: 0.35;
}

/* Make hover motion feel physical but restrained. */
@media (hover: hover) and (pointer: fine) {
  .hero-media,
  .media-wide {
    transition:
      transform 0.7s var(--ease),
      box-shadow 0.7s var(--ease);
  }
  .hero-media:hover,
  .media-wide:hover {
    transform: translateY(-3px);
  }
}

/* Mobile keeps the same visual hierarchy without forcing desktop geometry. */
@media (max-width: 800px) {
  main > .section[style] {
    padding-top: 104px !important;
  }
  .project {
    min-height: auto;
    padding: 70px 0;
    gap: 34px;
  }
  .project:first-of-type {
    margin-top: 28px;
  }
  .project img {
    height: 62svh;
    min-height: 420px;
    border-radius: 24px;
  }
  .project:nth-of-type(2),
  .project:nth-of-type(3) {
    box-shadow: 0 0 0 100vmax var(--section-b);
  }
  .resume-grid {
    margin-top: 62px !important;
  }
  .skills {
    margin-top: 60px;
    border-radius: 26px;
  }
  .skills .skill:first-child {
    border-radius: 26px 26px 0 0;
  }
  .skills .skill:nth-child(2),
  .skills .skill:nth-child(3) {
    border-radius: 0;
  }
  .skills .skill:last-child {
    border-radius: 0 0 26px 26px;
  }
  .gallery {
    margin-top: 56px;
  }
  .gallery figure {
    border-radius: 22px;
  }
}

/* Respect reduced-motion settings. */
@media (prefers-reduced-motion: reduce) {
  .project img,
  .hero-media img {
    transform: none !important;
  }
  .hero-media,
  .media-wide,
  .gallery figure {
    transition: none;
  }
}

/* =========================================================
   FINAL MOBILE / TABLET REDESIGN
   ========================================================= */

@media (max-width: 1200px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Navigation */
  .nav {
    height: 56px;
  }
  .nav-inner {
    padding: 0 18px;
  }
  .brand {
    font-size: 14px;
  }
  .nav-tools {
    gap: 7px;
  }
  .theme {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .mobile-nav {
    top: 56px;
    padding: 22px 20px 28px;
    gap: 18px;
    font-size: 18px;
  }

  /* Hero: mobile is a composition, not a shrunken desktop grid. */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: auto;
    max-width: none;
    padding: calc(var(--nav) + 48px) 20px 58px;
    margin: 0;
    overflow: hidden;
  }

  .hero::before {
    display: none;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
    z-index: 3;
  }

  .hero h1 {
    font-size: clamp(58px, 17.5vw, 86px);
    line-height: 0.87;
    letter-spacing: -0.075em;
  }

  .hero-lead {
    max-width: 100%;
    margin-top: 28px;
    font-size: clamp(24px, 6.7vw, 30px);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .hero-sub {
    max-width: 100%;
    margin: 18px 0 0;
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-media {
    width: calc(100% + 28px);
    min-height: 0;
    height: auto;
    margin: 28px -14px 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none !important;
  }

  .hero-media img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    transform: none !important;
    filter: none;
  }

  .hero-media:hover,
  .hero-media:hover img {
    transform: none !important;
    box-shadow: none !important;
  }

  /* Sections */
  main > .section,
  main > .section[style] {
    width: 100%;
    max-width: none;
    padding: 76px 20px !important;
    overflow: hidden;
  }

  .section .display,
  .display {
    max-width: 100%;
    font-size: clamp(46px, 13vw, 68px);
    line-height: 0.91;
    letter-spacing: -0.065em;
  }

  .intro {
    max-width: 100%;
    font-size: clamp(24px, 6.5vw, 30px);
    line-height: 1.08;
  }

  /* Split layouts */
  .split {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }

  .split > * {
    width: 100%;
  }

  .copy p {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.6;
  }

  .media-wide {
    width: 100%;
    margin-top: 38px;
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.08);
  }

  .media-wide img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transform: none !important;
  }

  /* Projects: image -> metadata -> title -> copy */
  .project {
    display: flex;
    flex-direction: column;
    min-height: auto;
    gap: 28px;
    padding: 64px 0;
    border-top: 0;
  }

  .project:first-of-type {
    margin-top: 0;
  }
  .project:nth-child(even) {
    direction: ltr;
  }
  .project > * {
    width: 100%;
  }
  .project > div::before {
    display: none;
  }

  .project img {
    order: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 22px;
    transform: none !important;
  }

  .project > div {
    order: 1;
    max-width: 100%;
    padding: 0;
  }

  .project .meta {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .project h2 {
    font-size: clamp(42px, 12vw, 64px);
    line-height: 0.91;
    letter-spacing: -0.065em;
    margin: 6px 0 18px;
  }

  .project p {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.6;
  }

  .project .link {
    margin-top: 20px;
    font-size: 16px;
  }

  .project:nth-of-type(2) {
    box-shadow: 0 0 0 100vmax var(--section-b);
  }

  .project:nth-of-type(3) {
    box-shadow: 0 0 0 100vmax var(--section-a);
  }

  /* Resume */
  .resume-grid {
    display: flex;
    flex-direction: column;
    gap: 42px;
    margin-top: 56px !important;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 21px 0;
  }

  .timeline-row strong {
    font-size: 15px;
  }
  .timeline-row span {
    font-size: 15px;
    line-height: 1.5;
  }

  .skills {
    grid-template-columns: 1fr;
    margin-top: 46px;
    border-radius: 22px;
  }

  .skills .skill:first-child {
    border-radius: 22px 22px 0 0;
  }
  .skills .skill:nth-child(2),
  .skills .skill:nth-child(3) {
    border-radius: 0;
  }
  .skills .skill:last-child {
    border-radius: 0 0 22px 22px;
  }

  .skill {
    min-height: 0;
    padding: 28px 24px;
  }

  .skill h3 {
    font-size: 20px;
  }
  .skill p {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Art */
  .gallery {
    display: block;
    margin-top: 46px;
  }

  .gallery figure {
    width: 100%;
    margin: 0 0 14px;
    border-radius: 18px;
  }

  .gallery img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .gallery figure:hover,
  .gallery figure:hover img {
    transform: none;
    filter: none;
  }

  /* Contact */
  .contact {
    min-height: calc(100svh - var(--nav));
    padding-top: 68px !important;
    padding-bottom: 68px !important;
  }

  .contact h1 {
    font-size: clamp(58px, 17vw, 92px);
    line-height: 0.9;
  }

  .contact p {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.5;
  }

  .contact-email {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
    font-size: clamp(21px, 5.8vw, 32px);
    overflow-wrap: anywhere;
  }

  /* Footer */
  footer {
    padding: 24px 20px;
  }

  footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  footer .footer-inner div + div {
    margin-top: 0;
  }
}

@media (max-width: 390px) {
  .hero {
    padding-left: 17px;
    padding-right: 17px;
  }
  .hero h1 {
    font-size: 17.2vw;
  }
  main > .section,
  main > .section[style] {
    padding-left: 17px !important;
    padding-right: 17px !important;
  }
  .project h2 {
    font-size: 12.2vw;
  }
}

/* Remove decorative horizontal separators site-wide; section color bands remain. */
.project,
main > .section + .section,
.section + .section {
  border-top: 0 !important;
}
main > .section::before {
  display: none !important;
}
footer {
  border-top: 0 !important;
}

/* Tighten the Home hero-to-profile transition. */
@media (max-width: 1200px) {
  main > .hero {
    padding-bottom: 12px;
  }
  main > .hero + .section {
    padding-top: 38px !important;
  }
}

/* Home: remove the black viewport-height tail below the hero artwork. */
@media (max-width: 1200px) {
  main > .hero {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  main > .hero + .section {
    margin-top: 0 !important;
    padding-top: 38px !important;
  }
}

/* Home: eliminate the viewport-height black gap completely on compact layouts. */
@media (max-width: 1200px) {
  main > .hero {
    min-height: 0 !important;
    height: auto !important;
    padding-top: calc(var(--nav) + 28px) !important;
    padding-bottom: 0 !important;
  }
  main > .hero + .section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* Projects on iPad/tablet: keep artwork proportional and out of the full-screen scale. */
.project .meta::before {
  display: none !important;
}
@media (max-width: 1200px) {
  .project img {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: 55svh;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    align-self: flex-start;
  }
}

/* Tablet Projects: alternate image/text columns, retain stacked layout on phones. */
@media (min-width: 601px) and (max-width: 1200px) {
  main > .section .project {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(22px, 4vw, 48px);
    row-gap: 24px;
    padding: 54px 0;
  }
  main > .section .project > img {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    height: auto !important;
    max-height: 48svh;
    min-height: 0 !important;
    object-fit: contain !important;
    align-self: center;
  }
  main > .section .project > div {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    max-width: none;
    align-self: center;
  }
  main > .section .project:nth-of-type(even) > img {
    grid-column: 2;
  }
  main > .section .project:nth-of-type(even) > div {
    grid-column: 1;
  }
}

/* Projects page: consistent section tone and rounded artwork. */
main > .section .project:nth-of-type(2),
main > .section .project:nth-of-type(3) {
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
}
@media (max-width: 1200px) {
  main > .section .project > img {
    border-radius: 24px !important;
    overflow: hidden;
  }
}

/* Projects: use one continuous section background, with no alternating project bands. */
main > .section .project,
main > .section .project:nth-of-type(2),
main > .section .project:nth-of-type(3) {
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
}
main > .section .project img {
  border-radius: 24px !important;
  overflow: hidden;
}

/* Restore the Projects page's alternating tonal bands without rectangular image panels. */
main > .section .project:nth-of-type(2) {
  background: var(--section-b) !important;
  box-shadow: 0 0 0 100vmax var(--section-b) !important;
  clip-path: inset(0 -100vmax) !important;
}
main > .section .project:nth-of-type(3) {
  background: var(--section-a) !important;
  box-shadow: 0 0 0 100vmax var(--section-a) !important;
  clip-path: inset(0 -100vmax) !important;
}
main > .section .project img {
  border-radius: 24px !important;
}

/* Force visibly rounded clipping on every Projects artwork image. */
main > .section .project > img {
  display: block;
  border-radius: 26px !important;
  clip-path: inset(0 round 26px) !important;
}

/* Projects: make the actual image fill its rounded media frame. */
main > .section .project > img {
  width: 100% !important;
  height: 100% !important;
  max-height: 48svh;
  aspect-ratio: 3 / 2;
  object-fit: cover !important;
  object-position: center;
  border-radius: 26px !important;
  clip-path: inset(0 round 26px) !important;
}
@media (min-width: 601px) and (max-width: 1200px) {
  main > .section .project > img {
    width: 100% !important;
    height: clamp(240px, 42svh, 440px) !important;
    max-height: 48svh !important;
    aspect-ratio: 3 / 2;
    object-fit: cover !important;
    object-position: center;
  }
}
@media (max-width: 600px) {
  main > .section .project > img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 3 / 2;
    object-fit: cover !important;
  }
}

/* FINAL FIX: Projects media and Art gallery sizing on iPad and phones. */
@media (min-width: 601px) and (max-width: 1200px) {
  main > .section .project {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: center !important;
  }
  main > .section .project > img {
    display: block !important;
    width: 100% !important;
    height: clamp(220px, 38svh, 390px) !important;
    min-height: 0 !important;
    max-height: 42svh !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    border-radius: 24px !important;
    clip-path: inset(0 round 24px) !important;
    align-self: center !important;
  }
}
@media (max-width: 1200px) {
  main > .section .gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: start !important;
    margin-top: 36px !important;
  }
  main > .section .gallery figure {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }
  main > .section .gallery img {
    display: block !important;
    width: 100% !important;
    height: clamp(150px, 28svh, 320px) !important;
    max-height: 32svh !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    border-radius: 18px !important;
    clip-path: inset(0 round 18px) !important;
  }
}
@media (max-width: 600px) {
  main > .section .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  main > .section .gallery img {
    height: clamp(130px, 24svh, 230px) !important;
    max-height: 26svh !important;
  }
}

/* Touch devices (including iPadOS desktop-sized Safari): compact, uncropped art gallery. */
@media (hover: none) and (pointer: coarse) {
  main > .section .gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
    margin-top: 32px !important;
  }
  main > .section .gallery figure {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: clamp(170px, 30svh, 300px) !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }
  main > .section .gallery img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    border-radius: 18px !important;
    clip-path: inset(0 round 18px) !important;
  }
  main > .section .project > img {
    width: 100% !important;
    height: clamp(200px, 36svh, 360px) !important;
    max-height: 40svh !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    border-radius: 24px !important;
    clip-path: inset(0 round 24px) !important;
  }
}

/* Art page final layout: centered, restrained video and a proper image gallery. */
main > .section > section.section {
  width: min(100%, 960px);
  margin: 54px auto 64px;
  padding: 0 !important;
  background: transparent !important;
}
main > .section > section.section > div[style*="aspect-ratio:16/9"] {
  width: min(100%, 760px) !important;
  margin: 28px auto 0 !important;
  border-radius: 15px !important;
  overflow: hidden !important;
}
main > .section > section.section iframe {
  border-radius: 15px !important;
}
main > .section .gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
  margin: 44px auto 0 !important;
}
main > .section .gallery figure {
  width: 100% !important;
  height: 250px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 15px !important;
}
main > .section .gallery img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
@media (max-width: 900px) {
  main > .section .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  main > .section .gallery figure {
    height: clamp(170px, 25svh, 260px) !important;
  }
  main > .section > section.section > div[style*="aspect-ratio:16/9"] {
    width: min(100%, 640px) !important;
  }
}
@media (max-width: 600px) {
  main > .section .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  main > .section .gallery figure {
    height: clamp(140px, 22svh, 210px) !important;
  }
}

/* Dedicated Art gallery layout: override all legacy gallery rules. */
#art-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 18px !important;
  width: 100% !important;
  margin: 44px auto 0 !important;
  align-items: stretch !important;
}
#art-gallery > figure,
#art-gallery > figure:nth-child(n) {
  display: block !important;
  width: 100% !important;
  height: 250px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 15px !important;
}
#art-gallery > figure > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
@media (max-width: 1000px) {
  #art-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  #art-gallery > figure,
  #art-gallery > figure:nth-child(n) {
    height: clamp(170px, 25svh, 260px) !important;
  }
}
@media (max-width: 600px) {
  #art-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  #art-gallery > figure,
  #art-gallery > figure:nth-child(n) {
    height: clamp(140px, 22svh, 210px) !important;
  }
}

/* Definitive Art portfolio grid: override legacy masonry spans and avoid cropping artwork. */
#art-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: 240px !important;
  grid-auto-flow: row dense !important;
  gap: 16px !important;
}
#art-gallery > figure,
#art-gallery > figure:nth-child(n) {
  grid-column: auto / span 1 !important;
  grid-row: auto / span 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border-radius: 15px !important;
  background: var(--section-b) !important;
}
#art-gallery > figure > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
@media (max-width: 1200px) {
  #art-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: clamp(170px, 25svh, 270px) !important;
    gap: 12px !important;
  }
}
@media (max-width: 600px) {
  #art-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: clamp(140px, 22svh, 210px) !important;
    gap: 10px !important;
  }
}
@media (hover: none) and (pointer: coarse) {
  #art-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: clamp(170px, 25svh, 270px) !important;
  }
}

/* Art gallery: invisible cells; round the actual image only. */
#art-gallery > figure,
#art-gallery > figure:nth-child(n) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
#art-gallery > figure > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}

/* Art page: true masonry columns, natural image proportions, rounded thumbnails. */
#art-gallery {
  display: block !important;
  column-count: 3 !important;
  column-gap: 16px !important;
  column-fill: balance !important;
  width: 100% !important;
  margin: 44px auto 0 !important;
}
#art-gallery > figure,
#art-gallery > figure:nth-child(n) {
  display: inline-block !important;
  vertical-align: top !important;
  break-inside: avoid !important;
  -webkit-column-break-inside: avoid !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#art-gallery > figure > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: initial !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
@media (max-width: 1200px) {
  #art-gallery {
    column-count: 2 !important;
    column-gap: 14px !important;
  }
  #art-gallery > figure,
  #art-gallery > figure:nth-child(n) {
    margin-bottom: 14px !important;
  }
}
@media (max-width: 600px) {
  #art-gallery {
    column-count: 2 !important;
    column-gap: 10px !important;
  }
  #art-gallery > figure,
  #art-gallery > figure:nth-child(n) {
    margin-bottom: 10px !important;
  }
}

/* Site-wide responsive image scale: consistent, restrained media sizing on touch screens. */
@media (max-width: 1200px) {
  .hero-media {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 28px 0 0 !important;
    overflow: hidden !important;
    border-radius: 15px !important;
  }
  .hero-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: clamp(260px, 44svh, 460px) !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 15px !important;
  }
  .media-wide {
    width: 100% !important;
    margin: 28px auto 0 !important;
    border-radius: 15px !important;
    overflow: hidden !important;
  }
  .media-wide img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: clamp(220px, 40svh, 420px) !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 15px !important;
  }
  .about-image,
  .split > div:last-child img,
  main > .section .reveal > img[alt*="Portrait"] {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: clamp(260px, 48svh, 480px) !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 15px !important;
  }
  .split > div:last-child,
  main > .section .reveal:has(> img[alt*="Portrait"]) {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }
  main > .section .project > img {
    max-height: clamp(220px, 40svh, 400px) !important;
    border-radius: 15px !important;
    clip-path: inset(0 round 15px) !important;
  }
  #art-gallery > figure > img {
    max-height: 42svh !important;
    border-radius: 15px !important;
    clip-path: inset(0 round 15px) !important;
  }
}
@media (max-width: 600px) {
  .hero-media img {
    max-height: 38svh !important;
  }
  .media-wide img {
    max-height: 34svh !important;
  }
  .about-image,
  .split > div:last-child img,
  main > .section .reveal > img[alt*="Portrait"] {
    max-height: 42svh !important;
  }
  main > .section .project > img {
    max-height: 34svh !important;
  }
  #art-gallery > figure > img {
    max-height: 34svh !important;
  }
}

/* Home hero only: restore a larger artwork scale without changing other pages. */
@media (max-width: 1200px) {
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: clamp(520px, 76svh, 920px) !important;
  }
}
@media (max-width: 600px) {
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: 76svh !important;
  }
}

/* Home hero only: restore a larger artwork scale without changing other pages. */
@media (max-width: 1200px) {
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: clamp(520px, 76svh, 920px) !important;
  }
}
@media (max-width: 600px) {
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: 76svh !important;
  }
}

/* Home hero refinement: make the artwork lead the story on compact screens.
   Desktop keeps the existing side-by-side composition; section tones remain untouched. */
@media (max-width: 1200px) {
  body:has(main > .hero) main > .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding-top: calc(var(--nav) + 24px) !important;
    padding-bottom: 36px !important;
  }
  body:has(main > .hero) main > .hero .hero-media {
    order: 0 !important;
    width: 100% !important;
    margin: 0 0 30px !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 22px !important;
  }
  body:has(main > .hero) main > .hero .hero-media img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: clamp(420px, 70svh, 760px) !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 22px !important;
    clip-path: inset(0 round 22px) !important;
  }
  body:has(main > .hero) main > .hero .hero-copy {
    order: 1 !important;
    width: 100% !important;
  }
}
@media (max-width: 600px) {
  body:has(main > .hero) main > .hero {
    padding-top: calc(var(--nav) + 16px) !important;
    padding-left: 17px !important;
    padding-right: 17px !important;
    padding-bottom: 30px !important;
  }
  body:has(main > .hero) main > .hero .hero-media {
    margin-bottom: 24px !important;
    border-radius: 16px !important;
  }
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: 62svh !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
}

/* Home hero: keep name, introduction and artwork in one responsive composition. */
@media (min-width: 901px) {
  body:has(main > .hero) main > .hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr) !important;
    align-items: center !important;
    gap: clamp(28px, 3.2vw, 52px) !important;
    padding: calc(var(--nav) + 56px) clamp(28px, 4vw, 56px) 64px !important;
    min-height: min(900px, 100svh) !important;
    height: auto !important;
  }
  body:has(main > .hero) main > .hero .hero-copy {
    order: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body:has(main > .hero) main > .hero .hero-media {
    order: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 24px !important;
  }
  body:has(main > .hero) main > .hero .hero-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(72svh, 820px) !important;
    object-fit: contain !important;
    border-radius: 24px !important;
    clip-path: inset(0 round 24px) !important;
  }
}
@media (max-width: 900px) {
  body:has(main > .hero) main > .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: calc(var(--nav) + 28px) 24px 44px !important;
  }
  body:has(main > .hero) main > .hero .hero-copy {
    order: 0 !important;
    width: 100% !important;
  }
  body:has(main > .hero) main > .hero .hero-media {
    order: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 30px 0 0 !important;
    border-radius: 22px !important;
  }
  body:has(main > .hero) main > .hero .hero-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: clamp(360px, 68svh, 680px) !important;
    object-fit: contain !important;
    border-radius: 22px !important;
    clip-path: inset(0 round 22px) !important;
  }
}
@media (max-width: 600px) {
  body:has(main > .hero) main > .hero {
    padding: calc(var(--nav) + 20px) 17px 34px !important;
  }
  body:has(main > .hero) main > .hero .hero-media {
    margin-top: 24px !important;
    border-radius: 16px !important;
  }
  body:has(main > .hero) main > .hero .hero-media img {
    max-height: 58svh !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
}

/* Apple-like section rhythm: restrained light contrast, clearer dark-mode bands,
   and smooth transitions when the theme changes. */
:root {
  --section-a: #f8f8fa;
  --section-b: #eceef2;
}
html[data-theme="dark"] {
  --section-a: #090a0c;
  --section-b: #17191d;
}
main > .section {
  background-color: var(--section-a);
  transition:
    background-color 700ms cubic-bezier(0.2, 0.75, 0.2, 1),
    color 500ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
main > .section:nth-of-type(2n) {
  background-color: var(--section-b);
}
main > .section:nth-of-type(2n + 1) {
  background-color: var(--section-a);
}
main > .section::after {
  background: linear-gradient(to bottom, transparent, var(--section-a));
  transition: background 700ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
main > .section:nth-of-type(2n)::after {
  background: linear-gradient(to bottom, transparent, var(--section-b));
}
html,
body,
.nav,
.theme,
footer {
  transition:
    background-color 700ms cubic-bezier(0.2, 0.75, 0.2, 1),
    color 500ms cubic-bezier(0.2, 0.75, 0.2, 1),
    border-color 700ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  main > .section,
  main > .section::after,
  html,
  body,
  .nav,
  .theme,
  footer {
    transition: none !important;
  }
}

/* Home hero: remove the media holder entirely; only the rounded image remains visible. */
body:has(main > .hero) main > .hero .hero-media {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
}
body:has(main > .hero) main > .hero .hero-media::before,
body:has(main > .hero) main > .hero .hero-media::after {
  content: none !important;
  display: none !important;
}
body:has(main > .hero) main > .hero .hero-media img {
  background: transparent !important;
}

/* Lower home artwork and image thumbnails: invisible holders, rounded actual media. */
body:has(main > .hero) main > .section .media-wide,
body:has(main > .hero) main > .section .media-wide::before,
body:has(main > .hero) main > .section .media-wide::after,
#art-gallery figure,
#art-gallery figure::before,
#art-gallery figure::after {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
}
body:has(main > .hero) main > .section .media-wide {
  overflow: hidden !important;
  border-radius: 24px !important;
}
body:has(main > .hero) main > .section .media-wide img,
.project > img,
#art-gallery figure img {
  display: block !important;
  border-radius: 24px !important;
  clip-path: inset(0 round 24px) !important;
}
.project > img,
#art-gallery figure img {
  overflow: hidden !important;
}
@media (max-width: 600px) {
  body:has(main > .hero) main > .section .media-wide,
  body:has(main > .hero) main > .section .media-wide img,
  .project > img,
  #art-gallery figure img {
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
}

/* Restore the original, more compact navigation width and spacing. */
.nav-inner {
  max-width: var(--max) !important;
}
.nav-links {
  gap: 25px !important;
}

/* Keep the navigation bar from getting thicker after scrolling. */
body.nav-scrolled .nav {
  height: var(--nav) !important;
}

/* Site-wide section colour reset: restrained neutral bands, no gradients or rainbow-like transitions. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --section-a: #f5f5f7;
  --section-b: #ededf0;
}
html[data-theme="dark"] {
  --bg: #101012;
  --surface: #18181b;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.12);
  --section-a: #101012;
  --section-b: #19191d;
}
body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}
main > .section {
  background: var(--section-a) !important;
  box-shadow: none !important;
  border-top: 0 !important;
  transition:
    background-color 450ms ease,
    color 350ms ease !important;
}
main > .section:nth-of-type(2n) {
  background: var(--section-b) !important;
}
main > .section:nth-of-type(2n + 1) {
  background: var(--section-a) !important;
}
main > .section::before,
main > .section::after {
  content: none !important;
  display: none !important;
}
main > .section + .section {
  box-shadow: none !important;
  border-top: 0 !important;
}
main > .section .section,
main > .section .section:nth-of-type(n) {
  background: transparent !important;
}
.hero {
  background: var(--bg) !important;
}
footer {
  background: var(--bg) !important;
  border-top-color: var(--line) !important;
}
@media (prefers-reduced-motion: reduce) {
  main > .section,
  body,
  footer {
    transition: none !important;
  }
}

/* Projects: align each text block to the top edge of its image and keep a consistent grid. */
main > .section .project {
  align-items: start !important;
}
main > .section .project > img {
  align-self: start !important;
  margin-top: 0 !important;
  transform: none !important;
}
main > .section .project > div {
  align-self: start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
main > .section .project h2 {
  margin-top: 0 !important;
}
@media (min-width: 1201px) {
  main > .section .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: clamp(32px, 5vw, 72px) !important;
  }
  main > .section .project > img {
    width: 100% !important;
  }
  main > .section .project > div {
    max-width: none !important;
  }
}

/* Projects thumbnails: match the Art gallery's rounded-image radius exactly. */
main > .section .project > img {
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
  overflow: hidden !important;
}
@media (max-width: 600px) {
  main > .section .project > img {
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
}

/* Projects: use one centered content grid for every row so left edges stay aligned. */
main > .section .project {
  width: min(100%, 1080px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 1200px) {
  main > .section .project {
    width: 100% !important;
  }
}

/* Fix Projects on tablet-sized Safari viewports: do not stretch alternating rows
   edge-to-edge; keep every row inside the same centered content measure. */
@media (min-width: 601px) and (max-width: 1200px) {
  main > .section .project {
    width: min(100%, 760px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Projects page: wide, centered content with consistent alternating image/text columns. */
main > .section:has(> .project) > .project {
  width: 80% !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 72px) !important;
  align-items: start !important;
  direction: ltr !important;
}
main > .section:has(> .project) > .project > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: 560px !important;
  max-height: none !important;
  min-height: 0 !important;
  align-self: start !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
  transform: none !important;
}
main > .section:has(> .project) > .project > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  direction: ltr !important;
}
main > .section:has(> .project) > .project h2 {
  margin-top: 0 !important;
}
main > .section:has(> .project) > .project:nth-of-type(even) > img {
  grid-column: 2 !important;
}
main > .section:has(> .project) > .project:nth-of-type(even) > div {
  grid-column: 1 !important;
}
@media (max-width: 1200px) {
  main > .section:has(> .project) > .project {
    width: 90% !important;
    column-gap: clamp(22px, 3vw, 42px) !important;
  }
  main > .section:has(> .project) > .project > img {
    height: auto !important;
    max-height: 52svh !important;
    object-fit: contain !important;
  }
}
@media (max-width: 700px) {
  main > .section:has(> .project) > .project {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 22px !important;
    padding: 42px 0 !important;
  }
  main > .section:has(> .project) > .project > img,
  main > .section:has(> .project) > .project:nth-of-type(even) > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 55svh !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
  main > .section:has(> .project) > .project > div,
  main > .section:has(> .project) > .project:nth-of-type(even) > div {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

/* Definitive Projects layout: explicit row classes avoid nth-of-type ambiguity. */
main > .section > .project.project--image-left,
main > .section > .project.project--image-right {
  width: 80% !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 72px) !important;
  align-items: start !important;
  direction: ltr !important;
}
main > .section > .project.project--image-left > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
main > .section > .project.project--image-left > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
main > .section > .project.project--image-right > img {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
main > .section > .project.project--image-right > div {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
main > .section > .project.project--image-left > img,
main > .section > .project.project--image-right > img {
  width: 100% !important;
  height: 560px !important;
  max-height: none !important;
  min-height: 0 !important;
  align-self: start !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
  transform: none !important;
}
main > .section > .project.project--image-left > div,
main > .section > .project.project--image-right > div {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  direction: ltr !important;
}
main > .section > .project.project--image-left h2,
main > .section > .project.project--image-right h2 {
  margin-top: 0 !important;
}
@media (max-width: 1200px) {
  main > .section > .project.project--image-left,
  main > .section > .project.project--image-right {
    width: 90% !important;
    column-gap: clamp(22px, 3vw, 42px) !important;
  }
  main > .section > .project.project--image-left > img,
  main > .section > .project.project--image-right > img {
    height: auto !important;
    max-height: 52svh !important;
    object-fit: contain !important;
  }
}
@media (max-width: 700px) {
  main > .section > .project.project--image-left,
  main > .section > .project.project--image-right {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 22px !important;
    padding: 42px 0 !important;
  }
  main > .section > .project.project--image-left > img,
  main > .section > .project.project--image-right > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 55svh !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
  main > .section > .project.project--image-left > div,
  main > .section > .project.project--image-right > div {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

/* Art gallery repair: preserve each artwork's native aspect ratio; never crop or stretch thumbnails. */
#art-gallery {
  display: block !important;
  column-count: 3 !important;
  column-gap: 16px !important;
  column-fill: balance !important;
}
#art-gallery > figure,
#art-gallery > figure:nth-child(n) {
  display: inline-block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#art-gallery > figure > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: initial !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
@media (max-width: 1200px) {
  #art-gallery {
    column-count: 2 !important;
    column-gap: 14px !important;
  }
  #art-gallery > figure {
    margin-bottom: 14px !important;
  }
}
@media (max-width: 600px) {
  #art-gallery {
    column-count: 2 !important;
    column-gap: 10px !important;
  }
  #art-gallery > figure {
    margin-bottom: 10px !important;
  }
  #art-gallery > figure > img {
    border-radius: 15px !important;
    clip-path: inset(0 round 15px) !important;
  }
}

/* Footer repair: keep the footer's own subtle top edge; separator cleanup applies to page sections, not the footer. */
footer {
  border-top: 1px solid var(--line) !important;
}

/* Definitive footer layout: copyright on the left, role label on the right. */
footer {
  border-top: 1px solid var(--line) !important;
  padding: 30px 24px !important;
}
footer .footer-inner {
  width: 100% !important;
  max-width: var(--max) !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}
footer .footer-inner > div {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.45 !important;
}
footer .footer-inner > div:last-child {
  margin-left: auto !important;
  text-align: right !important;
}
@media (max-width: 600px) {
  footer {
    padding: 22px 17px !important;
  }
  footer .footer-inner {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
  }
  footer .footer-inner > div {
    font-size: 10px !important;
    white-space: nowrap !important;
  }
}

/* HOME PAGE — single authoritative layout override.
   Keep these rules scoped to index.html to avoid changing other pages. */
body.home-page main > .hero {
  width: 100% !important;
  max-width: 1400px !important;
  min-height: min(900px, 100svh) !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: calc(var(--nav) + 48px) clamp(24px, 4vw, 56px) 56px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr) !important;
  align-items: center !important;
  gap: clamp(28px, 3.2vw, 52px) !important;
}
body.home-page main > .hero .hero-copy {
  order: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.home-page main > .hero .hero h1,
body.home-page main > .hero h1 {
  font-size: clamp(58px, 7.2vw, 112px) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.075em !important;
  overflow-wrap: anywhere;
}
body.home-page main > .hero .hero-lead {
  margin-top: clamp(22px, 3vw, 36px) !important;
}
body.home-page main > .hero .hero-sub {
  max-width: 500px !important;
  line-height: 1.55 !important;
}
body.home-page main > .hero .hero-media {
  order: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.home-page main > .hero .hero-media img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(72svh, 760px) !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 22px !important;
  clip-path: inset(0 round 22px) !important;
}
body.home-page main > .section {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(76px, 9vw, 132px) max(24px, calc((100% - 1280px) / 2)) !important;
}
body.home-page main > .section .display {
  max-width: 1120px;
  font-size: clamp(44px, 6.2vw, 88px) !important;
  line-height: 0.98 !important;
}
body.home-page main > .section .media-wide {
  width: 100% !important;
  margin: clamp(28px, 4vw, 56px) auto 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.home-page main > .section .media-wide img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: min(58svh, 620px) !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 22px !important;
  clip-path: inset(0 round 22px) !important;
}
body.home-page main > .section .split {
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
  gap: clamp(32px, 7vw, 100px) !important;
}
body.home-page main > .section .copy p {
  font-size: clamp(16px, 1.35vw, 19px) !important;
  line-height: 1.7 !important;
}
@media (max-width: 800px) {
  body.home-page main > .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: calc(var(--nav) + 34px) 20px 44px !important;
  }
  body.home-page main > .hero .hero-copy {
    order: 0 !important;
    width: 100% !important;
  }
  body.home-page main > .hero h1 {
    font-size: clamp(54px, 12.5vw, 90px) !important;
    line-height: 0.94 !important;
  }
  body.home-page main > .hero .hero-media {
    order: 1 !important;
    width: 100% !important;
    margin: 26px 0 0 !important;
    border-radius: 16px !important;
  }
  body.home-page main > .hero .hero-media img {
    max-height: 58svh !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
  body.home-page main > .section {
    padding: 76px 20px !important;
  }
  body.home-page main > .section .display {
    font-size: clamp(40px, 8.6vw, 64px) !important;
  }
  body.home-page main > .section .media-wide,
  body.home-page main > .section .media-wide img {
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
  }
  body.home-page main > .section .split {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
}
@media (max-width: 420px) {
  body.home-page main > .hero {
    padding-left: 17px !important;
    padding-right: 17px !important;
  }
  body.home-page main > .hero .eyebrow {
    font-size: 11px !important;
  }
  body.home-page main > .hero .hero-lead {
    font-size: 24px !important;
  }
  body.home-page main > .hero .hero-sub {
    font-size: 15px !important;
  }
}

/* Home-page three-image row: identical image dimensions, centered as a group,
   and the same 15px corner radius used by the portfolio thumbnails. */
body.home-page main > .section .home-image-grid {
  width: 100% !important;
  max-width: 1120px !important;
  margin: 36px auto 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 18px !important;
}
body.home-page main > .section .home-image-item {
  min-width: 0 !important;
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.home-page main > .section .home-image-item > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
body.home-page main > .section .home-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--section-b);
  border-radius: 15px;
  font-size: 13px;
}
@media (max-width: 700px) {
  body.home-page main > .section .home-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 28px !important;
  }
  body.home-page main > .section .home-image-item {
    border-radius: 15px !important;
  }
  body.home-page main > .section .home-image-item:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9 !important;
  }
}

/* Keep the See projects link two text lines below the Selected work copy. */
body.home-page .selected-work-section .copy > .link {
  margin-top: calc(2 * 1.45em + 18px) !important;
}

/* Selected Work: put the project link on its own row below the description,
   rather than aligning it beside the heading/copy at desktop widths. */
body.home-page main > .selected-work-section .split {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
}
body.home-page main > .selected-work-section .split > div:first-child {
  width: 100% !important;
}
body.home-page main > .selected-work-section .split > .copy {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  margin-top: clamp(28px, 4vw, 54px) !important;
}
body.home-page main > .selected-work-section .copy > p {
  margin-bottom: 0 !important;
}
body.home-page main > .selected-work-section .copy > .link {
  display: inline-flex !important;
  margin-top: calc(2 * 1.7em + 18px) !important;
}

/* The Selected Work link is a separate full-width row, independent of .copy layout. */
body.home-page main > .selected-work-section .selected-work-link-row {
  display: block !important;
  width: 100% !important;
  align-self: stretch !important;
  margin: calc(2 * 1.7em + 18px) 0 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
body.home-page main > .selected-work-section .selected-work-link-row > .link {
  display: inline-flex !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

/* About page responsive composition:
   wide content: portrait on the left, biography on the right;
   narrow content: portrait first, biography below. */
body.about-page main > .section:first-child > .split {
  display: grid !important;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr) !important;
  grid-template-areas: "portrait biography" !important;
  align-items: center !important;
  gap: clamp(30px, 5vw, 76px) !important;
}
body.about-page main > .section:first-child > .split > .copy {
  grid-area: biography !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.about-page main > .section:first-child > .split > div:last-child {
  grid-area: portrait !important;
  width: 100% !important;
  min-width: 0 !important;
  display: block !important;
}
body.about-page main > .section:first-child > .split > div:last-child img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 700px !important;
  margin: 0 auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 15px !important;
}
@media (max-width: 900px) {
  body.about-page main > .section:first-child > .split {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "portrait"
      "biography" !important;
    gap: 34px !important;
  }
  body.about-page main > .section:first-child > .split > div:last-child {
    max-width: 420px !important;
    margin: 0 auto !important;
  }
  body.about-page main > .section:first-child > .split > div:last-child img {
    max-height: 58svh !important;
  }
}

/* Hide image placeholders in both light and dark themes. */
body.home-page main > .section .home-image-placeholder {
  display: none !important;
}

/* Site-wide rule: placeholders, skeletons and loading indicators stay hidden in every theme. */
[class*="placeholder" i],
[id*="placeholder" i],
[class*="skeleton" i],
[id*="skeleton" i],
[class*="loading" i],
[id*="loading" i],
[class*="loader" i],
[id*="loader" i],
.placeholder,
.skeleton,
.loading,
.loader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Global placeholder suppression: keep placeholders hidden on every page and in both themes. */
:where(
  [class*="placeholder" i],
  [id*="placeholder" i],
  [data-placeholder],
  [aria-placeholder],
  .placeholder,
  .is-placeholder,
  .skeleton,
  [class*="skeleton" i],
  [id*="skeleton" i],
  [data-loading],
  [class*="loading-placeholder" i],
  [class*="placeholder-loading" i]
) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Projects page: one consistent editorial alignment for every project row. */
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right {
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
  margin: 0 auto 72px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 64px) !important;
  align-items: start !important;
  direction: ltr !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left
  > img,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  align-self: start !important;
  margin: 0 !important;
  border-radius: 15px !important;
  clip-path: inset(0 round 15px) !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left
  > div,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  direction: ltr !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project
  h2,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project
  h2 {
  margin-top: 0 !important;
}
@media (max-width: 700px) {
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project.project--image-left,
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project.project--image-right {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 20px !important;
    margin-bottom: 44px !important;
  }
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project
    > img,
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project
    > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
  }
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project
    > div,
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project
    > div {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

/* Projects page: breathing room after intro and alternating image sides on desktop/tablet. */
body:not(.home-page) main > .section > .intro + .project {
  margin-top: 56px !important;
}
body:not(.home-page) main > .section > .project.project--image-left,
body:not(.home-page) main > .section > .project.project--image-right {
  width: 100% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 88px !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 64px) !important;
  align-items: start !important;
}
body:not(.home-page) main > .section > .project.project--image-left > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
body:not(.home-page) main > .section > .project.project--image-left > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
body:not(.home-page) main > .section > .project.project--image-right > img {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
body:not(.home-page) main > .section > .project.project--image-right > div {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
@media (max-width: 700px) {
  body:not(.home-page) main > .section > .intro + .project {
    margin-top: 36px !important;
  }
  body:not(.home-page) main > .section > .project.project--image-left,
  body:not(.home-page) main > .section > .project.project--image-right {
    padding: 0 !important;
    margin-bottom: 52px !important;
  }
}

/* Projects final correction: consistent section background, intro breathing room, true alternating rows. */
body:has(main > .section > .project.project--image-left) main > .section,
body:has(main > .section > .project.project--image-right) main > .section {
  background: var(--section-a) !important;
  padding-bottom: 64px !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .intro
  + .project.project--image-left,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .intro
  + .project.project--image-left {
  margin-top: 64px !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left,
body:has(main > .section > .project.project--right)
  main
  > .section
  > .project.project--image-right,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right,
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-right {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 88px !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 64px) !important;
  align-items: start !important;
  direction: ltr !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left
  > img,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left
  > div,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > img {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > div {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
@media (max-width: 700px) {
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project.project--image-left,
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project.project--image-right {
    width: 100% !important;
    padding: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 20px !important;
    margin-bottom: 52px !important;
  }
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project.project--image-right
    > img,
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project.project--image-left
    > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project.project--image-right
    > div,
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project.project--image-left
    > div {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

/* Projects: each project is its own full-width section with alternating theme-aware backgrounds. */
body:has(main > .section > .project.project--image-left) main > .section,
body:has(main > .section > .project.project--image-right) main > .section {
  padding-bottom: 0 !important;
  background: var(--section-a) !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 64px max(24px, calc((100% - 1232px) / 2)) !important;
  box-sizing: border-box !important;
  background: var(--section-b) !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left:nth-of-type(even),
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right:nth-of-type(even) {
  background: var(--section-a) !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left
  > img,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right
  > img {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  object-fit: cover !important;
}
@media (max-width: 700px) {
  body:has(main > .section > .project.project--image-left)
    main
    > .section
    > .project.project--image-left,
  body:has(main > .section > .project.project--image-right)
    main
    > .section
    > .project.project--image-right {
    padding: 36px 20px 44px !important;
  }
}

/* Full-bleed alternating project bands: background spans the viewport, content stays on the shared grid. */
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  background: transparent !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left::before,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  max-width: 100vw !important;
  transform: translateX(-50%) !important;
  background: var(--section-b) !important;
  pointer-events: none !important;
}
body:has(main > .section > .project.project--image-left)
  main
  > .section
  > .project.project--image-left:nth-of-type(even)::before,
body:has(main > .section > .project.project--image-right)
  main
  > .section
  > .project.project--image-right:nth-of-type(even)::before {
  background: var(--section-a) !important;
}

/* Site-wide placeholder visibility policy: hidden by default in both themes. */
:where(
  [class~="placeholder" i],
  [class*="placeholder-" i],
  [class*="-placeholder" i],
  [id~="placeholder" i],
  [id*="placeholder-" i],
  [id*="-placeholder" i],
  [data-placeholder],
  [data-placeholder="true"],
  [class~="skeleton" i],
  [class*="skeleton-" i],
  [class*="-skeleton" i],
  [class~="loader" i],
  [class*="loader-" i],
  [class*="-loader" i],
  [class~="loading-indicator" i],
  [class~="loading-placeholder" i]
) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* About page: render portrait and copy immediately; avoid the delayed blur/reveal flash on reload. */
body.about-page .split > .reveal,
body.about-page .split > .reveal.on,
body.about-page .split > .copy.reveal,
body.about-page .split > .copy.reveal.on,
body.about-page .split > .reveal > img {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* About portrait: visually blend the white studio backdrop into the page background. */
body.about-page main > .section:first-child > .split > div:last-child {
  background: transparent !important;
  box-shadow: none !important;
}
body.about-page main > .section:first-child > .split > div:last-child img {
  mix-blend-mode: multiply !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* About portrait: use the repository's real transparent PNG. */
body.about-page main > .section:first-child > .split > div:last-child {
  background: transparent !important;
  box-shadow: none !important;
}
body.about-page main > .section:first-child > .split > div:last-child img {
  mix-blend-mode: normal !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

/* About portrait: preserve the black shirt while blending the white studio backdrop. */
body.about-page main > .section:first-child > .split > div:last-child {
  background: transparent !important;
  box-shadow: none !important;
}
body.about-page main > .section:first-child > .split > div:last-child img {
  mix-blend-mode: multiply !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: cover !important;
  border-radius: 26px !important;
}
html[data-theme="dark"]
  body.about-page
  main
  > .section:first-child
  > .split
  > div:last-child
  img {
  mix-blend-mode: normal !important;
}

/* Contact page: accessible icon links for email and social profiles. */
.contact-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.contact-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 64px;
  min-height: 64px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
.contact-social:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface);
}
.contact-social svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-social span {
  font-size: 14px;
  font-weight: 550;
}
.contact-social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (max-width: 480px) {
  .contact-socials {
    gap: 10px;
  }
  .contact-social {
    min-height: 58px;
    padding: 11px 13px;
    border-radius: 15px;
  }
}

/* Brand colors for Contact page icons. */
.contact-social-email svg {
  color: #ea4335;
  stroke: #ea4335;
}
.contact-social-linkedin svg {
  color: #0a66c2;
  stroke: #0a66c2;
}
.contact-social-linkedin svg rect {
  fill: #0a66c2;
  stroke: #0a66c2;
}
.contact-social-linkedin svg path {
  stroke: #fff;
}
.contact-social-instagram svg {
  stroke: url(#instagram-gradient);
}
.contact-social-instagram svg rect,
.contact-social-instagram svg circle,
.contact-social-instagram svg path {
  stroke: url(#instagram-gradient);
}
.contact-social-email:hover {
  border-color: #ea4335;
}
.contact-social-linkedin:hover {
  border-color: #0a66c2;
}
.contact-social-instagram:hover {
  border-color: #e1306c;
}

/* Contact brand marks: double the former 64px icon size. */
.contact-socials {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 42px;
}
.contact-social {
  display: grid;
  place-items: center;
  width: 152px;
  height: 152px;
  min-width: 152px;
  min-height: 152px;
  padding: 8px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
  transition:
    transform 0.25s var(--ease),
    filter 0.25s var(--ease);
}
.contact-social svg,
.contact-social img {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  fill: initial;
  stroke: initial;
  stroke-width: initial;
}
.contact-social span {
  display: none;
}
.contact-social:hover {
  transform: translateY(-5px) scale(1.04);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.16));
  background: transparent;
  border-color: transparent;
}
@media (max-width: 600px) {
  .contact-socials {
    gap: 16px;
  }
  .contact-social {
    width: 112px;
    height: 112px;
    min-width: 112px;
    min-height: 112px;
    padding: 4px;
  }
  .contact-social svg,
  .contact-social img {
    width: 96px;
    height: 96px;
  }
}

/* Official brand image treatments for Contact links. */
.contact-social-email img {
  width: 128px;
  height: 128px;
}
.contact-social-instagram {
  border-radius: 28px;
  background: linear-gradient(
    45deg,
    #ffdc80 0%,
    #fcaf45 22%,
    #f77737 42%,
    #e1306c 66%,
    #833ab4 100%
  );
}
.contact-social-instagram img {
  width: 82px;
  height: 82px;
  filter: brightness(0) invert(1);
}
.contact-social-instagram:hover {
  background: linear-gradient(
    45deg,
    #ffdc80 0%,
    #fcaf45 22%,
    #f77737 42%,
    #e1306c 66%,
    #833ab4 100%
  );
}
@media (max-width: 600px) {
  .contact-social-email img {
    width: 96px;
    height: 96px;
  }
  .contact-social-instagram img {
    width: 64px;
    height: 64px;
  }
}

/* Contact page: use the supplied transparent PNG icons, in mail / LinkedIn / Instagram order. */
.contact-socials {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 42px;
}
.contact-social {
  display: grid;
  place-items: center;
  flex: 0 0 152px;
  width: 152px;
  height: 152px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.contact-social img {
  display: block;
  width: 128px;
  height: 128px;
  max-width: none;
  object-fit: contain;
  filter: none;
}
.contact-social:hover {
  transform: translateY(-3px);
  background: transparent;
  border-color: transparent;
  filter: none;
}
.contact-social-email:hover {
  border-color: transparent;
}
.contact-social-linkedin:hover {
  border-color: transparent;
}
.contact-social-instagram {
  background: transparent;
  border-radius: 0;
}
.contact-social-instagram:hover {
  background: transparent;
}
@media (max-width: 600px) {
  .contact-socials {
    gap: 16px;
    margin-top: 32px;
  }
  .contact-social {
    flex-basis: 112px;
    width: 112px;
    height: 112px;
  }
  .contact-social img {
    width: 96px;
    height: 96px;
  }
}

/* Final Contact icon correction: use each supplied PNG as-is. */
.contact-socials {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 42px;
}
.contact-social {
  flex: 0 1 128px;
  width: 128px;
  height: 128px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.contact-social img {
  display: block;
  width: 128px;
  height: 128px;
  max-width: 100%;
  object-fit: contain;
  filter: none;
}
.contact-social-instagram {
  background: transparent;
  border-radius: 0;
}
.contact-social-instagram img {
  width: 128px;
  height: 128px;
  filter: none;
}
.contact-social:hover,
.contact-social-instagram:hover {
  transform: translateY(-3px);
  background: transparent;
  border-color: transparent;
  filter: none;
}
@media (max-width: 600px) {
  .contact-socials {
    gap: 18px;
    margin-top: 32px;
  }
  .contact-social {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }
  .contact-social img,
  .contact-social-instagram img {
    width: 96px;
    height: 96px;
  }
}

/* Contact icons: preserve the exact uploaded PNG artwork; CSS controls size only. */
.contact-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 42px;
}
.contact-social {
  display: grid;
  place-items: center;
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.contact-social img {
  display: block;
  width: 128px;
  height: 128px;
  max-width: 100%;
  object-fit: contain;
  filter: none;
}
.contact-social-instagram {
  background: transparent;
  border-radius: 0;
}
.contact-social-instagram img {
  width: 128px;
  height: 128px;
  filter: none;
}
.contact-social:hover,
.contact-social-instagram:hover {
  transform: none;
  background: transparent;
  border-color: transparent;
  filter: none;
}
@media (max-width: 600px) {
  .contact-socials {
    gap: 18px;
    margin-top: 32px;
  }
  .contact-social {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }
  .contact-social img,
  .contact-social-instagram img {
    width: 96px;
    height: 96px;
  }
}

/* Contact: enlarge only the visible airplane artwork to match the other icons. */
.contact-social-email img {
  transform: scale(1.3);
  transform-origin: center;
}

/* Contact icon final alignment: enlarge only the visible mail-plane artwork; keep three equal-width slots and equal gaps. */
.contact-socials {
  display: flex !important;
  align-items: center !important;
  gap: 28px !important;
}
.contact-social {
  flex: 0 0 128px !important;
  width: 128px !important;
  height: 128px !important;
}
.contact-social-email img {
  width: 128px !important;
  height: 128px !important;
  transform: scale(1.3) !important;
  transform-origin: center !important;
}
.contact-social-linkedin img {
  transform: translateX(15px) !important;
}
.contact-social-instagram img {
  transform: none !important;
}
@media (max-width: 600px) {
  .contact-socials {
    gap: 18px !important;
  }
  .contact-social {
    flex: 0 0 96px !important;
    width: 96px !important;
    height: 96px !important;
  }
  .contact-social-email img {
    width: 96px !important;
    height: 96px !important;
    transform: scale(1.3) !important;
  }
  .contact-social-linkedin img {
    transform: translateX(10px) !important;
  }
  .contact-social-instagram img {
    transform: none !important;
  }
}

/* Contact icons: equalize the visible edge-to-edge gaps without modifying the supplied PNGs. */
.contact-socials {
  display: grid !important;
  grid-template-columns: repeat(3, 128px) !important;
  column-gap: 28px !important;
  row-gap: 0 !important;
  justify-content: start !important;
  align-items: center !important;
}
.contact-social {
  width: 128px !important;
  height: 128px !important;
  flex: none !important;
  justify-self: center !important;
  align-self: center !important;
}
@media (max-width: 600px) {
  .contact-socials {
    grid-template-columns: repeat(3, 96px) !important;
    column-gap: 18px !important;
  }
  .contact-social {
    width: 96px !important;
    height: 96px !important;
  }
}

/* Contact page: balance visible gaps by shifting the LinkedIn artwork right slightly. */
.contact-social-linkedin img {
  transform: translateX(15px) !important;
}
@media (max-width: 600px) {
  .contact-social-linkedin img {
    transform: translateX(10px) !important;
  }
}

/* Contact icons: correct visible edge spacing; shift LinkedIn left to balance both gaps. */
.contact-social-linkedin img {
  transform: translateX(-13px) !important;
}
@media (max-width: 600px) {
  .contact-social-linkedin img {
    transform: translateX(-8px) !important;
  }
}

/* Roll back experimental horizontal shifts: keep all Contact icons centered in their own slots. */
.contact-social-linkedin img {
  transform: none !important;
}

/* Contact icons: small optical correction for equal visible edge gaps. */
.contact-social-linkedin img {
  transform: translateX(3.5px) !important;
}
@media (max-width: 600px) {
  .contact-social-linkedin img {
    transform: translateX(2.5px) !important;
  }
}

/* Minimal shared footer: consistent desktop/mobile structure and theme-aware colors. */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.footer-brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-copyright {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.footer-made {
  font-size: 13px;
  white-space: nowrap;
}
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: clamp(12px, 2.1vw, 28px);
}
.footer-nav a {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.footer-nav a:hover,
.footer-actions a:hover {
  opacity: 0.62;
}
.footer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.footer-actions a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.footer-actions svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: currentColor;
}
.footer-actions .footer-top {
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.footer-actions .footer-top svg {
  width: 22px;
  height: 22px;
  fill: none;
}
@media (max-width: 1000px) {
  .site-footer .footer-inner {
    flex-wrap: wrap;
    row-gap: 22px;
  }
  .footer-brand {
    flex: 1 1 auto;
  }
  .footer-actions {
    border-left: 0;
    padding-left: 0;
  }
  .footer-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  .site-footer {
    padding: 28px 22px;
  }
  .site-footer .footer-inner {
    gap: 20px 12px;
  }
  .footer-copyright {
    font-size: 15px;
  }
  .footer-made {
    font-size: 12px;
  }
  .footer-actions {
    gap: 12px;
  }
  .footer-actions a {
    width: 26px;
  }
  .footer-actions svg {
    width: 23px;
    height: 23px;
  }
  .footer-actions .footer-top {
    width: 38px;
    height: 38px;
  }
  .footer-nav {
    gap: 14px 20px;
    justify-content: center;
    padding-top: 20px;
  }
  .footer-nav a {
    font-size: 13px;
  }
}





/* Align the How I Work heading vertically with the robot's visual center. */
body.about-page .how-work-section .how-work-layout > .copy {
  align-self: center !important;
  padding-top: 100px !important;
}
@media (max-width: 900px) {
  body.about-page .how-work-section .how-work-layout > .copy {
    padding-top: 64px !important;
  }
}
@media (max-width: 680px) {
  body.about-page .how-work-section .how-work-layout > .copy {
    align-self: start !important;
    padding-top: 0 !important;
  }
}

/* About — How I work: balanced text/robot composition */
body.about-page .how-work-section {
  padding-top: clamp(76px, 8vw, 112px) !important;
  padding-bottom: clamp(76px, 8vw, 112px) !important;
  overflow: visible !important;
}
body.about-page .how-work-section .how-work-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr) !important;
  align-items: center !important;
  gap: clamp(28px, 4vw, 64px) !important;
  min-height: 0 !important;
  overflow: visible !important;
}
body.about-page .how-work-section .how-work-layout > .copy {
  align-self: start !important;
  padding: clamp(18px, 3vw, 42px) 0 0 !important;
  position: relative !important;
  z-index: 1 !important;
}
body.about-page .how-work-section .how-work-visual {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(2.5%, -24px) !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.about-page .how-work-section .how-work-robot {
  display: block !important;
  flex: 0 1 auto !important;
  width: auto !important;
  height: clamp(600px, 68vw, 820px) !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  mix-blend-mode: multiply !important;
}
html[data-theme="dark"] body.about-page .how-work-section .how-work-robot {
  mix-blend-mode: lighten !important;
}
@media (min-width: 1500px) {
  body.about-page .how-work-section .how-work-robot {
    height: min(76vh, 860px) !important;
  }
}
@media (max-width: 900px) {
  body.about-page .how-work-section {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
  body.about-page .how-work-section .how-work-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  body.about-page .how-work-section .how-work-layout > .copy {
    padding-top: 12px !important;
  }
  body.about-page .how-work-section .how-work-visual {
    transform: translate(2%, -10px) !important;
  }
  body.about-page .how-work-section .how-work-robot {
    height: min(68vw, 680px) !important;
  }
}
@media (max-width: 680px) {
  body.about-page .how-work-section {
    padding-top: 58px !important;
    padding-bottom: 48px !important;
  }
  body.about-page .how-work-section .how-work-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  body.about-page .how-work-section .how-work-layout > .copy {
    padding: 0 !important;
  }
  body.about-page .how-work-section .how-work-visual {
    justify-content: center !important;
    transform: translate(1%, -4px) !important;
    margin-top: -4px !important;
  }
  body.about-page .how-work-section .how-work-robot {
    height: min(78svh, 620px) !important;
    max-width: 100% !important;
  }
}
@media (max-width: 420px) {
  body.about-page .how-work-section .how-work-robot {
    height: min(70svh, 540px) !important;
  }
}


/* Final override: fine-tune heading position beside the centered robot. */
@media (min-width: 901px) {
  body.about-page .how-work-section .how-work-layout > .copy {
    align-self: center !important;
    padding-top: 48px !important;
  }
}
@media (min-width: 681px) and (max-width: 900px) {
  body.about-page .how-work-section .how-work-layout > .copy {
    align-self: center !important;
    padding-top: 32px !important;
  }
}
@media (max-width: 680px) {
  body.about-page .how-work-section .how-work-layout > .copy {
    align-self: start !important;
    padding-top: 0 !important;
  }
}


/* --- Responsive hardening: preserve layout, remove robot shadow --- */

/* Keep the original robot artwork untouched; remove all CSS-generated shadows. */
html body.about-page main > .how-work-section,
html body.about-page main > .how-work-section .how-work-layout,
html body.about-page main > .how-work-section .how-work-visual {
  overflow: visible !important;
  clip-path: none !important;
  contain: none !important;
}
html body.about-page main > .how-work-section .how-work-visual {
  position: relative !important;
  min-width: 0 !important;
  isolation: auto !important;
  box-shadow: none !important;
}
html body.about-page main > .how-work-section .how-work-visual::before {
  content: none !important;
  display: none !important;
}
html body.about-page main > .how-work-section .how-work-robot {
  filter: none !important;
  box-shadow: none !important;
}

/* Prevent grid and flex children from forcing horizontal overflow. */
.split > *,
.project > *,
.resume-grid > *,
.how-work-layout > *,
.nav-inner > *,
.site-footer .footer-inner > * {
  min-width: 0;
}

/* Give the desktop navigation and two-column layouts breathing room on laptops. */
@media (min-width: 801px) and (max-width: 1100px) {
  .nav-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .nav-links {
    gap: clamp(10px, 1.35vw, 18px);
  }
  .nav-links a {
    font-size: 11px;
  }
  .split,
  .resume-grid {
    gap: clamp(28px, 4vw, 48px);
  }
  .project {
    gap: clamp(28px, 4vw, 48px);
    min-height: 0;
  }
  .project img {
    height: clamp(360px, 42vw, 500px);
  }
}

/* Tablet: retain two columns where they fit, but avoid oversized project imagery. */
@media (min-width: 681px) and (max-width: 900px) {
  .split,
  .resume-grid {
    gap: 28px;
  }
  .project {
    gap: 26px;
    padding: 76px 0;
  }
  .project img {
    height: clamp(340px, 48vw, 460px);
  }
  .how-work-section .how-work-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
  }
  .how-work-section .how-work-robot {
    max-width: 100% !important;
    height: min(68vw, 620px) !important;
  }
}

/* Phones: keep the heading first, the full robot visible beneath it, and no shadow. */
@media (max-width: 680px) {
  html body.about-page main > .how-work-section {
    padding: 58px 20px 48px !important;
    overflow: visible !important;
  }
  html body.about-page main > .how-work-section .how-work-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100%;
  }
  html body.about-page main > .how-work-section .how-work-layout > .copy {
    padding: 0 !important;
    align-self: start !important;
  }
  html body.about-page main > .how-work-section .how-work-visual {
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  html body.about-page main > .how-work-section .how-work-robot {
    width: auto !important;
    height: min(76svh, 600px) !important;
    max-width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 420px) {
  html body.about-page main > .how-work-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  html body.about-page main > .how-work-section .how-work-robot {
    height: min(70svh, 520px) !important;
  }
}

/* Keep motion preferences and narrow viewport behavior predictable. */
@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav-links a,
  .brand,
  .theme,
  .project,
  .project img,
  .gallery figure,
  .gallery img,
  .skill,
  .link {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* About portrait: show the complete transparent artwork on portrait and landscape phones. */
html body.about-page main > .section:first-child > .split > div:last-child {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  align-self: start !important;
}
html body.about-page main > .section:first-child > .split > div:last-child img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center top !important;
  transform: none !important;
  border-radius: 0 !important;
}
@media (max-width: 900px) {
  html body.about-page main > .section:first-child > .split > div:last-child {
    width: 100% !important;
    max-width: 460px !important;
    margin: 0 auto !important;
  }
  html body.about-page main > .section:first-child > .split > div:last-child img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
@media (orientation: landscape) and (max-width: 900px) {
  html body.about-page main > .section:first-child {
    padding-top: calc(var(--nav) + 24px) !important;
  }
  html body.about-page main > .section:first-child > .split > div:last-child {
    max-width: 300px !important;
  }
}


/* About page: keep the navigation bar and section bands full-bleed in landscape too. */
html body.about-page > header.nav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
html body.about-page > header.nav > .nav-inner {
  width: 100% !important;
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body.about-page > main {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
html body.about-page > main > .section {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
html body.about-page > main > .how-work-section {
  position: relative !important;
  isolation: isolate !important;
  background: var(--section-b) !important;
}
html body.about-page > main > .how-work-section::before {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  max-width: 100vw !important;
  transform: translateX(-50%) !important;
  background: var(--section-b) !important;
  pointer-events: none !important;
}


/* =========================================================
   Unified layout system — shared geometry across all pages
   ========================================================= */
:root {
  --site-content-max: 1280px;
  --site-nav-content-max: 1400px;
  --site-gutter: clamp(20px, 3.2vw, 48px);
  --site-section-space: clamp(76px, 8vw, 128px);
  --site-section-space-mobile: clamp(52px, 9vw, 76px);
  --site-page-top: clamp(132px, 13vw, 180px);
}
html {
  overflow-x: clip;
}
body {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}
html body > header.nav {
  position: fixed !important;
  inset: 0 0 auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  height: var(--nav) !important;
}
html body > header.nav > .nav-inner {
  width: 100% !important;
  max-width: var(--site-nav-content-max) !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  padding-inline: var(--site-gutter) !important;
}
html body.nav-scrolled > header.nav {
  height: 58px !important;
}
html body > main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
}
html body > main > .section {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
  padding-inline: max(var(--site-gutter), calc((100vw - var(--site-content-max)) / 2 + 24px)) !important;
}
html body > main > .section > :where(.split, .resume-grid, .gallery, .contact, .projects-intro-inner) {
  width: 100%;
  max-width: var(--site-content-max);
  margin-inline: auto;
}
html body > main > .section > .split,
html body > main > .section > .resume-grid {
  min-width: 0;
}
html body > main > .section > .split > *,
html body > main > .section > .resume-grid > * {
  min-width: 0;
}

/* Consistent top offset for interior-page opening sections. */
html body.about-page > main > .page-intro-section,
html body:not(.home-page):not(.about-page):not(.contact-page) > main > .page-intro-section {
  padding-top: var(--site-page-top) !important;
}

/* Keep section backgrounds full-bleed while the content follows the same grid. */
html body > main > .section {
  background-clip: border-box;
}
html body > main > .section::before,
html body > main > .section::after {
  pointer-events: none;
}
html body > main > .section > .project {
  max-width: var(--site-content-max);
  margin-inline: auto;
}

/* Shared responsive spacing and geometry. */
@media (max-width: 900px) {
  :root {
    --site-gutter: 24px;
    --site-page-top: 132px;
  }
  html body > header.nav > .nav-inner {
    padding-inline: var(--site-gutter) !important;
  }
  html body > main > .section {
    padding-inline: var(--site-gutter) !important;
  }
}
@media (max-width: 600px) {
  :root {
    --site-gutter: 20px;
    --site-page-top: 112px;
  }
  html body > header.nav > .nav-inner {
    padding-inline: var(--site-gutter) !important;
  }
  html body > main > .section {
    padding-inline: var(--site-gutter) !important;
  }
  html body > main > .section:not(.contact) {
    scroll-margin-top: var(--nav);
  }
}
/* Landscape phones: use compact top spacing, but never constrain full-width bands. */
@media (orientation: landscape) and (max-width: 900px) {
  :root {
    --site-gutter: clamp(20px, 3vw, 32px);
    --site-page-top: 92px;
  }
  html body > header.nav {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
  html body > main > .section {
    width: 100% !important;
    max-width: none !important;
  }
}
/* Tablet and desktop content remains centered on one shared maximum-width grid. */
@media (min-width: 901px) {
  html body > main > .section > .split,
  html body > main > .section > .resume-grid,
  html body > main > .section > .gallery {
    max-width: var(--site-content-max);
    margin-inline: auto;
  }
}


/* Pharmaton project portrait: prioritize the upper part of the tall photo. */
html body > main > .projects-list > article:nth-child(3) > img {
  object-position: center top !important;
}


/* Disable the full-screen page-transition curtain: it could leave links black
   and interfere with browser Back navigation on mobile Safari. */
html body::before {
  display: none !important;
  animation: none !important;
  pointer-events: none !important;
}


/* Projects page: final layout override — the explicit row classes are the
   source of truth; later legacy rules must not force every image into column 1. */
html body > main > .projects-list > article.project--image-left {
  direction: ltr !important;
}
html body > main > .projects-list > article.project--image-left > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
html body > main > .projects-list > article.project--image-left > div {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
html body > main > .projects-list > article.project--image-right {
  direction: ltr !important;
}
html body > main > .projects-list > article.project--image-right > img {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
html body > main > .projects-list > article.project--image-right > div {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
@media (max-width: 700px) {
  html body > main > .projects-list > article.project--image-left > img,
  html body > main > .projects-list > article.project--image-right > img,
  html body > main > .projects-list > article.project--image-left > div,
  html body > main > .projects-list > article.project--image-right > div {
    grid-column: 1 !important;
  }
  html body > main > .projects-list > article.project--image-left > img,
  html body > main > .projects-list > article.project--image-right > img {
    grid-row: 1 !important;
  }
  html body > main > .projects-list > article.project--image-left > div,
  html body > main > .projects-list > article.project--image-right > div {
    grid-row: 2 !important;
  }
}


/* Projects spacing regression fix: neutralize legacy .project min-height,
   large vertical padding, and per-row bottom margins on this page only. */
html body > main > section.projects-list {
  padding-top: 24px !important;
  padding-bottom: 48px !important;
}
html body > main > section.projects-list > article.project {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: clamp(44px, 5vw, 68px) 0 !important;
  border-top: 1px solid var(--line) !important;
  align-items: center !important;
}
html body > main > section.projects-list > article.project:first-child {
  border-top: 0 !important;
}
html body > main > section.projects-list > article.project > img {
  height: clamp(320px, 39vw, 500px) !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
}
@media (max-width: 700px) {
  html body > main > section.projects-list {
    padding-top: 12px !important;
    padding-bottom: 24px !important;
  }
  html body > main > section.projects-list > article.project {
    min-height: 0 !important;
    padding: 34px 0 !important;
    margin: 0 auto !important;
    row-gap: 22px !important;
  }
  html body > main > section.projects-list > article.project > img {
    height: auto !important;
    max-height: 58svh !important;
    aspect-ratio: 4 / 3 !important;
  }
}
