:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0d0c;
  --bg-soft: #151413;
  --bg-elevated: #1c1a18;
  --bg-badge: #242220;
  --text: #a39d96;
  --text-bright: #ece8e2;
  --text-muted: #6b6560;
  --text-hover: #f5f2ed;
  --text-title-hover: #f7f4ef;
  --slate: #9a8f82;
  --slate-deep: #4a443c;
  --slate-glow: #b8aa98;
  --line: rgba(196, 181, 163, 0.1);
  --line-strong: rgba(196, 181, 163, 0.2);
  --accent: #c4b5a3;
  --shadow-sm: rgba(0, 0, 0, 0.24);
  --shadow-md: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.34);
  --glass: rgba(21, 20, 19, 0.74);
  --glass-hover: rgba(28, 26, 24, 0.92);
  --card-bg: rgba(28, 26, 24, 0.58);
  --card-bg-hover: rgba(36, 33, 30, 0.82);
  --row-hover: rgba(28, 26, 24, 0.48);
  --row-hover-soft: rgba(28, 26, 24, 0.52);
  --tag-bg: rgba(196, 181, 163, 0.12);
  --icon-hover-bg: rgba(196, 181, 163, 0.14);
  --selection-bg: rgba(196, 181, 163, 0.22);
  --glow: rgba(196, 181, 163, 0.28);
  --aurora-a: rgba(196, 181, 163, 0.2);
  --aurora-b: rgba(154, 143, 130, 0.16);
  --aurora-c: rgba(90, 78, 66, 0.22);
  --spotlight-color: rgba(196, 181, 163, 0.12);
  --name-glow: rgba(196, 181, 163, 0.32);
  --banner-a: rgba(74, 68, 60, 0.55);
  --banner-b: rgba(122, 110, 96, 0.42);
  --banner-c: rgba(154, 143, 130, 0.32);
  --banner-d: rgba(74, 68, 60, 0.2);
  --halftone-dot: rgba(196, 181, 163, 0.14);
  --halftone-mask: rgba(0, 0, 0, 0.86);
  --stack-icon-filter: none;
  --clock-mark: #8a8278;
  --clock-hand: #ece8e2;
  --clock-dial-edge: rgba(196, 181, 163, 0.22);
  --clock-dial-inset: rgba(255, 255, 255, 0.03);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad-x: clamp(24px, 6vw, 96px);
  --serif: "Instrument Serif", "Georgia", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pixel: "Pixelify Sans", monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #faf7f2;
  --bg-soft: #f2ede6;
  --bg-elevated: #fffdf9;
  --bg-badge: #e8e2d9;
  --text: #5a534c;
  --text-bright: #1c1916;
  --text-muted: #8a8278;
  --text-hover: #121110;
  --text-title-hover: #0e0d0c;
  --slate: #9a8b78;
  --slate-deep: #6b5f52;
  --slate-glow: #a89580;
  --line: rgba(28, 24, 20, 0.09);
  --line-strong: rgba(28, 24, 20, 0.14);
  --accent: #9a8570;
  --shadow-sm: rgba(28, 24, 20, 0.06);
  --shadow-md: rgba(28, 24, 20, 0.09);
  --shadow-lg: rgba(28, 24, 20, 0.11);
  --glass: rgba(255, 253, 249, 0.82);
  --glass-hover: rgba(255, 253, 249, 0.95);
  --card-bg: rgba(255, 253, 249, 0.88);
  --card-bg-hover: #fffdf9;
  --row-hover: rgba(242, 237, 230, 0.75);
  --row-hover-soft: rgba(242, 237, 230, 0.9);
  --tag-bg: rgba(154, 133, 112, 0.14);
  --icon-hover-bg: rgba(154, 133, 112, 0.16);
  --selection-bg: rgba(196, 181, 163, 0.35);
  --glow: rgba(154, 133, 112, 0.22);
  --aurora-a: rgba(154, 133, 112, 0.18);
  --aurora-b: rgba(196, 181, 163, 0.22);
  --aurora-c: rgba(138, 125, 110, 0.12);
  --spotlight-color: rgba(154, 133, 112, 0.1);
  --name-glow: rgba(196, 181, 163, 0.45);
  --banner-a: rgba(154, 133, 112, 0.18);
  --banner-b: rgba(168, 149, 128, 0.14);
  --banner-c: rgba(120, 108, 96, 0.1);
  --banner-d: rgba(154, 133, 112, 0.08);
  --halftone-dot: rgba(90, 83, 76, 0.1);
  --halftone-mask: rgba(250, 247, 242, 0.94);
  --stack-icon-filter: brightness(0.4) saturate(0.85);
  --clock-mark: #4a443c;
  --clock-hand: #1a1816;
  --clock-dial-edge: rgba(28, 24, 20, 0.16);
  --clock-dial-inset: rgba(28, 24, 20, 0.05);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 320ms var(--ease-out), color 320ms var(--ease-out);
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--slate-deep), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
  pointer-events: none;
}

