/* ═══════════════════════════════════════════════
   OPS LOG — CSS  
   Aesthetic: Polished Tech-Dark · Vercel / Linear
   ═══════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg:        #0a0a0b;
  --bg2:       #0f0f11;
  --panel:     #18181b;
  --panel2:    #1c1c20;
  --border:    #27272a;
  --border2:   #3f3f46;

  /* Text */
  --text:      #fafafa;
  --text2:     #a1a1aa;
  --text3:     #52525b;

  /* Brand — indigo like Linear */
  --brand:     #818cf8;
  --brand2:    #6366f1;
  --brand-dim: rgba(99,102,241,.1);
  --brand-glow: 0 0 0 1px rgba(99,102,241,.3), 0 4px 24px rgba(99,102,241,.2);

  /* Semantic */
  --green:     #4ade80;
  --green-dim: rgba(74,222,128,.1);
  --blue:      #38bdf8;
  --purple:    #c084fc;
  --red:       #f87171;
  --yellow:    #fbbf24;
  --orange:    #fb923c;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shape */
  --radius:    6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --maxw:      1100px;
  --pad:       clamp(1rem, 4vw, 2rem);
  --header-bg: rgba(10,10,11,.88);
}

:root[data-theme='light'] {
  --bg:        #f8fafc;
  --bg2:       #eef2f7;
  --panel:     #ffffff;
  --panel2:    #f3f6fb;
  --border:    #d9e0ea;
  --border2:   #b9c4d4;

  --text:      #0f172a;
  --text2:     #334155;
  --text3:     #64748b;

  --brand:     #4f46e5;
  --brand2:    #4338ca;
  --brand-dim: rgba(79,70,229,.12);
  --brand-glow: 0 0 0 1px rgba(67,56,202,.2), 0 5px 24px rgba(67,56,202,.2);

  --green:     #16a34a;
  --green-dim: rgba(22,163,74,.13);
  --blue:      #0284c7;
  --purple:    #7c3aed;
  --red:       #dc2626;
  --yellow:    #ca8a04;
  --orange:    #ea580c;
  --header-bg: rgba(248,250,252,.88);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6;
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}
:root[data-theme='light'] body::before { opacity: .008; }

/* ── Typography ── */
h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
h3 { font-size: 1rem; font-weight: 600; }
em { font-style: italic; color: var(--brand); }
code, pre { font-family: var(--font-mono); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--text); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 5rem var(--pad); position: relative; z-index: 1; }

/* ══ HEADER ══ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: .7rem var(--pad);
  display: flex; align-items: center; gap: 1.5rem;
}
.header-controls { margin-left: auto; display: flex; align-items: center; gap: .65rem; }
.header-tag { font-family: var(--font-mono); font-size: .62rem; color: var(--brand); letter-spacing: .14em; display: block; margin-bottom: .08rem; }
.header-name { font-size: .95rem; font-weight: 700; letter-spacing: -.025em; }
.header-sub  { font-size: .68rem; color: var(--text3); font-family: var(--font-mono); }
.site-nav { display: flex; gap: .05rem; }
.nav-link {
  font-size: .78rem; font-weight: 500; color: var(--text2);
  padding: .38rem .65rem; border-radius: var(--radius);
  transition: color .12s, background .12s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--panel); }
.theme-toggle {
  display: inline-flex; align-items: center; gap: .36rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text2);
  border-radius: var(--radius);
  padding: .36rem .56rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.theme-toggle:hover { border-color: var(--border2); color: var(--text); background: var(--panel2); }
.theme-toggle[aria-pressed='true'] { color: var(--brand); border-color: var(--brand); background: var(--brand-dim); }
.theme-toggle-icon { font-size: .85rem; line-height: 1; }
.header-status { display: flex; align-items: center; gap: .35rem; font-family: var(--font-mono); font-size: .65rem; color: var(--green); }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 2px rgba(74,222,128,.18);
  animation: bdot 2.5s ease-in-out infinite;
}
@keyframes bdot { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ══ HERO ══ */
.hero {
  position: relative; min-height: 90vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ''; position: absolute; top: -15%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(99,102,241,.065) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center; padding: 5rem var(--pad) 3rem;
  position: relative; z-index: 1;
}
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.tag {
  font-family: var(--font-mono); font-size: .63rem; font-weight: 500;
  padding: .22rem .52rem; border-radius: 4px;
  border: 1px solid var(--border); color: var(--text3);
  letter-spacing: .07em; text-transform: uppercase;
}
.tag--live  { border-color: rgba(99,102,241,.35); color: var(--brand); background: var(--brand-dim); }
.tag--award { border-color: rgba(251,191,36,.3); color: var(--yellow); background: rgba(251,191,36,.08); }
.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 800;
  line-height: 1.07; letter-spacing: -.04em; margin-bottom: 1.25rem;
}
.hero-title em { font-style: normal; color: var(--brand); }
.hero-body { color: var(--text2); max-width: 42ch; margin-bottom: 2rem; line-height: 1.75; font-size: .9rem; }
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; }

