/* ============================================================
   CAN.dev — Portfolio
   Futuristic dark / glass / neon · vanilla CSS
   ============================================================ */

:root {
  --bg:        #05060a;
  --bg-2:      #080a12;
  --panel:     rgba(255,255,255,0.035);
  --panel-2:   rgba(255,255,255,0.05);
  --border:    rgba(255,255,255,0.09);
  --border-2:  rgba(255,255,255,0.16);
  --text:      #e7ecf5;
  --muted:     #8a93a6;
  --muted-2:   #5b6478;

  --cyan:    #22d3ee;
  --violet:  #8b5cf6;
  --magenta: #ec4899;
  --lime:    #a3e635;
  --gold:    #fde047;

  --grad:    linear-gradient(110deg, #22d3ee 0%, #8b5cf6 45%, #ec4899 100%);
  --grad-soft: linear-gradient(110deg, rgba(34,211,238,.18), rgba(139,92,246,.18), rgba(236,72,153,.18));

  --radius:  18px;
  --radius-sm: 12px;
  --maxw:    1180px;
  --ease:    cubic-bezier(.16,.84,.44,1);
  --shadow:  0 30px 80px -30px rgba(0,0,0,.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto; }
}

/* ---------- backgrounds / fx ---------- */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 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%);
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 2; pointer-events: none;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.14), rgba(34,211,238,.06) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity .3s; opacity: 0;
  mix-blend-mode: screen;
}
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--grad); z-index: 100; box-shadow: 0 0 12px var(--cyan);
}

main, .nav, .footer { position: relative; z-index: 3; }

/* ---------- typography helpers ---------- */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
  display: inline-block; margin-bottom: 1rem;
}

/* ---------- buttons ---------- */
.btn {
  --pad: .85rem 1.6rem;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: var(--pad);
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  text-decoration: none; color: var(--text);
  border: 1px solid var(--border-2);
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s;
  will-change: transform;
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--grad); border: none; color: #07080d;
  box-shadow: 0 8px 30px -8px rgba(139,92,246,.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 44px -10px rgba(34,211,238,.7); }
.btn-ghost { background: var(--panel); backdrop-filter: blur(10px); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 12px 30px -12px rgba(34,211,238,.5); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  transition: padding .3s, background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5,6,10,.72);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding-top: .7rem; padding-bottom: .7rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-family: 'Space Grotesk', sans-serif; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad); color: #07080d; font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 6px 20px -6px rgba(139,92,246,.7);
}
.brand-text { font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.brand-text em { font-style: normal; color: var(--cyan); }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  position: relative; transition: color .25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--grad); transition: width .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: .8rem; }
.lang-toggle {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: .4rem .7rem; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: .78rem; transition: border-color .3s;
}
.lang-toggle:hover { border-color: var(--cyan); }
.lang-toggle .lang-on { color: var(--text); }
.lang-toggle.de .lang-on { color: var(--muted); }
.lang-toggle.de .lang-off { color: var(--text); }
.lang-sep { opacity: .4; margin: 0 .15rem; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- layout ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 5vw, 2rem);
}
.section-head { max-width: 760px; margin-bottom: 3.5rem; }
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.02em;
}
.section-lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); margin-top: 1rem; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center;
  padding: 8rem clamp(1.2rem, 5vw, 2rem) 4rem; position: relative;
}
.hero-inner { max-width: 900px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-size: .85rem; color: var(--muted); margin-bottom: 2rem;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(163,230,53,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(163,230,53,.6);} 70% { box-shadow: 0 0 0 10px rgba(163,230,53,0);} 100% { box-shadow: 0 0 0 0 rgba(163,230,53,0);} }

