/* wijnholds.com — dark glass theme */
:root {
  color-scheme: dark;
  --bg: #05070c;
  --fg: #eef1f6;
  --muted: #9aa3b2;
  --faint: #5d6675;
  --accent: #e5484d;
  --accent-2: #ff7a59;
  --navy: #1b2a3d;
  --blue: #3b6fd6;
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(14, 18, 28, .62);
  --glass-line: rgba(255, 255, 255, .10);
  --glass-hi: rgba(255, 255, 255, .16);
  --radius: 22px;
  --head: "Space Grotesk", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; position: relative; z-index: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Animated backdrop ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  will-change: transform;
}
.bg i:nth-child(1) {
  width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.bg i:nth-child(2) {
  width: 52vmax; height: 52vmax; right: -18vmax; top: 10vh;
  background: radial-gradient(circle, var(--blue) 0%, transparent 62%);
  opacity: .42;
  animation: drift2 32s ease-in-out infinite alternate;
}
.bg i:nth-child(3) {
  width: 38vmax; height: 38vmax; left: 25vw; bottom: -22vmax;
  background: radial-gradient(circle, #8a2b6b 0%, transparent 65%);
  opacity: .38;
  animation: drift3 28s ease-in-out infinite alternate;
}
.bg::before { /* grid */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg::after { /* film grain */
  content: ""; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; z-index: 0; left: 0; top: 0; width: 520px; height: 520px;
  margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(229,72,77,.13), transparent 60%);
  transform: translate3d(var(--mx, -999px), var(--my, -999px), 0);
  transition: opacity .4s; opacity: 0;
}
body.has-pointer .cursor-glow { opacity: 1; }

@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, 18vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-14vw, -26vh) scale(1.2); } }

/* ---------- Glass primitive ---------- */
.glass {
  background: linear-gradient(155deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 40%, rgba(255,255,255,.035));
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    0 20px 50px -20px rgba(0,0,0,.6);
  position: relative;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding: 14px 0;
  transition: padding .4s var(--ease);
}
.site-header .wrap { display: flex; justify-content: center; }
.site-header .bar {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 18px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s, box-shadow .4s, max-width .5s var(--ease);
  max-width: 1180px;
}
.site-header.scrolled { padding: 10px 0; }
.site-header.scrolled .bar {
  max-width: 820px;
  background: var(--glass-strong);
  border-color: var(--glass-line);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 12px 40px -12px rgba(0,0,0,.7);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: auto; transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand span { font: 600 18px/1 var(--head); letter-spacing: -.01em; }
.site-nav { display: flex; gap: 4px; position: relative; }
.site-nav a {
  font: 500 15px/1 var(--head); text-decoration: none; color: var(--muted);
  padding: 10px 16px; border-radius: 999px; transition: color .25s, background .25s;
}
.site-nav a:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.site-nav a[aria-current="page"] {
  color: var(--fg);
  background: rgba(229,72,77,.16);
  box-shadow: inset 0 0 0 1px rgba(229,72,77,.35);
}

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: pulse 2.4s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }

.accent-text { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; text-decoration: none;
  font: 600 15px/1 var(--head); border: 1px solid var(--glass-line);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, border-color .3s;
  cursor: pointer;
}
.btn svg { transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c22f3a);
  border-color: rgba(255,255,255,.18); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(229,72,77,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(229,72,77,.9), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost {
  background: rgba(255,255,255,.05); color: var(--fg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { border-color: var(--glass-hi); background: rgba(255,255,255,.09); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 28px; flex-wrap: wrap; }
.section-head h2 { font: 600 clamp(28px, 4vw, 40px)/1.1 var(--head); letter-spacing: -.02em; margin: 10px 0 0; }
.link-arrow { color: var(--muted); text-decoration: none; font: 500 15px var(--head); transition: color .2s; }
.link-arrow:hover { color: var(--fg); }

/* ---------- Hero ---------- */
.hero-sec {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding-top: clamp(32px, 7vh, 88px); padding-bottom: clamp(56px, 10vh, 120px);
}
.hero-sec h1 {
  font: 700 clamp(44px, 7.2vw, 92px)/.98 var(--head); letter-spacing: -.045em;
  margin: 22px 0 24px;
}
.hero-sec h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-sec h1 .line > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero-sec h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero-sec .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 0 0 34px; }
.hero-sec .lede strong { color: var(--fg); font-weight: 600; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }

.portrait-card {
  padding: 14px; border-radius: 32px; transform-style: preserve-3d;
  transition: transform .6s var(--ease);
  animation: float 8s ease-in-out infinite;
}
.portrait-card .frame { position: relative; border-radius: 22px; overflow: hidden; background: #000; }
.portrait-card img { width: 100%; filter: contrast(1.15) brightness(1.1); clip-path: inset(0 0 0 4%); }
.portrait-card .frame::after { /* scanline sweep */
  content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(180deg, transparent, rgba(229,72,77,.22) 70%, rgba(255,140,120,.55) 100%);
  mix-blend-mode: screen; animation: scan 5.5s cubic-bezier(.5,0,.5,1) infinite;
}
.portrait-card .frame::before { /* tint */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(229,72,77,.18), transparent 60%),
              radial-gradient(ellipse at 80% 90%, rgba(59,111,214,.2), transparent 60%);
}
.portrait-card .tag {
  position: absolute; z-index: 2; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 12px; border-radius: 999px; color: var(--fg);
  background: rgba(10,13,20,.6); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.portrait-card .tag.t1 { left: -18px; top: 18%; animation: float 6s ease-in-out infinite reverse; }
.portrait-card .tag.t2 { right: -14px; bottom: 16%; animation: float 7s ease-in-out -2s infinite; }
.portrait-card .tag b { color: #6fdc8c; font-weight: 500; }
@keyframes scan { 0% { top: -30%; } 60%, 100% { top: 110%; } }
@keyframes float { 50% { translate: 0 -10px; } }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 1; overflow: hidden; padding: 18px 0;
  border-block: 1px solid var(--glass-line);
  background: rgba(255,255,255,.025);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee ul { display: flex; gap: 48px; margin: 0; padding: 0; list-style: none; width: max-content; animation: marquee 38s linear infinite; }
.marquee li { font: 500 15px/1 var(--mono); color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.marquee li::after { content: "✦"; color: var(--accent); font-size: 11px; }
.marquee:hover ul { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Bento (about) ---------- */
.about-sec { padding-top: 110px; padding-bottom: 40px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { padding: 30px 30px 28px; overflow: hidden; }
.tile.span-4 { grid-column: span 4; }
.tile.span-3 { grid-column: span 3; }
.tile.span-2 { grid-column: span 2; }
.tile h3 { font: 600 22px/1.25 var(--head); letter-spacing: -.01em; margin: 18px 0 10px; }
.tile p { color: var(--muted); margin: 0 0 12px; }
.tile p:last-child { margin-bottom: 0; }
.tile .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(229,72,77,.3), rgba(229,72,77,.06));
  border: 1px solid rgba(229,72,77,.35); color: #ffb0ad;
}
.tile.blue .icon { background: linear-gradient(140deg, rgba(59,111,214,.35), rgba(59,111,214,.06)); border-color: rgba(90,140,240,.4); color: #b4ccff; }
.stat-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.stat { font: 700 clamp(40px, 5vw, 60px)/1 var(--head); letter-spacing: -.04em; }
.stat small { display: block; font: 500 13px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips span {
  font: 500 12.5px/1 var(--mono); padding: 8px 11px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--glass-line); color: #cfd5df;
}

/* spotlight that follows the pointer on glass tiles/cards */
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.09), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.spot::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(229,72,77,.9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- Posts ---------- */
.posts-sec { padding-top: 90px; padding-bottom: 120px; }
.page-head { padding-top: clamp(32px, 6vh, 72px); padding-bottom: 40px; }
.page-title { font: 700 clamp(42px, 6vw, 72px)/1 var(--head); letter-spacing: -.04em; margin: 18px 0 14px; }
.page-sub { color: var(--muted); font-size: 18px; max-width: 36em; margin: 0; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; padding-bottom: 120px; }
.posts-sec .post-list { padding-bottom: 0; }
.card {
  text-decoration: none; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s;
}
.card:hover { transform: translateY(-6px); box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(229,72,77,.15); }
.card .thumb { margin: 10px 10px 0; border-radius: 14px; overflow: hidden; }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform .8s var(--ease), filter .5s; filter: saturate(.85); }
.card:hover img { transform: scale(1.06); filter: saturate(1.1); }
.card .body { padding: 20px 22px 24px; }
.card h2, .card h3 { font: 600 22px/1.3 var(--head); letter-spacing: -.01em; margin: 10px 0 0; }
.card .meta, .post .meta { color: var(--muted); font: 500 12.5px/1.4 var(--mono); letter-spacing: .02em; margin: 0; }

/* ---------- Post ---------- */
.post { max-width: 800px; margin: 0 auto; padding: 24px 24px 120px; }
.post .back {
  display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font: 500 14px var(--head);
  text-decoration: none; padding: 8px 14px 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--glass-line); transition: color .2s, border-color .2s;
}
.post .back:hover { color: var(--fg); border-color: var(--glass-hi); }
.post h1 { font: 700 clamp(36px, 5.5vw, 58px)/1.05 var(--head); letter-spacing: -.035em; margin: 28px 0 16px; }
.post .hero { margin: 32px 0 0; border-radius: var(--radius); border: 1px solid var(--glass-line); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
.post .prose { margin-top: 32px; padding: clamp(24px, 4vw, 48px); }
.post p, .post li { font-size: 17.5px; color: #d5dae3; }
.post .prose > :first-child { margin-top: 0; }
.post .prose > :last-child { margin-bottom: 0; }
.post strong { color: var(--fg); }
.post ul { padding-left: 1.2em; }
.post li { margin-bottom: 10px; }
.post li::marker { color: var(--accent); }
.post .prose a { color: #ff8e8a; word-break: break-word; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post .prose a:hover { color: #fff; }
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; transform-origin: 0 50%;
  transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
}

/* ---------- Contact ---------- */
.contact-sec { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; padding-top: clamp(32px, 6vh, 72px); padding-bottom: 120px; }
.contact-sec .intro p { color: var(--muted); font-size: 18px; max-width: 26em; }
.contact { padding: clamp(24px, 4vw, 40px); }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; margin-bottom: 16px; }
.contact label { display: block; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.contact input, .contact textarea {
  width: 100%; color: var(--fg); font: inherit;
  background: rgba(0,0,0,.28); border: 1px solid var(--glass-line); border-radius: 14px;
  padding: 13px 15px; transition: border-color .25s, box-shadow .25s, background .25s;
}
.contact input:hover, .contact textarea:hover { border-color: var(--glass-hi); }
.contact input:focus, .contact textarea:focus {
  outline: none; border-color: rgba(229,72,77,.7); background: rgba(0,0,0,.4);
  box-shadow: 0 0 0 4px rgba(229,72,77,.16);
}
.contact textarea { min-height: 140px; resize: vertical; }
.contact button { width: 100%; justify-content: center; margin-top: 8px; font-size: 16px; padding: 16px; }
.contact button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { margin: 16px 0 0; font-size: 15px; min-height: 1px; }
.form-status.ok { color: #6fdc8c; }
.form-status.err { color: #ff8e8a; }
.hp { position: absolute; left: -9999px; }
.contact-links { display: grid; gap: 12px; margin-top: 32px; max-width: 360px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-top: 12vh; padding-bottom: 20vh; }
.notfound .code {
  font: 700 clamp(110px, 22vw, 240px)/.9 var(--head); letter-spacing: -.06em; margin: 0;
}
.notfound p { color: var(--muted); font-size: 18px; margin: 10px 0 32px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; color: var(--faint); font: 500 13px var(--mono); border-top: 1px solid var(--glass-line); background: rgba(5,7,12,.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-sec { grid-template-columns: 1fr; gap: 40px; }
  .hero-sec .portrait-card { max-width: 380px; width: 100%; margin: 0 auto; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile.span-4, .tile.span-3 { grid-column: span 2; }
  .tile.span-2 { grid-column: span 1; }
  .contact-sec { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .brand span { display: none; }
  .site-nav a { padding: 9px 12px; font-size: 14px; }
  .bento { grid-template-columns: 1fr; }
  .tile.span-4, .tile.span-3, .tile.span-2 { grid-column: auto; }
  .tile { padding: 24px; }
  .post-list { grid-template-columns: 1fr; }
  .contact .row { grid-template-columns: 1fr; gap: 0; }
  .portrait-card .tag.t1 { left: -6px; }
  .portrait-card .tag.t2 { right: -6px; }
  .post { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .cursor-glow { display: none; }
}