/* Terminal */
.hero-terminal {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03), 0 24px 56px rgba(0,0,0,.55);
}
.terminal-chrome {
  display: flex; align-items: center; gap: .45rem; padding: .65rem 1rem;
  background: var(--panel2); border-bottom: 1px solid var(--border);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red{background:#ff5f56} .t-yellow{background:#ffbd2e} .t-green{background:#27c93f}
.t-title { font-family: var(--font-mono); font-size: .68rem; color: var(--text3); margin-left: .5rem; }
.terminal-body {
  padding: 1.1rem 1.25rem; font-family: var(--font-mono); font-size: .76rem;
  color: var(--text2); min-height: 250px; line-height: 1.9; white-space: pre-wrap;
}
.t-line{display:block} .t-prompt{color:var(--brand)} .t-cmd{color:var(--text)}
.t-out{color:var(--text3)} .t-ok{color:var(--green)} .t-err{color:var(--red)}
.cursor {
  display: inline-block; width: 7px; height: .88em; background: var(--brand);
  vertical-align: text-bottom; animation: cur .9s step-end infinite;
}
@keyframes cur { 0%,100%{opacity:1} 50%{opacity:0} }

/* Stat bar */
.stat-bar {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: repeat(5,1fr);
  border-top: 1px solid var(--border); position: relative; z-index: 1;
}
.stat { padding: 1.5rem var(--pad); text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-n { display: block; font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: var(--text); letter-spacing: -.03em; line-height: 1; }
.stat-l { display: block; font-size: .67rem; color: var(--text3); margin-top: .35rem; letter-spacing: .06em; text-transform: uppercase; }

/* ══ SECTIONS ══ */
.section { border-bottom: 1px solid var(--border); position: relative; }
.section--alt { background: var(--bg2); }
.section-title {
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 2.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.025em;
}
.section-tag { font-family: var(--font-mono); font-size: .62rem; color: var(--text3); letter-spacing: .1em; }
.section-intro { color: var(--text2); max-width: 56ch; margin-top: -.75rem; margin-bottom: 2.5rem; font-size: .88rem; }

/* ══ TIMELINE ══ */
.timeline {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.tl-week { background: var(--panel); padding: 1.1rem; transition: background .12s; }
.tl-week:hover { background: var(--panel2); }
.tl-num { font-family: var(--font-mono); font-size: .6rem; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .35rem; }
.tl-label { font-weight: 700; font-size: .88rem; margin-bottom: .3rem; letter-spacing: -.015em; }
.tl-desc  { font-size: .75rem; color: var(--text2); line-height: 1.5; }
.tl-pill  {
  display: inline-block; margin-top: .6rem; font-family: var(--font-mono); font-size: .58rem;
  padding: .15rem .42rem; border-radius: 3px;
  background: var(--brand-dim); color: var(--brand); border: 1px solid rgba(99,102,241,.18);
}
.tl-week.tl-done .tl-pill { background: var(--green-dim); color: var(--green); border-color: rgba(74,222,128,.2); }

/* ══ RAPPORT/MD ══ */
.md-grid { display: grid; grid-template-columns: 195px 1fr; gap: 2.5rem; align-items: start; }
.md-nav {
  position: sticky; top: 76px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .875rem; overflow: hidden;
}
.md-nav-title { font-family: var(--font-mono); font-size: .6rem; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; padding: 0 .45rem .65rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.md-nav a { display: block; padding: .38rem .45rem; border-radius: var(--radius); font-size: .8rem; color: var(--text2); transition: all .12s; border-left: 2px solid transparent; }
.md-nav a:hover, .md-nav a.active { color: var(--text); background: var(--panel2); border-left-color: var(--brand); }
.md-print-btn {
  width: 100%; margin-top: .6rem; padding: .5rem .6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel2); color: var(--text2);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em;
  text-transform: uppercase; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.md-print-btn:hover { border-color: var(--border2); color: var(--text); background: var(--panel); }

.print-picker[hidden] { display: none; }
.print-picker {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center;
}
.print-picker-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.print-picker-card {
  position: relative;
  width: min(420px, calc(100vw - 1.25rem));
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 10px 36px rgba(0,0,0,.45);
}
.print-picker-title {
  font-size: .95rem; font-weight: 700;
  margin-bottom: .8rem; letter-spacing: -.01em;
}
.print-picker-subtitle {
  font-family: var(--font-mono);
  font-size: .62rem; color: var(--text3);
  text-transform: uppercase; letter-spacing: .08em;
  margin: .75rem 0 .45rem;
}
.print-options {
  display: grid; gap: .2rem;
  max-height: 300px; overflow: auto;
  padding-right: .2rem;
}
.print-opt {
  display: flex; align-items: flex-start; gap: .45rem;
  font-size: .82rem; color: var(--text2);
  padding: .22rem .1rem;
}
.print-opt input { margin-top: .2rem; accent-color: var(--brand); }
.print-opt--all {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel2);
  padding: .5rem .55rem;
}
.print-picker-actions {
  display: flex; justify-content: flex-end; gap: .45rem;
  margin-top: .95rem;
}
.md-content { min-width: 0; }
.md-content h2 { font-size: 1.15rem; font-weight: 700; margin: 2.5rem 0 .9rem; padding-top: 2rem; border-top: 1px solid var(--border); letter-spacing: -.025em; }
.md-content h2 { scroll-margin-top: 90px; }
.md-content h2:first-child { border-top:0; padding-top:0; margin-top:0; }
.md-content h3 { color: var(--text2); margin: 1.4rem 0 .5rem; font-size: .9rem; font-weight: 600; }
.md-content p  { color: var(--text2); margin-bottom: .85rem; line-height: 1.75; font-size: .9rem; }
.md-content ul, .md-content ol { color: var(--text2); padding-left: 1.4rem; margin-bottom: .85rem; }
.md-content li { margin-bottom: .2rem; line-height: 1.6; font-size: .9rem; }
.md-content strong { color: var(--text); font-weight: 600; }
.md-content em    { font-style: italic; color: var(--brand); }
.md-content hr    { border:0; border-top: 1px solid var(--border); margin: 2rem 0; }
.md-content code  { font-family: var(--font-mono); font-size: .8em; background: var(--panel); border: 1px solid var(--border); padding: .1em .36em; border-radius: 4px; color: var(--purple); }
.md-content pre   { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem; overflow-x: auto; margin-bottom: .85rem; }
.md-content pre code { background:none; border:none; padding:0; color:var(--text2); }
.md-content blockquote { border-left: 2px solid var(--brand); padding: .65rem 1.1rem; background: var(--brand-dim); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: .85rem; color: var(--text2); font-size: .88rem; }

/* ══ PROJECT ══ */
.project-layout { display: grid; grid-template-columns: 1fr 250px; gap: 3rem; align-items: start; }
.badge-stack { display: flex; flex-direction: column; gap: .45rem; position: sticky; top: 76px; }
.tech-badge { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .6rem .85rem; display: flex; align-items: center; gap: .65rem; transition: border-color .12s, transform .12s; }
.tech-badge:hover { border-color: var(--border2); transform: translateX(-2px); }
.tech-badge-icon { font-size: 1.05rem; }
.tech-badge-name { font-size: .8rem; font-weight: 600; }
.tech-badge-desc { font-size: .65rem; color: var(--text3); font-family: var(--font-mono); margin-top: .04rem; }

/* ══ CI/CD PIPELINE ══ */
.pipeline-wrap { margin-top: 1.25rem; }
.pipeline-label { font-family: var(--font-mono); font-size: .62rem; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .75rem; }
.pipeline-flow {
  display: flex; align-items: stretch;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.pipeline-step {
  flex: 1; padding: 1.1rem .9rem; text-align: center;
  position: relative; border-right: 1px solid var(--border);
  transition: background .12s; min-width: 0;
}
.pipeline-step:last-child { border-right: 0; }
.pipeline-step:hover { background: var(--panel2); }
.pipeline-step::after {
  content: '→'; position: absolute; right: -9px; top: 50%; transform: translateY(-50%);
  font-size: .8rem; color: var(--text3); z-index: 1;
}
.pipeline-step:last-child::after { display: none; }
.ps-icon { font-size: 1.2rem; margin-bottom: .35rem; }
.ps-name { font-size: .72rem; font-weight: 700; margin-bottom: .15rem; letter-spacing: -.01em; }
.ps-detail { font-family: var(--font-mono); font-size: .59rem; color: var(--text3); }
.ps-status { display: inline-block; margin-top: .45rem; font-family: var(--font-mono); font-size: .57rem; padding: .14rem .38rem; border-radius: 3px; }
.ps-status--pass { background: var(--green-dim); color: var(--green); }
.ps-status--info { background: var(--brand-dim); color: var(--brand); }

/* ══ ARCH DIAGRAM ══ */
.arch-diagram { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; overflow-x: auto; }
.arch-diagram svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.arch-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.1rem; }
.legend-item { display: flex; align-items: center; gap: .38rem; font-family: var(--font-mono); font-size: .68rem; color: var(--text3); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ══ SKILLS ══ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: .65rem; }
.skill-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; transition: border-color .12s; }
.skill-card:hover { border-color: var(--border2); }
.skill-cat  { font-family: var(--font-mono); font-size: .58rem; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .55rem; }
.skill-name { font-weight: 600; font-size: .88rem; margin-bottom: .5rem; letter-spacing: -.015em; }
.skill-bar  { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: .5rem; }
.skill-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--brand2), var(--brand)); width: 0; transition: width 1.1s cubic-bezier(.4,0,.2,1); }
.skill-tags { display: flex; flex-wrap: wrap; gap: .28rem; }
.skill-tag  { font-family: var(--font-mono); font-size: .58rem; padding: .13rem .38rem; border-radius: 3px; background: var(--panel2); color: var(--text3); border: 1px solid var(--border); }

