:root {
  color-scheme: dark;
  --bg: #0d1110;
  --bg-deep: #090c0b;
  --surface: #141918;
  --surface-strong: #191f1d;
  --line: rgba(231, 225, 211, 0.12);
  --line-strong: rgba(231, 225, 211, 0.2);
  --text: #f1eee6;
  --muted: #a9ada7;
  --quiet: #777d78;
  --amber: #e2aa6b;
  --mint: #77d7c4;
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shell: 1440px;
  --radius-lg: 28px;
  --radius-md: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 7%, rgba(226, 170, 107, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 22%, rgba(119, 215, 196, 0.07), transparent 34rem),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.site-shell { width: min(calc(100% - clamp(40px, 7vw, 112px)), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; left: 20px; top: -60px; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); text-decoration: none; }
.skip-link:focus { top: 16px; }

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(231, 225, 211, 0.08);
  background: rgba(13, 17, 16, 0.82);
  backdrop-filter: blur(18px);
}
.nav-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 8px 24px rgba(226, 170, 107, 0.2); }
.brand span { display: grid; line-height: 1.25; }
.brand b { font-size: 16px; letter-spacing: 0.04em; }
.brand small { margin-top: 3px; color: var(--quiet); font-size: 11px; letter-spacing: 0.04em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 180ms ease; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.nav-links .nav-cta:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }

.hero { min-height: 690px; padding-block: clamp(76px, 9vw, 132px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(350px, 0.65fr); gap: clamp(56px, 8vw, 132px); align-items: center; }
.eyebrow { margin: 0 0 22px; color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; }
.hero h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(54px, 6.2vw, 94px); font-weight: 600; letter-spacing: -0.055em; line-height: 1.06; }
.hero h1 em { color: var(--amber); font-style: normal; }
.hero-lead { max-width: 660px; margin: 34px 0 0; color: var(--muted); font-size: clamp(17px, 1.25vw, 20px); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--text); color: #111512; }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,0.025); color: var(--text); }
.button-secondary:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.05); }

