/* ═══════════════════════════════════════════════════════════
   Marcin Kluczek — Earth Observation portfolio
   Theme: deep space / satellite · spectral green→cyan accents
   ═══════════════════════════════════════════════════════════ */

:root{
  --bg:        #05070d;
  --bg-2:      #080b14;
  --panel:     rgba(255,255,255,.03);
  --panel-2:   rgba(255,255,255,.05);
  --line:      rgba(120,170,200,.14);
  --line-2:    rgba(120,170,200,.28);
  --text:      #e8eef6;
  --muted:     #93a4bd;
  --faint:     #5f708a;
  --acc:       #39ff9e;   /* spectral green (NDVI vibe) */
  --acc-2:     #21d4fd;   /* cyan */
  --acc-grad:  linear-gradient(100deg, var(--acc), var(--acc-2));
  --glow:      0 0 40px rgba(33,212,253,.25);
  --r:         16px;
  --wrap:      1120px;
  --bar-h:     36px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --font:      "Sora", system-ui, -apple-system, sans-serif;
  --display:   "Saira Semi Condensed", var(--font);
  --mono:      "JetBrains Mono", ui-monospace, monospace;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

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

/* subtle vignette + top nebula glow layered over the canvas */
body::before{
  content:"";
  position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(33,212,253,.10), transparent 55%),
    radial-gradient(90% 60% at 85% 15%, rgba(57,255,158,.06), transparent 50%),
    radial-gradient(120% 120% at 50% 120%, rgba(5,7,13,.9), transparent 60%);
}

#starfield{ position:fixed; inset:0; z-index:-2; display:block; }

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

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:clamp(20px,5vw,40px); }

/* ───────────────── Under-construction bar ───────────────── */
.topbar{
  position:fixed; top:0; left:0; right:0; z-index:60; height:var(--bar-h);
  display:flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--mono); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase;
  color:#04120c; background:var(--acc-grad);
  overflow:hidden; white-space:nowrap;
}
.topbar b{ font-weight:600; }
.topbar__glyph{ animation:spin 3.6s linear infinite; display:inline-block; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .topbar__glyph{ animation:none; } }
@media (max-width:520px){ .topbar{ letter-spacing:.08em; font-size:.66rem; } }

/* ───────────────── Nav ───────────────── */
.nav{
  position:fixed; top:var(--bar-h); left:0; right:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px clamp(20px,5vw,40px);
  transition:background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom:1px solid transparent;
}
.nav.is-stuck{
  background:rgba(6,9,16,.72);
  backdrop-filter:blur(14px);
  border-bottom-color:var(--line);
  padding-block:12px;
}
.nav__brand{
  font-family:var(--display); font-weight:600; letter-spacing:-.01em;
  display:flex; align-items:center; gap:10px; font-size:1rem;
}
.nav__links{ display:flex; gap:28px; }
.nav__links a{
  font-size:.9rem; color:var(--muted); position:relative;
  transition:color .25s;
}
.nav__links a::after{
  content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0;
  background:var(--acc-grad); transition:width .3s var(--ease);
}
.nav__links a:hover{ color:var(--text); }
.nav__links a:hover::after{ width:100%; }
@media (max-width:640px){ .nav__links{ display:none; } }

/* ───────────────── Buttons / chips ───────────────── */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 22px; border-radius:100px;
  font-size:.92rem; font-weight:500;
  border:1px solid var(--line-2); color:var(--text);
  transition:transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
.btn:hover{ transform:translateY(-2px); border-color:var(--acc-2); }
.btn--primary{
  border-color:transparent; color:#04120c; font-weight:600;
  background:var(--acc-grad); box-shadow:var(--glow);
}
.btn--primary:hover{ box-shadow:0 8px 30px rgba(33,212,253,.4); }

.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 18px; border-radius:12px;
  background:var(--panel); border:1px solid var(--line);
  color:var(--text); font-size:.92rem;
  transition:transform .25s var(--ease), border-color .25s, background .25s;
}
.chip:hover{ transform:translateY(-3px); border-color:var(--acc-2); background:var(--panel-2); }