/* ══ CV ══ */
.cv-actions { display: flex; gap: .65rem; margin-bottom: 2.5rem; }
.cv-actions .md-print-btn {
  width: auto;
  margin-top: 0;
  padding: .42rem .7rem;
  font-size: .64rem;
}
.cv-content h2 { font-family: var(--font-mono); font-size: .62rem; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; margin: 2.5rem 0 1.1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); font-weight: 500; }
.cv-content h2:first-child { margin-top: 0; }
.cv-content h3 { font-weight: 700; font-size: .92rem; letter-spacing: -.015em; }
.cv-content p  { color: var(--text2); font-size: .87rem; margin: .2rem 0 .65rem; line-height: 1.65; }
.cv-content ul { color: var(--text2); padding-left: 1.2rem; margin-bottom: .65rem; }
.cv-content li { font-size: .87rem; margin-bottom: .18rem; line-height: 1.6; }
.cv-content strong { color: var(--text); font-weight: 600; }

/* ══ CONTACT ══ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 260px),1fr)); gap: .65rem; }
.contact-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem; display: flex; align-items: center; gap: .8rem; transition: border-color .12s; color: inherit; min-width: 0; }
.contact-card:hover { border-color: var(--border2); }
.contact-icon { font-size: 1.1rem; }
.contact-body { min-width: 0; flex: 1; }
.contact-label { font-family: var(--font-mono); font-size: .62rem; color: var(--text3); letter-spacing: .06em; text-transform: uppercase; }
.contact-value { font-size: .85rem; font-weight: 600; color: var(--brand); margin-top: .08rem; overflow-wrap: anywhere; word-break: break-word; }
.contact-values { display: flex; flex-direction: column; gap: .2rem; margin-top: .08rem; }
.contact-values .contact-value { margin-top: 0; text-decoration: none; width: fit-content; }
.contact-values .contact-value:hover { color: var(--text); }

/* ══ BUTTONS ══ */
.btn { display: inline-flex; align-items: center; gap: .38rem; padding: .52rem 1rem; border-radius: var(--radius-md); font-size: .8rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .12s; text-decoration: none; letter-spacing: -.01em; }
.btn--primary { background: var(--brand2); color: #fff; border-color: var(--brand2); }
.btn--primary:hover { background: var(--brand); box-shadow: var(--brand-glow); color: #fff; }
.btn--ghost { background: transparent; color: var(--text2); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border2); color: var(--text); }

/* ══ FOOTER ══ */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 1.4rem var(--pad); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; font-family: var(--font-mono); font-size: .7rem; color: var(--text3); }
.footer-sep { color: var(--border); }

