/* ============================================================
   althausen.me
   Externalised from the inline <style> block so the CSP can
   run style-src 'self' with no 'unsafe-inline' anywhere.
   ============================================================ */

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root {
  --bg: #FAFAF8;
  --bg2: #F2F1ED;
  --bg3: #E8E6E1;
  --text: #1A1A18;
  --text2: #5C5B56;
  --text3: #8A8984;
  --accent: #2B5C3A;
  --accent-light: #3A7A4E;
  --accent-bg: rgba(43,92,58,.06);
  --border: #DEDCD7;
  --border2: #CCCAC4;
  --white: #FFFFFF;
}

html { scroll-behavior: smooth }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline }
::selection { background: var(--accent); color: var(--white) }

/* Visible keyboard focus — never remove without replacing. */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard and screen-reader users. */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--white);
  padding: .6rem 1rem; z-index: 100;
  font-size: .82rem; font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; text-decoration: none }

/* ──────────── NAV ──────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  background: rgba(250,250,248,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  color: var(--text);
}
.nav-right { display: flex; align-items: center; gap: 2rem }
.nav-links { display: flex; gap: 1.5rem; list-style: none }
.nav-links a {
  font-size: .78rem; font-weight: 500;
  color: var(--text3);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none }
.nav-cta {
  font-size: .75rem; font-weight: 600;
  color: var(--white);
  background: var(--text);
  padding: .45rem 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); text-decoration: none }
@media(max-width:820px) { .nav-links { display: none } }

/* ──────────── HERO ──────────── */
.hero {
  padding: 10rem clamp(1.5rem, 5vw, 4rem) 5rem;
  max-width: 900px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3.5rem;
  align-items: start;
}
.hero-text { min-width: 0 }
.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  /* nudges the circle down so its centre lines up with the name */
  margin-top: 2.75rem;
  border: 1px solid var(--border);
  /* warms the cool studio backdrop toward the page palette */
  filter: saturate(.92) contrast(1.02);
}

/* Below ~760px the two columns stack and the photo leads. */
@media(max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-photo {
    grid-row: 1;
    width: 104px;
    height: 104px;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }
  .hero-text { grid-row: 2 }
}

.hero-role {
  font-family: 'Geist Mono', monospace;
  font-size: .72rem; font-weight: 500;
  color: var(--accent);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.75;
  max-width: 580px;
  margin-bottom: 2rem;
}
.hero-detail {
  font-family: 'Geist Mono', monospace;
  font-size: .75rem;
  color: var(--text3);
  display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.hero-detail span { white-space: nowrap }
.hero-links {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.hero-links a {
  font-size: .82rem; font-weight: 600;
  padding: .6rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.hero-links a:hover { text-decoration: none }
.link-primary {
  background: var(--text);
  color: var(--white);
}
.link-primary:hover { background: var(--accent) }
.link-secondary {
  border: 1px solid var(--border2);
  color: var(--text2);
  background: transparent;
}
.link-secondary:hover { border-color: var(--text); color: var(--text) }

/* ──────────── DIVIDER ──────────── */
.divider {
  max-width: 820px;
  margin: 0 clamp(1.5rem, 5vw, 4rem);
  height: 1px;
  background: var(--border);
}

/* ──────────── SECTIONS ──────────── */
section {
  padding: 4.5rem clamp(1.5rem, 5vw, 4rem);
  max-width: 820px;
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.sec-num {
  font-family: 'Geist Mono', monospace;
  font-size: .7rem;
  color: var(--text3);
  letter-spacing: .05em;
}
.sec-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -.01em;
}

/* ──────────── ABOUT ──────────── */
.about-text {
  font-size: .95rem;
  line-height: 1.85;
  color: var(--text2);
  max-width: 620px;
}
.about-text + .about-text { margin-top: 1rem }

/* ──────────── EXPERIENCE ──────────── */
.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:first-of-type { padding-top: 0 }
.exp-item:last-of-type { border-bottom: none }
.exp-date {
  font-family: 'Geist Mono', monospace;
  font-size: .72rem;
  color: var(--text3);
  padding-top: .15rem;
  line-height: 1.6;
}
.exp-current {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: .35rem;
}
.exp-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .15rem;
}
.exp-org {
  font-size: .85rem;
  color: var(--text3);
  margin-bottom: .85rem;
}
.exp-note {
  font-size: .86rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 560px;
}

/* Practice-area headings inside a single role. */
.exp-area {
  font-family: 'Geist Mono', monospace;
  font-size: .66rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 1.4rem 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.exp-area:first-of-type { margin-top: 0 }

.exp-list { list-style: none }
.exp-list li {
  font-size: .88rem;
  color: var(--text2);
  line-height: 1.7;
  padding: .25rem 0 .25rem 1rem;
  position: relative;
}
.exp-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border2);
}
.exp-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: 1.25rem;
}
.tag {
  font-family: 'Geist Mono', monospace;
  font-size: .65rem;
  padding: .2rem .55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text3);
  background: var(--white);
}
@media(max-width: 600px) {
  .exp-item { grid-template-columns: 1fr; gap: .5rem }
}

