:root {
  --splash: #b9dcc0;
  --ink: #0e0e0e;
  --bg: #121212;
  --fg: #f2f0eb;
  --muted: #8a8780;
  --rule: rgba(242, 240, 235, 0.18);
  --accent: #b9dcc0;
  --gutter: clamp(16px, 4vw, 56px);
  --sans: "Inter Tight", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--accent); color: var(--ink); }

/* ───────────── Splash ───────────── */

.splash {
  position: relative;
  min-height: 100svh;
  background: var(--splash);
  color: var(--ink);
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.splash__meta {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sticker {
  position: absolute;
  top: calc(var(--gutter) + 8px);
  right: var(--gutter);
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  transform: rotate(-14deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.sticker:hover { transform: rotate(0deg) scale(1.08); }

.splash__name {
  font-weight: 700;
  text-transform: uppercase;
  font-size: min(18.5vw, 40svh);
  line-height: 0.8;
  white-space: nowrap;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
  margin-bottom: -0.02em;
}

.splash__name .line {
  display: block;
  padding-top: 0.06em;
}

/* Lighter brackets so the name still reads first */
.splash__name .tag { font-weight: 400; }

/* Hidden until main.js types them out; without JS the name just shows */
.js .splash__name .line { visibility: hidden; }
.js .splash__name.is-typing .line { visibility: visible; }
.splash__name .char { visibility: hidden; }
.splash__name .char.is-typed { visibility: visible; }

.cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.74em;
  margin-left: 0.06em;
  background: currentColor;
  vertical-align: baseline;
}
/* Solid while typing, blinks once done, then fades away */
.splash__name.is-done .cursor { animation: blink 1.06s steps(1) infinite; }
.splash__name .cursor.is-gone {
  animation: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes blink { 50% { opacity: 0; } }

/* Scroll cue: sits bottom-right, fades in after typing, bobs gently */
.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  font-size: clamp(44px, 8vw, 128px);
  font-weight: 400;
  line-height: 0.8;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.scroll-cue.is-visible {
  opacity: 1;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover { animation-play-state: paused; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14%); }
}

/* ───────────── Nav ───────────── */

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(230, 228, 222, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transform: translate(-50%, -80px);
  transition: transform 0.5s cubic-bezier(.16, 1, .3, 1);
}
.nav.is-visible { transform: translate(-50%, 0); }
.nav a { padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: #2f7a4a; }

/* ───────────── Information ───────────── */

.info { padding: 0 var(--gutter); }

.intro {
  padding: clamp(96px, 16vw, 200px) 0 clamp(72px, 10vw, 140px);
  max-width: 22ch;
  max-width: min(1100px, 100%);
}
.intro p {
  font-size: clamp(26px, 4.2vw, 58px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.block { padding: clamp(48px, 7vw, 96px) 0; }

.label {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.sublabel {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 14px 0;
}

.group + .group { margin-top: clamp(40px, 6vw, 80px); }

/* Numbers */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.numbers li {
  padding: 24px 24px 0 0;
  border-right: 1px solid var(--rule);
}
.numbers li + li { padding-left: 24px; }
.numbers li:last-child { border-right: 0; }
.num, .unit {
  font-size: clamp(64px, 12vw, 180px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.unit { color: var(--accent); }
.numbers p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  max-width: 22ch;
}

/* Rows — big bold uppercase names */
.rows { border-top: 1px solid var(--rule); }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  padding: clamp(10px, 1.4vw, 18px) 0;
  transition: color 0.25s ease, padding 0.35s cubic-bezier(.16, 1, .3, 1);
}
.row__name {
  font-size: clamp(40px, 8.6vw, 132px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.9;
}
.row__meta, .row__col {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
  flex-shrink: 0;
}
.row__meta > span { display: block; }
.row:hover { color: var(--accent); padding-left: 12px; }
.row:hover .row__meta, .row:hover .row__col { color: var(--fg); }

.rows--compact .row__name { font-size: clamp(32px, 5.4vw, 80px); }

.rows--table .row { display: grid; grid-template-columns: 1fr minmax(0, 320px) 120px; gap: 24px; }
.rows--table .row__name { font-size: clamp(26px, 3.6vw, 52px); letter-spacing: -0.03em; }

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tags li {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tags li:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ───────────── Contact ───────────── */

.contact {
  background: var(--splash);
  color: var(--ink);
  padding: clamp(64px, 10vw, 140px) var(--gutter) var(--gutter);
  margin-top: clamp(48px, 8vw, 120px);
}
.contact .label { margin-bottom: 12px; }
.contact__mail {
  display: inline-block;
  font-size: clamp(28px, 6.6vw, 120px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  word-break: break-word;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 0.06em no-repeat;
  transition: background-size 0.5s cubic-bezier(.16, 1, .3, 1);
}
.contact__mail:hover { background-size: 100% 0.06em; }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 32px;
  font-size: 18px;
  font-weight: 600;
}
.contact__links a:hover { text-decoration: underline; }
.contact__base {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(72px, 12vw, 160px);
  padding-top: 16px;
  border-top: 1px solid rgba(14, 14, 14, 0.25);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.link-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* ───────────── CV modal ───────────── */

.modal {
  border: 0;
  padding: 0;
  width: min(520px, calc(100% - 32px));
  background: var(--fg);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.modal::backdrop {
  background: rgba(14, 14, 14, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal[open] { animation: pop 0.45s cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) rotate(-2deg); } }

.modal__inner { position: relative; padding: clamp(28px, 5vw, 44px); }
.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  font: 400 28px/1 var(--sans);
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.modal__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b6862;
}
.modal__title {
  margin-top: 10px;
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.9;
}
.modal__body { margin-top: 18px; font-size: 18px; line-height: 1.4; }
.modal__cta {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 20px;
  background: var(--splash);
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.modal__cta:hover { background: var(--ink); color: var(--fg); }

/* ───────────── Reveal on scroll ───────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(.16, 1, .3, 1),
              color 0.25s ease, padding 0.35s cubic-bezier(.16, 1, .3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ───────────── Small screens ───────────── */

@media (max-width: 720px) {
  .sticker { top: calc(var(--gutter) + 52px); padding: 10px 12px; font-size: 12px; }
  .splash__name { font-size: min(16.5vw, 40svh); }
  .scroll-cue { font-size: 40px; }
  .numbers { grid-template-columns: 1fr; }
  .numbers li, .numbers li + li { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .row__meta { text-align: left; }
  .row__meta > span { display: inline; }
  .row__meta > span + span::before { content: " · "; }
  .rows--table .row { grid-template-columns: 1fr auto; }
  .rows--table .row__name { grid-column: 1 / -1; }
  .rows--table .row__col { text-align: left; }
  .nav a { padding: 8px 9px; }
  .nav a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .splash__name.is-done .cursor, .scroll-cue.is-visible { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
