/* ============================================================
   mauritz.io - editorial terminal
   Tokens
   ============================================================ */
:root {
  --bg: #070c18;             /* deep-space navy */
  --bg-elev: #0c1424;        /* raised cards */
  --ink: #e9eef9;
  --ink-soft: #b9c3d8;
  --muted: #93a0ba;
  --faint: #7d8aa6;  /* >=4.5:1 on --bg and --bg-elev - used for readable text */
  --hairline: rgba(148, 163, 204, 0.18);
  --hairline-soft: rgba(148, 163, 204, 0.10);
  --accent: #4fe3c1;         /* aurora teal - matrix-adjacent, AA on navy */
  --accent-soft: rgba(79, 227, 193, 0.08);
  --star: rgba(190, 214, 255, 0.9);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-detail: 0.9844rem;     /* 15.75px - body-detail step (timeline bullets, skills, project copy) */
  --col: 64rem;               /* ~1024px content column */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --rhythm: clamp(4.5rem, 10vw, 7rem);
  --shadow-lift: 0 6px 22px rgb(0 0 0 / 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: #06110d; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------
   Skip link (slides in on focus)
   ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--accent);
  color: #06110d;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus { top: 1rem; }

/* ------------------------------------------------------------
   Mono accent system
   ------------------------------------------------------------ */
.mono {
  font-family: var(--mono);
  font-feature-settings: "tnum";
}

.microlabel {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.section-label::before { content: "// "; color: var(--faint); }

.section-index {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  color: var(--faint);
  white-space: nowrap;
}

/* Animated underline links (body copy) */
.u-link {
  text-decoration: none;
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 200ms ease;
  padding-bottom: 1px;
}
.u-link:hover, .u-link:focus-visible { background-size: 100% 1px; }

/* ------------------------------------------------------------
   Sticky nav
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 12, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--col);
  margin-inline: auto;
  padding: 0.875rem var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand .tld { color: var(--accent); }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(0.75rem, 3vw, 1.5rem);
}
.site-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 200ms ease, color 150ms ease;
  padding-bottom: 2px;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); background-size: 100% 1px; }
@media (max-width: 40rem) {
  .site-nav li.nav-optional { display: none; }
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  /* faint star-chart dot grid */
  background-image: radial-gradient(circle, rgba(190, 214, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero::before {
  /* galactic nebula glows - pure CSS, zero cost */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 78% 12%, rgba(64, 106, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 35% at 12% 78%, rgba(79, 227, 193, 0.07), transparent 70%),
    radial-gradient(ellipse 30% 25% at 45% 40%, rgba(147, 92, 255, 0.06), transparent 70%);
  pointer-events: none;
}
.hero::after {
  /* fade so content below sits on flat navy */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 9rem;
  background: linear-gradient(to bottom, rgba(7, 12, 24, 0), var(--bg));
  pointer-events: none;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1; /* paint above .hero::after fade */
  padding-top: clamp(4rem, 12vh, 7.5rem);
  padding-bottom: clamp(4rem, 10vh, 6.5rem);
}
.prompt-line {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--muted);
  min-height: 1.5em;
  margin-bottom: 1.5rem;
}
.prompt-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.prompt-line .ps1 { color: var(--accent); font-weight: 500; }
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(1.5rem, 6vw, 4rem);
  align-items: start;
}
@media (max-width: 46rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
}

h1 {
  font-size: clamp(2.75rem, 8.5vw, 5rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 12ch;
}
.hero-role {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--ink);
  margin-top: 1.25rem;
}
.hero-role .loc { color: var(--muted); }
.hero-intro {
  margin-top: 1.25rem;
  max-width: 46rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}
.hero-photo {
  position: relative;
  width: clamp(7rem, 18vw, 10.5rem);
  border-radius: 6px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lift), 0 0 32px rgba(79, 227, 193, 0.10);
  background: var(--bg-elev);
}
/* corner-bracket accents - quiet L-brackets on opposite corners */
.hero-photo::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 34px;
  height: 34px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  pointer-events: none;
}
.hero-photo::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: -8px;
  width: 34px;
  height: 34px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}
