/* =========================================================================
   koenhanselman.nl — personal site
   ========================================================================= */

/* ---- Design tokens ----------------------------------------------------- */
:root {
  /* Surfaces */
  --bg-deep:        #07080c;
  --bg-page-top:    #0c0e1c;
  --bg-page-mid:    #08090f;
  --bg-page-glow:   #1c2148;       /* radial wash at top of page */
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-faint:  rgba(255, 255, 255, 0.02);
  --surface-hover:  rgba(255, 255, 255, 0.08);
  --surface-card:   #16181d;       /* solid fallback behind avatar */

  /* Borders */
  --border:         rgba(255, 255, 255, 0.10);
  --border-soft:    rgba(255, 255, 255, 0.07);
  --border-very-soft: rgba(255, 255, 255, 0.09);

  /* Text */
  --text-strong:    #f4f5f6;
  --text:           #e7e8ea;
  --text-muted:     #a7abb4;
  --text-soft:      #9a9ea8;
  --text-faint:     #6a6e78;
  --text-mono:      #b6b9c0;
  --text-footer:    #5e626c;
  --text-placeholder: #c7cad0;     /* dim text inside paragraphs */

  /* Accent + glow */
  --accent:         #6f7cff;
  --accent-glow:    #1e2a6b;

  /* Bloom colors (top-of-page color field) */
  --bloom-indigo:   #4338ca;
  --bloom-violet:   #7c3aed;
  --bloom-blue:     #2563eb;
  --bloom-cyan:     #0891b2;

  /* Radii */
  --r-button:       11px;
  --r-card:         14px;
  --r-pill:         30px;

  /* Fonts */
  --font-display:   'Bricolage Grotesque', sans-serif;
  --font-body:      'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  /* Breakpoint anchors (informational — used in media queries below) */
  /* phone:  max-width 480px */
}

/* ---- Reset + base ------------------------------------------------------ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background-color: var(--bg-deep); }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  overflow-x: hidden;

  /* Atmospheric background lives on the body so it always spans the full
     viewport width — no hard cutoff at the content column's edge. */
  background:
    radial-gradient(130% 90% at 50% -12%, var(--bg-page-glow) 0%, transparent 52%),
    linear-gradient(180deg, var(--bg-page-top) 0%, var(--bg-page-mid) 60%, var(--bg-deep) 100%);
}
::selection { background: rgba(111, 124, 255, 0.28); }
a { color: inherit; }

/* ---- Page shell ------------------------------------------------------- */
.page {
  position: relative;
  width: 100%;
  max-width: 760px;
  min-height: 100vh;
}

/* Color blooms — saturated circles softly blended across the top of the
   screen. Anchored to the viewport (position: fixed) so they fade smoothly
   to the edges on any screen width instead of being clipped to the column. */
.bloom {
  position: fixed;
  top: 0;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
}
.bloom--indigo { top: -170px; left: -40px;   width: 440px; height: 360px; background: var(--bloom-indigo); opacity: .55; }
.bloom--violet { top: -190px; left: 28%;     width: 380px; height: 330px; background: var(--bloom-violet); opacity: .50; filter: blur(105px); }
.bloom--blue   { top: -160px; right: -40px;  width: 440px; height: 340px; background: var(--bloom-blue);   opacity: .50; }
.bloom--cyan   { top:  -70px; right: 20%;    width: 320px; height: 250px; background: var(--bloom-cyan);   opacity: .36; filter: blur(110px); }

/* ---- Content column --------------------------------------------------- */
.content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  padding: clamp(56px, 12vw, 104px) clamp(24px, 6vw, 48px) 56px;
}

/* ---- Status pill ------------------------------------------------------ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: 26px;
  background: var(--surface-faint);
  white-space: nowrap;
}
.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: status-pulse 2.4s ease-in-out infinite;
}
.status__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-mono);
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ---- Intro: avatar + heading ----------------------------------------- */
.intro-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

/* Avatar — three layers: shadow, gradient ring, clipped photo frame */
.avatar { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.avatar__shadow {
  position: absolute;
  inset: -2px;
  top: 4px;
  border-radius: 50%;
  background: var(--accent-glow);
  opacity: 0.6;
  filter: blur(12px);
}
.avatar__ring {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 1.5px;
  background: linear-gradient(160deg, #5b6bd6 0%, rgba(255, 255, 255, 0.14) 55%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: 0 4px 14px -4px rgba(10, 14, 40, 0.7);
}
/* Inner frame stays put; the img inside translates so the face sits centered */
.avatar__frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 45% 38%, #3b4fd6 0%, #1c2a80 52%, #0f1848 100%);
}
.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateY(10%);
}

.intro-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--text-strong);
  text-wrap: balance;
}

/* ---- Intro paragraph ------------------------------------------------- */
.intro {
  font-size: clamp(16px, 4vw, 18px);
  line-height: 1.62;
  color: var(--text-muted);
  margin-bottom: 38px;
  text-wrap: pretty;
}
.intro p + p { margin-top: 1em; }
.intro strong {
  color: var(--text);
  font-weight: inherit;
}

/* ---- Email obfuscation ------------------------------------------------ */
.decoy { display: none; }

/* ---- Typewriter ------------------------------------------------------- */
.typewriter { display: inline; }
.typewriter__word {
  color: var(--accent);
  font-weight: 500;
}
.typewriter__cursor {
  display: inline-block;
  width: 2px;
  height: 0.82em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: -0.04em;
  border-radius: 1px;
  animation: tw-blink 1.1s step-end infinite;
}
@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---- Section label (small mono caption + horizontal rule) ----------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-label__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.section-label__rule {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ---- Projects grid + card ------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;     /* 2-column ready: change to repeat(2, 1fr) when you have more projects */
  gap: 14px;
  margin-bottom: 40px;
}
.project-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-very-soft);
  border-radius: var(--r-card);
  padding: 18px;
  background: var(--surface-faint);
  transition: border-color 0.18s, background 0.18s;
}
.project-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}
.project-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 9px;
}
.project-card__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.project-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.project-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-mono);
  text-transform: uppercase;
}
.project-card__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  font-style: normal;
}
.project-card__arrow {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 15px;
}
.project-card__description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}
.project-card__description strong {
  color: var(--text-placeholder);
  font-weight: inherit;
}

/* ---- Contact links --------------------------------------------------- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-button);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.link-button__external {
  font-size: 12px;
  color: #8a8e98;
  transition: color 0.16s;
}
.link-button:hover {
  background: #fff;
  color: #0c0d10;
  border-color: #fff;
}
.link-button:hover .link-button__external,
.link-button:hover svg { color: #0c0d10; }

/* ---- Footer ---------------------------------------------------------- */
.divider {
  height: 1px;
  background: var(--border-soft);
  margin-bottom: 20px;
}
.footer {
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-footer);
}

/* ---- Phone (≤ 480px) -------------------------------------------------- */
@media (max-width: 480px) {
  /* Heading wraps naturally already (text-wrap: balance + clamp font-size).
     Nothing brittle to override here. */
}