body::selection {
  background: var(--selection-bg);
  color: var(--text-bright);
}

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

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

/* ── Hero / intro ── */

.page {
  width: 100%;
  max-width: none;
  padding: 0 var(--pad-x) clamp(64px, 8vw, 120px);
}

.intro {
  --spot-x: 50%;
  --spot-y: 38%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(92vh, 760px);
  margin-inline: calc(var(--pad-x) * -1);
  padding: clamp(72px, 10vw, 120px) var(--pad-x) clamp(40px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

.intro__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.intro__aurora {
  position: absolute;
  inset: -25%;
  overflow: hidden;
}

.intro__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

.intro__orb--1 {
  top: 8%;
  left: 18%;
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  background: var(--aurora-a);
  animation: auroraDrift1 16s ease-in-out infinite;
}

.intro__orb--2 {
  top: 28%;
  right: 8%;
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  background: var(--aurora-b);
  animation: auroraDrift2 19s ease-in-out infinite;
}

.intro__orb--3 {
  bottom: 6%;
  left: 32%;
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  background: var(--aurora-c);
  animation: auroraDrift3 14s ease-in-out infinite;
}

.intro__noise {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.intro__spotlight {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle clamp(180px, 28vw, 340px) at var(--spot-x) var(--spot-y),
      var(--spotlight-color) 0%,
      transparent 72%
    );
  opacity: 0.95;
  transition: opacity 400ms ease;
}

.intro__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
  width: 100%;
  max-width: 640px;
  text-align: center;
  justify-items: center;
}

.intro__header {
  margin-bottom: 28px;
  width: 100%;
}

.intro__name-wrap {
  position: relative;
  display: inline-block;
}

.intro__name-glow {
  position: absolute;
  inset: -35% -18%;
  z-index: -1;
  background:
    radial-gradient(ellipse 75% 65% at 50% 50%, var(--name-glow) 0%, transparent 70%);
  filter: blur(32px);
  pointer-events: none;
}

.intro h1 {
  margin: 0 0 14px;
  color: var(--text-bright);
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: letter-spacing 400ms var(--ease-out), color 300ms ease;
}

.intro h1:hover {
  letter-spacing: 0.01em;
  color: var(--text-title-hover);
}

.intro h1:hover .intro__name-glow {
  filter: blur(40px);
}

@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, -4%) scale(1.06); }
  66% { transform: translate(-4%, 5%) scale(0.96); }
}

@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(-7%, 6%) scale(1.08); }
  70% { transform: translate(5%, -3%) scale(0.94); }
}

@keyframes auroraDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, -6%) scale(1.05); }
}

/* ── Page layout (sections) ── */

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg-badge);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 280ms var(--ease-spring), border-color 280ms ease, color 280ms ease, background 280ms ease;
}

.badge:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  color: var(--text-bright);
  background: var(--bg-elevated);
}

.intro__body {
  width: 100%;
}

.intro__body p {
  margin: 0 auto 16px;
  max-width: 56ch;
  color: var(--text);
}

.intro__cta {
  color: var(--text-muted) !important;
  font-size: 14px;
}

/* ── Action bar ── */

.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  width: min(100%, 420px);
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: transform 320ms var(--ease-out), border-color 320ms ease, box-shadow 320ms ease, background 320ms ease;
}

.action-bar:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 40px var(--shadow-md);
  background: var(--glass-hover);
}

.action-bar__social a {
  display: flex;
  color: var(--text-muted);
  transition: color 220ms ease, transform 320ms var(--ease-spring);
}

.action-bar__social a:hover {
  color: var(--accent);
  transform: scale(1.15) translateY(-1px);
}

.action-bar__links a {
  position: relative;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 220ms ease;
}

.action-bar__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease-out);
}

.action-bar__links a:hover {
  color: var(--text-bright);
}

.action-bar__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.action-bar__social {
  display: flex;
  gap: 14px;
}

