/* ─────────────────────────────────────────────────────────────
   ERIK STEINKI · personal site
   Aesthetic: pure-block, full-bleed sections, mix-blend titles.
   Fonts: Orbitron (display), Inter (body).
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --fg-soft: #d5d5d5;
  --fg-muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.55);

  --font-display: 'Orbitron', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* fluid scale */
  --t-kicker: clamp(0.65rem, 0.55rem + 0.35vw, 0.8rem);
  --t-body:   clamp(1rem, 0.92rem + 0.35vw, 1.18rem);
  --t-lede:   clamp(1rem, 0.85rem + 0.7vw, 1.45rem);
  --t-h3:     clamp(0.78rem, 0.7rem + 0.3vw, 0.95rem);
  --t-h4:     clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem);
  /* Massive display — COBRAH-scale, but capped tight enough that
     long words ("STEINKI", "HANDS") still fit on one line inside
     the content column at any viewport, including ultrawides. */
  --t-display:       clamp(3.25rem, 8vw, 9rem);
  --t-display-cv:    clamp(4rem, 14vw, 17rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: #fff; color: #000;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid #fff;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  transition: opacity 200ms ease;
}

.site-nav a:hover { opacity: 0.5; }

/* ── BLOCK PRIMITIVE ────────────────────────────────────── */
.block {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.block-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.block-media img,
.block-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

/* Hero needs a center-vignette so the big white title still reads
   over mid-tone images. mix-blend: difference fails on grey;
   this pushes the area behind the title toward black. */
.block-hero .block-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 55% at center,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0) 75%
  );
  pointer-events: none;
}

.block-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: grid;
  /* every block-content can decide its own placement */
}

.block-content {
  display: grid;
  gap: 1.25rem;
  padding: clamp(2rem, 6vw, 6rem);
  /* Hard-cap to viewport so giant Orbitron display text can never push past the screen edge */
  width: min(56rem, 100vw);
  max-width: 100%;
  /* The trick: text reads against any photo */
  mix-blend-mode: difference;
  color: #fff;
}

.block-content > * {
  min-width: 0;
}

.block-content-center {
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 44rem;
}

.block-content-bottom-left {
  align-self: end;
  justify-self: start;
}

.block-content-bottom-right {
  align-self: end;
  justify-self: end;
  text-align: right;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--t-kicker);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
}

.display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  /* Don't break words mid-character. If a title is wider than its
     column, let it overflow visually — the parent .block clips it
     to the viewport. */
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.lede {
  font-family: var(--font-body);
  font-size: var(--t-lede);
  line-height: 1.4;
  font-weight: 300;
  max-width: 38ch;
  color: #fff;
}

.block-content-bottom-right .lede,
.block-content-bottom-right .actions {
  margin-left: auto;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.block-content-bottom-right .actions { justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: opacity 220ms ease;
}

.btn:hover { opacity: 0.5; }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-light {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ── CV BLOCK (the one content block) ───────────────────── */
.block-cv {
  background: #000;
  min-height: auto;
}

.cv-inner {
  max-width: 90rem;
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) clamp(1.5rem, 5vw, 5rem) clamp(4rem, 8vw, 7rem);
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.cv-top {
  display: grid;
  gap: 1.5rem;
}

/* CV title hugs the left edge; portrait pushes to the right edge of
   the content area (visually aligning with the right side of the
   Education column below). Same row, opposite ends. */
.cv-title-row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.cv-title-row .portrait {
  margin-left: auto;
}

.cv-title {
  font-size: var(--t-display-cv);
  letter-spacing: -0.02em;
}

.cv-lede {
  color: var(--fg-soft);
  max-width: 48ch;
}

.portrait {
  margin: 0;
}

.portrait-frame {
  /* Diameter tracks the CV title font-size so the circle visually
     matches the height of the "CV" letters at any viewport. */
  width: clamp(4rem, 14vw, 17rem);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
}

.portrait-frame img,
.portrait-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CV columns + timeline */
/* ── "NOW" block ───────────────────────────────────────────
   Pinned current state (role + learning) above the historical
   timeline. Top/bottom hairlines bracket it as a distinct slab.
   To remove: delete this whole .cv-now block. */
.cv-now {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 56rem;
}

.cv-now-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
}

@media (min-width: 700px) {
  .cv-now-grid { grid-template-columns: 1fr 1fr; }
}

.cv-now-col {
  display: grid;
  gap: 1rem;
  /* Keep content packed at the top of each column regardless of how many
     items the other column has — otherwise the shorter column's items
     drift downward when the grid stretches the tracks to equal height. */
  align-content: start;
}

.cv-now-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.cv-now-item {
  display: grid;
  gap: 0.25rem;
}

.cv-now-item + .cv-now-item {
  margin-top: 0.5rem;
}

/* Certificate verification link — small uppercase Orbitron, sits inline
   under the provider line on any item that has a public credential. */
.cv-now-verify {
  display: inline-block;
  /* CSS Grid stretches items full-width by default — pin to start so
     the underline is only as wide as the text itself, not the column. */
  justify-self: start;
  width: fit-content;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 200ms ease, border-color 200ms ease;
}

.cv-now-verify:hover,
.cv-now-verify:focus-visible {
  color: var(--fg);
  border-bottom-color: currentColor;
}

/* ── Timeline ──────────────────────────────────────────── */
.timeline {
  display: grid;
  gap: 2.5rem;
  margin: 0;
  max-width: 56rem;
}

.timeline > li {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.4rem;
  position: relative;
  border-left: 1px solid var(--line);
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.8rem;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 999px;
}

/* Education entries get a hollow dot to silently distinguish them
   from the filled dot of Experience entries. Same outer size. */
.timeline > li[data-kind="education"]::before {
  background: transparent;
  border: 1.5px solid #fff;
}

/* Tag + date sit on one line above the role */
.t-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
}

.t-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-soft);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  line-height: 1;
}

.t-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.t-role {
  font-family: var(--font-body);
  font-size: var(--t-h4);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.t-org {
  color: var(--fg-soft);
  font-size: 0.95rem;
}

.t-grade {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #fff;
  margin-top: 0.15rem;
}

.timeline ul {
  margin-top: 0.5rem;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
  list-style: disc;
  color: var(--fg-soft);
}

.timeline ul li { font-size: 0.95rem; line-height: 1.5; }
.timeline ul li::marker { color: var(--fg-muted); }

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  /* row gap when wrapped, column gap when on one line */
  gap: 0.5rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: #000;
}

.site-footer .footer-segment {
  /* Each segment stays intact — wraps as a whole unit, never mid-phrase. */
  white-space: nowrap;
}

.site-footer .footer-credit {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, color 220ms ease;
}

.site-footer .footer-credit:hover,
.site-footer .footer-credit:focus-visible {
  color: var(--fg);
  border-bottom-color: currentColor;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-header { padding: 0.9rem 1.1rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.62rem; letter-spacing: 0.18em; }
  .brand-name { display: none; }

  .block { min-height: 88vh; }
  .block-stage { min-height: 88vh; }
  .block-content { padding: 1.75rem; gap: 1rem; }

  .actions .btn { padding: 0.75rem 1.1rem; font-size: 0.62rem; }
}

@media (max-width: 520px) {
  :root {
    --t-display:    clamp(3.5rem, 18vw, 8rem);
    --t-display-cv: clamp(4rem, 22vw, 9rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
