@import url("https://fonts.googleapis.com/css2?family=Cutive+Mono&family=DM+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --bg-2: #eaf1f8;
  --panel: rgba(255, 255, 255, 0.48);
  --panel-strong: rgba(255, 255, 255, 0.7);
  --text: #1e3042;
  --headline: #53677c;
  --muted: #354b61;
  --line: rgba(29, 54, 82, 0.12);
  --accent: #ff9a3d;
  --accent-soft: rgba(255, 154, 61, 0.13);
  --accent-rgb: 255, 154, 61;
  --shadow: 0 22px 70px rgba(30, 58, 92, 0.1);
  --radius: 8px;
  font-family: "Cutive Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 46px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(var(--accent-rgb), 0.08), transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 46%, #eef4fa 100%);
  color: var(--text);
  letter-spacing: 0;
  transition: background-color 780ms ease, color 420ms ease;
}

body::before {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 35;
  height: min(14vh, 118px);
  pointer-events: none;
  content: "";
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(250, 253, 255, 0.92), rgba(250, 253, 255, 0.42) 52%, transparent),
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.05), transparent 62%);
  backdrop-filter: blur(8px);
  mask-image: linear-gradient(180deg, #000 52%, transparent);
  transition: opacity 280ms ease;
}

body.has-scrolled::before {
  opacity: 1;
}

body::after {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  height: min(13vh, 112px);
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(245, 248, 252, 0.32) 58%, rgba(245, 248, 252, 0.82));
  backdrop-filter: blur(8px);
  mask-image: linear-gradient(180deg, transparent, #000 52%);
}

body.is-leaving {
  cursor: progress;
}

body[data-page="about"] {
  --accent: #7cc7ff;
  --accent-soft: rgba(124, 199, 255, 0.12);
  --accent-rgb: 124, 199, 255;
}

body[data-page="projects"] {
  --accent: #8be6bd;
  --accent-soft: rgba(139, 230, 189, 0.12);
  --accent-rgb: 139, 230, 189;
}

body[data-page="gallery"] {
  --accent: #c9a8ff;
  --accent-soft: rgba(201, 168, 255, 0.12);
  --accent-rgb: 201, 168, 255;
}

body[data-page="contact"] {
  --accent: #ffb86b;
  --accent-soft: rgba(255, 184, 107, 0.12);
  --accent-rgb: 255, 184, 107;
}

#ambient {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0.34;
}

.cursor-trail {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pixel-field {
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 68px);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), transparent 34%),
    rgba(231, 239, 247, 0.92);
  backdrop-filter: blur(18px);
  transition: background 780ms ease, border-color 780ms ease;
}

.page-shell,
.site-footer {
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 700;
  color: var(--headline);
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.13), rgba(255, 255, 255, 0.88));
  color: rgb(var(--accent-rgb));
  font-size: 0.84rem;
}

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

.site-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: clamp(18px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), transparent 56%),
    rgba(248, 251, 255, 0.96);
  box-shadow: 0 18px 48px rgba(30, 58, 92, 0.12);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 260ms ease, transform 260ms ease, visibility 0s linear 260ms;
}

.site-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.site-nav a {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  font-family: "DM Mono", ui-monospace, monospace;
  transition: color 340ms ease, background 340ms ease, border-color 340ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(var(--accent-rgb), 0.105);
  color: var(--text);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.64);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0;
  background: currentColor;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100vh - 86px);
  margin: 0 auto;
  padding: 132px 0 70px;
}

.hero-page {
  padding-bottom: 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 82px);
  min-height: calc(100vh - 250px);
}

.hero-copy {
  width: 100%;
  max-width: none;
}