/* ══ UTILS ══ */
.loading-pulse { padding: 3rem 0; text-align: center; font-family: var(--font-mono); font-size: .78rem; color: var(--text3); animation: lp 1.8s ease-in-out infinite; }
@keyframes lp { 0%,100%{opacity:.3} 50%{opacity:.8} }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .4s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ══ PRINT ══ */
@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  .site-header,.hero,.page-hero,#kurs-timeline,#projekt,#arkitektur,.site-footer,.cv-actions,#kompetenser,#kontakt,body::before { display: none !important; }
  .print-picker,.md-nav,.md-print-btn { display: none !important; }
  .print-excluded { display: none !important; }
  body {
    background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .section { border: 0 !important; }
  .container { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .md-grid { display: block !important; }
  .md-content {
    width: auto !important;
    max-width: 72ch !important;
    margin: 0 !important;
    font-size: 10.5pt;
    color: #111;
  }

  .md-content h1,
  .md-content h2,
  .md-content h3,
  .md-content h4 {
    color: #000 !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .md-content h2 {
    margin: 12pt 0 6pt !important;
    padding: 0 !important;
    border-top: 0 !important;
    scroll-margin-top: 0;
  }

  .md-content p,
  .md-content ul,
  .md-content ol,
  .md-content blockquote,
  .md-content pre,
  .md-content table {
    page-break-inside: avoid;
    break-inside: avoid;
    text-align: left !important;
  }

  .md-content p,
  .md-content li,
  .md-content td,
  .md-content th {
    color: #111 !important;
    text-align: left !important;
    text-justify: auto;
    word-spacing: normal;
    letter-spacing: normal;
    hyphens: none;
  }

  .md-content strong,
  .md-content em,
  .md-content b,
  .md-content i {
    color: #111 !important;
  }

  .md-content code {
    white-space: pre-wrap;
    word-break: break-word;
  }

  .md-content pre {
    overflow: visible !important;
    white-space: pre-wrap;
    word-break: break-word;
    border-color: #d7d7d7 !important;
    background: #f8f8f8 !important;
    font-size: 9pt;
    padding: 8pt;
  }

  .md-content table {
    width: 100% !important;
    table-layout: fixed;
  }

  .md-content td,
  .md-content th {
    word-break: break-word;
  }

  a,
  a:visited {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #444;
  }

  #cv .container { padding: 0; }
  .cv-content h2 { color: #888; border-color: #ddd; }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-terminal { order: -1; }
  .md-grid { grid-template-columns: 1fr; }
  .md-nav { position: static; }
  .project-layout { grid-template-columns: 1fr; }
  .badge-stack { position: static; flex-direction: row; flex-wrap: wrap; }
  .stat-bar { grid-template-columns: repeat(3,1fr); }
  .pipeline-flow { flex-wrap: wrap; }
  .pipeline-step::after { display: none; }
}
@media (max-width: 600px) {
  .site-nav { display: none; }
  .theme-toggle-text { display: none; }
  .theme-toggle { padding: .38rem .46rem; }
  .stat-bar { grid-template-columns: repeat(2,1fr); }
  .hero-title { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *,.reveal { transition: none !important; animation: none !important; }
}

/* ══════════════════════════════════════
   ATTENDANCE
══════════════════════════════════════ */
.att-header { margin-bottom: 1.25rem; }

.att-summary {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  font-size: .8rem;
}
.att-legend {
  display: flex; align-items: center; gap: .4rem;
  color: var(--text2); font-family: var(--font-mono); font-size: .72rem;
}
.att-legend strong { color: var(--text); }
.att-total { margin-left: auto; color: var(--text3); }

.att-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}

.att-grid {
  display: flex; gap: .5rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}

.att-week {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  flex: 1; min-width: 48px;
}
.att-week-label {
  font-family: var(--font-mono); font-size: .6rem;
  color: var(--text3); letter-spacing: .08em;
}
.att-days {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.att-day {
  width: 20px; height: 20px; border-radius: 4px;
  cursor: default; transition: transform .1s, box-shadow .1s;
  display: block;
}
.att-day:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
  z-index: 1; position: relative;
}
.att-day--empty {
  background: var(--border); opacity: .3;
}

/* Custom tooltip */
.att-tooltip {
  position: fixed; z-index: 9000; display: none;
  background: var(--panel2); border: 1px solid var(--border2);
  color: var(--text); font-family: var(--font-mono); font-size: .72rem;
  padding: .35rem .65rem; border-radius: var(--radius);
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ══════════════════════════════════════
   PRESENTATION MODE
══════════════════════════════════════ */
.pres-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: #050506;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.pres-overlay.pres-active {
  opacity: 1; pointer-events: auto;
}

.pres-chrome {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.pres-hint {
  font-family: var(--font-mono); font-size: .68rem; color: var(--text3);
}
.pres-btn-close {
  background: none; border: 1px solid var(--border); color: var(--text2);
  width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
  font-size: .9rem; display: flex; align-items: center; justify-content: center;
  transition: border-color .12s, color .12s;
}
.pres-btn-close:hover { border-color: var(--border2); color: var(--text); }

/* Slide */
.pres-slide {
  max-width: 820px; width: 100%;
  padding: 3rem var(--pad);
  animation: slide-in .25s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.pres-tag {
  font-family: var(--font-mono); font-size: .68rem; color: var(--brand);
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.pres-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.05;
  color: var(--text); margin-bottom: 1rem;
}
.pres-slide--cover .pres-title { font-size: clamp(2.5rem, 8vw, 5rem); }

.pres-sub {
  font-size: 1rem; color: var(--text2); margin-bottom: 2rem;
  font-weight: 400; line-height: 1.6;
}

.pres-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .6rem;
}
.pres-list li {
  font-size: 1.05rem; color: var(--text2);
  padding: .65rem 1rem; border-radius: var(--radius-md);
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  line-height: 1.5;
  animation: slide-in .3s ease both;
}
.pres-list li:nth-child(1) { animation-delay: .05s; }
.pres-list li:nth-child(2) { animation-delay: .10s; }
.pres-list li:nth-child(3) { animation-delay: .15s; }
.pres-list li:nth-child(4) { animation-delay: .20s; }
.pres-list li:nth-child(5) { animation-delay: .25s; }

/* Progress pips */
.pres-progress {
  display: flex; gap: .4rem; margin-top: 2.5rem;
}
.pres-pip {
  width: 24px; height: 3px; border-radius: 2px;
  background: var(--border); transition: background .2s, width .2s;
}
.pres-pip--active {
  background: var(--brand); width: 36px;
}

/* Nav arrows */
.pres-nav {
  position: absolute; bottom: 1.5rem;
  display: flex; gap: .5rem;
}
.pres-nav-btn {
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text2); width: 42px; height: 42px; border-radius: var(--radius-md);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .12s, color .12s;
}
.pres-nav-btn:hover { border-color: var(--border2); color: var(--text); }

/* ══════════════════════════════════════
   MARKDOWN TABLES (for Lab 2 table)
══════════════════════════════════════ */
.md-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.25rem 0; font-size: .88rem;
}
.md-content th {
  text-align: left; padding: .6rem .9rem;
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--text3); letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.md-content td {
  padding: .6rem .9rem; border-bottom: 1px solid var(--border);
  color: var(--text2); vertical-align: top;
}
.md-content tr:last-child td { border-bottom: 0; }
.md-content tbody tr:hover td { background: var(--panel2); }
.md-content td code { font-size: .8em; }

/* Highlight the "after" row green */
.md-content tbody tr:last-child td:last-child {
  color: var(--green); font-weight: 600;
}
.md-content tbody tr:first-child td:last-child {
  color: var(--red);
}

/* ══════════════════════════════════════
   BLOCKQUOTE (citations from workshop notes)
══════════════════════════════════════ */
.md-content blockquote {
  border-left: 2px solid var(--brand);
  padding: .75rem 1.1rem .75rem 1.25rem;
  background: var(--brand-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1rem 0;
}
.md-content blockquote p {
  margin: 0; font-style: italic; color: var(--text2); font-size: .88rem;
}
.md-content blockquote p + p {
  margin-top: .35rem; font-style: normal;
  font-family: var(--font-mono); font-size: .72rem; color: var(--text3);
}

/* ══════════════════════════════════════
   HORIZONTAL RULE
══════════════════════════════════════ */
.md-content hr {
  border: 0; border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ══════════════════════════════════════
   ATTENDANCE — responsive
══════════════════════════════════════ */
@media (max-width: 700px) {
  .att-grid { gap: .3rem; padding: 1rem .75rem; }
  .att-day  { width: 16px; height: 16px; }
  .att-summary { gap: .5rem 1rem; }
  .att-total { margin-left: 0; }
}

/* ══════════════════════════════════════
   PRESENTATION — responsive
══════════════════════════════════════ */
@media (max-width: 600px) {
  .pres-title { font-size: 2rem; }
  .pres-list li { font-size: .9rem; padding: .55rem .85rem; }
  .pres-hint { display: none; }
}

/* ══════════════════════════════════════
   FOCUS / KEYBOARD ACCESSIBILITY
══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ══════════════════════════════════════
   SMOOTH SECTION ENTRY DIVIDERS
══════════════════════════════════════ */
.section-title .section-tag::after {
  content: ' /';
  color: var(--border2);
}

/* ══════════════════════════════════════
   PRESENTATION BUTTON in hero
══════════════════════════════════════ */
#btn-present {
  display: inline-flex; align-items: center; gap: .4rem;
}
#btn-present:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ══════════════════════════════════════
   SCROLL PROGRESS BAR
══════════════════════════════════════ */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--brand2), var(--brand));
  transition: width .05s linear;
  pointer-events: none;
}

