:root {
  --bg:#1A1714; --bg2:#211D19; --card:#211D19;
  --line:#2C2721; --line2:#3D362E;
  --fg:#F2EDE6; --muted:#B6ABA0; --dim:#8E857A;
  --accent:#E4633A; --accent-soft:rgba(228,99,58,.14); --on-accent:#1A1714;
  --field:#191512;
}
:root[data-theme="light"] {
  --bg:#FAF6F0; --bg2:#F3EDE4; --card:#FFFFFF;
  --line:#E4DACC; --line2:#D3C7B6;
  --fg:#1A1714; --muted:#5C544A; --dim:#867C70;
  --accent:#C24A22; --accent-soft:rgba(194,74,34,.10); --on-accent:#FFFFFF;
  --field:#FFFFFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Sora', sans-serif;
  min-height: 100vh;
  transition: background .25s ease, color .25s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, button { font: inherit; }
::placeholder { color: var(--dim); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  padding-top: 16px; padding-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.logo { font-family: 'Newsreader', serif; font-size: 21px; color: var(--fg); text-decoration: none; }
.nav { display: flex; gap: 24px; align-items: center; color: var(--dim); }
.nav a { color: var(--dim); }
.nav a.contact-link { color: var(--accent); }
.theme-toggle {
  background: transparent; border: 1px solid var(--line2); color: var(--fg);
  border-radius: 99px; padding: 7px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* buttons */
.btn {
  display: inline-block; padding: 16px 30px; border-radius: 4px;
  font-weight: 600; font-size: 15px; transition: opacity .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); border: none; }
.btn-primary:hover { opacity: .9; }
.btn-outline { border: 1px solid var(--line2); color: var(--fg); }
.btn-outline:hover { border-color: var(--accent); }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner {
  position: relative;
  padding: 126px 40px 112px;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,340px);
  gap: 64px; align-items: center;
}
.hero-eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hero h1 {
  margin: 0; font-family: 'Newsreader', serif; font-size: 88px; line-height: .98;
  font-weight: 400; letter-spacing: -.022em; max-width: 14ch;
}
.hero h2 {
  margin: 0; font-size: 27px; font-weight: 400; letter-spacing: -.012em;
  color: var(--accent); max-width: 32ch;
}
.hero p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 62ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 10px; }
.hero-photo {
  position: relative; width: 340px; height: 420px; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; justify-self: end;
}

/* image placeholder (swap for a real <img> once photos are ready) */
.img-slot {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; background: var(--bg2); color: var(--dim);
  font-size: 13px; border: 1px dashed var(--line2);
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; }

/* section titles */
.section { padding-top: 96px; }
.section-title {
  margin: 0; font-family: 'Newsreader', serif; font-size: 52px;
  font-weight: 400; letter-spacing: -.02em;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-tag { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--dim); }

/* demo cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; padding-top: 44px; }
.card {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line2); }
.card-media { position: relative; height: 180px; border-bottom: 1px solid var(--line); }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 4px 10px; }
.tag-outline { border: 1px solid var(--line2); color: var(--muted); border-radius: 4px; padding: 5px 10px; font-size: 12px; }
.tag-pill-outline { border: 1px solid var(--line2); color: var(--muted); border-radius: 99px; padding: 7px 14px; }
.card-body h3 { margin: 0; font-family: 'Newsreader', serif; font-size: 26px; font-weight: 400; line-height: 1.15; }
.card-body p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); flex: 1; }
.card-link {
  border: 1px solid var(--line2); color: var(--fg); border-radius: 4px; padding: 13px 16px;
  font-size: 14px; text-align: center; transition: border-color .15s ease, color .15s ease;
}
.card-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* timeline */
.timeline { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 40px; }
.timeline-item { position: relative; padding-bottom: 48px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -46px; top: 7px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--line2);
}
.timeline-dot.current { background: var(--accent); }
.timeline-grid { display: grid; grid-template-columns: minmax(0,260px) minmax(0,1fr); gap: 40px; }
.timeline-meta { display: flex; flex-direction: column; gap: 6px; }
.timeline-date { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--dim); }
.timeline-date.current { color: var(--accent); }
.timeline-org { font-family: 'Newsreader', serif; font-size: 28px; }
.timeline-role { font-size: 15px; color: var(--dim); }
.timeline-content { display: flex; flex-direction: column; gap: 16px; }
.timeline-content-block { display: flex; flex-direction: column; gap: 8px; }
.timeline-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim);
}
.timeline-content p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 7px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

