:root {
  --bg: #f4f2ed;
  --surface: #ebe9e3;
  --text: #171717;
  --muted: #696760;
  --line: #d2d0c9;
  --accent: #b7ff3c;
  --accent-ink: #101500;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; background:var(--bg); color:var(--text); font-family:Inter,system-ui,sans-serif; }
body.dark { --bg:#11110f; --surface:#191917; --text:#f2f1eb; --muted:#aaa79e; --line:#34332e; --accent:#b7ff3c; --accent-ink:#101500; }
body, a, button { transition:background-color .25s ease,color .25s ease,border-color .25s ease; }
a { color:inherit; text-decoration:none; }
.noise { position:fixed; inset:0; pointer-events:none; opacity:.035; z-index:10; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.nav { height:76px; max-width:var(--max); margin:auto; padding:0 28px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { font:500 22px "DM Mono",monospace; letter-spacing:-1px; }
.brand span { color:#80b900; }
.nav nav { display:flex; gap:32px; font-size:13px; text-transform:uppercase; letter-spacing:.08em; }
.nav nav a:hover { opacity:.55; }
.theme-toggle { border:1px solid var(--line); background:transparent; border-radius:50%; width:36px;height:36px; cursor:pointer; color:var(--text); }
.section { max-width:var(--max); margin:auto; padding:130px 28px; border-bottom:1px solid var(--line); }
.hero { min-height:calc(100vh - 76px); display:flex; flex-direction:column; justify-content:center; position:relative; }
.eyebrow,.section-number,.project-top,.role-date,.toolbox-title { font:500 11px "DM Mono",monospace; text-transform:uppercase; letter-spacing:.12em; }
.eyebrow { display:flex; align-items:center; gap:9px; margin-bottom:30px; }
.dot { width:7px;height:7px;background:#80b900;border-radius:50%; box-shadow:0 0 0 5px rgba(128,185,0,.12); }
.hero h1 { font-size:clamp(72px,13vw,176px); line-height:.82; letter-spacing:-.085em; margin:0; font-weight:700; }
.hero h1 em,.contact h2 em { font-style:normal; color:transparent; -webkit-text-stroke:1.5px var(--text); }
.cursor { color:#80b900; -webkit-text-stroke:0; animation:blink 1s steps(2,end) infinite; }
@keyframes blink { 50%{opacity:0} }
.hero-bottom { display:flex; justify-content:space-between; align-items:end; gap:40px; margin-top:65px; }
.lead { max-width:530px; font-size:21px; line-height:1.45; margin:0; }
.hero-links,.contact-actions { display:flex; gap:10px; flex-wrap:wrap; }
.button { padding:15px 20px; border:1px solid var(--text); display:inline-flex; gap:22px; align-items:center; font:500 12px "DM Mono",monospace; text-transform:uppercase; }
.button.primary { background:var(--text); color:var(--bg); }
.button.primary:hover { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.button.ghost:hover { background:var(--surface); }
.scroll-note { position:absolute; bottom:28px; left:28px; font:11px "DM Mono",monospace; color:var(--muted); display:flex; gap:12px; }
.scroll-note span { color:var(--text); }
.section-number { color:var(--muted); margin-bottom:60px; }
.intro-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:80px; }
h2 { font-size:clamp(42px,6vw,82px); line-height:.98; letter-spacing:-.065em; margin:0; }
.intro h2 span,.work-header h2 span { color:var(--muted); }
.intro-copy { max-width:470px; font-size:17px; line-height:1.7; color:var(--muted); }
.mono { font:12px/1.6 "DM Mono",monospace; }
.capability { display:grid; grid-template-columns:130px 1fr; gap:45px; padding:42px 0; border-top:1px solid var(--line); }
.cap-index { font:12px "DM Mono",monospace; color:var(--muted); }
.capability h3,.project h3,.role h3 { margin:0 0 15px; font-size:clamp(24px,3vw,40px); letter-spacing:-.04em; }
.capability p,.project p,.role p { color:var(--muted); line-height:1.65; max-width:720px; margin:0 0 22px; }
.tags { display:flex; flex-wrap:wrap; gap:7px; }
.tags span { border:1px solid var(--line); padding:7px 9px; font:10px "DM Mono",monospace; text-transform:uppercase; }
.work-header { display:flex; justify-content:space-between; align-items:end; gap:40px; margin-bottom:70px; }
.work-header p { max-width:310px; color:var(--muted); line-height:1.6; }
.projects { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.project { background:var(--surface); padding:32px; min-height:330px; display:flex; flex-direction:column; justify-content:space-between; border:1px solid transparent; }
.project:hover { border-color:var(--text); transform:translateY(-3px); }
.project.featured { grid-column:span 2; min-height:470px; background:var(--text); color:var(--bg); }
.project.featured p,.project.featured li { color:#aaa9a1; }
.project.featured .tags span { border-color:#44433f; }
.project-top { display:flex; justify-content:space-between; color:var(--muted); margin-bottom:45px; }
.project.featured .project-top { color:#8d8c85; }
.project ul { padding-left:20px; max-width:700px; line-height:1.7; }
.metric { margin-top:20px; }
.metric strong { display:block; font-size:54px; letter-spacing:-.06em; }
.metric small,.fine { color:var(--muted); font:10px "DM Mono",monospace; }
.timeline { border-top:1px solid var(--line); }
.role { display:grid; grid-template-columns:220px 1fr; gap:30px; padding:38px 0; border-bottom:1px solid var(--line); }
.role h3 { font-size:26px; }
.toolbox { margin-top:100px; display:grid; grid-template-columns:220px 1fr; gap:30px; }
.toolbox-title { color:var(--muted); }
.toolbox-cloud { font:500 20px/1.65 "DM Mono",monospace; letter-spacing:-.03em; }
.contact { min-height:80vh; display:flex; flex-direction:column; justify-content:center; }
.contact-inner { max-width:1000px; }
.contact h2 { font-size:clamp(62px,10vw,130px); }
.contact-copy { color:var(--muted); max-width:500px; line-height:1.6; margin:35px 0; }
footer { max-width:var(--max); margin:auto; padding:25px 28px; display:flex; justify-content:space-between; color:var(--muted); font-size:11px; }
@media (max-width:800px) {
  .nav nav { display:none; }
  .section { padding:90px 20px; }
  .hero h1 { font-size:clamp(62px,18vw,110px); }
  .hero-bottom,.intro-grid,.work-header { display:block; }
  .hero-links { margin-top:30px; }
  .scroll-note { left:20px; }
  .capability,.role,.toolbox { grid-template-columns:1fr; gap:16px; }
  .projects { grid-template-columns:1fr; }
  .project.featured { grid-column:span 1; }
  .work-header p { margin-top:25px; }
  footer { padding:22px 20px; gap:20px; flex-direction:column; }
}

.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity:1; transform:none; }

/* Portfolio V2: evidence, writing and credentials */
.project-links { display:flex; gap:1rem; flex-wrap:wrap; margin-top:1rem; }
.project-links a, .writing-card a, .cert-card a { text-decoration:none; }
.writing-card { display:flex; justify-content:space-between; align-items:flex-end; gap:2rem; padding:2rem 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.writing-card h2 { margin:.2rem 0 .7rem; }
.writing-card p { max-width:720px; }
.cert-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; }
.cert-card { border:1px solid var(--line); padding:1.5rem; display:flex; flex-direction:column; gap:.65rem; min-height:210px; }
.cert-card span { font-family:'DM Mono', monospace; font-size:.72rem; letter-spacing:.12em; color:var(--muted); }
.cert-card h3 { margin:0; font-size:1.05rem; line-height:1.35; }
.cert-card p { color:var(--muted); margin:0; }
.cert-card a { margin-top:auto; }
@media (max-width: 800px) { .writing-card { flex-direction:column; align-items:flex-start; } .cert-grid { grid-template-columns:1fr; } }
