/* =========================================================
   Sakar Gurubacharya, personal site
   Earthy editorial system — olive / cream / brown, light + dark
   ========================================================= */

:root,
:root[data-theme="light"] {
  --bg: #f2ebdc;
  --surface: #fbf7ee;
  --ink: #241f18;
  --muted: #6d6250;
  --faint: #948a74;
  --line: #ddd1b4;
  --line-strong: #c7b997;
  --accent: #5b6b3f;
  --accent-deep: #414c2d;
  --accent-soft: #e6e4cd;
  --accent2: #a85c34;
  --accent2-soft: #f0ddc9;
  --ok: #5b6b3f;
  --err: #a1453a;
  --code-bg: #241f18;
  --code-text: #e4dcc8;
  --code-muted: #8a8065;
  --gh-0: #e4dbc2;
  --gh-1: rgba(91,107,63,0.35);
  --gh-2: rgba(91,107,63,0.58);
  --gh-3: rgba(91,107,63,0.78);
  --gh-4: rgba(91,107,63,1);
  --blob-a: rgba(196,120,64,0.30);
  --blob-b: rgba(91,107,63,0.24);
  --blob-c: rgba(61,74,92,0.16);
}

:root[data-theme="dark"] {
  --bg: #17140f;
  --surface: #1f1b14;
  --ink: #ece4d2;
  --muted: #ab9f87;
  --faint: #756a54;
  --line: #322c20;
  --line-strong: #443c2b;
  --accent: #a7b878;
  --accent-deep: #c2d295;
  --accent-soft: rgba(167,184,120,0.14);
  --accent2: #d99361;
  --accent2-soft: rgba(217,147,97,0.16);
  --ok: #a7b878;
  --err: #cf8073;
  --code-bg: #0f0d09;
  --code-text: #e4dcc8;
  --code-muted: #7d7358;
  --gh-0: #292418;
  --gh-1: rgba(167,184,120,0.28);
  --gh-2: rgba(167,184,120,0.5);
  --gh-3: rgba(167,184,120,0.75);
  --gh-4: rgba(167,184,120,1);
  --blob-a: rgba(158,94,52,0.22);
  --blob-b: rgba(120,138,80,0.18);
  --blob-c: rgba(70,90,120,0.16);
}

@font-face{
  font-family:"Galgo";
  src:url("/assets/fonts/galgo/Galgo.ttf") format("truetype");
  font-weight:500;
  font-style:normal;
  font-display:swap;
}

:root {
  --font-display: "Galgo", "Fredoka", "Baloo 2", "Segoe UI", sans-serif;
  --font-body: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-code: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;background:var(--bg);font-size:117%;overflow-x:hidden}

body {
  background:var(--bg);color:var(--ink);
  min-height:100vh;min-height:100dvh;
  overflow-x:hidden;
  font-family:var(--font-body);font-size:1.05rem;line-height:1.68;
  -webkit-font-smoothing:antialiased;
  transition:background-color .25s ease,color .25s ease;
}