/* ──────────── SKILLS ──────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}
.skill-group h3 {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.skill-group ul { list-style: none }
.skill-group li {
  font-size: .88rem;
  color: var(--text2);
  padding: .3rem 0;
  line-height: 1.5;
}
@media(max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr }
}

/* ──────────── CERTIFICATIONS ──────────── */
.cert-list { list-style: none }
.cert-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.cert-item:last-child { border-bottom: none }
.cert-name {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}
.cert-issuer {
  font-size: .8rem;
  color: var(--text3);
  margin-top: .1rem;
}
.cert-date {
  font-family: 'Geist Mono', monospace;
  font-size: .72rem;
  color: var(--text3);
  text-align: right;
  white-space: nowrap;
}
.sub-head {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 2.25rem 0 .5rem;
}
.sub-note {
  font-size: .8rem;
  color: var(--text3);
  margin-bottom: .5rem;
  line-height: 1.6;
}

/* ──────────── EDUCATION ──────────── */
.edu-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-of-type { border-bottom: none }
.edu-year {
  font-family: 'Geist Mono', monospace;
  font-size: .72rem;
  color: var(--text3);
  padding-top: .15rem;
}
.edu-school {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .15rem;
}
.edu-field {
  font-size: .88rem;
  color: var(--text2);
}
.edu-note {
  font-size: .82rem;
  color: var(--text3);
  font-style: italic;
  margin-top: .25rem;
}
@media(max-width: 600px) {
  .edu-item { grid-template-columns: 1fr; gap: .5rem }
}

/* ──────────── FOOTER ──────────── */
footer {
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  max-width: 820px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer p {
  font-family: 'Geist Mono', monospace;
  font-size: .7rem;
  color: var(--text3);
}
footer .foot-links {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
}
footer .foot-links a {
  font-size: .78rem;
  color: var(--text3);
  text-decoration: none;
}
footer .foot-links a:hover { color: var(--text); text-decoration: underline }

/* ──────────── 404 ──────────── */
.err {
  min-height: 70vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem clamp(1.5rem, 5vw, 4rem) 4rem;
  max-width: 820px;
}
.err-code {
  font-family: 'Geist Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .15em;
  margin-bottom: 1rem;
}
.err h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}
.err p {
  font-size: .95rem;
  color: var(--text2);
  max-width: 460px;
  margin-bottom: 2rem;
}

/* ──────────── ENTRANCE ──────────── */
@media(prefers-reduced-motion: no-preference) {
  .fade {
    opacity: 0; transform: translateY(12px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .fade.in { opacity: 1; transform: translateY(0) }
}

/* ──────────── PRINT ──────────── */
@media print {
  .nav, .skip, .hero-links, footer .foot-links { display: none }
  body { background: #fff; color: #000 }
  .hero { padding-top: 2rem }
  section { padding: 1.5rem 0; break-inside: avoid }
  a { color: #000; text-decoration: underline }
  .fade { opacity: 1 !important; transform: none !important }
}
