/* Shared layout and accessibility */
* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --paper: #f6f3e9;
  --ink: #263b30;
  --muted: #657065;
  --line: #d7dbcc;
  --accent: #315b45;
  --surface: #e8ecdf;
  --knob: #fffdf6;
}
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 5px; }
button { font: inherit; }
button, a { touch-action: manipulation; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.page { width: min(1184px, calc(100% - 112px)); margin: 0 auto; }
header { height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 650; letter-spacing: -.035em; text-decoration: none; }
.brand img { width: 38px; height: 38px; display: block; }
.theme-control { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.theme-switch { width: 44px; height: 25px; padding: 0; position: relative; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); cursor: pointer; }
.theme-switch::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: var(--accent); transition: transform .2s; }
:root[data-theme="night"] .theme-switch::after { transform: translateX(19px); }
h1, h2, p, figure { margin: 0; }
.hero { position: relative; }
.hero-copy { position: relative; z-index: 1; }
h1 { font-weight: 400; line-height: 1.08; letter-spacing: -.055em; }
.subtitle { font-size: 21px; line-height: 1.5; }
.about { font-size: 15px; line-height: 1.85; color: var(--muted); }
.hero-art { position: relative; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.projects h2 { font-size: 12px; letter-spacing: .15em; font-weight: 500; }
.project-card { position: relative; display: grid; align-items: center; overflow: hidden; }
.project-copy { position: relative; z-index: 1; }
.project-title { line-height: 1.1; letter-spacing: -.04em; }
.project-description { color: var(--muted); font-size: 15px; }
.project-link { display: inline-flex; align-items: center; font-size: 13px; font-weight: 550; text-decoration: none; transition: transform .2s; }
.project-link:hover { transform: translateX(4px); }
.project-visual { min-width: 0; }
.project-visual svg { width: 100%; height: auto; display: block; }
.decoration { pointer-events: none; position: absolute; }
footer { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; display: inline-block; background: #a9864a; border-radius: 50%; box-shadow: 0 0 0 4px #a9864a12; }
@media (max-width: 760px) {
  .page { width: calc(100% - 40px); }
  header { height: 84px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .theme-control { gap: 7px; font-size: 11px; }
  .subtitle { font-size: 20px; }
  .about { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Warm study design */
:root[data-theme="night"] { color-scheme: dark; --paper: #18271f; --ink: #f0eddc; --muted: #b6c1b0; --line: #3b4b3c; --accent: #cfdbb3; --surface: #263b2b; }
body { background-image: radial-gradient(var(--line) .65px, transparent .65px); background-size: 8px 8px; }
header { border-bottom: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: 1.03fr 1fr; gap: 50px; align-items: center; padding: 64px 0 58px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 6.2vw, 83px); }
.subtitle { margin-top: 22px; max-width: 380px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.45; }
.about { max-width: 460px; margin-top: 28px; }
.hero-art { height: 410px; margin: 5px 0 5px; }
.hero-art::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid #a9b59d; border-radius: 46% 46% 9px 9px; }
.hero-art img { position: relative; border-radius: 46% 46% 9px 9px; }
.hero-art::after { content: ""; position: absolute; width: 80px; height: 80px; top: -26px; right: -22px; border: 1px solid #ad8f5a; border-radius: 50%; box-shadow: 0 0 0 7px var(--paper), 0 0 0 8px #ad8f5a; z-index: -1; }
.sprig { width: 52px; height: 65px; left: -21px; bottom: 5px; color: var(--accent); transform: rotate(-20deg); }
.projects { padding: 0 0 48px; }
.projects h2 { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.projects h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.project-card { grid-template-columns: 1.3fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px 42px; min-height: 218px; }
.project-title { font-family: Georgia, "Times New Roman", serif; font-size: 39px; }
.project-description { margin-top: 9px; }
.project-link { margin-top: 21px; border-bottom: 1px solid var(--accent); padding-bottom: 3px; color: var(--accent); }
.project-visual { justify-self: end; width: 300px; color: var(--accent); }
footer { padding: 20px 0 30px; border-top: 1px solid var(--line); }
@media (min-width: 1400px) { .hero { padding-top: 78px; padding-bottom: 72px; } .hero-art { height: 440px; } }
@media (max-width: 1000px) and (min-width: 761px) {
  .page { width: calc(100% - 72px); }
  .hero { gap: 30px; } h1 { font-size: 58px; } .hero-art { height: 380px; }
  .project-card { padding: 30px; } .project-visual { width: 230px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding: 42px 0; }
  h1 { font-size: clamp(43px, 10.6vw, 72px); }
  .subtitle { font-size: 23px; max-width: 330px; margin-top: 15px; }
  .about { margin-top: 22px; max-width: 100%; }
  .hero-art { height: auto; aspect-ratio: 1.25; width: calc(100% - 14px); margin: 0; }
  .hero-art::after { width: 55px; height: 55px; right: -14px; top: -14px; }
  .project-card { grid-template-columns: 1fr; padding: 27px; gap: 15px; }
  .project-title { font-size: 35px; } .project-visual { width: min(100%, 270px); justify-self: center; }
  .project-link { margin-top: 16px; } .projects { padding-bottom: 32px; }
}