/* ---------- layered background ---------- */
.bg-layer{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.bg-blob{position:absolute;border-radius:50%;filter:blur(64px)}
.bg-blob-a{width:56vmax;height:56vmax;top:-20vmax;right:-16vmax;background:radial-gradient(circle,var(--blob-a) 0%,transparent 68%)}
.bg-blob-b{width:48vmax;height:48vmax;bottom:-18vmax;left:-14vmax;background:radial-gradient(circle,var(--blob-b) 0%,transparent 68%)}
.bg-blob-c{width:32vmax;height:32vmax;bottom:6vmax;right:8vmax;background:radial-gradient(circle,var(--blob-c) 0%,transparent 70%)}
.bg-grain{position:absolute;inset:-10%;opacity:.05;mix-blend-mode:overlay;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.bg-icon{position:absolute;color:var(--ink);opacity:.07;animation:drift var(--dur,54s) ease-in-out infinite alternate;animation-delay:var(--del,0s)}
.bg-icon svg{display:block;width:100%;height:100%}
.bg-icon.is-accent{color:var(--accent);opacity:.1}
.bg-icon.is-accent2{color:var(--accent2);opacity:.1}
@keyframes drift{0%{transform:translate(0,0)}100%{transform:translate(var(--dx,20px),var(--dy,-16px))}}
/* only the two corner-anchored icons show on narrow/medium viewports, well clear of the text column */
.bg-icon.wide-only{display:none}
@media(min-width:980px){.bg-icon.wide-only{display:block}}
@media(max-width:720px){.bg-icon.hide-sm{display:none}.bg-icon{opacity:.05}}

.wrap{max-width:760px;margin:0 auto;padding:0 clamp(1.5rem,4.5vw,4rem)}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}
::selection{background:var(--accent-soft)}

/* ---------- scroll progress bar ---------- */
#scroll-progress{position:fixed;top:0;left:0;width:0%;height:2px;background:var(--accent);z-index:100;pointer-events:none;transition:width .06s linear}

/* ---------- load-in ---------- */
.rise{opacity:0;transform:translateY(14px);animation:rise-in .6s cubic-bezier(.22,1,.36,1) forwards}
@keyframes rise-in{to{opacity:1;transform:none}}
.rise-1{animation-delay:.03s}.rise-2{animation-delay:.09s}.rise-3{animation-delay:.15s}.rise-4{animation-delay:.21s}.rise-5{animation-delay:.27s}.rise-6{animation-delay:.33s}

/* ---------- scroll reveal ---------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s cubic-bezier(.22,1,.36,1),transform .6s cubic-bezier(.22,1,.36,1)}
.reveal.revealed{opacity:1;transform:translateY(0)}

/* ---------- header / nav ---------- */
/* self-contained width/position so no page-specific .wrap override can ever shift it again */
.site-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;max-width:760px;margin:0 auto;padding:1.3rem clamp(1.5rem,4.5vw,4rem)}
header{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid transparent;transition:border-color .25s ease,background-color .25s ease}
header.scrolled{border-bottom-color:var(--line)}
.wordmark{font-family:var(--font-body);font-weight:700;font-size:1.25rem;letter-spacing:-.01em;color:var(--ink)}
.wordmark-dot{color:var(--accent2)}
.wordmark:hover{text-decoration:none;color:var(--accent)}
.site-nav{display:flex;gap:1.5rem;flex-wrap:wrap}
.site-nav a{font-family:var(--font-mono);font-size:.72rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);position:relative;padding-bottom:3px}
.site-nav a::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;background:var(--accent);transform:scaleX(0);transform-origin:right;transition:transform .28s cubic-bezier(.22,1,.36,1)}
.site-nav a:hover{color:var(--ink);text-decoration:none}
.site-nav a:hover::after,.site-nav a[aria-current="page"]::after{transform:scaleX(1);transform-origin:left}
.site-nav a[aria-current="page"]{color:var(--ink)}
.header-toggles{display:flex;gap:.4rem;align-items:center}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:4px;background:transparent;border:1px solid transparent;color:var(--muted);cursor:pointer;transition:color .18s ease,border-color .18s ease}
.icon-btn:hover{color:var(--accent);border-color:var(--line);text-decoration:none}
.theme-sun{display:none}.theme-moon{display:block}
[data-theme="dark"] .theme-sun{display:block}[data-theme="dark"] .theme-moon{display:none}
.lang-toggle{font-family:var(--font-mono);font-size:.68rem;letter-spacing:.03em;background:transparent;border:1px solid var(--line);border-radius:4px;padding:0 .7rem;height:34px;cursor:pointer;display:inline-flex;gap:.35rem;align-items:center;color:var(--faint);transition:border-color .18s ease}
.lang-toggle:hover{border-color:var(--accent)}
.lang-opt{transition:color .18s ease}
.lang-opt.active{color:var(--accent);font-weight:500}
.lang-sep{color:var(--line-strong)}
.icon-row{display:flex;gap:.3rem;align-items:center}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-body);font-size:.9rem;font-weight:600;border-radius:4px;padding:.65rem 1.3rem;transition:background-color .18s ease,border-color .18s ease,color .18s ease;cursor:pointer;border:1px solid transparent;line-height:1.2}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--ink);color:var(--bg)}
.btn-primary:hover{background:var(--accent)}
:root[data-theme="dark"] .btn-primary{color:var(--bg)}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--line-strong)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent)}