.action-bar__links {
  display: flex;
  gap: 18px;
}

/* ── Sections ── */

.section {
  margin-top: clamp(48px, 8vw, 80px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 300ms ease, transform 300ms var(--ease-out);
}

.section-label::after {
  content: "";
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 400ms var(--ease-out);
}

.section:hover .section-label {
  color: var(--text);
}

.section:hover .section-label::after {
  width: 48px;
}

/* ── About ── */

.about__layout {
  display: grid;
  gap: clamp(28px, 4vw, 40px);
}

@media (min-width: 900px) {
  .about__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 380px);
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
  }
}

.about__lede {
  margin: 0 0 28px;
  color: var(--text-bright);
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  max-width: 22ch;
  transition: color 400ms ease;
}

.about:hover .about__lede {
  color: var(--text-hover);
}

.about__content {
  display: grid;
  gap: 16px;
  max-width: 62ch;
}

.about__content p {
  margin: 0;
  color: var(--text);
  font-size: clamp(15px, 1.6vw, 16px);
  line-height: 1.6;
}

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

.about__facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  transition: border-color 280ms ease, background 280ms ease, transform 280ms var(--ease-out);
}

.about__facts li:hover {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.about__facts-label {
  color: var(--text-muted);
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 300px;
}

.about-clock__dial {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 1;
  border: 1px solid var(--clock-dial-edge);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--bg-elevated) 0%, var(--bg-soft) 68%, var(--bg) 100%);
  box-shadow:
    inset 0 0 0 1px var(--clock-dial-inset),
    0 20px 50px var(--shadow-md);
  transition: border-color 320ms ease, box-shadow 320ms ease;
}

.about:hover .about-clock__dial {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--clock-dial-inset),
    0 28px 60px var(--shadow-lg);
}

.about-clock__marks {
  position: absolute;
  inset: 0;
}

.about-clock__marks span {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--i) * 30deg));
  pointer-events: none;
}

.about-clock__marks span::after {
  content: "";
  position: absolute;
  top: 9%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--clock-mark);
  box-shadow: 0 0 0 1px var(--clock-dial-inset);
}

.about-clock__hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 0;
  height: 0;
  transform: rotate(var(--deg, 0deg));
  transform-origin: bottom center;
  transition: transform 80ms linear;
}

.about-clock__hand::before {
  content: "";
  position: absolute;
  left: -4px;
  bottom: 0;
  width: 8px;
  height: 8px;
  background: var(--clock-hand);
  box-shadow: 0 0 10px var(--glow);
}

.about-clock__hand--hour::before {
  box-shadow:
    0 -10px 0 0 var(--clock-hand),
    0 -20px 0 0 var(--clock-hand),
    0 -30px 0 0 var(--clock-hand),
    0 0 10px var(--glow);
}

.about-clock__hand--minute::before {
  width: 7px;
  height: 7px;
  left: -3.5px;
  box-shadow:
    0 -9px 0 0 var(--clock-hand),
    0 -18px 0 0 var(--clock-hand),
    0 -27px 0 0 var(--clock-hand),
    0 -36px 0 0 var(--clock-hand),
    0 -45px 0 0 var(--clock-hand),
    0 -54px 0 0 var(--clock-hand),
    0 0 10px var(--glow);
}

.about-clock__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--clock-hand);
  box-shadow: 0 0 10px var(--glow);
}

.about-clock__digital {
  color: var(--text);
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .about-clock__digital {
  color: var(--slate-deep);
  font-weight: 500;
}

@media (max-width: 899px) {
  .about-clock {
    max-width: 240px;
    margin-inline: auto;
  }

  .about-clock__dial {
    width: min(100%, 220px);
  }

  .about__visual {
    margin-top: 8px;
  }
}

#projects .work-list--featured {
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  #projects .work-list--featured {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .work-list__featured + .work-list__featured {
    margin-top: 0;
  }

  .work-list__featured .work-item {
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 22px 18px;
    margin-inline: 0;
  }

  .work-list__featured .work-item__icon {
    width: 40px;
    height: 40px;
  }

  .work-list__featured .work-item__date {
    justify-self: start;
  }
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--serif);
}

.work-list li + li {
  border-top: none;
}

.work-list li:not(.work-list__featured) + li:not(.work-list__featured) {
  border-top: 1px solid var(--line);
}

.work-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  transition: transform 320ms var(--ease-out), opacity 200ms ease;
}