.hero-photo figcaption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 0.5rem 0.625rem;
  border-top: 1px solid var(--hairline-soft);
  background: var(--bg-elev);
  border-radius: 0 0 5px 5px;
}

.cta-row {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.5rem 1.125rem;
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 175ms ease, box-shadow 175ms ease, transform 175ms ease, background 175ms ease;
}
.pill:hover, .pill:focus-visible {
  border-color: rgba(148, 163, 204, 0.45);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.pill-primary { background: var(--accent); color: #06110d; border-color: var(--accent); }
.pill-primary:hover, .pill-primary:focus-visible { background: #6cf0d2; border-color: #6cf0d2; box-shadow: 0 0 24px rgba(79, 227, 193, 0.35); }

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
section { padding-block: calc(var(--rhythm) / 2); }
main > section:first-of-type { padding-top: 0; }
.section-block { border-top: 1px solid var(--hairline-soft); padding-top: calc(var(--rhythm) / 2); }

h2 {
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  font-weight: 580;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 24ch;
}

.prose p { max-width: 82ch; }
.prose p + p { margin-top: 1rem; }

/* ------------------------------------------------------------
   Timeline
   ------------------------------------------------------------ */
.timeline { list-style: none; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--hairline);
}
.entry {
  position: relative;
  padding-left: 2rem;
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.5rem 1.5rem;
}
.entry + .entry { margin-top: 3rem; }
.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--faint);
  transition: background 350ms ease, border-color 350ms ease;
}
.entry.is-visible::before { background: var(--accent); border-color: var(--accent); }
/* without JS the reveal never fires - show the dots filled */
html:not(.js) .entry::before { background: var(--accent); border-color: var(--accent); }
@media (max-width: 46rem) {
  .entry { grid-template-columns: 1fr; }
}
.entry-when {
  font-family: var(--mono);
  font-feature-settings: "tnum";
  font-size: 0.8125rem;
  color: var(--muted);
  padding-top: 0.25rem;
  white-space: nowrap;
}
.entry-body h3 {
  font-size: 1.1875rem;
  font-weight: 580;
  letter-spacing: -0.01em;
}
.entry-org {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.entry-body ul:not(.chip-row),
.edu-item ul,
.edu-featured ul {
  list-style: none;
  margin-top: 0.875rem;
  max-width: 76ch;
}
.entry-body ul:not(.chip-row) li,
.edu-item li,
.edu-featured li {
  padding-left: 1.125rem;
  position: relative;
  font-size: var(--fs-detail);
  color: var(--ink-soft);
}
.entry-body ul:not(.chip-row) li + li,
.edu-item li + li,
.edu-featured li + li { margin-top: 0.5rem; }
.entry-body ul:not(.chip-row) li::before,
.edu-item li::before,
.edu-featured li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  transition: border-color 150ms ease, color 150ms ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------
   Skills
   ------------------------------------------------------------ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 2rem 2.5rem;
}
.skill-group h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline-soft);
}
.skill-group ul { list-style: none; }
.skill-group li {
  font-size: var(--fs-detail);
  color: var(--ink-soft);
  padding: 0.25rem 0;
}
.skill-group li::before { content: "· "; color: var(--accent); }

/* ------------------------------------------------------------
   Projects
   ------------------------------------------------------------ */