/* ---------- sections ---------- */
section{padding:3rem 0;border-top:1px solid var(--line)}
.section-label{font-family:var(--font-mono);font-size:.7rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin-bottom:1.8rem;display:flex;align-items:center;gap:.7rem}
.section-label::before{content:"";width:20px;height:1px;background:var(--accent)}

/* ---------- career / education ---------- */
.log-entry{display:grid;grid-template-columns:minmax(122px,auto) 1fr;gap:1.5rem;padding:1.5rem 0}
.log-entry+.log-entry{border-top:1px dashed var(--line)}
.log-when{font-family:var(--font-mono);font-size:.76rem;color:var(--faint);padding-top:.35rem;white-space:nowrap}
.log-what h3{font-family:var(--font-body);font-size:1.2rem;font-weight:700;letter-spacing:0;color:var(--ink)}
.log-what .org{color:var(--muted);font-size:.94rem;margin-bottom:.55rem}
.log-what .org a{color:var(--muted)}.log-what .org a:hover{color:var(--accent)}
.log-what .summary{color:var(--muted);font-size:.97rem}
.tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.9rem}
.tag{font-family:var(--font-mono);font-size:.68rem;color:var(--muted);background:transparent;border:1px solid var(--line);border-radius:3px;padding:.18rem .55rem;transition:border-color .18s ease,color .18s ease}
.tag:hover{border-color:var(--accent);color:var(--accent)}

/* ---------- personal projects (dedicated page, whole-card links out to GitHub) ---------- */
.project-card-list{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem}
.project-card{display:block;border:1px solid var(--line);border-radius:8px;padding:1.6rem 1.8rem;color:var(--ink);transition:border-color .2s ease,transform .2s ease}
.project-card:hover{border-color:var(--accent);transform:translateX(6px);text-decoration:none}
.project-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}
.project-card-title{font-family:var(--font-body);font-size:1.26rem;font-weight:700;color:var(--ink)}
.project-card-arrow{color:var(--faint);flex:none;font-size:1.1rem;transition:transform .22s ease,color .22s ease}
.project-card:hover .project-card-arrow{color:var(--accent);transform:translate(3px,-3px)}
.project-card-desc{color:var(--muted);font-size:.99rem;margin-top:.5rem;max-width:62ch}
.project-card-meta{font-family:var(--font-mono);font-size:.72rem;color:var(--faint);margin-top:1.1rem;display:flex;align-items:center;gap:.4rem}
.project-card:hover .project-card-meta{color:var(--accent)}
.projects-empty{color:var(--muted);padding:2.5rem 0}

@media(max-width:600px){
  .project-card{padding:1.3rem 1.4rem}
}


/* ---------- github contribution graph ---------- */
.gh-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.gh-title{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--font-body);font-size:1.1rem;font-weight:700;letter-spacing:0;color:var(--ink)}
.gh-title:hover{color:var(--accent);text-decoration:none}
.gh-total{font-family:var(--font-mono);font-size:.72rem;color:var(--faint)}
.gh-graph{display:grid;grid-auto-flow:column;grid-template-rows:repeat(7,12px);grid-auto-columns:12px;gap:3px;overflow-x:auto;padding:.3rem 0 .5rem}
.gh-cell{width:12px;height:12px;border-radius:2px;background:var(--gh-0)}
.gh-pad{background:transparent}
.gh-l1{background:var(--gh-1)}
.gh-l2{background:var(--gh-2)}
.gh-l3{background:var(--gh-3)}
.gh-l4{background:var(--gh-4)}
.gh-note{color:var(--muted);font-size:.9rem;margin-top:.6rem}

/* ---------- skills ---------- */
.skill-row{display:grid;grid-template-columns:minmax(150px,auto) 1fr;gap:1.5rem;padding:.75rem 0;font-size:.97rem}
.skill-row+.skill-row{border-top:1px dashed var(--line)}
.skill-cat{font-family:var(--font-mono);font-size:.72rem;color:var(--faint);padding-top:.25rem}
.skill-items{color:var(--ink)}

