:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --soft: #f3f1ec;
  --ink: #0b0d10;
  --muted: #687076;
  --line: rgba(11, 13, 16, 0.1);
  --accent: #111827;
  --accent-soft: rgba(17, 24, 39, 0.06);
  --focus: #2367f2;
  --shadow: 0 28px 90px rgba(17, 24, 39, 0.08);
}

body.dark {
  color-scheme: dark;
  --bg: #07080a;
  --surface: #101216;
  --soft: #15181d;
  --ink: #f8fafc;
  --muted: #9aa4af;
  --line: rgba(248, 250, 252, 0.12);
  --accent: #f8fafc;
  --accent-soft: rgba(248, 250, 252, 0.08);
  --focus: #7aa2ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

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

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 58px;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(22px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 850;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.site-nav a:hover,
.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero,
.section,
.photo-band,
.contact-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  padding: 180px 0 86px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.56fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-intro h2,
.beyond-intro h2,
.contact-inner h2,
.now-hero h1 {
  margin: 0 auto;
  max-width: 950px;
  font-size: 5.8rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1,
.hero-lead {
  margin-left: 0;
  margin-right: 0;
}

.hero-lead,
.beyond-intro p,
.contact-inner p,
.now-hero p {
  max-width: 730px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 1.25rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 46px;
}

.hero-portrait {
  margin: 0;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 1 / 1.14;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.hero-portrait figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-align: center;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.photo-band {
  padding-bottom: 90px;
}

.photo-band {
  display: grid;
  gap: 18px;
}

.photo-frame {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.photo-frame img {
  width: 100%;
  height: 620px;
  object-fit: cover;
}

.personal-photo-note {
  display: grid;
  grid-template-columns: 0.3fr 1fr;
  gap: 24px;
  align-items: start;
  max-width: 760px;
  margin-left: auto;
}

.personal-photo-note span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personal-photo-note p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section {
  padding: 118px 0;
  border-top: 1px solid var(--line);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--line);
}

.metrics article {
  padding: 34px 28px;
  background: var(--surface);
}

.metrics strong {
  display: block;
  font-size: 3.7rem;
  line-height: 1;
  letter-spacing: 0;
}

.metrics span,
.project-row p,
.project-row li,
.timeline p,
.topic-list a,
.site-footer,
.now-list strong {
  color: var(--muted);
}

.section-intro {
  margin-bottom: 54px;
  text-align: center;
}

.section-intro h2,
.beyond-intro h2,
.contact-inner h2,
.now-hero h1 {
  font-size: 4.35rem;
}

.webui-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: 42px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--focus) 14%, transparent), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.webui-copy {
  padding: clamp(18px, 4vw, 42px);
}

.webui-copy h3 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.webui-copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
}

.webui-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.webui-points span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.webui-screen {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #090b10;
}

.webui-screen img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: top center;
}

.project-stack {
  display: grid;
  gap: 18px;
}

.project-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 0.72fr) minmax(0, 1fr) minmax(220px, 0.78fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--ink);
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-row:hover,
.project-row:focus-visible {
  border-color: color-mix(in srgb, var(--ink) 34%, var(--line));
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.project-row img {
  width: 100%;
  height: 172px;
  border-radius: 20px;
  object-fit: cover;
}

.label,
.timeline span,
.now-list span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-row h3,
.timeline h3 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.project-row p {
  margin: 0;
  font-size: 1.04rem;
}

.project-row ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

/* .project-row::after {
  content: "Open details";
  justify-self: end;
  align-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
} */

.beyond-section {
  display: grid;
  gap: 30px;
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--focus) 16%, transparent), transparent 38%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 34%),
    var(--surface);
}

.beyond-intro {
  width: min(920px, calc(100% - 56px));
  margin: 0 auto;
  text-align: center;
}

.beyond-highlight {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: stretch;
  width: min(980px, calc(100% - 56px));
  margin: 0 auto;
}

.highlight-copy,
.highlight-image,
.mood-card,
.beyond-note {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.highlight-copy {
  padding: clamp(24px, 4vw, 36px);
}

.highlight-copy h3,
.beyond-note h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.highlight-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.highlight-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.highlight-image {
  margin: 0;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
}

.highlight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-image figcaption,
.mood-card figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.beyond-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 0.9fr);
  gap: 16px;
  width: min(980px, calc(100% - 56px));
  margin: 0 auto;
}

.mood-card {
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}

.mood-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.mood-card.tall {
  grid-row: span 2;
}

.mood-card.wide {
  grid-column: 2 / 4;
}

.beyond-note {
  padding: 24px;
  align-self: stretch;
}