.profile-panel { position: relative; overflow: hidden; padding: clamp(26px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)); box-shadow: 0 32px 80px rgba(0,0,0,0.18); }
.profile-panel::after { content: ""; position: absolute; width: 260px; height: 260px; right: -130px; top: -130px; border: 1px solid rgba(226,170,107,0.18); border-radius: 50%; box-shadow: 0 0 0 34px rgba(226,170,107,0.025), 0 0 0 68px rgba(226,170,107,0.02); pointer-events: none; }
.profile-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; }
.profile-avatar { width: 116px; height: 116px; flex: 0 0 auto; border: 2px solid rgba(226,170,107,0.35); border-radius: 50%; object-fit: cover; box-shadow: 0 16px 40px rgba(0,0,0,0.3); }
.profile-kicker { margin: 0 0 5px; color: var(--quiet); font-size: 12px; letter-spacing: 0.12em; }
.profile-top h2 { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1.2; }
.profile-top p:last-child { max-width: 280px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; padding-block: 22px; border-block: 1px solid var(--line); }
.profile-metrics div { display: grid; gap: 3px; padding-inline: 14px; border-right: 1px solid var(--line); }
.profile-metrics div:first-child { padding-left: 0; }
.profile-metrics div:last-child { padding-right: 0; border-right: 0; }
.profile-metrics strong { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.profile-metrics span { color: var(--quiet); font-size: 11px; }
.profile-note { margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }

.projects-section { padding-block: clamp(84px, 9vw, 132px); border-block: 1px solid rgba(231,225,211,0.08); background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.006)); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.55fr); gap: 60px; align-items: end; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 13px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 4vw, 58px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-card { --project-accent: var(--amber); position: relative; min-height: 430px; overflow: hidden; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--project-accent) 12%, transparent), transparent 40%), var(--surface); text-decoration: none; transition: transform 220ms ease, border-color 220ms ease, background 220ms ease; }
.project-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--project-accent) 42%, var(--line)); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--project-accent) 17%, transparent), transparent 44%), var(--surface-strong); }
.tone-blue { --project-accent: #82b7e7; }
.tone-coral { --project-accent: #ee9a85; }
.tone-green { --project-accent: #73cda7; }
.project-number { position: absolute; top: 28px; right: 34px; color: color-mix(in srgb, var(--project-accent) 66%, var(--quiet)); font-family: var(--serif); font-size: 14px; letter-spacing: 0.08em; }
.project-title-row { display: flex; align-items: center; gap: 18px; padding-right: 52px; }
.project-title-row img { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 16px; object-fit: cover; box-shadow: 0 12px 30px rgba(0,0,0,0.24); }
.project-type { display: block; margin-bottom: 3px; color: var(--project-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.project-title-row h3 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.project-subtitle { margin: 30px 0 0; color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.55; }
.project-description { max-width: 630px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-top: auto; padding-top: 34px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.project-tags span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.project-link { flex: 0 0 auto; color: var(--project-accent); font-size: 13px; font-weight: 700; }
.project-link b, .article-link b { display: inline-block; margin-left: 4px; transition: transform 180ms ease; }
.project-card:hover .project-link b { transform: translate(3px, -3px); }

.writing-section { padding-block: clamp(84px, 9vw, 132px); }
.writing-heading { align-items: center; }
.text-link { justify-self: end; color: var(--muted); font-size: 14px; text-decoration: none; }
.text-link:hover { color: var(--amber); }
.writing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.article-card { min-height: 260px; display: flex; flex-direction: column; padding: 34px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background 180ms ease; }
.article-card:nth-child(odd) { border-right: 1px solid var(--line); }
.article-card:hover { background: rgba(255,255,255,0.025); }
.article-index { color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.article-card h3 { max-width: 560px; margin: 18px 0 0; font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.45; }
.article-card p { max-width: 570px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.article-link { margin-top: auto; padding-top: 26px; color: var(--quiet); font-size: 12px; font-weight: 700; }
.article-card:hover .article-link { color: var(--amber); }
.article-card:hover .article-link b { transform: translateX(4px); }
.article-featured { background: linear-gradient(135deg, rgba(115,205,167,0.065), transparent 65%); }

.about-section { padding-block: clamp(84px, 9vw, 128px); border-top: 1px solid rgba(231,225,211,0.08); background: var(--bg-deep); }
.about-grid { display: grid; grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr); gap: clamp(60px, 9vw, 140px); }
.about-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.2vw, 60px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.25; }
.principles { display: grid; }
.principles > div { display: grid; grid-template-columns: 52px 190px 1fr; gap: 22px; align-items: start; padding-block: 26px; border-bottom: 1px solid var(--line); }
.principles > div:first-child { padding-top: 8px; }
.principles span { color: var(--amber); font-family: var(--serif); font-size: 13px; }
.principles h3 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.principles p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.site-footer { padding-block: 54px; border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 72px; align-items: end; }
.footer-brand { font-family: var(--serif); font-size: 22px; font-weight: 600; text-decoration: none; }
.footer-grid p { margin: 6px 0 0; color: var(--quiet); font-size: 12px; }
.footer-contact, .footer-legal { display: grid; gap: 6px; }
.footer-contact a, .footer-legal a, .footer-legal span { color: var(--quiet); font-size: 12px; text-decoration: none; }
.footer-contact a:hover, .footer-legal a:hover { color: var(--text); }
.footer-legal { text-align: right; }

a:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 900px; }
  .profile-panel { max-width: 720px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .section-heading > p { max-width: 720px; }
  .project-card { min-height: 460px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-copy { max-width: 720px; }
  .text-link { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-legal { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 760px) {
  .site-shell { width: min(calc(100% - 32px), var(--shell)); }
  .site-header { position: static; }
  .nav-row { min-height: 72px; }
  .brand small, .nav-links > a:not(.nav-cta) { display: none; }
  .nav-links { gap: 0; }
  .hero { padding-block: 64px 76px; gap: 48px; }
  .hero h1 { font-size: clamp(44px, 13vw, 66px); }
  .hero h1 br { display: none; }
  .hero-lead { margin-top: 26px; font-size: 16px; }
  .hero-actions { align-items: stretch; }
  .button { width: 100%; }
  .profile-top { align-items: flex-start; }
  .profile-avatar { width: 84px; height: 84px; }
  .profile-top h2 { font-size: 28px; }
  .profile-metrics div { padding-inline: 9px; }
  .profile-metrics strong { font-size: 19px; }
  .projects-section, .writing-section, .about-section { padding-block: 72px; }
  .section-heading { margin-bottom: 34px; }
  .project-grid, .writing-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 420px; }
  .project-footer { align-items: flex-start; flex-direction: column; }
  .article-card { min-height: 240px; padding: 28px 20px; border-right: 0; }
  .principles > div { grid-template-columns: 38px 1fr; gap: 14px; }
  .principles p { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { grid-column: auto; }
}

@media (max-width: 430px) {
  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 15px; }
  .nav-cta { font-size: 12px !important; }
  .profile-top { display: grid; }
  .profile-panel { padding: 24px; }
  .project-card { min-height: 0; padding: 24px; }
  .project-number { top: 22px; right: 24px; }
  .project-title-row img { width: 54px; height: 54px; border-radius: 14px; }
  .project-title-row h3 { font-size: 26px; }
  .project-subtitle { margin-top: 24px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