/* ══════════════════════════════════════
   PAGE HERO (inner pages, not landing)
══════════════════════════════════════ */
.page-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
  position: relative;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 60% 50%, rgba(99,102,241,.05) 0%, transparent 70%);
}
.page-eyebrow {
  font-family: var(--font-mono); font-size: .65rem; color: var(--brand);
  letter-spacing: .14em; margin-bottom: .75rem;
}
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  margin-bottom: .6rem;
}
.page-sub {
  color: var(--text2); font-size: .9rem;
}

/* ══════════════════════════════════════
   PAGE CARDS (index → other pages)
══════════════════════════════════════ */
.page-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .75rem;
}
.page-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.1rem;
  text-decoration: none; color: inherit;
  transition: border-color .12s, transform .12s, background .12s;
}
.page-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  background: var(--panel2);
}
.page-card-icon  { font-size: 1.5rem; flex-shrink: 0; }
.page-card-body  { flex: 1; min-width: 0; }
.page-card-title { font-weight: 700; font-size: .95rem; letter-spacing: -.015em; margin-bottom: .2rem; }
.page-card-desc  { font-size: .78rem; color: var(--text2); line-height: 1.5; }
.page-card-arrow {
  font-size: 1rem; color: var(--text3);
  transition: color .12s, transform .12s;
  flex-shrink: 0;
}
.page-card:hover .page-card-arrow { color: var(--brand); transform: translateX(3px); }