/* ---------- certifications ---------- */
.certs{display:flex;flex-direction:column;margin-top:1.8rem;border-top:1px solid var(--line)}
.cert-item{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:.85rem 0;border-bottom:1px solid var(--line);color:var(--ink);transition:padding-left .2s ease}
.cert-item:hover{padding-left:.5rem;text-decoration:none}
.cert-item:hover .cert-name{color:var(--accent)}
.cert-main{display:flex;align-items:baseline;gap:.7rem;min-width:0}
.cert-badge{font-family:var(--font-mono);font-size:.64rem;font-weight:500;color:var(--accent2);letter-spacing:.04em;flex:none}
.cert-name{font-size:.95rem;font-weight:500;transition:color .18s ease}
.cert-issuer{font-family:var(--font-mono);font-size:.7rem;color:var(--faint);white-space:nowrap}

/* ---------- contact ---------- */
.contact>p{color:var(--muted);max-width:58ch}
#contact-form{margin-top:2rem}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
#contact-form label{display:block;margin-bottom:1rem;font-size:.85rem;font-weight:500;color:var(--muted)}
#contact-form label span{display:block;margin-bottom:.35rem}
#contact-form input[type="text"],#contact-form input[type="email"],#contact-form textarea{width:100%;font-family:var(--font-body);font-size:.97rem;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:.65rem .85rem;transition:border-color .18s ease;resize:vertical}
#contact-form input:focus,#contact-form textarea:focus{outline:none;border-color:var(--accent)}
.hidden-field{display:none}
.form-actions{display:flex;gap:.7rem;flex-wrap:wrap;align-items:center}
#form-status{margin-top:.9rem;font-size:.88rem;font-weight:500;min-height:1.4em}
#form-status.ok{color:var(--ok)}
#form-status.err{color:var(--err)}

/* ---------- lets-chat ---------- */
.chat-main{padding-bottom:3rem}
.chat-hero{padding:3rem 0 1.6rem}
.chat-hero h1{font-family:var(--font-display);font-size:clamp(2rem,5vw,2.6rem);font-weight:500;letter-spacing:0;line-height:1.1;margin-bottom:1rem;color:var(--ink)}
.chat-hero .intro{color:var(--muted);max-width:58ch}
.calendly-wrap{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:.5rem;overflow:hidden}
.chat-back{margin-top:2rem;font-family:var(--font-mono);font-size:.78rem}
.chat-back a{color:var(--faint)}.chat-back a:hover{color:var(--accent)}

/* ---------- footer ---------- */
.page-foot{border-top:1px solid var(--line);margin-top:3rem;padding:2rem 0 1rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem}
.foot-meta{font-family:var(--font-mono);font-size:.7rem;color:var(--faint)}
.foot-meta a{color:var(--faint)}
.foot-meta a:hover{color:var(--accent)}
.foot-legal{display:flex;gap:.7rem}

/* tiny persistent legal-notice access point on the home page (no footer there) */
.legal-strip{position:static;margin:1.5rem 0 .5rem;display:flex;gap:.7rem;font-family:var(--font-mono);font-size:.64rem;color:var(--faint);opacity:.75}
.legal-strip a{color:var(--faint)}
.legal-strip a:hover{color:var(--accent);opacity:1}
@media(min-width:861px){
  .legal-strip{position:fixed;left:1rem;bottom:.8rem;margin:0;z-index:15}
}

/* ---------- HOME / landing (single-screen, decluttered) ---------- */
.home-main{min-height:0;display:flex;align-items:center;padding-top:1rem;padding-bottom:2rem}
body.home-page{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
body.home-page #scroll-progress{display:none}
.home-main{max-width:960px}

.home-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:3.5rem;align-items:center;width:100%}
.home-left{max-width:600px}
.home-right{align-self:stretch;display:flex;align-items:center;min-width:0}

.home-left h1{font-family:var(--font-display);font-weight:500;font-size:clamp(3.4rem,15vw,5.6rem);line-height:.98;letter-spacing:0;color:var(--ink);margin-bottom:.35rem;overflow-wrap:break-word}
.home-eyebrow{font-family:var(--font-mono);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);margin-bottom:.6rem}
.home-role{font-family:var(--font-body);font-size:1.05rem;color:var(--muted);font-weight:500;margin-bottom:.7rem}
.home-role b{color:var(--accent);font-weight:600}
.home-intro{color:var(--muted);max-width:52ch;margin-bottom:1.2rem;font-size:.99rem}

