/* =========================================================
   Lars Hoogeveen — portfolio
   Dark theme, cyan accent, system fonts (geen externe requests)
   ========================================================= */

:root {
  /* palette */
  --bg:            #0b0f14;
  --bg-alt:        #0e141b;
  --surface:       #111922;
  --surface-2:     #16202b;
  --border:        #1e2a36;
  --border-strong: #2a3a4a;

  --text:          #e6edf3;
  --text-muted:    #9bb0c0;
  --text-dim:      #6b7f8f;

  --accent:        #22d3ee;
  --accent-soft:   #67e8f9;
  --accent-dim:    rgba(34, 211, 238, .12);
  --accent-line:   rgba(34, 211, 238, .35);

  --red:           #ff5f57;
  --yellow:        #febc2e;
  --green:         #28c840;

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* layout */
  --maxw: 1120px;
  --gutter: 24px;
  --radius: 10px;
  --header-h: 68px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }

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

::selection { background: var(--accent); color: #04191d; }

/* ---------- utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #04191d;
  font-family: var(--font-mono);
  font-size: .82rem;
  padding: 10px 16px;
  border-radius: 6px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #04191d; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(11, 15, 20, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand-bracket { color: var(--accent); }
.brand-name { transition: color .2s var(--ease); }
.brand:hover .brand-name { color: var(--accent); }

.nav-list { display: flex; gap: 4px; }
.nav-list a {
  display: block;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .01em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 6px;
  position: relative;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-list a:hover { color: var(--text); background: var(--surface); }
.nav-list a.is-active { color: var(--accent); }
.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: .78rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--surface);
}
.lang-btn {
  background: none;
  border: 0;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color .2s var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { color: var(--accent); }
.lang-sep { color: var(--border-strong); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.menu-bar {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 104px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
}
.section-title {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 650;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.section-lead {
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 40px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 96px;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(circle, rgba(34,211,238,.10), transparent 62%);
  pointer-events: none;
  filter: blur(10px);
}

.hero-inner { position: relative; z-index: 1; }

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(34,211,238,.04);
  max-width: 760px;
  animation: fade-up .7s var(--ease) both;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }
.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-dim);
}

.terminal-body { padding: 22px clamp(18px, 4vw, 30px) 28px; }

.term-line {
  font-family: var(--font-mono);
  font-size: .9rem;
  margin-bottom: 4px;
}
.prompt { color: var(--accent); }
.colon  { color: var(--text-dim); }
.path   { color: var(--text-muted); }
.sigil  { color: var(--text-dim); margin-right: .4em; }
.cmd    { color: var(--text); }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.term-out { padding-top: 14px; }
.term-out[hidden] { display: none; }
.term-out > * { animation: fade-up .5s var(--ease) both; }
.term-out > *:nth-child(2) { animation-delay: .07s; }
.term-out > *:nth-child(3) { animation-delay: .14s; }
.term-out > *:nth-child(4) { animation-delay: .21s; }

.hero-name {
  font-size: clamp(2rem, 6.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(.9rem, 2.3vw, 1.05rem);
  color: var(--accent);
  margin-top: 6px;
}
.hero-tagline {
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 54ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: .76rem;
}
.hero-meta li {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}
.hero-meta .key {
  background: var(--surface-2);
  color: var(--text-dim);
  padding: 3px 8px;
  border-right: 1px solid var(--border);
}
.hero-meta .val { padding: 3px 9px; color: var(--text-muted); }
.hero-meta .val.accent { color: var(--accent); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  animation: fade-up .7s .2s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .01em;
  padding: 11px 20px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #04191d;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-soft);
  color: #04191d;
  box-shadow: 0 8px 24px -10px rgba(34,211,238,.6);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 22px; height: 40px;
  display: grid;
  place-items: center;
}
.scroll-hint-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, var(--accent-line), transparent);
  animation: slide-down 2.2s var(--ease) infinite;
}
@keyframes slide-down {
  0% { opacity: 0; transform: translateY(-10px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 16px;
}
.about-text p + p { margin-top: 16px; }
.about-text p { color: var(--text-muted); max-width: 60ch; }
.about-text p:first-child { color: var(--text); font-size: 1.05rem; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.about-card::before {
  content: "";
  position: absolute;
  inset: -1px auto auto -1px;
  width: 42px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.fact + .fact { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.facts dt {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-dim);
}
.facts dd { margin: 3px 0 0; font-size: .95rem; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background-color .25s var(--ease);
}
.skill-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.skill-cat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.skill-idx {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--accent);
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 9px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.skill-card:hover .tags li { border-color: var(--border-strong); }
.tags li:hover { color: var(--accent); border-color: var(--accent-line); }
.tags-sm li { font-size: .7rem; padding: 3px 7px; }

/* =========================================================
   PROJECTS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.project-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.project-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.project-card:hover::after { transform: scaleX(1); }
.project-card.is-featured { grid-column: span 2; background: var(--surface-2); }

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.badge {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 10px;
}
.badge-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.badge-muted { color: var(--text-dim); }
.project-idx { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }

.project-title {
  font-size: 1.08rem;
  font-weight: 640;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.project-org {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--accent);
  margin-top: 4px;
}
.project-desc {
  color: var(--text-muted);
  font-size: .94rem;
  margin: 12px 0 18px;
  flex: 1;
}

/* =========================================================
   EXPERIENCE (timeline)
   ========================================================= */
.timeline {
  position: relative;
  margin-top: 28px;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-line), var(--border), transparent);
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -26px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-strong);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.timeline-item:hover .timeline-marker { border-color: var(--accent); }
.timeline-item.is-current .timeline-marker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-dim);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chip-now {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.timeline-role { font-size: 1.05rem; font-weight: 630; margin-top: 4px; }
.timeline-org { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.timeline-desc { color: var(--text-muted); font-size: .94rem; margin-top: 8px; max-width: 68ch; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(24px, 5vw, 40px);
  max-width: 720px;
  position: relative;
  overflow: hidden;
}
.contact-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.contact-line { font-family: var(--font-mono); font-size: .88rem; }
.contact-lead { color: var(--text-muted); margin: 16px 0 26px; max-width: 56ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-name { font-family: var(--font-mono); font-size: .9rem; font-weight: 600; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-note {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-dim);
  width: 100%;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .project-card.is-featured { grid-column: span 1; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; }
  .section { padding: 76px 0; }

  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(11, 15, 20, .97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-list { flex-direction: column; gap: 0; padding: 12px var(--gutter) 20px; }
  .nav-list a { padding: 12px 8px; font-size: .92rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-list a.is-active::after { display: none; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 56px); padding-bottom: 80px; }
  .scroll-hint { display: none; }
  .terminal-body { padding: 18px 16px 22px; }
  .hero-cta .btn { flex: 1 1 auto; }

  .section-title { white-space: normal; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero-meta { font-size: .7rem; }
  .terminal-title { display: none; }
}

/* =========================================================
   MOTION / PRINT
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .caret { opacity: 1; }
}

@media print {
  .site-header, .scroll-hint, .hero-cta, .grid-bg { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}
