:root {
  color-scheme: light;
  --bg: #fafafa;
  --text: #282828;
  --muted: #686868;
  --line: #dedede;
  --surface: #f0f0f0;
  --accent: #426b97;
}
html.dark {
  color-scheme: dark;
  --bg: #191919;
  --text: #e6e6e6;
  --muted: #a4a4a4;
  --line: #343434;
  --surface: #222;
  --accent: #a5c3e3;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.7 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--accent);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(29px, 5vw, 38px);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.wrap {
  width: min(100% - 48px, 820px);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px;
  background: var(--bg);
}
.skip-link:focus {
  top: 10px;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 92px;
}
.nav-brand {
  font-weight: 600;
  text-decoration: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.nav-actions a {
  text-decoration: none;
}
.theme-toggle,
.gallery-controls button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.theme-toggle:hover,
.gallery-controls button:hover:enabled {
  background: var(--surface);
}
.theme-toggle img,
.gallery-controls img,
.project-row > img {
  width: 18px;
  height: 18px;
  filter: brightness(0);
}
html.dark .theme-toggle img,
html.dark .gallery-controls img,
html.dark .project-row > img {
  filter: brightness(0) invert(1);
}
.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 32px;
  margin-bottom: 48px;
  padding: 68px 36px;
  border-radius: 3px;
  color: #fff;
}
.intro h1 {
  margin-bottom: 14px;
}
.intro > p {
  max-width: 460px;
  color: #f0f3f8;
  margin-bottom: 0;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(120deg, #163c76, #74a9dd, #285caa);
}
html.dark .hero-art {
  background: linear-gradient(120deg, #163c76, #0d1729, #285caa);
}
.hero-shader-wrap,
.hero-shader-layer {
  position: absolute;
  inset: 0;
}
.hero-shader-layer {
  transition: opacity 0.3s;
}
.hero-shader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 21, 42, 0.52);
}
.hero-shader-layer.is-hidden {
  opacity: 0;
}
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 28px 20px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.project-row:hover,
.project-row:focus-visible {
  background: var(--surface);
}
.project-row > img {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.project-row:hover > img,
.project-row:focus-visible > img {
  transform: translateX(4px);
}
.project-row h3 {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 550;
}
.project-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}
.about,
.contact {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.about p {
  max-width: 620px;
  margin-bottom: 14px;
}
.about .skills {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
}
.contact-note {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
}
.footer {
  padding-block: 24px;
  color: var(--muted);
  font-size: 12px;
}
.footer p {
  margin: 0;
}
.back-link {
  display: inline-block;
  margin: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.project-header {
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.project-header h1 {
  margin-bottom: 18px;
}
.project-summary {
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}
.gallery {
  margin-bottom: 36px;
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background: var(--surface);
}
.gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.gallery-slide img,
.gallery-slide video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #151515;
}
.gallery-slide figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
}
.gallery-toolbar,
.gallery-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gallery-toolbar {
  justify-content: space-between;
  margin-top: 10px;
}
.gallery-hint,
.gallery-count {
  font-size: 12px;
  color: var(--muted);
}
.project-details {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
  margin-bottom: 40px;
}
.project-details h2 {
  margin-bottom: 14px;
}
.project-details p,
.project-details li {
  color: var(--muted);
}
.project-details ul {
  padding-left: 18px;
}
.project-details li {
  margin-bottom: 8px;
}
.project-meta {
  font-size: 13px;
}
.project-meta dt {
  margin-top: 18px;
}
.project-meta dd {
  color: var(--muted);
  margin: 4px 0 0;
}
.text-link {
  display: inline-block;
  font-size: 13px;
  margin-top: 12px;
}
.project-next {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.not-found {
  padding-block: 90px;
  min-height: 65vh;
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .navbar {
    min-height: 76px;
    gap: 12px;
  }
  .nav-actions {
    gap: 14px;
  }
  .nav-about {
    display: none;
  }
  .intro {
    margin-top: 18px;
    margin-bottom: 36px;
    padding: 48px 24px;
  }
  .project-row {
    gap: 16px;
    padding: 24px 16px;
  }
  .project-details {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .gallery-hint {
    max-width: 140px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