.hero-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5.2rem); line-height: 1.02; letter-spacing: -.03em;
}
.hero-title .line { display: block; }
#rotator { min-height: 1.05em; }
.hero-sub {
  color: var(--muted); font-size: clamp(1rem, 1.9vw, 1.25rem);
  max-width: 680px; margin: 1.8rem auto 0;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 5vw, 3.5rem); justify-content: center;
  margin-top: 3.6rem;
}
.stat { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.stat-num, .stat-plus, .stat-suffix {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.stat-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-plus, .stat-suffix { color: var(--cyan); }
.stat > .stat-plus, .stat > .stat-suffix { display: inline; }
.stat { position: relative; }
.stat-label { color: var(--muted); font-size: .8rem; margin-top: .35rem; max-width: 130px; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  color: var(--muted); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
}
.scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--text); animation: scrolldown 1.8s var(--ease) infinite; }
@keyframes scrolldown { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: rgba(255,255,255,.015); padding: 1.1rem 0; }
.marquee-track { display: flex; align-items: center; gap: 2rem; white-space: nowrap; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--muted); }
.marquee-track i { color: var(--violet); font-style: normal; font-size: .6rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- cards grid ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.2rem; }
.card {
  position: relative; padding: 2rem 1.8rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(10px); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  transform-style: preserve-3d;
}
.card:hover { border-color: var(--border-2); background: var(--panel-2); }
.card-glow {
  position: absolute; inset: -1px; opacity: 0; transition: opacity .4s; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,0%), rgba(34,211,238,.16), transparent 55%);
}
.card:hover .card-glow { opacity: 1; }
.card-icon { font-size: 2rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 14px rgba(139,92,246,.5)); }
.card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.card-tags li {
  font-family: 'JetBrains Mono', monospace; font-size: .72rem;
  padding: .25rem .6rem; border-radius: 7px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted);
}

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.stack-col {
  padding: 1.6rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(8px);
}
.stack-col h4 { display: flex; align-items: center; gap: .55rem; font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; margin-bottom: 1.1rem; }
.stack-dot { width: 9px; height: 9px; border-radius: 50%; }
.c-cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.c-violet { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.c-magenta { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.c-lime { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips span {
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  padding: .4rem .75rem; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text);
  transition: transform .25s var(--ease), border-color .25s, color .25s, background .25s;
}
.chips span:hover { transform: translateY(-3px); border-color: var(--cyan); color: var(--cyan); background: rgba(34,211,238,.08); }

/* ---------- architecture ---------- */
.section-arch { max-width: 1280px; }
.arch-wrap {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  padding: 1.5rem clamp(.5rem, 2vw, 2rem) 1rem; overflow-x: auto;
}
#lakehouse { width: 100%; min-width: 760px; height: auto; display: block; }
#lakehouse .arch-node rect { fill: rgba(255,255,255,.04); stroke: var(--border-2); stroke-width: 1; }
#lakehouse .arch-node text { fill: var(--text); font-size: 13px; text-anchor: middle; dominant-baseline: middle; }
#lakehouse .stage-t { fill: var(--text); font-family: 'Space Grotesk'; font-weight: 700; font-size: 16px; text-anchor: middle; letter-spacing: 1px; }
#lakehouse .stage-s { fill: var(--muted); font-family: 'JetBrains Mono'; font-size: 10px; text-anchor: middle; }
#lakehouse .packets circle { filter: drop-shadow(0 0 6px currentColor); }
.arch-legend { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center; margin-top: 1rem; color: var(--muted); font-size: .85rem; }
.arch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: middle; }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; }
.work-card {
  position: relative; padding: 1.8rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  overflow: hidden;
}
.work-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: .35; transition: opacity .35s;
}
.work-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.work-card:hover::before { opacity: 1; }
.work-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.work-cat { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.work-year { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--muted); }
.work-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; margin-bottom: .55rem; }
.work-card p { color: var(--muted); font-size: .92rem; }
.work-metrics { display: flex; gap: 1.4rem; margin: 1.3rem 0 .4rem; }
.work-metrics div { display: flex; flex-direction: column; }
.work-metrics b { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.work-metrics span { font-size: .72rem; color: var(--muted); }

/* ---------- timeline ---------- */
.timeline { list-style: none; position: relative; max-width: 760px; margin: 0 auto; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), var(--magenta)); opacity: .4; }
.timeline li { position: relative; padding: 0 0 2.4rem 1.4rem; }
.tl-dot { position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.tl-year { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--cyan); letter-spacing: .05em; }
.timeline h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; margin: .3rem 0 .4rem; }
.timeline p { color: var(--muted); font-size: .95rem; }

.certs { margin-top: 3rem; text-align: center; }
.cert-label { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }
.cert-chips { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.2rem; }
.cert {
  padding: .6rem 1.1rem; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  font-size: .85rem; font-weight: 500;
}

/* ---------- contact ---------- */
.section-contact { max-width: 1080px; }
.contact-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: 26px;
  background: linear-gradient(160deg, rgba(34,211,238,.06), rgba(139,92,246,.05) 50%, rgba(236,72,153,.05));
  border: 1px solid var(--border-2); backdrop-filter: blur(14px); position: relative; overflow: hidden;
}
.contact-card::after { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%); top: -120px; right: -80px; filter: blur(30px); pointer-events: none; }
.contact-links { display: flex; flex-direction: column; gap: .8rem; margin-top: 2rem; }
.contact-link { display: flex; align-items: center; gap: .8rem; color: var(--text); text-decoration: none; font-size: .98rem; transition: color .25s, transform .25s; }
.contact-link:hover { color: var(--cyan); transform: translateX(4px); }
.contact-link .ci { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel); border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: .85rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 1.1rem 1rem .5rem; border-radius: var(--radius-sm);
  background: rgba(0,0,0,.25); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: .95rem; resize: vertical; transition: border-color .3s, background .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); background: rgba(0,0,0,.4); }
.field label {
  position: absolute; left: 1rem; top: .9rem; color: var(--muted); font-size: .95rem;
  pointer-events: none; transition: .2s var(--ease);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: .35rem; font-size: .7rem; color: var(--cyan);
}
.form-note { font-size: .85rem; color: var(--lime); min-height: 1.2em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2.5rem clamp(1.2rem, 5vw, 2rem); margin-top: 3rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: .88rem; flex: 1; min-width: 220px; }
.footer-year { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 0 0 auto auto; top: 0; right: 0; height: 100svh; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; gap: 1.8rem; padding: 2rem;
    background: rgba(8,10,18,.96); backdrop-filter: blur(20px);
    transform: translateX(100%); transition: transform .4s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.2rem; }
  .nav-burger { display: flex; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .contact-card { grid-template-columns: 1fr; }
  .nav-actions .btn { display: none; }
}
@media (max-width: 520px) {
  .hero-stats { gap: 1.2rem 2rem; }
  .stat-label { font-size: .72rem; }
  .work-metrics { gap: 1rem; }
}
