:root {
  --paper: #f3ede2;
  --paper-2: #e9e1d4;
  --ink: #1d211e;
  --muted: #70716a;
  --line: rgba(29, 33, 30, .14);
  --accent: #9b513c;
  --accent-2: #315a4b;
  --card: rgba(255,255,255,.34);
  --shadow: 0 20px 50px rgba(48,40,30,.08);
  --max: 1280px;
  --gutter: clamp(18px, 3vw, 30px);
  --radius: 22px;
  --header-h: 70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 13%, rgba(155,81,60,.065), transparent 25rem),
    radial-gradient(circle at 91% 7%, rgba(49,90,75,.055), transparent 23rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, svg { max-width: 100%; display: block; }

/* One alignment system for the whole site. */
.section,
.header-inner,
.contact-inner,
.footer,
.quote-inner,
.proof-inner {
  width: min(var(--max), calc(100% - (2 * var(--gutter))));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  background: rgba(243,237,226,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display:flex; align-items:center; gap:12px; min-width:0; font-weight:700; letter-spacing:-.02em; }
.brand-mark { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border:1px solid var(--ink); border-radius:50%; font-size:11px; font-weight:800; }
.brand-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav { display:flex; align-items:center; gap:clamp(16px, 2vw, 28px); font-size:13px; }
.nav a { color:var(--muted); transition:color .2s ease; }
.nav a:hover { color:var(--ink); }
.lang-toggle { border:1px solid var(--line); background:transparent; border-radius:999px; padding:7px 11px; cursor:pointer; color:var(--ink); min-width:42px; }
.menu-toggle { display:none; width:42px; height:42px; border:1px solid var(--line); background:transparent; border-radius:50%; cursor:pointer; align-items:center; justify-content:center; flex-direction:column; gap:5px; }
.menu-toggle span { display:block; width:17px; height:1.5px; background:var(--ink); }
.mobile-menu { display:none; }
[id] { scroll-margin-top: calc(var(--header-h) + 14px); }

.section-pad { padding-block: clamp(88px, 8vw, 124px); }

/* HERO */
.hero {
  min-height: min(780px, calc(100svh - var(--header-h)));
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
  align-items: center;
  gap: clamp(44px, 6vw, 82px);
  padding-top: clamp(72px, 8vw, 104px);
  padding-bottom: clamp(72px, 8vw, 104px);
}
.hero-copy { min-width:0; max-width: 700px; }
.eyebrow { margin:0 0 16px; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.hero h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight:500; letter-spacing:-.045em; }
.hero h1 { font-size:clamp(56px, 5.35vw, 84px); line-height:.94; margin:0; max-width:720px; }
.hero h1 span, .hero h1 em { display:block; }
.hero h1 em { color:var(--accent); font-style:normal; }
.hero-lead { max-width:660px; margin:30px 0 0; font-size:clamp(17px, 1.35vw, 19px); color:#40423e; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:32px; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:0 18px; border-radius:999px; font-size:13px; font-weight:800; transition:transform .2s ease, background .2s ease; }
.button:hover { transform:translateY(-1px); }
.button-dark { background:var(--ink); color:var(--paper); }
.button-quiet { border:1px solid var(--line); background:transparent; }
.signature-line { display:flex; flex-wrap:wrap; gap:18px; margin-top:44px; font-size:11px; color:var(--muted); }
.signature-line span + span { padding-left:18px; border-left:1px solid var(--line); }

.hero-art { position:relative; min-height:500px; width:100%; max-width:530px; justify-self:end; }
.paper { position:absolute; border:1px solid rgba(29,33,30,.16); box-shadow:var(--shadow); border-radius:26px; background:rgba(255,255,255,.26); }
.paper-a { inset:14% 10% 8% 9%; transform:rotate(-5deg); }
.paper-b { inset:6% 7% 15% 16%; transform:rotate(6deg); background:linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.16)); }
.orbit { position:absolute; border:1px solid rgba(49,90,75,.32); border-radius:50%; }
.orbit-1 { width:58%; height:33%; top:18%; left:18%; transform:rotate(-22deg); }
.orbit-2 { width:66%; height:38%; top:40%; left:8%; transform:rotate(28deg); border-color:rgba(155,81,60,.27); }
.diagram-line { position:absolute; height:1px; background:var(--line); transform-origin:left center; }
.line-a { width:44%; top:36%; right:12%; transform:rotate(28deg); }
.line-b { width:31%; top:67%; left:22%; transform:rotate(-32deg); }
.scribble { position:absolute; right:13%; top:19%; font-family:Georgia,serif; font-size:clamp(42px,5vw,58px); line-height:.86; letter-spacing:-.08em; color:var(--accent-2); transform:rotate(7deg); }
.stamp { position:absolute; left:15%; bottom:17%; width:145px; height:145px; border:1px dashed var(--accent); border-radius:50%; display:grid; place-items:center; text-align:center; transform:rotate(-11deg); color:var(--accent); }
.stamp span { display:block; font-family:Georgia,serif; font-size:40px; line-height:1; }
.stamp small { font-size:10px; font-weight:800; line-height:1.1; text-transform:uppercase; letter-spacing:.12em; }
.margin-note { position:absolute; right:8%; bottom:14%; font-family:Georgia,serif; font-size:13px; color:var(--muted); transform:rotate(-4deg); }

/* PROOF STRIP: full-bleed background, aligned inner grid. */
.proof-strip { border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:rgba(255,255,255,.18); }
.proof-inner { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); }
.proof-inner > div { min-width:0; padding:25px 20px 24px; border-right:1px solid var(--line); }
.proof-inner > div:first-child { padding-left:0; }
.proof-inner > div:last-child { border-right:none; padding-right:0; }
.proof-inner strong { display:block; font-size:24px; font-family:Georgia,serif; font-weight:500; }
.proof-inner span { display:block; margin-top:2px; font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; }