a.work-item {
  cursor: pointer;
}

a.work-item:hover {
  opacity: 1;
}

a.work-item:hover .work-item__icon {
  transform: scale(1.08);
  background: var(--icon-hover-bg);
  color: var(--text-bright);
}

a.work-item:hover .work-item__title {
  color: var(--text-hover);
}

a.work-item::after {
  content: "→";
  position: absolute;
  right: 18px;
  top: 50%;
  opacity: 0;
  transform: translate(-8px, -50%);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 14px;
  transition: opacity 280ms ease, transform 320ms var(--ease-out);
  pointer-events: none;
}

.work-list__featured .work-item {
  position: relative;
}

a.work-item:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.work-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  transition: transform 320ms var(--ease-spring), background 320ms ease, color 320ms ease;
}

.work-item__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.work-item__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-bright);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 20px);
  letter-spacing: -0.01em;
  transition: color 280ms ease;
}

.work-item__tag {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--slate-glow);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.work-item__desc {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
}

.work-item__date {
  flex-shrink: 0;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  white-space: nowrap;
}

.work-list__featured .work-item {
  padding: 20px 18px;
  margin-inline: 0;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  transition: transform 320ms var(--ease-out), border-color 320ms ease, box-shadow 320ms ease, background 320ms ease;
}

.work-list__featured .work-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 48px var(--shadow-lg);
  background: var(--card-bg-hover);
}

.work-list__featured + .work-list__featured {
  margin-top: 10px;
}

.work-list__featured + .work-list__featured .work-item {
  border-top: 1px solid var(--line);
}

.projects-more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 480ms var(--ease-out), opacity 360ms ease, margin-top 360ms ease;
}

.projects-more.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 16px;
}

.projects-more__inner {
  overflow: hidden;
}

.projects-more[hidden] {
  display: grid;
}

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: color 280ms ease, border-color 280ms ease, background 280ms ease, transform 280ms var(--ease-spring), box-shadow 280ms ease;
}

.section-toggle::after {
  content: "↓";
  font-size: 11px;
  transition: transform 360ms var(--ease-out);
}

.section-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.section-toggle:hover {
  color: var(--text-bright);
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-sm);
}

/* ── Experience (line list) ── */

.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.line-list li {
  display: grid;
  gap: 4px;
  padding: 22px 18px;
  margin-inline: calc(var(--pad-x) * -0.35);
  padding-inline: calc(var(--pad-x) * 0.35);
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: background 320ms ease, border-color 320ms ease, transform 320ms var(--ease-out), padding-left 320ms var(--ease-out);
}

.line-list li:hover {
  background: var(--row-hover);
  border-left-color: var(--accent);
  transform: translateX(4px);
  padding-left: calc(var(--pad-x) * 0.35 + 6px);
}

.line-list__role {
  color: var(--text-bright);
  font-weight: 600;
  font-size: clamp(15px, 2vw, 17px);
  transition: color 280ms ease;
}

.line-list li:hover .line-list__role {
  color: var(--text-hover);
}

.line-list__detail {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 72ch;
}

/* ── Tech stack ── */

.line-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.line-list__date {
  color: var(--text-muted);
  font-size: 13px;
}

.line-list__org {
  color: var(--text);
  font-size: 14px;
}

.stack-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.stack-group h3 {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  cursor: default;
  transition: transform 280ms var(--ease-spring), border-color 280ms ease, color 280ms ease, background 280ms ease, box-shadow 280ms ease;
}

.stack-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
  filter: var(--stack-icon-filter);
  transition: transform 280ms var(--ease-spring), opacity 280ms ease, filter 320ms var(--ease-out);
}

.stack-tags li:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  color: var(--text-bright);
  background: var(--bg-elevated);
  box-shadow: 0 8px 20px var(--shadow-sm);
}

.stack-tags li:hover .stack-icon {
  transform: scale(1.12);
  opacity: 1;
}

/* ── Theme + accent controls ── */

.theme-controls {
  position: fixed;
  top: 20px;
  right: var(--pad-x);
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
}

.accent-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.accent-picker {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.accent-picker__input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.accent-picker__face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  transition: transform 280ms var(--ease-spring), border-color 280ms ease, background 280ms ease, color 280ms ease, box-shadow 280ms ease;
}

.accent-picker__face::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-picker-swatch, var(--accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.accent-picker:hover .accent-picker__face {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--line-strong);
  background: var(--glass-hover);
  color: var(--text-bright);
  box-shadow: 0 8px 24px var(--shadow-sm);
}