.hero-portrait {
  width: min(100%, 350px);
  aspect-ratio: 1;
  justify-self: end;
  margin-right: clamp(0px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 24px 70px rgba(30, 58, 92, 0.16);
  opacity: 0.9;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

@media (min-width: 981px) {
  .site-nav {
    top: 50%;
    right: calc(clamp(18px, 5vw, 68px) + 54px);
    flex-direction: row;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: translate(14px, -50%);
  }

  .site-nav.open {
    transform: translate(0, -50%);
  }

  .site-nav a {
    width: auto;
  }

  .hero-portrait-mobile {
    display: none;
  }

  .hero.portfolio-section > .hero-portrait-desktop {
    position: absolute;
    top: 82px;
    right: calc(clamp(20px, 4vw, 56px) + 32px);
    width: min(280px, 24vw);
    margin: 0;
  }

  .hero-copy > .eyebrow,
  .hero-copy > h1,
  .hero-copy > .hero-text {
    max-width: 720px;
  }
}

.portfolio-section {
  position: relative;
  min-height: calc(100vh - 46px);
  display: grid;
  align-content: start;
  padding: clamp(82px, 11vh, 118px) clamp(18px, 3.4vw, 44px) clamp(48px, 8vh, 82px);
  border-top: 0;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(var(--section-rgb, var(--accent-rgb)), 0.11), transparent 44%),
    radial-gradient(ellipse at 86% 72%, rgba(var(--section-rgb, var(--accent-rgb)), 0.07), transparent 48%);
  scroll-margin-top: 46px;
  overflow: hidden;
}

.portfolio-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(var(--section-rgb, var(--accent-rgb)), 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(var(--section-rgb, var(--accent-rgb)), 0.035) 0 1px, transparent 1px 82px);
  opacity: 0.14;
  transform: translateX(-18%);
  animation: sectionDrift 14s linear infinite;
}

.portfolio-section > * {
  position: relative;
  z-index: 1;
}

.portfolio-section:first-child {
  border-top: 0;
  padding-inline: clamp(18px, 3.4vw, 44px);
}

.section-warm {
  --section-rgb: 255, 154, 61;
}

.section-blue {
  --section-rgb: 124, 199, 255;
}

.section-green {
  --section-rgb: 139, 230, 189;
}

.section-violet {
  --section-rgb: 201, 168, 255;
}

.section-rose {
  --section-rgb: 244, 138, 199;
}

.section-cyan {
  --section-rgb: 91, 214, 255;
}

.section-amber {
  --section-rgb: 255, 184, 107;
}

.section-heading {
  width: min(920px, 100%);
  margin-bottom: clamp(22px, 4vh, 38px);
}

.section-heading h2 {
  max-width: 780px;
  font-size: clamp(1.35rem, 2.45vw, 2.25rem);
}

.section-heading p:not(.eyebrow) {
  max-width: 720px;
}

.section-heading.with-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

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

.info-panel {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(29, 54, 82, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 22px 70px rgba(30, 58, 92, 0.1);
  backdrop-filter: blur(8px);
}

.info-panel::after,
.project-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(120deg, transparent, rgba(var(--section-rgb, var(--accent-rgb)), 0.13), transparent);
  opacity: 0;
  transform: translateX(-70%);
}

.section-in-view .info-panel::after,
.section-in-view .project-card::after {
  animation: panelSweep 1300ms ease 180ms both;
}

.section-index,
.section-symbol {
  display: inline-block;
  margin-bottom: 34px;
  color: rgb(var(--section-rgb, var(--accent-rgb)));
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: clamp(1.35rem, 3.4vw, 3.2rem);
  font-weight: 600;
}

.section-symbol {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.22);
  border-radius: 8px;
  background: rgba(var(--section-rgb, var(--accent-rgb)), 0.055);
  font-size: 1.25rem;
  line-height: 1;
}

.section-symbol::before,
.section-symbol::after {
  position: absolute;
  content: "";
}

.symbol-campus::before {
  width: 22px;
  height: 14px;
  border-right: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-bottom: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-left: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  transform: translateY(5px);
}

.symbol-campus::after {
  width: 26px;
  height: 2px;
  background: rgb(var(--section-rgb, var(--accent-rgb)));
  box-shadow:
    0 -8px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.42),
    0 8px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.42);
}

.symbol-orbit::before {
  width: 26px;
  height: 16px;
  border: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-radius: 999px;
  transform: rotate(-22deg);
}

.symbol-orbit::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--section-rgb, var(--accent-rgb)));
  box-shadow: 13px -5px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.36);
  transform: translate(-9px, 4px);
}

.symbol-stack::before {
  width: 24px;
  height: 18px;
  border-top: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-bottom: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  background:
    linear-gradient(90deg, rgb(var(--section-rgb, var(--accent-rgb))) 0 2px, transparent 2px 8px, rgb(var(--section-rgb, var(--accent-rgb))) 8px 10px, transparent 10px);
}

.symbol-stack::after {
  width: 24px;
  height: 2px;
  background: rgba(var(--section-rgb, var(--accent-rgb)), 0.42);
}

