/* Lauren Niehues portfolio styles */

:root {
  --sage-50:  #f4f6f1;
  --sage-100: #e6ebe0;
  --sage-200: #cdd8c3;
  --sage-400: #9caf88;
  --sage-600: #6b8160;
  --sage-800: #3f5239;
  --ink:      #23291f;
  --muted:    #5b6455;
  --paper:    #fbfbf8;
  --radius:   18px;
  --surface:  #ffffff;
  --nav-bg:   rgba(251,251,248,.88);
  --on-accent: #ffffff;
  --on-accent-muted: #cdd8c3;
  --contact-bg: #3f5239;
  color-scheme: light;
}

/* Dark mode */
:root[data-theme="dark"] {
  --sage-50:  #1a2117;
  --sage-100: #2a3426;
  --sage-200: #3b4a35;
  --sage-400: #7d9470;
  --sage-600: #a3b893;
  --sage-800: #c3d4b4;
  --ink:      #e9eee4;
  --muted:    #a9b3a2;
  --paper:    #131811;
  --surface:  #1c2319;
  --nav-bg:   rgba(19,24,17,.85);
  --on-accent: #131811;
  --on-accent-muted: #3b4a35;
  --contact-bg: #26331f;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.15; }
a { color: var(--sage-800); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sage-100);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.logo span { color: var(--sage-600); }
nav ul { display: flex; gap: 28px; list-style: none; }
nav ul a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
nav ul a:hover { color: var(--sage-800); }

/* Hero */
.hero { padding: 96px 0 80px; background: linear-gradient(180deg, var(--sage-50), var(--paper)); }
.hero .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-600); margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--sage-600); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin-bottom: 32px; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: .95rem; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--sage-800); color: var(--on-accent); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { border: 1.5px solid var(--sage-400); color: var(--sage-800); }
.btn-ghost:hover { background: var(--sage-100); }

.hero-card {
  background: var(--sage-400);
  border-radius: 28px;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 28px;
}
.hero-card::before {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: var(--sage-200); top: -60px; right: -60px; opacity: .7;
}
.hero-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: var(--sage-600); bottom: 80px; left: -50px; opacity: .45;
}
.hero-card .initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", Georgia, serif; font-size: 6rem; color: #fff; opacity: .95; z-index: 1;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  z-index: 1;
}
.hero-card .tag {
  position: relative; z-index: 2; background: var(--paper); border-radius: 14px; padding: 14px 18px; font-size: .9rem; box-shadow: 0 8px 24px rgba(35,41,31,.12);
}
.hero-card .tag strong { display: block; font-size: 1rem; }