/* ══════════════════════════════════════
   TECH BADGE POPUP
══════════════════════════════════════ */

/* Badge hover/active state */
.tech-badge {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.tech-badge--active {
  border-color: var(--brand) !important;
  background: var(--panel2) !important;
}
.tech-badge-chevron {
  font-size: 1rem; color: var(--text3);
  margin-left: auto; padding-left: .5rem;
  transition: color .12s, transform .12s;
  flex-shrink: 0;
}
.tech-badge:hover .tech-badge-chevron,
.tech-badge--active .tech-badge-chevron {
  color: var(--brand); transform: rotate(90deg);
}

/* Popup card */
.tech-popup {
  display: none;
  position: absolute;
  z-index: 500;
  width: 300px;
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 8px 32px rgba(0,0,0,.55),
    0 2px 8px rgba(0,0,0,.3);

  /* Animate in */
  opacity: 0;
  transform: scale(.94) translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.tech-popup.tp-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Popup header */
.tp-header {
  display: flex; align-items: center; gap: .75rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .85rem;
}
.tp-icon { font-size: 1.4rem; flex-shrink: 0; }
.tp-name {
  font-weight: 700; font-size: .95rem; letter-spacing: -.015em;
}
.tp-tag {
  font-family: var(--font-mono); font-size: .6rem;
  color: var(--brand); margin-top: .2rem; line-height: 1.4;
}

/* Popup sections */
.tp-what {
  font-size: .83rem; color: var(--text2); line-height: 1.65;
  margin-bottom: .85rem;
}
.tp-section-label {
  font-family: var(--font-mono); font-size: .58rem;
  color: var(--text3); letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: .3rem;
}
.tp-role, .tp-detail {
  font-size: .8rem; color: var(--text2); line-height: 1.65;
  margin-bottom: .75rem;
}
.tp-detail { margin-bottom: 0; }
.tp-role code, .tp-detail code {
  font-family: var(--font-mono); font-size: .75em;
  background: var(--panel2); border: 1px solid var(--border);
  padding: .08em .35em; border-radius: 3px; color: var(--purple);
}

/* Mobile: popup below badge, full width */
@media (max-width: 900px) {
  .tech-popup { width: min(320px, calc(100vw - 16px)); }
}