.beyond-note ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.beyond-note li {
  font-size: 0.97rem;
}

.beyond-highlight,
.beyond-grid {
  animation: sectionRise 700ms ease both;
}

@keyframes sectionRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-section,
.writing-section {
  border-top: 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--line);
}

.timeline article {
  min-height: 260px;
  padding: 28px;
  background: var(--surface);
}

.timeline p {
  margin: 18px 0 0;
}

.topic-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.topic-list a {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 720;
}

.topic-list a:hover {
  color: var(--ink);
}

.contact-section {
  padding: 118px 0;
}

.contact-inner {
  padding: 90px 46px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=85") center / cover;
  box-shadow: var(--shadow);
  text-align: center;
}

body.dark .contact-inner {
  background:
    linear-gradient(180deg, rgba(16, 18, 22, 0.76), rgba(16, 18, 22, 0.94)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=85") center / cover;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 46px;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a:hover {
  color: var(--ink);
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
}

.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.34);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-image {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.modal-content {
  padding: 46px;
}

.modal-content h2 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: 0;
}

.modal-summary {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.modal-grid div {
  padding: 22px;
  background: var(--soft);
}

.modal-grid h3 {
  margin: 0 0 8px;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-grid p {
  margin: 0;
  color: var(--muted);
}

.now-main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.now-hero {
  padding: 180px 0 80px;
  text-align: center;
}

.now-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 110px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--line);
}

.now-list article {
  padding: 32px;
  background: var(--surface);
}

.now-list strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.28;
}

@media (max-width: 1000px) {
  .hero h1 {
    font-size: 4.4rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero h1,
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .hero-portrait {
    width: min(520px, 100%);
    margin: 0 auto;
  }

  .section-intro h2,
  .beyond-intro h2,
  .contact-inner h2,
  .now-hero h1 {
    font-size: 3.4rem;
  }

  .metrics,
  .timeline,
  .now-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .webui-feature {
    grid-template-columns: 1fr;
  }

  .webui-screen img {
    height: 390px;
  }

  .project-row::after {
    justify-self: start;
  }

  .project-row img {
    height: 300px;
  }

  .modal-card {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 320px;
    max-height: 360px;
  }

  .beyond-highlight {
    grid-template-columns: 1fr;
  }

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

  .mood-card.tall,
  .mood-card.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .mood-card img {
    min-height: 320px;
  }

  .photo-frame img {
    height: 430px;
  }
}

@media (max-width: 740px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 70px 10px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a,
  .theme-toggle {
    justify-content: flex-start;
    min-height: 44px;
  }

  .hero {
    min-height: auto;
    padding-top: 142px;
    padding-bottom: 64px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .section-intro h2,
  .beyond-intro h2,
  .contact-inner h2,
  .now-hero h1 {
    font-size: 2.55rem;
  }

  .hero-lead,
  .beyond-intro p,
  .contact-inner p,
  .now-hero p {
    font-size: 1.08rem;
  }

  .section,
  .contact-section {
    padding: 76px 0;
  }

  .photo-band {
    padding-bottom: 58px;
  }

  .personal-photo-note {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .photo-frame,
  .metrics,
  .timeline,
  .contact-inner,
  .now-list,
  .beyond-section,
  .highlight-copy,
  .highlight-image,
  .mood-card,
  .beyond-note {
    border-radius: 20px;
  }

  .photo-frame img,
  .mood-card img {
    height: 320px;
  }

  .beyond-intro,
  .beyond-highlight,
  .beyond-grid {
    width: calc(100% - 24px);
  }

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

  .highlight-image {
    grid-template-rows: minmax(260px, 1fr) auto;
  }

  .metrics,
  .timeline,
  .now-list {
    grid-template-columns: 1fr;
  }

  .metrics article,
  .timeline article,
  .now-list article {
    min-height: auto;
    padding: 26px;
  }

  .metrics strong {
    font-size: 3rem;
  }

  .contact-inner {
    padding: 58px 22px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-row {
    padding: 12px;
    border-radius: 22px;
  }

  .webui-feature {
    padding: 12px;
    border-radius: 24px;
  }

  .webui-copy {
    padding: 22px 10px 10px;
  }

  .webui-copy h3 {
    font-size: 3rem;
  }

  .webui-screen {
    border-radius: 18px;
  }

  .webui-screen img {
    height: 280px;
  }

  .project-row img {
    height: 230px;
    border-radius: 16px;
  }

  .modal-card {
    border-radius: 22px;
  }

  .modal-content {
    padding: 30px 20px 22px;
  }

  .modal-content h2 {
    font-size: 2.2rem;
  }

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