[data-accent-custom] .accent-picker__face {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
}

.accent-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 280ms var(--ease-spring), border-color 280ms ease, background 280ms ease, color 280ms ease;
}

.accent-reset svg {
  width: 12px;
  height: 12px;
}

.accent-reset:hover {
  transform: scale(1.06);
  border-color: var(--line-strong);
  background: var(--glass-hover);
  color: var(--text-bright);
}

.theme-toggle {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 280ms var(--ease-spring), border-color 280ms ease, background 280ms ease, color 280ms ease, box-shadow 280ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--line-strong);
  background: var(--glass-hover);
  color: var(--text-bright);
  box-shadow: 0 8px 24px var(--shadow-sm);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 280ms ease, transform 360ms var(--ease-out);
}

.theme-toggle__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.7);
}

[data-theme="light"] .theme-toggle__sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.7);
}

[data-theme="light"] .theme-toggle__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ── Contact ── */

.contact__lede {
  margin: 0 0 32px;
  color: var(--text-bright);
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.15;
  max-width: 20ch;
  transition: color 400ms ease;
}

.contact:hover .contact__lede {
  color: var(--text-hover);
}

.contact-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 18px 20px;
  margin-inline: calc(var(--pad-x) * -0.25);
  border-top: 1px solid var(--line);
  border-radius: 8px;
  transition: background 320ms ease, transform 320ms var(--ease-out), padding-left 320ms var(--ease-out);
}

.contact-list li:hover {
  background: var(--row-hover-soft);
  transform: translateX(6px);
  padding-left: 26px;
}

.contact-list a {
  position: relative;
  color: var(--text);
  transition: color 220ms ease;
}

.contact-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease-out);
}

.contact-list a:hover {
  color: var(--text-bright);
}

.contact-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-list__label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: color 280ms ease;
}

.contact-list li:hover .contact-list__label {
  color: var(--accent);
}

.contact-list li span:not(.contact-list__label) {
  color: var(--text);
  font-size: 14px;
}

/* ── Reveal animation ── */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ── Case study pages ── */

.case-page {
  background: var(--bg);
}

.case-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 24px var(--pad-x) 0;
}

.case-page .case-nav {
  padding-right: calc(var(--pad-x) + 108px);
}

.case-nav a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 220ms ease, transform 280ms var(--ease-out), border-color 280ms ease, background 280ms ease;
}

.case-nav a:hover {
  color: var(--accent);
}

.case-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text) !important;
  font-weight: 500;
}

.case-live:hover {
  color: var(--text-bright) !important;
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.case-study {
  width: 100%;
  max-width: none;
  padding: clamp(32px, 5vw, 48px) var(--pad-x) 80px;
}

.case-study h1 {
  margin: 16px 0 0;
  color: var(--text-bright);
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 400;
  line-height: 1;
}

.case-study .case-label {
  color: var(--text-muted);
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.case-study .case-lede {
  margin: 28px 0 0;
  max-width: none;
  color: var(--text);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

.case-block {
  padding: clamp(28px, 4vw, 40px) 0;
  border-top: 1px solid var(--line);
}

.case-block h2 {
  margin: 0 0 16px;
  color: var(--slate-glow);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 320ms ease;
}

.case-block p {
  margin: 0;
  max-width: none;
  color: var(--text);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  transition: color 320ms ease;
}

.case-block:hover h2 {
  color: var(--accent);
}

.case-page .progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--slate-deep), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .progress,
  .intro__orb {
    animation: none;
  }

  .about-clock__hand {
    transition: none;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .action-bar:hover,
  .work-list__featured .work-item:hover,
  .line-list li:hover,
  .stack-tags li:hover,
  .contact-list li:hover,
  .section-toggle:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .theme-controls {
    top: 14px;
    gap: 6px;
  }

  .accent-picker,
  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .accent-picker__face::after {
    width: 16px;
    height: 16px;
  }

  .accent-reset {
    width: 26px;
    height: 26px;
  }

  .case-nav {
    padding-top: 64px;
    padding-right: calc(var(--pad-x) + 96px);
  }

  .work-item {
    grid-template-columns: 32px 1fr;
  }

  .work-item__date {
    grid-column: 2;
    padding-top: 2px;
    font-size: 12px;
  }

  .action-bar {
    flex-direction: column;
    align-items: center;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