/* ───────────────── Hero ───────────────── */
.hero{
  position:relative; min-height:100svh;
  display:flex; align-items:center;
  padding-top:96px; padding-bottom:64px;
  overflow:hidden;
}
/* the Earth limb glowing at the bottom of the hero */
.hero__earth{
  position:absolute; left:50%; bottom:-64vw; transform:translateX(-50%);
  width:150vw; height:150vw; border-radius:50%;
  background:
    radial-gradient(circle at 50% 8%, rgba(33,212,253,.20), transparent 34%),
    linear-gradient(180deg, #0a1a2e 0%, #06101d 40%, #05070d 70%);
  box-shadow:0 -2px 60px rgba(33,212,253,.35), inset 0 6px 40px rgba(57,255,158,.12);
  border-top:1px solid rgba(120,220,255,.35);
  pointer-events:none;
}
.hero__inner{ position:relative; z-index:2; }
.hero__eyebrow{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  font-family:var(--font); font-size:1rem; font-weight:500;
  letter-spacing:0; color:var(--muted); margin:0;
}
.hero__eyebrow-line{
  width:40px; height:2px; border-radius:2px; flex:none;
  background:var(--acc-grad); box-shadow:0 0 12px rgba(33,212,253,.5);
}
.hero__eyebrow-at{ color:var(--acc-2); }

.hero__name{
  font-family:var(--display); font-weight:700;
  font-size:clamp(2.9rem,9.4vw,6.4rem); line-height:.95; letter-spacing:-.005em;
  margin:.28em 0 .12em;
  background:linear-gradient(180deg,#fff 30%, #9fb4cc);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero__tagline{
  font-size:clamp(1.15rem,2.6vw,1.7rem); color:var(--text);
  max-width:none; font-weight:500; margin:0 0 1.1rem;
}
.hero__tagline{ background:var(--acc-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero__loc{
  display:inline-flex; align-items:center; gap:7px;
  color:var(--muted); font-size:.95rem; margin:0 0 2rem;
}
.hero__loc svg{ color:var(--acc-2); }

.hero__cta{ display:flex; gap:14px; flex-wrap:wrap; margin-top:2.4rem; }

.hero__scroll{
  position:absolute; left:50%; bottom:26px; transform:translateX(-50%);
  width:26px; height:42px; border:1px solid var(--line-2); border-radius:100px;
  display:flex; justify-content:center; padding-top:8px; z-index:3;
}
.hero__scroll span{ width:4px; height:8px; border-radius:4px; background:var(--acc); animation:scroll 1.8s infinite; }
@keyframes scroll{ 0%{opacity:0; transform:translateY(-4px);} 40%{opacity:1;} 80%{opacity:0; transform:translateY(12px);} }

/* ───────────────── Stats ───────────────── */
.stats{
  list-style:none; margin:2.2rem 0 0; padding:0;
  display:flex; flex-wrap:wrap; gap:14px;
}
.stats__item{
  display:flex; flex-direction:column; gap:2px;
  padding:14px 20px; border-radius:14px;
  background:var(--panel); border:1px solid var(--line);
  min-width:110px;
}
.stats__value{ font-family:var(--mono); font-size:1.5rem; font-weight:600; color:#fff; }
.stats__label{ font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }

/* ───────────────── Sections ───────────────── */
.section{ position:relative; padding:clamp(80px,12vw,140px) 0; }
.section--alt{ background:linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent); }
.section__kicker{
  font-family:var(--mono); font-size:.8rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--acc); margin:0 0 .6rem;
}
.section__title{
  font-family:var(--display); font-weight:600; letter-spacing:-.005em;
  font-size:clamp(2rem,4.7vw,3.2rem); line-height:1.03; margin:0 0 2.4rem;
}

/* ───────────────── About ───────────────── */
.about{ display:grid; grid-template-columns:1.5fr 1fr; gap:clamp(30px,5vw,64px); align-items:start; }
.about__lead{ font-size:1.15rem; color:var(--muted); max-width:56ch; }
.about__text .section__title{ margin-bottom:1.4rem; }

.about__card{
  position:sticky; top:96px;
  padding:26px; border-radius:var(--r);
  background:var(--panel); border:1px solid var(--line);
  backdrop-filter:blur(6px);
}
.about__avatar{
  width:88px; height:88px; border-radius:50%; object-fit:cover;
  border:1px solid var(--line-2); background:var(--bg-2);
  box-shadow:var(--glow); margin-bottom:16px;
}
.about__id{ display:flex; flex-direction:column; gap:2px; }
.about__id strong{ font-family:var(--display); font-size:1.15rem; }
.about__id span{ color:var(--muted); font-size:.92rem; }
.about__org{ color:var(--acc-2)!important; }
.about__spectral{ list-style:none; padding:0; margin:20px 0 0; display:flex; gap:5px; height:44px; align-items:flex-end; }
.about__spectral li{
  flex:1; border-radius:4px 4px 2px 2px;
  background:var(--acc-grad); opacity:.85;
  transform-origin:bottom; animation:eq 2.6s ease-in-out infinite;
}
@keyframes eq{ 0%,100%{ transform:scaleY(.35);} 50%{ transform:scaleY(1);} }
@media (prefers-reduced-motion:reduce){ .about__spectral li{ animation:none; } }
@media (max-width:820px){
  .about{ grid-template-columns:1fr; }
  .about__card{ position:static; }
}

/* ───────────────── Research cards ───────────────── */
.cards{ display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
@media (max-width:720px){ .cards{ grid-template-columns:1fr; } }
.card{
  position:relative; padding:28px; border-radius:var(--r);
  background:var(--panel); border:1px solid var(--line);
  overflow:hidden; transition:transform .35s var(--ease), border-color .35s, background .35s;
}
.card::before{
  content:""; position:absolute; inset:0; opacity:0; transition:opacity .35s;
  background:radial-gradient(400px 200px at var(--mx,50%) 0%, rgba(33,212,253,.10), transparent 60%);
}
.card:hover{ transform:translateY(-4px); border-color:var(--line-2); background:var(--panel-2); }
.card:hover::before{ opacity:1; }
.card__icon{
  display:inline-flex; width:46px; height:46px; border-radius:12px;
  align-items:center; justify-content:center; margin-bottom:16px;
  color:var(--acc); background:rgba(57,255,158,.08); border:1px solid var(--line);
}
.card__icon svg{ width:24px; height:24px; }
.card__title{ font-family:var(--display); font-size:1.2rem; font-weight:600; margin:0 0 .5rem; }
.card__blurb{ color:var(--muted); font-size:.98rem; margin:0; }

/* ───────────────── Path (experience + education) ───────────────── */
.path{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,60px); }
@media (max-width:780px){ .path{ grid-template-columns:1fr; gap:44px; } }
.path__head{
  font-family:var(--mono); font-size:.8rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--acc); margin:0 0 22px;
}
.tl{ list-style:none; margin:0; padding:0; position:relative; }
.tl__item{
  position:relative; padding:0 0 26px 26px; border-left:1px solid var(--line);
}
.tl__item:last-child{ padding-bottom:0; }
.tl__item::before{
  content:""; position:absolute; left:-5px; top:5px; width:9px; height:9px; border-radius:50%;
  background:var(--acc-grad); box-shadow:0 0 10px rgba(33,212,253,.5);
}
.tl__period{ font-family:var(--mono); font-size:.78rem; color:var(--acc-2); letter-spacing:.02em; }
.tl__role{ font-family:var(--display); font-size:1.12rem; font-weight:600; margin:.25rem 0 .1rem; }
.tl__org{ color:var(--text); font-size:.95rem; margin:0; }
.tl__note{ color:var(--muted); font-size:.9rem; margin:.35rem 0 0; }
.path__more{ margin-top:2.6rem; }

/* ───────────────── Publications ───────────────── */
.pub-stats{
  list-style:none; margin:0 0 2.2rem; padding:0;
  display:flex; flex-wrap:wrap; gap:14px;
}
.pub-stats__item{
  display:flex; flex-direction:column; gap:2px;
  padding:14px 22px; border-radius:14px;
  background:var(--panel); border:1px solid var(--line); min-width:120px;
}
.pub-stats__v{ font-family:var(--mono); font-size:1.6rem; font-weight:600; color:#fff; }
.pub-stats__l{ font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }

.pub-filters{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:2rem; }
.pub-filters button{
  font-family:var(--font); font-size:.85rem; cursor:pointer;
  padding:8px 16px; border-radius:100px; color:var(--muted);
  background:transparent; border:1px solid var(--line);
  transition:color .25s, border-color .25s, background .25s;
}
.pub-filters button:hover{ color:var(--text); border-color:var(--line-2); }
.pub-filters button.is-active{ color:#04120c; font-weight:600; background:var(--acc-grad); border-color:transparent; }

.pubs{ list-style:none; margin:0; padding:0; }
.pub{
  display:grid; grid-template-columns:88px 1fr; gap:20px;
  padding:26px 0; border-top:1px solid var(--line);
  transition:opacity .4s, transform .4s;
}
.pub:last-child{ border-bottom:1px solid var(--line); }
.pub.is-hidden{ display:none; }
.pub__year{ font-family:var(--mono); font-size:1.05rem; color:var(--acc-2); padding-top:2px; }
.pub__title{ font-family:var(--display); font-size:1.2rem; font-weight:600; line-height:1.3; margin:0 0 .35rem; }
.pub__title a{ transition:color .2s; }
.pub__title a:hover{ color:var(--acc-2); }
.pub__authors{ color:var(--muted); font-size:.95rem; margin:0 0 .4rem; }
.pub__authors strong{ color:var(--text); }
.pub__meta{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:0 0 .7rem; font-size:.9rem; }
.pub__venue{ font-style:italic; color:var(--text); }
.pub__cites{
  font-family:var(--mono); font-size:.8rem; color:var(--acc);
  padding:2px 10px; border-radius:100px; border:1px solid var(--line); background:rgba(57,255,158,.06);
}
.pub__tags{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{ font-size:.76rem; color:var(--muted); padding:3px 10px; border-radius:6px; background:var(--panel-2); border:1px solid var(--line); }
.pubs__more{ margin-top:2.4rem; }
@media (max-width:520px){ .pub{ grid-template-columns:1fr; gap:6px; } .pub__year{ font-size:.9rem; } }

/* ───────────────── Contact ───────────────── */
.contact__lead{ font-size:1.15rem; color:var(--muted); max-width:none; margin:0 0 2rem; }
.contact__links{ display:flex; flex-wrap:wrap; gap:12px; }

/* ───────────────── Blog ───────────────── */
.posts{ list-style:none; margin:0; padding:0; display:grid; gap:16px; }
.post-card{
  border:1px solid var(--line); border-radius:var(--r); background:var(--panel);
  transition:transform .3s var(--ease), border-color .3s, background .3s;
}
.post-card:hover{ transform:translateY(-3px); border-color:var(--line-2); background:var(--panel-2); }
.post-card a{ display:block; padding:24px 26px; }
.post-card__date{ font-family:var(--mono); font-size:.78rem; color:var(--acc-2); }
.post-card__title{ font-family:var(--display); font-size:1.3rem; font-weight:600; margin:.4rem 0 .5rem; }
.post-card__excerpt{ color:var(--muted); font-size:.98rem; margin:0 0 .8rem; }
.post-card__link{ font-size:.9rem; color:var(--acc); font-weight:500; }

/* ───────────────── Blog "coming soon" ───────────────── */
.soon{
  border:1px dashed var(--line-2); border-radius:var(--r);
  padding:44px 40px; background:var(--panel);
  display:flex; flex-direction:column; align-items:flex-start; gap:14px;
}
.soon__badge{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--mono); font-size:.8rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--acc); padding:7px 15px; border-radius:100px;
  border:1px solid var(--line); background:rgba(57,255,158,.06);
}
.soon__dot{ width:8px; height:8px; border-radius:50%; background:var(--acc); box-shadow:0 0 10px var(--acc); animation:ping 2.4s infinite; }
@keyframes ping{ 0%{box-shadow:0 0 0 0 rgba(57,255,158,.5);} 70%{box-shadow:0 0 0 9px rgba(57,255,158,0);} 100%{box-shadow:0 0 0 0 rgba(57,255,158,0);} }
.soon__text{ color:var(--muted); font-size:1.1rem; margin:0; max-width:48ch; }
@media (prefers-reduced-motion:reduce){ .soon__dot{ animation:none; } }

/* ───────────────── Single post ───────────────── */
.wrap--narrow{ max-width:760px; }
.post{ padding-top:calc(var(--bar-h) + 90px); }
.post__back{ display:inline-block; color:var(--acc-2); font-size:.9rem; margin-bottom:1.6rem; }
.post__back:hover{ text-decoration:underline; }
.post__back--bottom{ margin-top:3rem; }
.post__date{ font-family:var(--mono); font-size:.82rem; color:var(--muted); margin:0 0 .6rem; }
.post__title{ font-family:var(--display); font-weight:700; font-size:clamp(2rem,5vw,3rem); line-height:1.05; letter-spacing:-.01em; margin:0 0 2rem; }
.post__body{ font-size:1.08rem; color:#d3ddea; }
.post__body h2{ font-family:var(--display); font-size:1.5rem; margin:2.2rem 0 .8rem; color:#fff; }
.post__body h3{ font-family:var(--display); font-size:1.2rem; margin:1.8rem 0 .6rem; }
.post__body a{ color:var(--acc); text-decoration:underline; text-underline-offset:3px; }
.post__body ul, .post__body ol{ padding-left:1.3em; }
.post__body li{ margin:.4rem 0; }
.post__body code{ font-family:var(--mono); font-size:.9em; background:var(--panel-2); padding:.15em .4em; border-radius:6px; }
.post__body strong{ color:#fff; }
.post__body blockquote{ border-left:2px solid var(--acc); margin:1.4rem 0; padding:.2rem 0 .2rem 1.2rem; color:var(--muted); }

/* ───────────────── CV page ───────────────── */
.cv{ padding-top:calc(var(--bar-h) + 90px); }
.cv__header{ margin-bottom:3rem; padding-bottom:2rem; border-bottom:1px solid var(--line); }
.cv__name{ font-family:var(--display); font-weight:700; font-size:clamp(2.2rem,6vw,3.4rem); letter-spacing:-.01em; margin:.3rem 0 .4rem; }
.cv__role{ color:var(--muted); font-size:1.05rem; margin:0 0 1.4rem; }
.cv__links{ margin:0; }
.cv__block{ margin:0 0 2.8rem; }
.cv__h2{ font-family:var(--display); font-size:1.4rem; font-weight:600; margin:0 0 1.4rem; color:#fff; }
.cv__h2::before{ content:""; display:inline-block; width:22px; height:2px; border-radius:2px; background:var(--acc-grad); vertical-align:middle; margin-right:12px; }
.cv__list{ list-style:none; margin:0; padding:0; }
.cv__pub{ display:grid; grid-template-columns:64px 1fr; gap:16px; padding:14px 0; border-top:1px solid var(--line); }
.cv__pub:first-child{ border-top:none; }
.cv__year{ font-family:var(--mono); font-size:.92rem; color:var(--acc-2); }
.cv__pubtitle{ display:block; font-weight:500; }
.cv__pubtitle a:hover{ color:var(--acc-2); }
.cv__authors{ display:block; color:var(--muted); font-size:.9rem; margin-top:.2rem; }
.cv__authors strong{ color:var(--text); }
.cv__venue{ display:block; color:var(--faint); font-size:.88rem; font-style:italic; margin-top:.15rem; }
.cv__tags{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:10px; }
.tag--lg{ font-size:.9rem; padding:8px 14px; display:inline-flex; align-items:center; gap:8px; }
.tag__since{ font-family:var(--mono); font-size:.72rem; color:var(--acc-2); }
@media (max-width:520px){ .cv__pub{ grid-template-columns:1fr; gap:4px; } }

/* ───────────────── Footer ───────────────── */
.footer{ border-top:1px solid var(--line); padding:34px 0; }
.footer__inner{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; color:var(--faint); font-size:.85rem; }
.footer__meta{ font-family:var(--mono); }

/* ───────────────── Reveal on scroll ───────────────── */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in{ opacity:1; transform:none; }
.card.reveal{ transition-delay:calc(var(--i,0) * .07s); }
@media (prefers-reduced-motion:reduce){ .reveal{ opacity:1; transform:none; } }