.symbol-frame::before {
  width: 25px;
  height: 19px;
  border: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-radius: 5px;
}

.symbol-frame::after {
  width: 13px;
  height: 13px;
  border-top: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-right: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  transform: translate(5px, -5px) rotate(18deg);
}

.symbol-bolt::before {
  width: 16px;
  height: 24px;
  background: rgb(var(--section-rgb, var(--accent-rgb)));
  clip-path: polygon(48% 0, 100% 0, 62% 42%, 100% 42%, 28% 100%, 44% 56%, 0 56%);
}

.symbol-bolt::after {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.28);
  border-radius: 50%;
}

.symbol-network::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--section-rgb, var(--accent-rgb)));
  box-shadow:
    17px -8px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.8),
    19px 11px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.55),
    -7px 12px 0 rgba(var(--section-rgb, var(--accent-rgb)), 0.66);
}

.symbol-network::after {
  width: 28px;
  height: 20px;
  border-top: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.5);
  border-right: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.42);
  border-bottom: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.34);
  transform: rotate(-18deg);
}

.symbol-satellite::before {
  width: 10px;
  height: 10px;
  border: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-radius: 3px;
  transform: rotate(45deg);
}

.symbol-satellite::after {
  width: 30px;
  height: 12px;
  border-right: 8px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.5);
  border-left: 8px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.5);
  transform: rotate(45deg);
}

.symbol-robot::before {
  width: 24px;
  height: 18px;
  border: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-radius: 6px;
  background:
    radial-gradient(circle at 32% 45%, rgb(var(--section-rgb, var(--accent-rgb))) 0 2px, transparent 2.5px),
    radial-gradient(circle at 68% 45%, rgb(var(--section-rgb, var(--accent-rgb))) 0 2px, transparent 2.5px);
}

.symbol-robot::after {
  width: 12px;
  height: 8px;
  border-top: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-left: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  transform: translateY(-17px) rotate(45deg);
}

.symbol-signal::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--section-rgb, var(--accent-rgb)));
  transform: translate(-10px, 9px);
}

.symbol-signal::after {
  width: 28px;
  height: 28px;
  border-top: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-right: 2px solid rgb(var(--section-rgb, var(--accent-rgb)));
  border-radius: 50%;
  box-shadow: 6px -6px 0 -4px rgba(var(--section-rgb, var(--accent-rgb)), 0.42);
  transform: translate(2px, -2px) rotate(12deg);
}

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

.section-timeline div {
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.section-timeline div:last-child {
  border-right: 0;
}

.section-carousel {
  --carousel-gap: 16px;
  --carousel-card-width: 360px;
  display: block;
  overflow: hidden;
  padding: 3px 0 16px;
  scrollbar-width: none;
}

.section-carousel.is-auto {
  cursor: default;
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  align-items: stretch;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.section-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  flex: 0 0 var(--carousel-card-width);
  width: var(--carousel-card-width);
}

.carousel-controls {
  display: inline-flex;
  gap: 8px;
}

.carousel-controls button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.2);
  border-radius: 8px;
  background: rgba(var(--section-rgb, var(--accent-rgb)), 0.08);
  color: var(--text);
  font-size: 1.45rem;
  cursor: pointer;
  transition: background 300ms ease, border-color 300ms ease;
}

.carousel-controls button:hover {
  border-color: rgba(var(--section-rgb, var(--accent-rgb)), 0.38);
  background: rgba(var(--section-rgb, var(--accent-rgb)), 0.07);
}

.gallery-carousel .gallery-item {
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-align: left;
}

.gallery-carousel .gallery-item img {
  width: 100%;
  flex: 0 0 auto;
  height: 230px;
  min-height: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px;
}

.gallery-copy h3 {
  margin-bottom: 8px;
}

.gallery-copy p:last-child {
  margin-bottom: 0;
}

.gallery-switcher {
  display: inline-flex;
  gap: 8px;
  margin: -12px 0 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.gallery-switcher button {
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 260ms ease, color 260ms ease;
}

.gallery-switcher button.active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text);
}

.gallery-panels {
  display: grid;
}

.gallery-panels .gallery-carousel {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.gallery-panels .gallery-carousel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes sectionDrift {
  to {
    transform: translateX(18%);
  }
}

@keyframes panelSweep {
  0% {
    opacity: 0;
    transform: translateX(-70%);
  }

  35% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateX(70%);
  }
}

