:root {
  --cream: #f8f6ed;
  --paper: #fffef7;
  --green: #002813;
  --green-2: #004822;
  --lime: #d5e27b;
  --blush: #e7b7af;
  --ink: #002813;
  --muted: #4d6355;
  --line: #e5e2d9;
  --bg: var(--cream);
  --surface: var(--paper);
  --radius: 24px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #00180b;
  --surface: #002813;
  --ink: #f8f6ed;
  --muted: #a9bdb0;
  --line: #0d3d22;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.03em; }
.logo span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); margin-left: 3px; box-shadow: 0 0 0 2px var(--green); }
nav { display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .8; }
nav a:hover { opacity: 1; }
nav a.nav-cta { opacity: 1; background: var(--green); color: var(--cream); padding: 10px 20px; border-radius: 999px; }
:root[data-theme="dark"] nav a.nav-cta { background: var(--lime); color: var(--green); }
.theme-btn, .menu-btn {
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem;
}
.menu-btn { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.lime { background: var(--lime); color: var(--green); }
.btn.ghost { border-color: rgba(248,246,237,.4); color: var(--cream); }
.btn.dark { background: var(--green); color: var(--cream); }

/* hero */
.hero { padding: 28px 0 0; }
.hero-panel {
  background: var(--green); color: var(--cream);
  border-radius: 40px; padding: 88px 64px 72px;
  position: relative; overflow: hidden;
}
.hero-panel::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-2) 0%, transparent 70%);
}
.badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(213,226,123,.15); color: var(--lime);
  font-size: .85rem; font-weight: 600; margin-bottom: 28px;
}
.hero-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero-text { position: relative; z-index: 1; }
.hero-photo {
  position: relative; z-index: 1; width: 100%; height: auto; max-height: 560px;
  object-fit: cover; object-position: top; border-radius: 28px;
  border: 1px solid rgba(213,226,123,.25);
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 800; max-width: 900px; position: relative; z-index: 1; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero p.lead { max-width: 580px; margin: 28px 0 36px; font-size: 1.2rem; color: rgba(248,246,237,.8); position: relative; z-index: 1; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }

.focus-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.focus {
  border-radius: 28px; padding: 24px; min-height: 130px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--green);
}
.focus strong { font-family: var(--display); font-size: 1.35rem; line-height: 1.15; }
.focus span { font-size: .85rem; opacity: .7; }
.f1 { background: var(--lime); } .f2 { background: var(--blush); }
.f3 { background: var(--paper); border: 1px solid var(--line); }
.f4 { background: #cfd9c9; }

/* sections */
section { padding: 104px 0 0; }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; max-width: 760px; }
.section-intro { color: var(--muted); max-width: 640px; font-size: 1.1rem; margin: 18px 0 0; }

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; margin-top: 8px; }
.about-grid p { font-size: 1.15rem; margin: 0 0 18px; }
.about-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
}
.about-card h3 { font-size: 1.2rem; margin-bottom: 14px; }
.about-card ul { list-style: none; padding: 0; margin: 0; }
.about-card li { padding: 11px 0; border-top: 1px solid var(--line); color: var(--muted); }
.about-card li:first-child { border-top: 0; }

