:root {
  color-scheme: light dark;
  --page: #070812;
  --surface: rgba(10, 12, 22, 0.94);
  --surface-soft: rgba(15, 18, 31, 0.82);
  --surface-solid: #0d0f1a;
  --text: #f4f5f7;
  --muted: #b9bdc8;
  --quiet: #8c91a0;
  --line: rgba(244, 245, 247, 0.16);
  --line-strong: rgba(244, 245, 247, 0.3);
  --accent: #8bc8ff;
  --accent-ink: #07111d;
  --shadow: rgba(1, 2, 8, 0.34);
  --hero-scrim: rgba(6, 7, 16, 0.28);
  --hero-shadow: rgba(3, 4, 10, 0.46);
  --card-surface: rgba(13, 15, 26, 0.42);
  --max-width: 1180px;
  --radius-panel: 28px;
  --radius-control: 999px;
  --font-display: "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --page: #eef1f6;
    --surface: rgba(238, 241, 246, 0.96);
    --surface-soft: rgba(248, 249, 252, 0.82);
    --surface-solid: #f7f8fb;
    --text: #11131b;
    --muted: #4e5564;
    --quiet: #676e7c;
    --line: rgba(17, 19, 27, 0.15);
    --line-strong: rgba(17, 19, 27, 0.28);
    --accent: #0669c8;
    --accent-ink: #f7f9fc;
    --shadow: rgba(45, 57, 78, 0.16);
    --hero-scrim: rgba(242, 245, 250, 0.32);
    --hero-shadow: rgba(247, 249, 252, 0.7);
    --card-surface: rgba(247, 248, 251, 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--hero-scrim) 0 44%, transparent 78%),
    linear-gradient(180deg, rgba(6, 8, 17, 0.08), var(--hero-scrim));
}

#shader-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background: var(--page);
  pointer-events: none;
}

a {
  color: inherit;
}

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

.shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 18, 0.58);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

@media (prefers-color-scheme: light) {
  .site-header {
    background: rgba(244, 246, 250, 0.66);
  }
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.wordmark small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 640;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
  text-decoration: none;
  transition: color 160ms ease;
}

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

.hero {
  min-height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.6fr);
  align-items: center;
  gap: clamp(42px, 5vw, 80px);
  padding-block: clamp(54px, 8vh, 90px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 710px;
  text-shadow: 0 3px 30px var(--hero-shadow);
}

.hero-kicker {
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(60px, 6.1vw, 88px);
  font-weight: 760;
  line-height: 0.94;
  letter-spacing: -0.075em;
}

h1 span {
  display: block;
}

h1 span:last-child {
  color: var(--accent);
}

.hero-intro {
  max-width: 560px;
  margin: 30px 0 0;
  color: var(--text);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.018em;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-secondary {
  background: var(--surface-soft);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

/* Web approximation of frosted macOS material. */
.identity-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(145deg, rgba(244, 245, 247, 0.14), rgba(244, 245, 247, 0.03)),
    var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(244, 245, 247, 0.24),
    0 28px 76px var(--shadow);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.identity-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 14% 0, rgba(139, 200, 255, 0.2), transparent 38%);
}

.identity-profile {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.identity-profile img {
  width: 70px;
  height: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 12px 30px var(--shadow);
}

.identity-profile strong,
.identity-profile span {
  display: block;
}

.identity-profile strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.025em;
}

.identity-profile span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.identity-links {
  position: relative;
  padding: 8px 14px 14px;
}