/* Sections */
section { padding: 88px 0; }
.section-head { margin-bottom: 44px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.alt { background: var(--sage-50); }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.about-grid p + p { margin-top: 16px; }
.values { list-style: none; display: grid; gap: 14px; }
.values li { background: var(--surface); border: 1px solid var(--sage-100); border-radius: 14px; padding: 16px 18px; }
.values strong { display: block; color: var(--sage-800); }
.values span { color: var(--muted); font-size: .95rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--sage-100); border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(63,82,57,.10); }
.icon { width: 46px; height: 46px; border-radius: 12px; background: var(--sage-100); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.icon svg { width: 24px; height: 24px; stroke: var(--sage-800); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: .8rem; font-weight: 500; background: var(--sage-50); color: var(--sage-800); border: 1px solid var(--sage-200); padding: 4px 11px; border-radius: 999px; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project { background: var(--surface); border-radius: var(--radius); padding: 30px; border-left: 5px solid var(--sage-400); }
.status {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  background: var(--sage-100); color: var(--sage-800); border: 1px solid var(--sage-200);
  padding: 2px 10px; border-radius: 999px; margin-bottom: 10px;
}
.project h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: .97rem; }

.timeline { display: grid; gap: 20px; }
.tl-item { display: grid; grid-template-columns: 180px 1fr; gap: 28px; background: var(--surface); border: 1px solid var(--sage-100); border-radius: var(--radius); padding: 26px 30px; }
.tl-when { color: var(--sage-600); font-weight: 600; font-size: .92rem; }
.tl-item h3 { font-size: 1.2rem; margin-bottom: 4px; }
.tl-item .where { color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
.tl-item p:last-child { color: var(--muted); font-size: .97rem; }

.contact { text-align: center; background: var(--contact-bg); color: #fff; border-radius: 28px; padding: 64px 32px; }
.contact h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 12px; }
.contact p { color: #cdd8c3; max-width: 32em; margin: 0 auto 30px; }
.contact .btn-primary { background: #cdd8c3; color: #23291f; }
.contact .btn-primary:hover { background: #fff; color: #23291f; }
.contact .btn-ghost { border-color: #9caf88; color: #fff; }
.contact .btn-ghost:hover { background: rgba(255,255,255,.08); }
.contact .btns { justify-content: center; }

footer { padding: 36px 0 48px; text-align: center; color: var(--muted); font-size: .88rem; }

/* Home lab case studies */
.case {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start;
  background: var(--surface); border: 1px solid var(--sage-100); border-radius: 24px;
  padding: 36px; margin-bottom: 28px;
}
.case:last-child { margin-bottom: 0; }
.case-flip .case-diagram { order: 2; }
.case-diagram { margin: 0; position: sticky; top: 88px; }
.case-diagram svg { width: 100%; height: auto; display: block; background: var(--sage-50); border-radius: 16px; }
.case-diagram figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; text-align: center; }
.case-tag {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  background: var(--sage-100); color: var(--sage-800); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.case-body h3 { font-size: 1.5rem; margin-bottom: 10px; }
.case-body h4 { font-family: "Inter", system-ui, sans-serif; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-600); margin: 22px 0 6px; }
.case-body p, .case-body li { color: var(--muted); font-size: .97rem; }
.case-body ul { padding-left: 20px; display: grid; gap: 4px; }
.case-body code { background: var(--sage-50); border: 1px solid var(--sage-200); border-radius: 6px; padding: 1px 6px; font-size: .88em; color: var(--sage-800); }

/* Diagram styles */
.d-node   { fill: var(--surface); stroke: var(--sage-400); stroke-width: 1.5; }
.d-accent { fill: var(--sage-800); stroke: var(--sage-800); }
.d-soft   { fill: var(--sage-100); stroke: var(--sage-400); }
.d-zone   { fill: none; stroke: var(--sage-400); stroke-width: 1.5; stroke-dasharray: 6 5; }
.d-cluster{ fill: var(--sage-100); fill-opacity: .55; stroke: var(--sage-600); stroke-width: 1.2; stroke-dasharray: 3 4; }
.d-line   { stroke: var(--sage-600); stroke-width: 1.6; fill: none; }
.d-dash   { stroke-dasharray: 5 4; }
.d-arrowhead { fill: var(--sage-600); }
.d-label  { font: 600 13px "Inter", system-ui, sans-serif; fill: var(--ink); text-anchor: middle; }
.d-sub    { font: 400 11px "Inter", system-ui, sans-serif; fill: var(--muted); text-anchor: middle; }
.d-light  { fill: var(--on-accent); }
.d-sub.d-light { fill: var(--on-accent-muted); }
.d-tiny   { font: 500 10px "Inter", system-ui, sans-serif; fill: var(--sage-800); text-anchor: middle; }
.d-zone-label { font: 600 11px "Inter", system-ui, sans-serif; fill: var(--sage-600); letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .case-flip .case-diagram { order: 0; }
  .case-diagram { position: static; }
}

/* Home lab teaser (home page) */
.teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--surface); border: 1px solid var(--sage-100); border-left: 6px solid var(--sage-400);
  border-radius: 24px; padding: 40px; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.teaser:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(63,82,57,.10); }
.teaser h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 10px; }
.teaser p { color: var(--muted); max-width: 36em; }
.teaser .btn { white-space: nowrap; flex-shrink: 0; }

.sub-head { margin: 56px 0 24px; }
.lab-page .section-head + .sub-head { margin-top: 8px; }
.sub-head h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 6px; }
.projects + .sub-head { margin-top: 64px; }
.teaser-sm { margin-top: 36px; padding: 28px 32px; }
.teaser-sm h2 { font-size: 1.5rem; }

/* Home lab page */
.lab-page { background: linear-gradient(180deg, var(--sage-50), var(--paper) 420px); padding-top: 64px; padding-bottom: 24px; }
.lab-page .section-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin-bottom: 12px; }
.back { display: table; font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--sage-600); margin-bottom: 20px; }
.back:hover { color: var(--sage-800); }
nav ul a[aria-current="page"] { color: var(--sage-800); font-weight: 600; }


/* Notes */
.note-list { display: grid; gap: 22px; }
.note-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--sage-100); border-radius: 22px; padding: 30px 32px;
  transition: transform .2s, box-shadow .2s;
}
.note-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(63,82,57,.10); }
.note-card h2 { font-size: 1.45rem; margin: 6px 0 8px; }
.note-card p { color: var(--muted); }
.note-meta { display: flex; gap: 14px; font-size: .85rem; color: var(--sage-600); font-weight: 500; }
.note-meta span + span::before { content: "·"; margin-right: 14px; }

.post-wrap { max-width: 740px; }
.post h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin: 4px 0 12px; }
.post h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.post h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.post p, .post li { color: var(--muted); }
.post p + p { margin-top: 14px; }
.post strong { color: var(--ink); }
.post ul { padding-left: 22px; display: grid; gap: 8px; margin-top: 10px; }
.post code { background: var(--sage-50); border: 1px solid var(--sage-200); border-radius: 6px; padding: 1px 6px; font-size: .88em; color: var(--sage-800); }
.post pre {
  background: #1e261b; color: #dfe8d6; border-radius: 14px; padding: 18px 20px; margin: 14px 0;
  overflow-x: auto; font-size: .9rem; line-height: 1.55;
}
:root[data-theme="dark"] .post pre { background: #0d110b; border: 1px solid var(--sage-100); }
.post pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.tldr {
  background: var(--sage-50); border: 1px solid var(--sage-200); border-left: 5px solid var(--sage-400);
  border-radius: 14px; padding: 18px 22px; margin: 28px 0 8px; color: var(--muted);
}
.tldr strong { display: block; color: var(--sage-800); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.post-next { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--sage-100); }
.post-next a { font-weight: 600; text-decoration: none; }

/* Footer status link */
.status-link { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status-link:hover { color: var(--sage-800); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fa463; box-shadow: 0 0 0 3px rgba(95,164,99,.2); }

/* Theme toggle */
.nav-right { display: flex; align-items: center; gap: 24px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sage-200);
  background: var(--surface); color: var(--sage-800); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--sage-100); }
.theme-toggle:focus-visible { outline: 2px solid var(--sage-600); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
body, nav, .card, .project, .tl-item, .case, .teaser, .values li { transition: background-color .25s, border-color .25s, color .25s; }

@media (max-width: 860px) {
  .teaser { flex-direction: column; align-items: flex-start; padding: 28px; }
  .hero .wrap, .about-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 340px; }
  .cards { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  nav ul { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