/* experience */
.timeline { margin-top: 48px; display: grid; gap: 20px; }
.job {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; display: grid; grid-template-columns: 280px 1fr; gap: 32px;
  transition: transform .2s, box-shadow .2s;
}
.job:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(0,40,19,.35); }
.job h3 { font-size: 1.5rem; }
.job .org { color: var(--green-2); font-weight: 600; margin: 8px 0 0; }
:root[data-theme="dark"] .job .org { color: var(--lime); }
.job .date { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.job .org a { text-decoration: underline; text-underline-offset: 3px; }
.job ul { margin: 0; padding-left: 20px; color: var(--muted); }
.job li { margin-bottom: 6px; }
.job li::marker { color: var(--green-2); }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.skill-box { border-radius: var(--radius); padding: 32px; color: var(--green); }
.skill-box:nth-child(1) { background: var(--lime); }
.skill-box:nth-child(2) { background: var(--blush); }
.skill-box:nth-child(3) { background: #cfd9c9; }
.skill-box:nth-child(4) { background: var(--paper); border: 1px solid var(--line); }
.skill-box h3 { font-size: 1.4rem; margin-bottom: 18px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 15px; border-radius: 999px; background: rgba(255,254,247,.65); font-size: .92rem; font-weight: 500; }
.skill-box:nth-child(4) .chips li { background: var(--cream); border: 1px solid var(--line); }

/* education */
.edu { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.edu + .edu { margin-top: 20px; }
.edu .org a { text-decoration: underline; text-underline-offset: 3px; }
.edu h3 { font-size: 1.6rem; }
.edu .org { color: var(--green-2); font-weight: 600; margin: 8px 0; }
:root[data-theme="dark"] .edu .org { color: var(--lime); }
.edu p { margin: 4px 0; color: var(--muted); }

/* contact */
.contact-panel {
  background: var(--green); color: var(--cream); border-radius: 40px;
  padding: 80px 64px; text-align: center; margin-top: 0;
}
.contact-panel h2 { margin: 0 auto 18px; color: var(--cream); }
.contact-panel h2 em { font-style: normal; color: var(--lime); }
.contact-panel p { color: rgba(248,246,237,.78); max-width: 520px; margin: 0 auto 32px; font-size: 1.1rem; }
.contact-panel .cta { justify-content: center; }

.social-links { list-style: none; padding: 0; margin: 36px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.social-links a {
  display: inline-block; padding: 8px 18px; border-radius: 999px; text-decoration: none; font-size: .95rem;
  background: rgba(248,246,237,.1); color: var(--cream);
}
.social-links a:hover { background: var(--lime); color: var(--green); }
footer { padding: 48px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* hero cutout */
.cutout-wrap { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; align-self: end; }
.cutout-circle { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: min(400px, 92%); aspect-ratio: 1; border-radius: 50%; background: var(--lime); }
.hero-photo.cutout { border: 0; border-radius: 0 0 28px 28px; max-height: 600px; object-fit: contain; position: relative; width: auto; max-width: 100%; }
.hero-panel { padding-bottom: 0; }
.hero-text { padding-bottom: 72px; }
.about-grid { margin-top: 24px; }
.chips li { border-radius: 18px; }

/* accessibility */
a:focus-visible, button:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
.skill-box a:focus-visible, .about-card a:focus-visible { outline-color: var(--green-2); }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* large screens */
@media (min-width: 1440px) {
  .wrap { max-width: 1280px; }
  .hero-panel { padding-left: 88px; padding-right: 88px; }
  body { font-size: 1.05rem; }
}
@media (min-width: 1900px) {
  .wrap { max-width: 1440px; }
  body { font-size: 1.15rem; }
}

/* tablets and below */
@media (max-width: 900px) {
  .hero-panel { padding: 48px 28px 0; border-radius: 32px; gap: 28px; }
  .hero h1 { font-size: clamp(2rem, 6.2vw, 3.4rem); overflow-wrap: anywhere; }
  .hero-text, .hero-photo { min-width: 0; max-width: 100%; }
  .hero-text { padding-bottom: 48px; }
  .hero-photo.cutout { max-height: 460px; }
  .focus-row { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .job { grid-template-columns: 1fr; gap: 20px; }
  .skill-grid { grid-template-columns: 1fr; }
  .contact-panel { padding: 56px 24px; border-radius: 32px; }
  section { padding-top: 72px; }
}

/* phones */
@media (max-width: 720px) {
  .hero-panel { grid-template-columns: minmax(0, 1fr); padding: 40px 24px 0; }
  .hero h1 { font-size: clamp(2rem, 9vw, 3.4rem); }
  .hero-text { padding-bottom: 0; }
  .theme-btn, .menu-btn { width: 44px; height: 44px; }
  .menu-btn { display: block; }
  nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  nav a { padding: 4px 0; }
  nav.open { display: flex; }
  .btn { padding: 14px 24px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .focus-row { grid-template-columns: 1fr; }
  .job, .edu, .about-card, .skill-box { padding: 24px; }
  .hero-panel { padding: 32px 20px 0; border-radius: 28px; }
  .contact-panel { padding: 44px 20px; border-radius: 28px; }
  .cta .btn { width: 100%; justify-content: center; }
  .contact-panel .btn { font-size: .84rem; padding: 14px 12px; overflow-wrap: normal; text-align: center; }
  section { padding-top: 60px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 1.9rem; }
  .logo { font-size: 1.2rem; }
}

.hero-name { color: var(--lime); font-weight: 600; font-size: .95rem; letter-spacing: .02em; margin: 0 0 18px; }

/* inner pages */
.page { padding-top: 40px; padding-bottom: 40px; max-width: 860px; }
.crumbs { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.page-title { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; margin: 0 0 18px; }
.byline { color: var(--muted); margin: 0 0 32px; }
.byline a { text-decoration: underline; text-underline-offset: 3px; }
.prose { font-size: 1.1rem; }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: 1.7rem; margin: 40px 0 14px; }
.prose ul { padding-left: 22px; margin: 0 0 20px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--green-2); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .prose a, :root[data-theme="dark"] .crumbs a, :root[data-theme="dark"] .link-list a { color: var(--lime); }
.lead-dark { font-size: 1.25rem; }
.about-hero { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; margin-bottom: 8px; }
.about-photo { width: 220px; height: 220px; object-fit: cover; border-radius: 28px; }
.block { padding-top: 56px; }
.block h2 { font-size: 1.8rem; margin-bottom: 18px; }
.timeline-list { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--lime); }
.timeline-list li { padding: 0 0 22px 22px; position: relative; display: flex; flex-direction: column; }
.timeline-list li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); border: 3px solid var(--lime); }
.timeline-list span { color: var(--muted); }
.chips.plain li { background: var(--surface); border: 1px solid var(--line); }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.link-list a { text-decoration: underline; text-underline-offset: 3px; color: var(--green-2); font-weight: 500; }
.author-box { margin-top: 48px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.article h2 { font-size: 1.5rem; }

/* home: articles + faq */
.article-list { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.article-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(0,40,19,.35); }
.article-card h3 { font-size: 1.4rem; }
.article-card p { margin: 0; color: var(--muted); }
.article-card .tag { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.article-card .more { margin-top: 6px; font-weight: 600; color: var(--green-2); }
:root[data-theme="dark"] .article-card .more { color: var(--lime); }
.faq { margin-top: 36px; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 24px; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }
footer a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-photo { width: 160px; height: 160px; }
  .block { padding-top: 40px; }
}
