/* ---------- Font ---------- */
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk-variable.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f2f3ef;
  --ink: #1b211e;
  --muted: #59625d;
  --rule: #d6dad4;
  --accent: #2a44c4;
  --accent-soft: rgba(42, 68, 196, 0.18);

  --font: 'Schibsted Grotesk', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --measure: 36rem;
  --gutter: clamp(1.5rem, 10vw, 11rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131715;
    --ink: #e6ebe7;
    --muted: #9aa49e;
    --rule: #2b322e;
    --accent: #93a6ff;
    --accent-soft: rgba(147, 166, 255, 0.22);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0;
}

/* ---------- Layout ---------- */
.page {
  align-self: center;
  width: 100%;
  max-width: 96rem;
  padding: clamp(3rem, 8vh, 6rem) var(--gutter) 2.5rem;
}

/* Wide screens: headline left, details right */
@media (min-width: 70rem) {
  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 30rem);
    column-gap: clamp(3rem, 6vw, 7rem);
    align-items: end;
  }

  .details .about {
    margin-top: 0;
  }
}

/* ---------- Type ---------- */
.name {
  font-weight: 500;
  color: var(--muted);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
  text-wrap: balance;
}

.tagline {
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
  line-height: 1.4;
  color: var(--muted);
  max-width: 30ch;
}

.about {
  margin-top: clamp(2rem, 5vh, 3rem);
  max-width: var(--measure);
}

.about p + p {
  margin-top: 1em;
}

.status {
  margin-top: 1.5rem;
  max-width: var(--measure);
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.975rem;
}

/* ---------- Contact ---------- */
.contact {
  margin-top: clamp(2rem, 5vh, 3rem);
}

.contact-label {
  color: var(--muted);
  font-size: 0.975rem;
  margin-bottom: 0.35rem;
}

.email {
  display: inline-block;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.3em;
  transition: background-size 0.2s ease;
  overflow-wrap: anywhere;
}

.email:hover {
  background-size: 100% 0.9em;
}

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

/* ---------- Footer ---------- */
.footer {
  padding: 1.5rem var(--gutter) 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .email {
    transition: none;
  }
}