/* case study */
.case-study { margin-top: 112px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); }
.case-study .wrap {
  padding: 88px 40px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 56px; align-items: center;
}
.case-media { position: relative; height: 440px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.case-copy { display: flex; flex-direction: column; gap: 20px; }
.case-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.case-copy h2 { margin: 0; font-family: 'Newsreader', serif; font-size: 46px; font-weight: 400; letter-spacing: -.02em; line-height: 1.08; }
.case-copy > p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--muted); }
.case-list { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.case-list-item { display: flex; gap: 12px; align-items: flex-start; }
.case-list-item p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.case-list-item strong { color: var(--fg); font-weight: 600; }
.case-copy .btn { align-self: flex-start; margin-top: 8px; }

/* stack */
.stack-card {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 30px; display: flex; flex-direction: column; gap: 18px;
}
.stack-title { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.stack-note { margin: auto 0 0; font-size: 14px; line-height: 1.6; color: var(--dim); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0,240px) minmax(0,1fr); gap: 56px; align-items: start; }
.about-photo { position: relative; width: 240px; height: 290px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.about-copy { max-width: 70ch; display: flex; flex-direction: column; gap: 24px; }
.about-copy h2 { margin: 0; font-family: 'Newsreader', serif; font-size: 52px; font-weight: 400; letter-spacing: -.02em; }
.about-copy p { margin: 0; font-size: 19px; line-height: 1.8; color: var(--muted); }
.about-facts { display: flex; gap: 44px; flex-wrap: wrap; padding-top: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--dim); }
.about-facts div div:first-child { color: var(--fg); }

/* contact */
.contact { margin-top: 112px; border-top: 1px solid var(--line); background: var(--bg2); }
.contact .wrap { padding: 88px 40px 40px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 72px; }
.contact-copy { display: flex; flex-direction: column; gap: 22px; }
.contact-copy h2 { margin: 0; font-family: 'Newsreader', serif; font-size: 60px; font-weight: 400; letter-spacing: -.025em; line-height: 1.02; max-width: 15ch; }
.contact-copy > p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 42ch; }
.contact-links { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 15px; }
.contact-links a.muted { color: var(--muted); }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea {
  background: var(--field); border: 1px solid var(--line2); border-radius: 4px;
  padding: 15px 16px; color: var(--fg); font-size: 15px; outline: none; width: 100%;
  transition: border-color .15s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; }
.contact-form button {
  background: var(--accent); color: var(--on-accent); border: none; border-radius: 4px;
  padding: 16px; font-weight: 600; font-size: 15px; cursor: pointer; transition: opacity .15s ease;
}
.contact-form button:hover { opacity: .9; }
.form-note { font-size: 13px; color: var(--dim); margin: 0; }

.footer {
  padding: 22px 40px 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--dim);
}

@media (max-width: 900px) {
  .wrap, .hero-inner, .case-study .wrap, .contact .wrap { padding-left: 24px; padding-right: 24px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; width: 100%; max-width: 340px; }
  .hero h1 { font-size: 56px; max-width: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .timeline-grid { grid-template-columns: 1fr; gap: 16px; }
  .case-study .wrap { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact .wrap { grid-template-columns: 1fr; }
  .nav { gap: 14px; flex-wrap: wrap; }
}
