/* ============================================================
   DaNNetworks - design system
   Dark, techie, glassmorphism. Accent: cyan → violet.
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-2: #080b14;
  --surface: rgba(20, 27, 45, 0.55);
  --surface-solid: #0d1220;
  --border: rgba(122, 162, 255, 0.14);
  --border-strong: rgba(122, 162, 255, 0.30);
  --text: #e8edf7;
  --text-dim: #9fb0cf;
  --text-faint: #6b7a99;

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #a855f7;
  --pink: #ec4899;
  --green: #34d399;

  --accent: var(--cyan);
  --grad: linear-gradient(120deg, #22d3ee 0%, #3b82f6 45%, #a855f7 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,211,238,.16), rgba(168,85,247,.16));

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px -8px rgba(34, 211, 238, 0.35);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Cascadia Code', monospace;
  --maxw: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ambient gradient blobs behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 15% -5%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(55vw 55vw at 95% 10%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(50vw 50vw at 50% 110%, rgba(59, 130, 246, 0.10), transparent 60%);
  pointer-events: none;
}

/* fixed animated network canvas */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

.container { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mono { font-family: var(--mono); }

/* ── Navbar ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; font-size: 1.18rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: var(--shadow-glow);
  font-family: var(--mono); font-weight: 800; color: #04101a;
}
.brand small { color: var(--text-faint); font-weight: 500; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; display: block; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: .93rem; color: var(--text-dim);
  font-weight: 500; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(122, 162, 255, 0.08); }
.nav-cta {
  background: var(--grad-soft) !important; color: var(--text) !important;
  border: 1px solid var(--border-strong);
}
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .18s, box-shadow .25s, background .25s, border-color .2s;
  font-family: var(--font);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #04101a; box-shadow: 0 10px 30px -10px rgba(34,211,238,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(34,211,238,.7); }
.btn-ghost { background: rgba(122,162,255,.06); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(122,162,255,.12); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .05em;
  color: var(--cyan); padding: 6px 14px; border-radius: 999px;
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.22); margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.03; letter-spacing: -.03em; font-weight: 800; margin-bottom: 20px; }
.hero p.lead { font-size: 1.18rem; color: var(--text-dim); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-meta .stat b { font-size: 1.5rem; font-weight: 800; display: block; }
.hero-meta .stat span { font-size: .82rem; color: var(--text-faint); }

/* Dynamic profile portrait */
.portrait-wrap { position: relative; display: grid; place-items: center; }
.portrait {
  position: relative; width: min(360px, 78vw); aspect-ratio: 1;
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 80px -20px rgba(168,85,247,.5);
  isolation: isolate;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s; }
.portrait:hover img { filter: grayscale(0) contrast(1.05); }
.portrait::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(160deg, rgba(34,211,238,.22), transparent 40%, rgba(168,85,247,.28));
  mix-blend-mode: overlay;
}
/* scanning line */
.portrait::before {
  content: ''; position: absolute; left: 0; right: 0; height: 32%; z-index: 3;
  background: linear-gradient(to bottom, transparent, rgba(34,211,238,.18), transparent);
  animation: scan 4.5s ease-in-out infinite;
}
@keyframes scan { 0%,100%{ transform: translateY(-40%) } 50%{ transform: translateY(230%) } }
.portrait-ring {
  position: absolute; inset: -14px; border-radius: 34px; z-index: -1;
  background: conic-gradient(from 0deg, var(--cyan), var(--violet), var(--blue), var(--cyan));
  filter: blur(22px); opacity: .55; animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.portrait-tag {
  position: absolute; z-index: 4; font-family: var(--mono); font-size: .72rem;
  padding: 6px 11px; border-radius: 8px; background: rgba(5,7,13,.72);
  backdrop-filter: blur(6px); border: 1px solid var(--border); color: var(--text-dim);
  display: flex; align-items: center; gap: 7px;
}
.portrait-tag .d { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.portrait-tag.t1 { top: 16px; left: 16px; }
.portrait-tag.t2 { bottom: 16px; right: 16px; }

/* ── Sections ───────────────────────────────────────────── */
section { position: relative; padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head .kicker { font-family: var(--mono); color: var(--cyan); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.02em; margin: 12px 0 14px; line-height: 1.1; }
.section-head p { color: var(--text-dim); font-size: 1.06rem; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(8,11,20,.6), transparent); }

/* glass card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  padding: 26px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }

/* ── About / Skills ─────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 16px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.skill {
  display: flex; flex-direction: column; gap: 14px;
}
.skill .skill-top { display: flex; align-items: center; gap: 13px; }
.skill .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border); flex-shrink: 0;
}
.skill .ic svg { width: 23px; height: 23px; }
.skill h4 { font-size: 1.12rem; letter-spacing: -.01em; }
.skill .skill-desc { font-size: .92rem; color: var(--text-dim); line-height: 1.55; margin: -2px 0 2px; }
.skill .skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill .skill-tags span {
  font-family: var(--mono); font-size: .72rem; color: var(--cyan);
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.18);
  padding: 3px 9px; border-radius: 999px;
}
.skill .bar { height: 6px; border-radius: 999px; background: rgba(122,162,255,.1); overflow: hidden; margin-top: auto; }
.skill .bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 12px rgba(34,211,238,.6); width: 0; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }

/* ── Timeline ───────────────────────────────────────────── */
.timeline { position: relative; margin-top: 20px; padding-left: 4px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), transparent); }
.tl-item { position: relative; padding: 0 0 34px 52px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 6px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--cyan); display: grid; place-items: center;
  box-shadow: 0 0 16px rgba(34,211,238,.5);
}
.tl-dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.tl-item .when { font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.tl-item h4 { font-size: 1.15rem; margin: 4px 0 2px; }
.tl-item .role { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.tl-item p { color: var(--text-faint); margin-top: 8px; font-size: .98rem; }
.tl-item .badge-now { display: inline-block; margin-left: 10px; font-size: .68rem; font-family: var(--mono); color: var(--green); border: 1px solid rgba(52,211,153,.4); background: rgba(52,211,153,.1); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* ── Gallery ────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 4/5; cursor: pointer;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3) contrast(1.05); transition: transform .5s, filter .5s; }
.gallery figure:hover img { transform: scale(1.06); filter: grayscale(0); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 14px; font-family: var(--mono); font-size: .78rem;
  background: linear-gradient(transparent, rgba(5,7,13,.9)); color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}

/* ── Nimbus / links cards ───────────────────────────────── */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.link-card { display: flex; flex-direction: column; gap: 12px; }
.link-card .lc-top { display: flex; align-items: center; justify-content: space-between; }
.link-card .lc-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; font-weight: 800; color: #04101a; font-family: var(--mono); }
.link-card h4 { font-size: 1.12rem; }
.link-card p { color: var(--text-dim); font-size: .95rem; }
.link-card .arrow { color: var(--text-faint); transition: transform .25s, color .25s; }
.link-card:hover .arrow { transform: translate(3px,-3px); color: var(--cyan); }

.cta-banner {
  background: var(--grad-soft); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 44px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner h3 { font-size: clamp(1.5rem,3vw,2.1rem); margin-bottom: 12px; }
.cta-banner p { color: var(--text-dim); max-width: 520px; margin: 0 auto 26px; }

/* ── Blog cards ─────────────────────────────────────────── */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .cover { aspect-ratio: 16/9; overflow: hidden; background: var(--grad-soft); position: relative; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .cover img { transform: scale(1.05); }
.post-card .cover.placeholder { display: grid; place-items: center; }
.post-card .cover.placeholder .ph { font-family: var(--mono); color: var(--text-faint); font-size: 2.4rem; opacity: .5; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .meta { font-family: var(--mono); font-size: .76rem; color: var(--text-faint); display: flex; gap: 10px; align-items: center; }
.post-card h3 { font-size: 1.24rem; letter-spacing: -.01em; line-height: 1.25; }
.post-card p { color: var(--text-dim); font-size: .95rem; flex: 1; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: .72rem; color: var(--cyan); background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.2); padding: 3px 9px; border-radius: 999px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty-state .big { font-size: 3rem; margin-bottom: 12px; opacity: .5; }

/* ── Single post ────────────────────────────────────────── */
.article-hero { padding: 130px 0 40px; }
.article-hero .back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: .9rem; margin-bottom: 24px; }
.article-hero .back:hover { color: var(--cyan); }
.article-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; margin: 14px 0; }
.article-hero .sub { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 20px; }
.article-hero .meta { font-family: var(--mono); font-size: .85rem; color: var(--text-faint); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 40px; }

.prose { max-width: 760px; margin: 0 auto; font-size: 1.1rem; color: #d7deee; }
.prose > * + * { margin-top: 1.15em; }
.prose h1,.prose h2,.prose h3,.prose h4 { color: #fff; letter-spacing: -.01em; line-height: 1.25; margin-top: 1.6em; }
.prose h2 { font-size: 1.7rem; } .prose h3 { font-size: 1.35rem; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin-inline: auto; }
.prose blockquote { border-left: 3px solid var(--cyan); padding-left: 20px; color: var(--text-dim); font-style: italic; }
.prose pre { background: #0a0e18; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: .9rem; }
.prose code { font-family: var(--mono); font-size: .9em; background: rgba(122,162,255,.1); padding: 2px 6px; border-radius: 6px; }
.prose pre code { background: none; padding: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose figure { margin: 1.4em 0; }
.prose figcaption { text-align: center; color: var(--text-faint); font-size: .85rem; margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 54px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin-bottom: 16px; }
.footer a { display: block; color: var(--text-dim); padding: 5px 0; font-size: .95rem; }
.footer a:hover { color: var(--cyan); }
.footer .about-col p { color: var(--text-dim); font-size: .95rem; margin-top: 12px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: .85rem; flex-wrap: wrap; gap: 12px; }
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-dim); }
.social a:hover { border-color: var(--border-strong); color: var(--cyan); background: rgba(122,162,255,.06); }

/* ── Reveal on scroll ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(3,5,10,.92); backdrop-filter: blur(8px); display: none; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait-wrap { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: rgba(5,7,13,.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 14px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-toggle { display: block; }
}
@media (max-width: 620px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .hero { padding: 112px 0 60px; }
  .hero-meta { gap: 18px; }
  .hero-meta .stat b { font-size: 1.25rem; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .cta-banner { padding: 30px 20px; }
  .article-hero { padding: 104px 0 24px; }
  .prose { font-size: 1.02rem; }
  .tl-item .role { font-size: .88rem; }
  /* voorkom horizontaal scrollen door brede inline-code/pre */
  .prose pre, .editor-area pre { font-size: .82rem; }
}
@media (max-width: 400px) {
  .gallery { grid-template-columns: 1fr; }
  .container { width: min(100% - 28px, var(--maxw)); }
  .brand small { display: none; }
}