.section-in-view .project-card img,
.section-in-view .gallery-item img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.035);
}

.portfolio-section.section-in-view .section-heading,
.portfolio-section.section-in-view .info-panel,
.portfolio-section.section-in-view .section-timeline div,
.portfolio-section.section-in-view .carousel-card,
.portfolio-section.section-in-view .contact-form,
.portfolio-section.section-in-view .contact-card,
.portfolio-section.section-in-view .hero-panel {
  animation: sectionReveal 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portfolio-section.section-in-view .carousel-card:nth-child(4) {
  animation-delay: 270ms;
}

.portfolio-section.section-in-view .info-panel:nth-child(2),
.portfolio-section.section-in-view .section-timeline div:nth-child(2),
.portfolio-section.section-in-view .carousel-card:nth-child(2),
.portfolio-section.section-in-view .contact-card {
  animation-delay: 90ms;
}

.portfolio-section.section-in-view .info-panel:nth-child(3),
.portfolio-section.section-in-view .section-timeline div:nth-child(3),
.portfolio-section.section-in-view .carousel-card:nth-child(3) {
  animation-delay: 180ms;
}

@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.page-intro,
.panel,
.project-card,
.prompt,
.contact-form,
.contact-card {
  min-width: 0;
}

.eyebrow,
.tag {
  margin: 0 0 14px;
  color: rgb(var(--accent-rgb));
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  color: var(--headline);
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(2rem, 3.9vw, 3.85rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 10px;
  color: var(--headline);
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(1.08rem, 1.55vw, 1.45rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  color: var(--headline);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 400;
}

p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.64;
  overflow-wrap: anywhere;
}

.hero-text,
.page-intro p {
  max-width: 740px;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions .button {
  border-color: rgba(var(--accent-rgb), 0.22) !important;
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--headline) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.09) !important;
}

.hero-actions .button:hover {
  border-color: rgba(var(--accent-rgb), 0.36) !important;
  background: rgba(var(--accent-rgb), 0.12) !important;
  box-shadow: 0 12px 36px rgba(var(--accent-rgb), 0.12), inset 0 0 0 1px rgba(var(--accent-rgb), 0.12) !important;
}

.skill-ticker {
  position: relative;
  width: auto;
  max-width: none;
  margin: 28px clamp(18px, 3.4vw, 44px) 0 0;
  overflow: hidden;
  border-top: 1px solid rgba(var(--accent-rgb), 0.36);
  border-bottom: 1px solid rgba(29, 54, 82, 0.1);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding: 13px 0;
  animation: tickerMove 28s linear infinite;
}

.ticker-track span {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #20334a;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

@keyframes tickerMove {
  to {
    transform: translateX(-50%);
  }
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 700;
  text-decoration: none;
  transition: transform 260ms ease, border-color 420ms ease, background 420ms ease, color 420ms ease, box-shadow 420ms ease;
}

.button:hover,
.prompt:hover,
.gallery-item:hover,
.project-card:hover {
  transform: translateY(-3px);
}

.primary {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.primary:hover {
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 12px 36px rgba(var(--accent-rgb), 0.12), inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.ghost,
.quiet {
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
}

.ghost:hover,
.quiet:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.34);
}

.quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.hero-panel,
.panel,
.timeline,
.contact-card,
.contact-form,
.prompt {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(30, 58, 92, 0.1);
  backdrop-filter: blur(10px);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
}

.metric {
  min-height: 152px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.36);
}

.metric.wide {
  grid-column: 1 / -1;
}

.metric span {
  display: block;
  margin-bottom: 12px;
  color: rgb(var(--accent-rgb));
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 2.35rem;
  font-weight: 700;
}

.home-prompts,
.split-layout,
.contact-layout {
  display: grid;
  gap: 18px;
}

.home-prompts {
  grid-template-columns: 1fr;
  margin-top: clamp(48px, 9vh, 96px);
  gap: 0;
  padding: clamp(22px, 5vh, 58px) 0 22vh;
}

.prompt {
  position: sticky;
  top: clamp(88px, 16vh, 132px);
  min-height: clamp(390px, 54vh, 520px);
  margin: 0 0 clamp(28px, 5vh, 56px);
  padding: clamp(28px, 5vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  transition: transform 260ms ease, border-color 420ms ease, background 420ms ease, box-shadow 420ms ease;
  transform-origin: center top;
  will-change: transform, filter;
  backface-visibility: hidden;
}

.prompt:hover {
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.025);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.prompt span,
.timeline span {
  display: inline-block;
  margin-bottom: auto;
  color: rgb(var(--accent-rgb));
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  font-weight: 700;
  line-height: 0.9;
}

.timeline span {
  margin-bottom: 18px;
  font-size: 1rem;
}

.page-intro {
  max-width: 930px;
  margin-bottom: 34px;
}

.split-layout,
.contact-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
}

.panel,
.contact-form,
.contact-card {
  padding: clamp(22px, 4vw, 34px);
}

.timeline {
  display: grid;
  margin-top: 18px;
  overflow: hidden;
}

.timeline div {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.timeline div:last-child {
  border-bottom: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.016);
  color: var(--muted);
  cursor: pointer;
  transition: background 420ms ease, border-color 420ms ease, color 420ms ease;
}

.filter.active {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.045);
  color: var(--text);
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  transition: opacity 260ms ease, transform 260ms ease, border-color 420ms ease, box-shadow 420ms ease;
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 24px 72px rgba(30, 58, 92, 0.14);
}