.home-index{display:flex;flex-direction:column;border-top:1px solid var(--line);margin-bottom:1.1rem}
.home-index-item{display:flex;align-items:baseline;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--line);color:var(--ink);transition:padding-left .22s cubic-bezier(.22,1,.36,1)}
.home-index-item:hover{padding-left:.6rem;text-decoration:none}
.home-index-num{font-family:var(--font-mono);font-size:.72rem;color:var(--accent2);flex:none}
.home-index-title{font-family:var(--font-body);font-weight:700;font-size:1.15rem;letter-spacing:0;transition:color .18s ease}
.home-index-item:hover .home-index-title{color:var(--accent)}
.home-index-desc{font-family:var(--font-body);font-size:.82rem;color:var(--faint);margin-left:auto;text-align:right;max-width:230px}
.home-index-arrow{color:var(--faint);flex:none;transition:transform .22s ease,color .22s ease}
.home-index-item:hover .home-index-arrow{color:var(--accent);transform:translate(2px,-2px)}

@media(max-width:600px){
  .home-index-desc{display:none}
}

/* ---------- terminal (desktop home only) ---------- */
.terminal{background:var(--code-bg);border-radius:8px;overflow:hidden;width:100%;box-shadow:0 1px 0 var(--line-strong) inset}
.terminal-bar{display:flex;align-items:center;gap:6px;padding:10px 14px;background:rgba(255,255,255,.05)}
.terminal-dot{width:11px;height:11px;border-radius:50%}
.td-red{background:#b5654e}.td-yellow{background:#c9a25a}.td-green{background:#8a9d5e}
.terminal-title{font-family:var(--font-mono);font-size:.68rem;color:var(--code-muted);margin-left:auto;margin-right:auto;letter-spacing:.03em}
.terminal-body{padding:1rem 1.2rem 1.2rem;height:clamp(260px,32vh,320px);overflow-y:auto;font-family:var(--font-mono);font-size:.8rem;line-height:1.7;color:var(--code-text)}
.term-line{white-space:pre-wrap;word-break:break-word}
.term-prompt{color:var(--accent)}
.term-cmd{color:var(--code-text)}
.term-output{color:var(--code-muted)}
.terminal-cursor{display:inline-block;width:7px;height:14px;background:var(--accent);vertical-align:text-bottom;animation:blink 1s step-end infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.term-hint{color:var(--code-muted);opacity:.75;margin-top:.4rem}
.term-err{color:var(--err)}
.term-output a{color:var(--accent)}
.term-input-line{display:flex;align-items:baseline}
.term-input{flex:1;background:transparent;border:none;outline:none;color:var(--code-text);font-family:var(--font-mono);font-size:.8rem;line-height:1.7;padding:0;caret-color:var(--accent)}
.term-input:focus{outline:none}

@media(max-width:860px){
  .home-right{display:none}
}

/* ---------- generic subpage hero ---------- */
.page-hero{padding:3rem 0 1.4rem}
.eyebrow{font-family:var(--font-mono);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);display:flex;align-items:center;gap:.6rem;margin-bottom:1rem}
.eyebrow::before{content:"";width:20px;height:1px;background:var(--accent)}
.page-hero h1{font-family:var(--font-display);font-weight:500;font-size:clamp(2rem,5vw,3rem);letter-spacing:0;line-height:1.06;color:var(--ink)}
.page-hero .lede{color:var(--muted);max-width:58ch;margin-top:1rem;font-size:1.04rem}
.jump-nav{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.6rem}
.jump-nav a{font-family:var(--font-mono);font-size:.72rem;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:.3rem .8rem;transition:border-color .18s ease,color .18s ease}
.jump-nav a:hover{border-color:var(--accent);color:var(--accent);text-decoration:none}

/* back-home */
.back-home-top{margin:1.4rem 0 -.4rem}
.back-home{display:inline-flex;align-items:center;gap:.45rem;font-family:var(--font-mono);font-size:.78rem;color:var(--faint)}
.back-home:hover{color:var(--accent);text-decoration:none}

/* ---------- BLOG list ---------- */
.post-list{margin-top:.5rem;border-top:1px solid var(--line)}
.post-item{display:grid;grid-template-columns:1fr auto;column-gap:1.2rem;align-items:center;padding:1.5rem .1rem;border-bottom:1px solid var(--line);color:var(--ink);transition:padding-left .22s cubic-bezier(.22,1,.36,1)}
.post-item:hover{padding-left:.7rem;text-decoration:none}
.post-main{min-width:0}
.post-title{font-family:var(--font-body);font-weight:700;font-size:1.34rem;letter-spacing:0;color:var(--ink);line-height:1.3}
.post-item:hover .post-title{color:var(--accent)}
.post-meta{display:flex;align-items:center;gap:.7rem;font-family:var(--font-mono);font-size:.74rem;color:var(--faint);margin-top:.45rem}
.post-cat{color:var(--accent2);border:1px solid var(--line);border-radius:3px;padding:.1rem .5rem}
.post-arrow{color:var(--faint);transition:transform .22s ease,color .22s ease}
.post-item:hover .post-arrow{color:var(--accent);transform:translate(2px,-2px)}
.blog-empty{color:var(--muted);padding:2.5rem 0}

/* ---------- BLOG article ---------- */
.article-head{padding:2.4rem 0 1rem}
.post-headline{font-family:var(--font-display);font-weight:500;font-size:clamp(1.9rem,4.6vw,2.7rem);line-height:1.1;letter-spacing:0;color:var(--ink);margin:.7rem 0}
.post-byline{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center;font-family:var(--font-mono);font-size:.76rem;color:var(--faint)}
.prose{max-width:70ch;font-size:1.05rem}
.prose p{margin:1.15rem 0;color:var(--ink)}
.prose h2{font-family:var(--font-body);font-weight:700;font-size:1.36rem;letter-spacing:0;margin:2.2rem 0 .8rem;color:var(--ink)}
.prose h3{font-family:var(--font-body);font-weight:700;font-size:1.1rem;margin:1.6rem 0 .6rem;color:var(--ink)}
.prose ul,.prose ol{margin:1rem 0 1.1rem 1.3rem;color:var(--ink)}
.prose li{margin:.45rem 0}
.prose code{font-family:var(--font-code);font-size:.86em;background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:.08rem .4rem}
.prose pre{background:var(--code-bg);color:var(--code-text);border-radius:6px;padding:1rem 1.2rem;overflow-x:auto;margin:1.5rem 0;font-size:.84rem;line-height:1.65}
.prose pre code{background:none;border:none;padding:0;color:inherit;font-size:.84rem}
.prose blockquote{border-left:2px solid var(--accent);padding-left:1.1rem;margin:1.5rem 0;color:var(--muted);font-style:italic}
.prose a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.prose>*:first-child{margin-top:0}

/* ---------- responsive ---------- */
@media(max-width:860px){
  body.home-page{height:auto;min-height:100dvh;overflow:visible}
  .home-main{min-height:calc(100dvh - 78px);padding-top:2.4rem}
  .home-hero{grid-template-columns:1fr}
}
@media(max-width:720px){.site-header{justify-content:space-between}.site-nav{order:3;width:100%;justify-content:flex-start;gap:1.1rem;margin-top:.2rem}}
@media(max-width:600px){
  .wrap{padding:0 1.15rem}
  .log-entry,.skill-row{grid-template-columns:1fr;gap:.35rem}
  .form-grid{grid-template-columns:1fr;gap:0}
  .post-title{font-size:1.2rem}
  .cert-issuer{display:none}
}

/* ---------- reduced motion ---------- */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rise{animation:none;opacity:1;transform:none}
  .reveal{transition:none;opacity:1;transform:none}
  .btn,.tag,.icon-btn,.post-item,.cert-item,.home-index-item,.project-card{transition:none}
  #scroll-progress{transition:none}
  .bg-icon{animation:none}
  .terminal-cursor{animation:none}
}