.identity-links a {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.identity-links a:last-child {
  border-bottom: 0;
}

.identity-links a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.identity-links span:first-child {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.identity-links strong {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-surface {
  position: relative;
  background: transparent;
}

#about,
#projects {
  scroll-margin-top: 88px;
}

.about {
  padding-block: clamp(110px, 13vw, 170px);
}

.about h2 {
  max-width: 980px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 730;
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.about-copy {
  max-width: 680px;
  margin-top: 42px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.72;
  letter-spacing: -0.014em;
}

.about-copy p + p {
  margin-top: 6px;
}

.work {
  padding-bottom: clamp(110px, 13vw, 170px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 730;
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-heading p {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.project {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--card-surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 22px 60px rgba(1, 2, 8, 0.12);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.project-youdub,
.project-memory {
  grid-column: span 7;
}

.project-codex,
.project-claudex {
  grid-column: span 5;
}

.project-youdub,
.project-codex {
  min-height: 560px;
}

.project-visual {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-bottom: 1px solid var(--line);
}

.project-visual-youdub {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 22% 18%, rgba(139, 200, 255, 0.2), transparent 42%);
}

.project-visual-youdub img {
  width: min(72%, 440px);
}

.project-visual-codex {
  background: #d5d4d3;
}

.project-visual-codex img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.6vw, 42px);
}

.project h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.7vw, 50px);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.project p {
  max-width: 500px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.project-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 34px;
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.project-foot span:last-child {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.project-claudex {
  background: radial-gradient(circle at 88% 16%, rgba(139, 200, 255, 0.28), transparent 38%);
}

.project-claudex .project-copy {
  min-height: 270px;
}

.project-type {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(26px, 3.6vw, 42px) 36px;
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.7vw, 34px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.project-type span:last-child {
  color: var(--accent);
}

.project-memory {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
}

.project-quote {
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 4vw, 46px);
  border-right: 1px solid var(--line);
  background: rgba(139, 200, 255, 0.08);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.reveal-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}

.reveal-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms), transform 650ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
}

.project:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 70px var(--shadow);
}

.project:hover .project-visual-codex img {
  transform: scale(1.025);
}

.project:active {
  transform: translateY(-1px) scale(0.995);
}

.channels {
  padding-bottom: clamp(110px, 12vw, 150px);
}

.section-heading-compact {
  margin-bottom: 26px;
}

.channel-list {
  border-top: 1px solid var(--line-strong);
}

.channel-list a {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.8fr auto;
  align-items: center;
  gap: 22px;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 160ms ease, padding 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-list a:hover {
  padding-inline: 10px;
  color: var(--accent);
}

.channel-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.channel-handle {
  font-family: var(--font-mono);
  font-size: 13px;
}

.channel-purpose {
  color: var(--muted);
  font-size: 15px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.footer-row {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-row a {
  text-underline-offset: 3px;
}

.footer-row a:hover {
  color: var(--accent);
}

@media (prefers-color-scheme: light) {
  .project-visual-youdub {
    background: radial-gradient(circle at 22% 18%, rgba(6, 105, 200, 0.18), transparent 42%);
  }

  .project-visual-codex {
    background: #d5d4d3;
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: calc(100dvh - 68px);
    grid-template-columns: 1fr;
    align-content: center;
    gap: 44px;
    padding-block: 54px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .identity-panel {
    width: min(100%, 620px);
  }

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

  .project-youdub,
  .project-codex,
  .project-claudex,
  .project-memory {
    grid-column: auto;
  }

  .project-youdub,
  .project-codex {
    min-height: 520px;
  }

  .project-memory {
    grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .nav-links a:first-child {
    display: none;
  }

  .nav-links a:last-child {
    display: none;
  }

  .nav-links {
    gap: 18px;
  }

  .hero {
    min-height: calc(100dvh - 68px);
    gap: 32px;
    padding-block: 34px 40px;
  }

  .hero-kicker {
    margin-bottom: 18px;
    font-size: 11px;
  }

  h1 {
    font-size: clamp(43px, 12vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.065em;
  }

  .hero-intro {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .button {
    min-height: 44px;
    padding-inline: 18px;
  }

  .identity-profile {
    grid-template-columns: 58px 1fr;
    gap: 14px;
    padding: 18px;
  }

  .identity-profile img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .identity-profile strong {
    font-size: 18px;
  }

  .identity-links {
    padding: 6px 10px 10px;
  }

  .identity-links a {
    grid-template-columns: 65px minmax(0, 1fr) auto;
    min-height: 47px;
  }

  .about {
    padding-block: 92px;
  }

  .about h2 {
    font-size: clamp(38px, 11.5vw, 56px);
  }

  .about-copy {
    margin-top: 30px;
  }

  .about-copy p {
    font-size: 18px;
  }

  .work {
    padding-bottom: 96px;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .section-heading h2 {
    font-size: 42px;
  }

  .section-heading p {
    margin-top: 16px;
    font-size: 16px;
  }

  .project-grid {
    gap: 14px;
  }

  .project,
  .project-youdub,
  .project-codex {
    min-height: 0;
  }

  .project-visual {
    min-height: 210px;
  }

  .project-visual-codex img {
    min-height: 210px;
  }

  .project-copy {
    min-height: 270px;
    padding: 26px;
  }

  .project h3 {
    font-size: 33px;
  }

  .project-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .project-foot span:last-child {
    align-self: flex-end;
  }

  .project-claudex .project-copy {
    min-height: 260px;
  }

  .project-type {
    padding: 0 26px 28px;
    font-size: 26px;
  }

  .project-memory {
    display: flex;
  }

  .project-quote {
    min-height: 210px;
    align-items: flex-end;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 32px;
  }

  .channels {
    padding-bottom: 96px;
  }

  .channel-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 18px;
    min-height: 88px;
    padding-block: 16px;
  }

  .channel-handle,
  .channel-purpose {
    grid-column: 1;
  }

  .channel-list a > span:last-child {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .footer-row {
    min-height: 118px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  .wordmark small {
    display: none;
  }

  h1 {
    font-size: clamp(41px, 11.8vw, 49px);
  }

  .hero-intro {
    max-width: 330px;
  }

  .identity-links strong {
    font-size: 12px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal-enabled [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .identity-panel,
  .button-secondary,
  .project {
    background: var(--surface-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
