:root {
  --ink: #10243f;
  --ink-2: #243b57;
  --muted: #64748b;
  --paper: #f6efe5;
  --white: #ffffff;
  --line: rgba(16, 36, 63, 0.14);
  --line-strong: rgba(16, 36, 63, 0.32);
  --accent: #1d5f8f;
  --accent-2: #ead8bd;
  --forest: #17324c;
  --blue: #0f4f76;
  --warm: #c7773f;
  --sand: #fff8ef;
  --max: 1180px;
  --side: clamp(1rem, 4vw, 2.25rem);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(29, 95, 143, .18), transparent 30rem),
    radial-gradient(circle at 84% 18%, rgba(199, 119, 63, .16), transparent 26rem),
    linear-gradient(180deg, #fffaf3 0%, var(--paper) 46%, #ffffff 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.skip-link { position: absolute; left: 1rem; top: .75rem; z-index: 20; transform: translateY(-180%); padding: .75rem 1rem; color: var(--white); background: var(--ink); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.site-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 var(--side); background: rgba(255, 253, 249, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; min-height: 48px; align-items: center; gap: .75rem; text-decoration: none; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: var(--white); background: var(--blue); border-radius: 50%; font-size: .72rem; letter-spacing: .04em; }
nav { display: flex; align-items: center; gap: .35rem; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 .75rem; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 650; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
.hero { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--side); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.hero.compact { min-height: calc(100svh - 72px); }
.eyebrow { margin: 0 0 1rem; color: var(--accent); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 10.6ch; margin-bottom: 1.4rem; font-size: clamp(3.45rem, 8.8vw, 7.4rem); line-height: .89; letter-spacing: -.075em; text-wrap: balance; }
.lead { max-width: 690px; margin-bottom: 0; color: var(--ink-2); font-size: clamp(1.15rem, 2vw, 1.42rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .85rem 1.05rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 750; }
.button-dark { color: var(--white); background: var(--blue); border-color: var(--blue); }
.button-dark:hover { background: var(--ink); border-color: var(--ink); }
.button-light { color: var(--ink); background: rgba(255,248,239,.72); }
.hero-panel { min-height: 370px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: flex-end; background: var(--ink); color: var(--white); border-radius: 28px; box-shadow: 0 24px 80px rgba(15,79,118,.20); overflow: hidden; }
.hero-panel.small { min-height: 320px; }
.panel-topline { width: 100%; height: 8px; margin-bottom: auto; background: linear-gradient(90deg, var(--blue), #78b3d0, var(--accent-2), var(--warm)); border-radius: 999px; }
.panel-label { margin-bottom: .65rem; color: #c6d5df; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.hero-panel h2 { max-width: 12ch; margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.15rem); line-height: .95; letter-spacing: -.06em; }
.hero-panel p:last-child { margin-bottom: 0; color: #d7e1e8; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.section { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--side); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section h2, .contact h2, .page-hero h1, .project-page h1 { margin-bottom: 0; font-size: clamp(2.5rem, 5.6vw, 5.3rem); line-height: .94; letter-spacing: -.068em; text-wrap: balance; }
.teaser-grid { display: grid; gap: 1rem; }
.teaser-grid.three { grid-template-columns: repeat(3, 1fr); }
.teaser-card, .project-tile, .note-list article { min-height: 230px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.72); text-decoration: none; }
.teaser-card span, .project-tile span, .note-list span { color: var(--accent); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.teaser-card h3, .project-tile h2, .project-tile h3, .note-list h2 { margin: 2rem 0 1rem; font-size: clamp(1.45rem, 2.5vw, 2.35rem); line-height: 1; letter-spacing: -.055em; }
.teaser-card p, .project-tile p, .note-list p { margin-bottom: 0; color: var(--muted); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.teaser-card.warm { background: linear-gradient(145deg, #d9ebf4 0%, var(--accent-2) 100%); }
.teaser-card.sand { background: var(--sand); }
.teaser-card.blue { color: white; background: linear-gradient(145deg, var(--forest), #0f4f76); }
.teaser-card.blue span { color: #eac9a6; }
.teaser-card.blue p { color: #d7e1e8; }
.home-split, .profile { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.link-list { border-top: 1px solid var(--line-strong); }
.link-list a { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.link-list span { color: var(--muted); }
.link-list .all-link { display: inline-flex; min-height: 48px; align-items: center; gap: .5rem; border-bottom: 0; font-weight: 800; color: var(--accent); }
.page-hero { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(4rem, 10vw, 7rem) var(--side) clamp(2rem, 5vw, 4rem); }
.page-hero h1 { max-width: 9.5ch; }
.page-hero p:not(.eyebrow) { max-width: 680px; color: var(--ink-2); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.18rem; }
.project-index-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-bottom: 0; }
.subproject-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.note-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; border-bottom: 0; }
.note-list .note-body { white-space: pre-wrap; }
.admin-shell { width: min(100%, 820px); min-height: calc(100svh - 144px); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--side); }
.editor-card { padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.76); box-shadow: 0 24px 80px rgba(15,79,118,.12); }
.editor-card h1 { max-width: none; font-size: clamp(2.8rem, 8vw, 5.3rem); }
.editor-card p, .editor-form, .editor-session { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.editor-session { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0; color: var(--muted); }
.editor-form { display: grid; gap: .65rem; }
.editor-form label { margin-top: .8rem; font-weight: 750; }
.editor-form input, .editor-form textarea { width: 100%; padding: .9rem 1rem; color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; }
.editor-form textarea { resize: vertical; line-height: 1.55; }
.editor-form .button { width: fit-content; margin-top: 1rem; }
.editor-form button:disabled { cursor: wait; opacity: .58; }
.editor-status { min-height: 1.6em; margin: 1.5rem 0 0; color: var(--muted); }
.editor-status[data-state="success"] { color: #17673a; }
.editor-status[data-state="error"] { color: #9b2c2c; }
[hidden] { display: none !important; }
.project-page { width: min(100%, 920px); margin: 0 auto; padding: clamp(4rem, 10vw, 7rem) var(--side); }
.back-link { display: inline-flex; margin-bottom: 2rem; color: var(--accent); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 800; text-decoration: none; }
.project-page h1 { max-width: none; }
.project-lead { margin-top: 1.25rem; color: var(--ink-2); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; }
.project-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 3rem; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.project-meta span { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--sand); color: var(--accent); font-size: .82rem; font-weight: 750; }
.project-page section { padding: 2rem 0; border-top: 1px solid var(--line); }
.project-page section h2 { margin-bottom: .75rem; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1; letter-spacing: -.055em; }
.project-page section p { margin-bottom: 0; color: var(--muted); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.05rem; }
.project-page .project-tile h3 { margin: 2rem 0 1rem; font-size: clamp(1.45rem, 2.5vw, 2.35rem); }
.contact { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--side); color: var(--white); background: var(--ink); border-radius: 32px 32px 0 0; }
.contact .eyebrow { color: #eac9a6; }
.contact p:not(.eyebrow) { max-width: 640px; color: #d5dbe2; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.05rem; }
.text-link { display: inline-flex; min-height: 48px; align-items: center; gap: .65rem; margin-top: 1rem; color: var(--white); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }
.text-link:hover { border-bottom-color: white; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--side); color: #bdc7d0; background: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .9rem; }
@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; padding-block: .75rem; }
  nav { width: 100%; overflow-x: auto; padding-bottom: .1rem; }
  nav a { padding-left: 0; padding-right: 1.1rem; white-space: nowrap; }
  .hero, .home-split, .profile { grid-template-columns: 1fr; }
  .hero.compact { min-height: 0; }
  .hero-panel { min-height: 260px; }
  h1 { max-width: 10ch; font-size: clamp(3.15rem, 15vw, 5.1rem); }
  .teaser-grid.three, .project-index-list, .subproject-list, .note-list { grid-template-columns: 1fr; }
  .editor-session { align-items: flex-start; flex-direction: column; }
  .link-list a { grid-template-columns: 1fr; gap: .25rem; }
  footer { flex-direction: column; }
}
@media (max-width: 520px) {
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .section h2, .contact h2, .page-hero h1, .project-page h1 { font-size: clamp(2.35rem, 12vw, 3.8rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
