/* ---------------------------------------------------------------------------
   Karel Dhondt — personal site
   Layout: minimal single-column profile (after lepoch.at).
   Motif: the "accolade" — a curly brace { used to decorate title headers.
   --------------------------------------------------------------------------- */

:root {
  /* layout + type (shared across themes) */
  --content: 42rem;        /* narrow, document-like column */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --glow: none;            /* themes can add a glow to accent elements */
}

/* --- themes ------------------------------------------------------------- */
/* gray (default) — cool neutral with a red-team accent */
:root,
[data-theme="gray"] {
  --ink: #1b1d21;
  --ink-soft: #585d66;
  --paper: #f5f6f7;
  --paper-alt: #e9ebed;
  --line: #d4d7db;
  --accent: #c92a2a;
}

/* warm — the original beige + gold */
[data-theme="warm"] {
  --ink: #1a1a18;
  --ink-soft: #55534d;
  --paper: #faf8f3;
  --paper-alt: #f1ede3;
  --line: #ddd7c9;
  --accent: #8a6d3b;
}

/* hacker — terminal green on black, monospace */
[data-theme="hacker"] {
  --ink: #c4f5cf;
  --ink-soft: #5fae74;
  --paper: #0a0d0b;
  --paper-alt: #111814;
  --line: #1f3326;
  --accent: #4ce06a;
  --serif: var(--mono);
  --sans: var(--mono);
  --glow: 0 0 8px rgba(76, 224, 106, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* outbound marker after links that open in a new tab */
a[target="_blank"]::after {
  content: '↗';
}

/* shared single column */
.site-header,
.page,
.site-footer {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* --- header / nav ------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: var(--ink); }

/* theme switcher */
.theme-switch { display: flex; gap: 0.3rem; }
.theme-switch button {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.theme-switch button:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

/* --- profile header ----------------------------------------------------- */
.profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 0 1.5rem;
}
.profile-photo {
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
}
.profile-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0;
  line-height: 1.1;
}
.profile-subtitle { margin: 0.15rem 0 0.4rem; color: var(--ink-soft); }

/* blinking terminal cursor — hacker theme only */
.cursor { display: none; }
[data-theme="hacker"] .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.18em;
  vertical-align: -0.15em;
  background: var(--accent);
  box-shadow: var(--glow);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* $ shell prompt before the subtitle — hacker theme only */
[data-theme="hacker"] .profile-subtitle::before {
  content: "$ ";
  color: var(--accent);
  text-shadow: var(--glow);
}

/* CRT scanlines overlay — hacker theme only */
[data-theme="hacker"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.22) 50%);
  background-size: 100% 3px;
  opacity: 0.5;
  animation: flicker 5s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.42; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  [data-theme="hacker"] body::after { animation: none; }
}
.profile-contact { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.profile-contact a {
  text-decoration: none;
  white-space: nowrap;
}
.profile-contact a:hover { text-decoration: underline; }
.profile-contact .dot { margin: 0 0.5rem; color: var(--line); }
.profile-contact .icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.13em;
  margin-right: 0.32em;
}

/* --- prose sections ----------------------------------------------------- */
.prose { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.block { margin-bottom: 1.75rem; }
.block:last-child { margin-bottom: 0; }
.block-body { margin: 0; color: var(--ink-soft); }

/* --- accolade ({ brace) headers — the motif ----------------------------- */
.accolade { margin: 0 0 0.6rem; }
.accolade-head {
  position: relative;
  padding-left: 2.75rem;
}
.accolade-head::before {
  content: "{";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-52%);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--accent);
  text-shadow: var(--glow);
}
.accolade-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  text-shadow: var(--glow);
}
.accolade-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0.1rem 0 0;
}

/* --- projects ----------------------------------------------------------- */
.project-list { list-style: none; padding: 0; margin: 0; }
.project { padding: 1rem 0; border-top: 1px dashed var(--line); }
.project:first-child { border-top: none; }
.project-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.25rem; }
.project-name a { color: var(--ink); text-decoration: none; }
.project-name a:hover { color: var(--accent); }
.project-summary { color: var(--ink-soft); margin: 0 0 0.6rem; font-size: 0.95rem; }
.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  list-style: none; padding: 0; margin: 0;
}
.project-tags li {
  font-size: 0.74rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--paper-alt);
  color: var(--ink-soft);
}

/* --- footer ------------------------------------------------------------- */
.site-footer {
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