/* CONTENT SECTIONS */
.section-heading { display:grid; grid-template-columns:minmax(0, 1fr) minmax(340px, .72fr); gap:clamp(48px, 6vw, 84px); align-items:end; margin-bottom:52px; }
.section-heading h2 { font-size:clamp(44px, 4.55vw, 66px); line-height:.98; margin:0; max-width:720px; }
.section-heading > p { margin:0; max-width:520px; color:var(--muted); font-size:14px; line-height:1.72; padding-bottom:5px; }

/* Equal, predictable blocks on desktop. */
.project-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; }
.project-card { position:relative; min-width:0; min-height:310px; padding:28px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); overflow:hidden; display:flex; flex-direction:column; transition:transform .25s ease, box-shadow .25s ease, background .25s ease; }
.project-card.project-featured { grid-column:1 / -1; min-height:360px; }
.project-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); background:rgba(255,255,255,.58); }
.project-meta { position:relative; z-index:1; display:flex; justify-content:space-between; gap:16px; color:var(--muted); font-size:10px; letter-spacing:.12em; text-transform:uppercase; }
.project-card h3 { position:relative; z-index:1; font-size:38px; line-height:1; margin:64px 0 12px; }
.project-card.project-featured h3 { font-size:clamp(42px, 4.6vw, 62px); }
.project-card p { position:relative; z-index:1; max-width:680px; color:#55574f; margin:0; font-size:14px; }
.project-tech { margin-top:auto; padding-top:26px; display:flex; flex-wrap:wrap; gap:7px; padding-right:46px; }
.pill { padding:5px 9px; border:1px solid var(--line); border-radius:999px; font-size:9px; color:var(--muted); background:rgba(255,255,255,.28); }
.project-arrow { position:absolute; z-index:2; right:24px; bottom:20px; font-size:24px; }
.project-accent { position:absolute; width:210px; height:210px; right:-55px; top:-55px; border-radius:50%; background:radial-gradient(circle, rgba(155,81,60,.23), transparent 68%); }
.project-card:nth-child(2) .project-accent { background:radial-gradient(circle, rgba(49,90,75,.21), transparent 68%); }
.project-card:nth-child(3) .project-accent { background:radial-gradient(circle, rgba(92,84,113,.16), transparent 68%); }
.project-card:nth-child(4) .project-accent { background:radial-gradient(circle, rgba(155,81,60,.19), transparent 68%); }

.syshuman-section { padding-top:clamp(88px, 9vw, 124px); }
.product-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
.product-card { min-width:0; min-height:290px; padding:24px; border:1px solid var(--line); border-radius:20px; background:rgba(255,255,255,.29); display:flex; flex-direction:column; justify-content:space-between; transition:transform .22s ease, box-shadow .22s ease, background .22s ease; }
.product-card:nth-child(1) { background:rgba(49,90,75,.055); }
.product-card:nth-child(2) { background:rgba(155,81,60,.055); }
.product-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); background:rgba(255,255,255,.55); }
.product-topline { display:flex; justify-content:space-between; gap:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.11em; font-size:9px; }
.product-logo { display:flex; align-items:center; gap:8px; margin-top:38px; }
.product-logo span { font-family:Georgia,serif; font-size:13px; letter-spacing:-.02em; }
.product-logo i { font-style:normal; font-size:8px; letter-spacing:.12em; padding:3px 5px; border:1px solid var(--line); border-radius:999px; }
.product-card h3 { font-size:30px; margin:6px 0 8px; line-height:1; }
.product-card p { color:#55574f; font-size:13px; margin:0; max-width:340px; }
.product-link, .text-link { display:inline-flex; align-items:center; justify-content:space-between; gap:12px; margin-top:25px; font-size:12px; font-weight:800; }
.sys-footer-link { margin-top:30px; }

.quote-band { width:100%; color:var(--paper); background:var(--ink); }
.quote-inner { display:grid; grid-template-columns:100px minmax(0, 1fr); gap:0 26px; align-items:start; }
.quote-mark { grid-column:1; font:500 86px/.75 Georgia,serif; color:#c98468; }
.quote-band blockquote { grid-column:2; margin:0; max-width:980px; font:500 clamp(34px, 4.15vw, 58px)/1.03 Georgia,serif; letter-spacing:-.04em; }
.quote-band cite { grid-column:2; margin-top:22px; font-size:11px; color:rgba(243,237,226,.58); font-style:normal; }

.timeline { border-top:1px solid var(--line); }
.timeline-item { display:grid; grid-template-columns:160px minmax(0,1fr) 145px; gap:28px; padding:24px 0; border-bottom:1px solid var(--line); align-items:start; }
.timeline-year { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; padding-top:7px; }
.timeline-item h3 { margin:0; font-size:27px; line-height:1.12; }
.timeline-place { text-align:right; color:var(--muted); font-size:11px; padding-top:7px; }

.learn-grid { display:grid; grid-template-columns:1.15fr 1fr 1fr; grid-template-rows:auto auto; gap:14px; }
.learn-card { min-width:0; padding:27px; border:1px solid var(--line); border-radius:20px; min-height:210px; background:rgba(255,255,255,.22); transition:transform .22s ease, box-shadow .22s ease; }
a.learn-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.learn-card.large { grid-row:span 2; background:rgba(49,90,75,.055); border-color:rgba(49,90,75,.18); }
.card-number { display:block; font-size:10px; color:var(--muted); letter-spacing:.12em; }
.learn-card h3 { font-size:30px; line-height:1; margin:60px 0 10px; }
.learn-card p { margin:0; color:var(--muted); font-size:13px; }
.card-link { display:inline-block; margin-top:20px; font-size:12px; font-weight:800; }

.about-section { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:62px; align-items:start; }
.about-note { padding:33px; border:1px solid var(--line); border-radius:26px; background:rgba(255,255,255,.28); box-shadow:var(--shadow); }
.about-note h2 { font-size:clamp(40px,4.1vw,54px); margin:0 0 24px; line-height:1; }
.about-note p { color:#55574f; font-size:14px; }
.about-signature { margin-top:30px; font:italic 32px Georgia,serif; color:var(--accent); transform:rotate(-4deg); width:max-content; }
.skills-board { padding:11px 0; }
.skill-row { display:grid; grid-template-columns:145px minmax(0,1fr); gap:18px; padding:18px 0; border-bottom:1px solid var(--line); }
.skill-row strong { font-family:Georgia,serif; font-weight:500; font-size:18px; }
.skill-row span { color:var(--muted); font-size:13px; }

.contact-section { width:100%; background:var(--paper-2); border-top:1px solid var(--line); }
.contact-inner h2 { max-width:760px; font-size:clamp(45px,5.5vw,76px); line-height:.96; margin:0; }
.contact-inner > p:not(.eyebrow) { max-width:630px; color:var(--muted); font-size:15px; }
.link-grid { margin-top:40px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1px; border:1px solid var(--line); background:var(--line); }
.link-grid a { min-height:132px; padding:19px; background:var(--paper-2); display:flex; flex-direction:column; justify-content:space-between; transition:background .2s ease; }
.link-grid a:hover { background:var(--paper); }
.link-grid span { font:500 23px Georgia,serif; }
.link-grid small { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.link-grid b { align-self:flex-end; font-size:20px; font-weight:400; }
.contact-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; margin-top:26px; padding-top:17px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.contact-footer a { color:var(--ink); }
.footer { padding:26px 0; display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; font-size:10px; color:var(--muted); }

.reveal { opacity:0; transform:translateY(15px); transition:opacity .65s ease, transform .65s ease; }
.reveal.in { opacity:1; transform:none; }

@media (max-width: 1100px) {
  .hero { grid-template-columns:minmax(0, 1fr) minmax(340px, .88fr); gap:44px; }
  .hero h1 { font-size:clamp(52px, 6.2vw, 76px); }
  .section-heading { grid-template-columns:minmax(0, 1fr) minmax(280px, .68fr); gap:38px; }
  .proof-inner { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .proof-inner > div:nth-child(3) { border-right:none; }
  .proof-inner > div:nth-child(4), .proof-inner > div:nth-child(5) { border-top:1px solid var(--line); }
  .proof-inner > div:nth-child(4) { border-right:1px solid var(--line); }
  .product-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .learn-grid { grid-template-columns:1fr 1fr; }
  .learn-card.large { grid-column:1 / -1; grid-row:auto; }
  .link-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .about-section { gap:40px; }
}

@media (max-width: 860px) {
  .nav { display:none; }
  .menu-toggle { display:flex; }
  .mobile-menu {
    display:none;
    position:absolute;
    top:100%; left:0; right:0;
    max-height:calc(100dvh - var(--header-h));
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding:12px var(--gutter) 20px;
    background:var(--paper);
    border-top:1px solid rgba(29,33,30,.05);
    border-bottom:1px solid var(--line);
    box-shadow:0 16px 28px rgba(48,40,30,.07);
  }
  .mobile-menu.open { display:grid; gap:2px; }
  .mobile-menu a { padding:12px 0; color:var(--muted); border-bottom:1px solid rgba(29,33,30,.08); }
  .mobile-menu .lang-toggle { margin-top:10px; width:max-content; }

  .hero { grid-template-columns:1fr; min-height:auto; }
  .hero-copy { max-width:760px; }
  .hero-art { justify-self:stretch; max-width:620px; min-height:390px; margin-inline:auto; }
  .section-heading { grid-template-columns:1fr; gap:18px; align-items:start; }
  .section-heading > p { max-width:700px; padding-bottom:0; }
  .quote-inner { grid-template-columns:70px minmax(0,1fr); gap:0 16px; }
  .quote-mark { font-size:72px; }
  .quote-band blockquote, .quote-band cite { grid-column:2; }
  .timeline-item { grid-template-columns:120px minmax(0,1fr); gap:22px; }
  .timeline-place { text-align:left; grid-column:2; padding-top:0; margin-top:-15px; }
  .about-section { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  :root { --header-h:64px; }
  .section-pad { padding-top:72px; padding-bottom:72px; }
  .hero { padding-top:56px; gap:34px; }
  .hero h1 { font-size:clamp(46px, 13.8vw, 70px); }
  .hero-lead { font-size:16px; }
  .signature-line { gap:10px; margin-top:32px; }
  .signature-line span + span { padding-left:10px; }
  .hero-art { min-height:310px; }
  .paper-a { inset:12% 4% 8% 5%; }
  .paper-b { inset:5% 1% 14% 11%; }
  .orbit-1 { width:64%; height:34%; left:16%; }
  .orbit-2 { width:73%; height:38%; left:5%; }
  .scribble { font-size:40px; right:9%; top:17%; }
  .stamp { width:110px; height:110px; left:9%; bottom:9%; }
  .stamp span { font-size:31px; }
  .stamp small { font-size:8px; }
  .margin-note { right:7%; bottom:6%; font-size:10px; }

  .proof-inner { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .proof-inner > div { padding:18px 14px; }
  .proof-inner > div:first-child { padding-left:0; }
  .proof-inner > div:nth-child(2), .proof-inner > div:nth-child(4) { border-right:none; }
  .proof-inner > div:nth-child(3), .proof-inner > div:nth-child(4), .proof-inner > div:nth-child(5) { border-top:1px solid var(--line); }
  .proof-inner > div:nth-child(5) { grid-column:1 / -1; padding-right:0; }

  .section-heading h2 { font-size:clamp(40px,11.5vw,58px); }
  .project-grid, .product-grid, .learn-grid { grid-template-columns:1fr; }
  .project-card, .project-card.project-featured { grid-column:1; }
  .project-card, .project-card.project-featured { min-height:300px; padding:22px; }
  .project-card h3, .project-card.project-featured h3 { margin-top:52px; font-size:34px; }
  .project-tech { padding-top:22px; padding-right:44px; }
  .project-arrow { right:20px; bottom:18px; }
  .product-card { min-height:250px; padding:21px; }
  .product-logo { margin-top:28px; }
  .product-card h3 { font-size:29px; }

  .quote-band { padding-top:58px; padding-bottom:58px; }
  .quote-inner { grid-template-columns:1fr; gap:5px; }
  .quote-mark { grid-column:1; font-size:68px; }
  .quote-band blockquote, .quote-band cite { grid-column:1; }
  .quote-band blockquote { font-size:clamp(31px,9vw,46px); }

  .timeline-item { grid-template-columns:1fr; gap:7px; padding:21px 0; }
  .timeline-place { grid-column:auto; margin-top:0; }
  .timeline-item h3 { font-size:24px; }
  .learn-card, .learn-card.large { min-height:195px; padding:23px; }
  .learn-card h3 { margin-top:45px; font-size:28px; }
  .about-note { padding:25px; }
  .about-signature { font-size:28px; }
  .skill-row { grid-template-columns:1fr; gap:4px; padding:16px 0; }
  .link-grid { grid-template-columns:1fr 1fr; }
  .link-grid a:last-child { grid-column:1 / -1; }
  .link-grid a { min-height:120px; }
  .contact-footer { flex-direction:column; }
  .footer { flex-direction:column; padding-top:22px; }
}

@media (max-width: 400px) {
  .hero-actions { align-items:stretch; flex-direction:column; }
  .button { width:100%; }
  .link-grid { grid-template-columns:1fr; }
  .link-grid a:last-child { grid-column:auto; }
  .brand-mark { width:31px; height:31px; flex-basis:31px; font-size:10px; }
  .menu-toggle { width:39px; height:39px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .reveal { opacity:1; transform:none; transition:none; }
  *, *::before, *::after { transition:none !important; }
}