.projects { display: grid; gap: 1.25rem; }
.project {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1.5rem 1.625rem;
  background: var(--bg-elev);
  transition: border-color 175ms ease, box-shadow 175ms ease, transform 175ms ease;
}
.project:hover { border-color: rgba(79, 227, 193, 0.4); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.project h3 { font-size: 1.125rem; font-weight: 580; letter-spacing: -0.01em; }
.project .project-id {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.5rem;
}
.project p { margin-top: 0.5rem; font-size: var(--fs-detail); color: var(--ink-soft); max-width: 78ch; }

/* ------------------------------------------------------------
   Education & contact
   ------------------------------------------------------------ */
.edu-item h3 { font-size: 1.125rem; font-weight: 580; }
.edu-item .entry-org { margin-top: 0.25rem; }
.edu-item + .edu-item { margin-top: 1.5rem; }

/* Featured Master's — the standout credential */
.edu-featured {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  border: 1px solid rgba(79, 227, 193, 0.38);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(79, 227, 193, 0.07), rgba(79, 227, 193, 0) 55%),
    var(--bg-elev);
  box-shadow: var(--shadow-lift), 0 0 44px rgba(79, 227, 193, 0.09);
  padding: 1.75rem 1.875rem;
  margin-bottom: 1.75rem;
}
.edu-badge {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #06110d;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.edu-featured-body { min-width: 0; }
.edu-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.edu-featured h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 580;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.edu-featured .entry-org { font-size: 0.85rem; margin-top: 0.35rem; }
@media (max-width: 34rem) {
  .edu-featured { gap: 1.125rem; padding: 1.375rem; }
  .edu-badge { width: 2.75rem; height: 2.75rem; font-size: 0.8rem; }
}

.contact-card {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg-elev);
  padding: 2rem;
}
.contact-card .prompt-echo {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.contact-card .prompt-echo .ps1 { color: var(--accent); font-weight: 500; }
.contact-links { list-style: none; display: grid; gap: 0.625rem; }
.contact-links li { font-family: var(--mono); font-size: 0.875rem; }
.contact-links .key { color: var(--faint); display: inline-block; min-width: 6.5rem; }

.contact-form { display: grid; gap: 1rem; margin-bottom: 1.75rem; max-width: 42rem; }
.contact-form .field { display: grid; gap: 0.375rem; }
.contact-form .key {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.contact-form .key::before { content: "// "; color: var(--faint); }
.contact-form input,
.contact-form textarea {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.625rem 0.75rem;
  width: 100%;
  transition: border-color 150ms ease;
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form input:hover,
.contact-form textarea:hover { border-color: rgba(148, 163, 204, 0.45); }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.contact-form button { justify-self: start; }
.contact-form .hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}
.form-status {
  font-size: 0.8125rem;
  color: var(--muted);
  min-height: 1.25em;
  margin: 0;
}
.form-status.is-error { color: #ff9d9d; }
.form-status.is-success { color: var(--accent); }
.contact-form + .contact-links { border-top: 1px solid var(--hairline-soft); padding-top: 1.5rem; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--hairline-soft);
  margin-top: calc(var(--rhythm) / 2);
  padding: 2.5rem 0 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-inner .comment { color: var(--faint); }

/* ------------------------------------------------------------
   Scroll reveal - hiding is gated behind the .js root class so
   the page stays fully readable when JavaScript is unavailable.
   ------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 380ms ease-out, transform 380ms ease-out;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .pill, .project { transition: none; }
  .skip-link { transition: none; }
}

/* ------------------------------------------------------------
   Print - clean black-on-white resume
   ------------------------------------------------------------ */
@media print {
  /* Remap the dark palette back to ink-on-paper for print. */
  :root {
    --accent: #000;
    --bg: #fff; --bg-elev: #fff;
    --ink: #000; --ink-soft: #222; --muted: #444; --faint: #555;
    --hairline: #bbb; --hairline-soft: #ccc;
  }
  body { font-size: 11pt; color: #000; background: #fff; }
  .site-header, #hero-canvas, .cta-row, .site-footer, .cursor,
  .skip-link, .section-index, .contact-form { display: none !important; }
  .hero { background: none; }
  .hero::before, .hero::after { display: none; }
  .hero-inner { padding-block: 0 1.5rem; }
  .hero-photo::before, .hero-photo::after { display: none; }
  .prompt-line, .section-label, .microlabel, .entry-when, .entry-org, .chip { color: #444; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .project, .contact-card, .hero-photo { box-shadow: none; border-color: #bbb; }
  section { padding-block: 1rem; break-inside: avoid-page; }
  a { text-decoration: none; color: #000; }
  .timeline::before { background: #bbb; }
  .entry::before { border-color: #000; background: #000; }
}
