/* ============================================================
   JURRE PEETERS — Portfolio
   styles.css
   ============================================================ */

/* ---- DESIGN TOKENS — Pulse (near-black + electric blue) ---- */
:root {
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --bg: #0a0b0e;
  --bg-2: #121419;
  --bg-3: #181b22;
  --fg: #f4f6fb;
  --muted: #9aa3b2;
  --faint: #5b6373;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: oklch(0.64 0.19 258);
  --accent-2: oklch(0.74 0.15 258);
  --accent-ink: #06070b;
  --accent-soft: oklch(0.64 0.19 258 / .16);
  --radius: 14px;
  --radius-sm: 9px;
}


/* ---- RESET & BASE ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
  /* smooth theme transitions */
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
img { max-width: 100%; display: block; }

/* Shared layout helpers */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); display: inline-block; }


/* ---- TOP NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease), padding .4s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); padding: 12px 28px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.monogram {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 900; font-size: 16px; letter-spacing: -.04em;
  transition: transform .35s var(--ease), background .5s var(--ease);
}
.brand:hover .monogram { transform: rotate(-8deg) scale(1.06); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: var(--radius-sm);
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-links .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-right: 6px; }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Language toggle */
.lang {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.lang button {
  background: none; border: none;
  color: var(--muted);
  padding: 7px 13px;
  cursor: pointer;
  transition: color .25s, background .25s;
}
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lang button.on { background: var(--accent); color: var(--accent-ink); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--fg);
  transition: border-color .25s, background .25s, color .25s, transform .25s var(--ease);
}
.nav-cta:hover { background: var(--fg); color: var(--bg); transform: translateY(-1px); }
.nav-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  place-items: center;
}
.burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }



/* ---- HERO ---- */
.hero { position: relative; padding: 170px 0 90px; overflow: hidden; }
.hero-glow {
  position: absolute;
  top: -10%; right: -8%;
  width: 62vw; height: 62vw;
  max-width: 820px; max-height: 820px;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 62%);
  pointer-events: none; z-index: 0; filter: blur(8px);
}
.hero .wrap { position: relative; z-index: 2; }

.hero-top { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--muted); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
}
.status .pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pip 2.4s infinite;
}
@keyframes pip {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Hero name — visible state is the base; hidden start only via body:not(.loaded) */
.h-name {
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .92;
  font-size: clamp(58px, 12vw, 168px);
  margin: 8px 0 0;
}
.h-name .ln { display: block; overflow: hidden; }
.h-name .ln span { display: block; transform: translateY(0); transition: transform 1s var(--ease); }
body:not(.loaded) .h-name .ln span { transform: translateY(110%); }
.h-name .ln:nth-child(2) span { transition-delay: .09s; }
.h-name .accent-word { color: var(--accent); }

.hero-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  margin-top: 34px;
}
.h-title { font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.h-title b { color: var(--accent); }
.h-tag { max-width: 430px; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.5; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 600; font-size: 15px;
  padding: 15px 26px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 34px var(--accent-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px var(--accent-soft); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); transform: translateY(-2px); }

.hero-strip {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.hstat { padding: 22px 4px 22px 0; }
.hstat .num { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.hstat .num b { color: var(--accent); }
.hstat .cap {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase; margin-top: 4px;
}


/* ---- SECTION SHELL ---- */
section { position: relative; }
.sec { padding: 96px 0; }
.sec-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 30px;
  margin-bottom: 54px; flex-wrap: wrap;
}
.sec-title { font-size: clamp(34px, 5vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.sec-title em { font-style: normal; color: var(--accent); }
.sec-index { font-family: var(--font-mono); font-size: 13px; color: var(--faint); letter-spacing: .1em; }
.sec-lead { max-width: 440px; color: var(--muted); font-size: 16px; }

/* Scroll-reveal — elements start hidden, animate in when IntersectionObserver fires .in */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }


/* ---- ABOUT ---- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 54px; align-items: start; }

/* Portrait placeholder — replace background with your photo later */
.photo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 14px, var(--bg-3) 14px 28px);
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo .ph-tag {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 6px; letter-spacing: .06em;
}
.photo .ph-frame {
  position: absolute; inset: 0;
  border: 1px dashed var(--line-strong);
  margin: 14px;
  border-radius: calc(var(--radius) - 6px);
}

.about-body p {
  font-size: clamp(18px, 2.2vw, 23px);
  font-weight: 500; line-height: 1.55; letter-spacing: -.01em; color: var(--fg);
}
.about-body p .dim { color: var(--muted); }
.about-body p b { color: var(--accent); font-weight: 600; }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 34px; }
.vcard {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; background: var(--bg-2);
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.vcard:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--bg-3); }
.vicon { width: 34px; height: 34px; margin-bottom: 16px; color: var(--accent); }
.vcard h4 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 5px; }
.vcard p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }


/* ---- SKILLS ---- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skblock {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; background: var(--bg-2);
  position: relative; overflow: hidden;
}
/* Accent top-bar animates from 0 → 100% width when block enters viewport (.in) */
.skblock::before {
  content: ""; position: absolute;
  top: 0; left: 0; width: 0; height: 3px;
  background: var(--accent);
  transition: width .6s var(--ease);
}
.skblock.in::before { width: 100%; }
.skblock .k { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.skblock h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.skblock .kn { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  font-size: 13.5px; font-weight: 500;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg); background: var(--bg-3);
  transition: transform .25s var(--ease), border-color .25s, color .25s, background .25s;
  cursor: default;
}
.tag:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.tag.lead { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag.lead:hover { color: var(--accent-ink); }


/* ---- WORK TIMELINE ---- */
.work-grid { display: grid; grid-template-columns: 1fr 300px; gap: 60px; align-items: start; }
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}

.tl-item { position: relative; padding: 0 0 38px 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .node {
  position: absolute; left: 0; top: 5px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.tl-item:hover .node { border-color: var(--accent); background: var(--accent); transform: scale(1.15); }
.tl-item.cur .node { border-color: var(--accent); background: var(--accent); }

.tl-period { font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; color: var(--accent); margin-bottom: 6px; }
.tl-role { font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.tl-co { font-size: 14.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.tl-co .badge {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--accent-ink); background: var(--accent);
  padding: 2px 7px; border-radius: 5px; margin-left: 9px;
  letter-spacing: .04em; vertical-align: middle;
}
.tl-desc { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin-top: 11px; max-width: 560px; }

.tl-compact {
  display: flex; justify-content: space-between; gap: 16px;
  align-items: baseline; padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.tl-compact .r { font-weight: 600; font-size: 15px; }
.tl-compact .c { color: var(--muted); font-size: 13px; }
.tl-compact .p { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.tl-more-h {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 36px 0 6px;
}

/* Education side panel */
.edu {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; background: var(--bg-2);
  position: sticky; top: 96px;
}
.edu h3 {
  font-size: 13px; font-family: var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 20px;
}
.edu-item { padding: 16px 0; border-top: 1px solid var(--line); }
.edu-item:first-of-type { border-top: none; padding-top: 0; }
.edu-item .d { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.edu-item .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.edu-item .y { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); margin-top: 6px; }
.langs { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.langs .lt {
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px; color: var(--muted);
}


/* ---- CONTACT ---- */
.contact { padding: 96px 0 60px; }
.contact-card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-2); position: relative;
}

.cc-left { padding: 54px 48px; border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.cc-left .glow {
  position: absolute; bottom: -40%; left: -10%;
  width: 90%; height: 90%;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  pointer-events: none;
}
.cc-left h2 {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.02; position: relative;
}
.cc-left h2 em { font-style: normal; color: var(--accent); }
.cc-left p { color: var(--muted); margin-top: 16px; font-size: 16px; max-width: 340px; position: relative; }

.contact-links { margin-top: 34px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.clink {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
  transition: padding .3s var(--ease);
}
.clink:hover { padding-left: 8px; }
.clink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.clink .ico {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--accent); flex-shrink: 0;
  transition: background .3s, color .3s, border-color .3s;
}
.clink:hover .ico { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.clink .t {
  font-size: 11px; font-family: var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.clink .v { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }

.cc-right { padding: 54px 48px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px;
}
.field input,
.field textarea {
  width: 100%; background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-display); font-size: 15px;
  padding: 14px 16px; resize: vertical;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-3);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.submit { width: 100%; justify-content: center; margin-top: 6px; }
#email-error {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 12px;
  color: rgba(255, 80, 80, .9);
  margin-top: 6px;
  opacity: 0;
  transition: max-height .2s ease, opacity .2s ease;
}
#email-error.visible {
  max-height: 40px;
  opacity: 1;
}
.form-ok {
  display: none;
  align-items: center; gap: 12px;
  margin-top: 18px; padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--fg); font-size: 14.5px; font-weight: 500;
}
.form-ok.show { display: flex; }
.form-error {
  display: none;
  align-items: center; gap: 12px;
  margin-top: 18px; padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 80, 80, .12); border: 1px solid rgba(255, 80, 80, .35);
  color: var(--fg); font-size: 14.5px; font-weight: 500;
}
.form-error.show { display: flex; }


/* ---- FOOTER ---- */
footer { border-top: 1px solid var(--line); padding: 34px 0; margin-top: 30px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .c { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); }
.foot .c b { color: var(--muted); }
.to-top {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  cursor: pointer; transition: color .25s;
}
.to-top:hover { color: var(--accent); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ---- RESPONSIVE — 900px ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: grid; }
  .nav-cta { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .photo { max-width: 300px; }

  .skills-grid { grid-template-columns: 1fr; }

  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .edu { position: static; }

  .contact-card { grid-template-columns: 1fr; }
  .cc-left { border-right: none; border-bottom: 1px solid var(--line); padding: 42px 30px; }
  .cc-right { padding: 42px 30px; }

  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .hstat { border-top: 1px solid var(--line); }
  .hstat:nth-child(-n+2) { border-top: none; }
}

/* ---- RESPONSIVE — 560px ---- */
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .nav { padding: 14px 18px; }
  .hero { padding: 130px 0 60px; }
  .values { grid-template-columns: 1fr; }
  .switcher { left: 50%; transform: translateX(-50%); bottom: 16px; }
  .switcher .lbl { display: none; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 22px; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .h-name .ln span { transform: none; }
  * { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