.project-card.is-hidden {
  display: none;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 900ms ease, filter 900ms ease;
}

.project-card div {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px;
}

.project-card h2 {
  font-size: 1.15rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  cursor: pointer;
  transition: transform 260ms ease, border-color 420ms ease;
}

.gallery-item:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
  transform: scale(1.01);
  transition: transform 900ms ease, filter 900ms ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
  text-align: left;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.contact-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.34);
}

.contact-card {
  align-self: start;
}

.contact-card a {
  display: block;
  overflow-wrap: anywhere;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: rgb(var(--accent-rgb));
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 700;
  text-decoration: none;
}

.lightbox {
  width: min(920px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(30, 58, 92, 0.18);
}

.lightbox::backdrop {
  background: rgba(235, 242, 250, 0.72);
  backdrop-filter: blur(6px);
}

.lightbox img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 760px);
  border-radius: 8px;
  background: rgba(232, 239, 247, 0.72);
  object-fit: contain;
}

.lightbox h2 {
  margin: 18px 0 8px;
}

.close-lightbox {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.86);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .site-nav {
    top: calc(100% + 10px);
    right: 18px;
    left: auto;
  }

  .hero,
  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    position: static;
    justify-self: start;
    width: min(280px, 62vw);
    margin: 0;
  }

  .hero-portrait-desktop {
    display: none;
  }

  .home-prompts,
  .info-grid,
  .section-timeline,
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-section,
  .portfolio-section:first-child {
    min-height: auto;
    padding: 56px 0;
  }

  .portfolio-section:not(:first-child) {
    padding-inline: 18px;
  }

  .section-heading.with-controls {
    align-items: start;
    flex-direction: column;
  }

  .section-timeline div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-timeline div:last-child {
    border-bottom: 0;
  }

  .section-carousel {
    --carousel-card-width: min(360px, 82vw);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-right: 18px;
  }

  .site-nav {
    right: 14px;
    left: 14px;
    min-width: 0;
  }

  .site-nav a {
    padding: 10px 12px;
    text-align: center;
    font-size: 0.9rem;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 132px;
  }

  h1 {
    max-width: 10ch;
    font-size: 2.1rem;
    line-height: 1.03;
  }

  .eyebrow {
    max-width: 34ch;
    font-size: 0.68rem;
  }

  .hero-text,
  .page-intro p {
    max-width: 32ch;
  }

  .brand-text {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .button,
  .filter {
    width: 100%;
  }

  .home-prompts,
  .info-grid,
  .section-timeline,
  .project-grid,
  .gallery-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .portfolio-section,
  .portfolio-section:first-child {
    padding: 42px 0;
    scroll-margin-top: 132px;
  }

  .portfolio-section:not(:first-child) {
    padding-inline: 0;
  }

  .info-panel {
    min-height: 230px;
  }

  .section-carousel {
    --carousel-card-width: min(320px, 92vw);
  }

  .prompt {
    top: 118px;
    min-height: 420px;
    margin: 0 0 36px;
  }

  .metric.wide {
    grid-column: auto;
  }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-trail,
  #ambient {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
