/* =========================================================
   Szymon Dziewic - AGH  |  Redesign
   Paleta: grafit + papier, czerwień AGH (tożsamość),
   sygnałowy teal (fala). Zmienne "legacy" utrzymane, bo
   używają ich style inline w courses/materials/header.
   ========================================================= */
:root{
  --paper:#E7E8E3;        /* tło strony - ciemniejsze, by karty odstawały */
  --tile:#FCFCFA;         /* karta / blok */
  --surface:#F3F4F0;      /* element wewnątrz karty */
  --ink:#14191D;
  --ink-soft:#59636C;
  --red:#A80000;
  --teal:#A80000;
  --teal-glow:#d8f9f4;
  --line:#D5D9D2;
  --line-strong:#C3C8C0;
  --green:#00693C;        /* zieleń AGH - akcent drugiego wydziału */
  --red-tint:#F6E9E7;
  --green-tint:#E3F0E8;
  --hero-bg:#a8aaa4;

  /* aliasy zgodności (nie usuwać – używane inline w PHP) */
  --bg-color:#E7E8E3;
  --card-bg:#FCFCFA;
  --text-color:#14191D;
  --text-light:#59636C;
  --agh-red:#A80000;
  --border-color:#D5D9D2;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;font-family:'Inter',sans-serif;color:var(--ink);
  background:var(--paper);line-height:1.6;-webkit-font-smoothing:antialiased;
}
h1,h2,h3,.site-title{font-family:'Cormorant Garamond',serif;font-weight:600;color:var(--ink);margin:0;}
a{color:var(--red);text-decoration:none;transition:color .2s ease;}
a:hover{color:#6a0000;}

/* ---------- Nagłówek ---------- */
header{
  position:sticky;top:0;z-index:20;
  background:rgba(252,252,250,.82);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(20,25,29,.08);
}
.head-inner{
  max-width:1120px;margin:0 auto;padding:16px 22px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
}
.brand-name{font-family:'Cormorant Garamond',serif;font-size:1.55rem;font-weight:700;line-height:1;}
.brand-sub{font-family:'Fira Code',monospace;font-size:.72rem;color:var(--ink-soft);margin-top:5px;letter-spacing:.2px;}
.nav{display:flex;align-items:center;gap:26px;}
nav{display:flex;gap:22px;}
nav a{color:var(--ink);font-weight:500;font-size:.95rem;position:relative;padding:2px 0;}
nav a::after{content:"";position:absolute;left:0;bottom:-3px;width:0;height:2px;background:var(--red);transition:width .22s ease;}
nav a:hover::after{width:100%;}
.lang{font-family:'Fira Code',monospace;font-size:.8rem;color:var(--ink-soft);white-space:nowrap;}
.lang a{color:var(--ink-soft);}
.lang .lang-active,.lang .on{color:var(--red);font-weight:500;}

/* ---------- Kontener główny ---------- */
main{max-width:1120px;margin:0 auto;padding:34px 22px 60px;}
.section{margin-bottom:56px;}
.section h2{
  font-size:2rem;border-bottom:2px solid var(--red);
  display:inline-block;padding-bottom:5px;margin-bottom:24px;
}

/* ========================= BENTO (index) ========================= */
.bento{
  display:grid;grid-template-columns:repeat(4,1fr);
  grid-auto-rows:minmax(90px,auto);gap:16px;
  grid-template-areas:
    "hero hero hero portrait"
    "hero hero hero portrait"
    "hero hero hero portrait"
    "students students projekty projekty"
    "contact contact contact contact";
}
.tile{
  background:var(--tile);border:1px solid var(--line);border-radius:14px;
  padding:26px;display:flex;flex-direction:column;transition:border-color .2s ease;
}
.tile:hover{border-color:var(--line-strong);}
.tile h2{font-size:1.55rem;line-height:1.15;margin:0 0 10px;}
.tile p{color:var(--ink-soft);font-size:.95rem;margin:0 0 14px;}
.tile .go{
  margin-top:auto;font-weight:600;font-size:.92rem;color:var(--red);
  align-self:flex-start;border-bottom:1px solid transparent;transition:border-color .2s;
}
.tile .go:hover{border-bottom-color:var(--red);}

.hero{
  grid-area:hero;position:relative;overflow:hidden;
  background:var(--hero-bg);border:none;border-radius:16px;
  padding:36px;min-height:340px;color:#fff;
  display:flex;flex-direction:column;justify-content:center;
}
#ripple{position:absolute;inset:0;width:100%;height:100%;z-index:0;display:block;}
.hero::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:radial-gradient(120% 90% at 22% 50%,rgba(16,22,26,.55) 0%,rgba(16,22,26,.15) 60%,transparent 100%);
}
.hero-content{position:relative;z-index:2;max-width:52ch;pointer-events:none;}
.hero-content .eyebrow{font-family:'Fira Code',monospace;font-size:.72rem;color:var(--teal-glow);opacity:.9;letter-spacing:.2px;margin-bottom:14px;}
.hero-content h1{
  font-family:'Cormorant Garamond',serif;font-weight:600;color:#fff;
  font-size:clamp(2.1rem,4vw,3rem);line-height:1;margin:0 0 16px;
}
.hero-content p{color:#c9d2d7;font-size:.92rem;line-height:1.62;margin:0 0 10px;}
.hero-content p:last-child{margin-bottom:0;}

.portrait{
  grid-area:portrait;padding:0;overflow:hidden;position:relative;
  border-radius:14px;min-height:340px;border:1px solid var(--line);background:var(--tile);
}
.portrait img{width:100%;height:100%;object-fit:cover;object-position:center 26%;display:block;}
.portrait .cap{position:absolute;left:0;right:0;bottom:0;padding:14px 16px;background:linear-gradient(0deg,rgba(16,22,26,.82),rgba(16,22,26,0));font-family:'Fira Code',monospace;font-size:.68rem;color:#dfe4e6;}
.portrait .cap b{color:#fff;font-weight:500;}

.students{grid-area:students;}
.projekty{grid-area:projekty;}

.contact{
  grid-area:contact;flex-direction:row;flex-wrap:wrap;align-items:center;
  justify-content:space-between;gap:20px;padding:22px 26px;
}
.contact h2{font-size:1.55rem;margin:0 0 6px;}
.contact .c-lines{font-size:.9rem;color:var(--ink-soft);line-height:1.7;}
.contact .c-lines a{color:var(--ink);}
.contact .c-lines a:hover{color:var(--red);}
.contact .c-lines strong{color:var(--ink);font-weight:600;}
.contact .c-links{display:flex;gap:18px;}
.contact .c-links a{font-weight:600;font-size:.92rem;color:var(--red);}

/* ========================= KURSY ========================= */
.lead{color:var(--ink-soft);max-width:70ch;margin:0 0 28px;}

.course-group{
  --accent:var(--red);--accent-tint:var(--red-tint);
  background:var(--tile);border:1px solid var(--line);border-radius:14px;
  margin-bottom:28px;overflow:hidden;position:relative;
  box-shadow:0 1px 2px rgba(20,25,29,.04);
}
.course-group.accent-green{--accent:var(--green);--accent-tint:var(--green-tint);}
.course-group::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);}
.course-group-header{
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  padding:22px 26px 18px 30px;border-bottom:1px solid var(--line);
}
.course-group-title{font-family:'Cormorant Garamond',serif;font-size:1.6rem;font-weight:700;color:var(--ink);line-height:1.15;margin:0;}
.course-group-subtitle{display:block;font-size:.85rem;color:var(--ink-soft);margin-top:4px;font-family:'Inter',sans-serif;}
.level-badge{
  font-family:'Inter',sans-serif;font-size:.78rem;font-weight:600;letter-spacing:.1px;white-space:nowrap;
  color:var(--accent);background:var(--accent-tint);
  padding:5px 12px;border-radius:999px;
}
.course-group-content{padding:18px 26px 22px 30px;display:flex;flex-direction:column;gap:12px;}

/* --- przedmiot --- */
.course-item{
  background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden;
  transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;
}
.course-item:hover{border-color:var(--line-strong);}
.course-item.open{background:var(--tile);border-color:var(--accent);box-shadow:0 6px 18px rgba(20,25,29,.07);}
.course-head{
  width:100%;background:none;border:none;cursor:pointer;text-align:left;font:inherit;color:inherit;
  display:flex;align-items:center;gap:16px;padding:16px 20px;
}
.course-head:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:12px;}
.course-mono{
  flex:0 0 auto;min-width:54px;height:46px;padding:0 8px;border-radius:10px;
  display:grid;place-items:center;
  font-family:'Inter',sans-serif;font-size:.8rem;font-weight:600;letter-spacing:.4px;
  color:var(--accent);background:var(--accent-tint);
  transition:background-color .2s ease,color .2s ease;
}
.course-item.open .course-mono{background:var(--accent);color:#fff;}
.course-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.course-name{font-family:'Cormorant Garamond',serif;font-size:1.32rem;font-weight:600;line-height:1.2;color:var(--ink);}
.course-coord{font-size:.85rem;color:var(--ink-soft);margin-top:3px;}
.lang-chip{
  flex:0 0 auto;font-family:'Inter',sans-serif;font-size:.72rem;font-weight:600;letter-spacing:.3px;
  color:var(--ink-soft);border:1px solid var(--line-strong);border-radius:6px;padding:2px 7px;
}
.course-toggle{
  flex:0 0 auto;position:relative;width:32px;height:32px;border-radius:50%;
  border:1px solid var(--line-strong);background:var(--tile);
  transition:transform .3s ease,background-color .2s ease,border-color .2s ease;
}
.course-toggle::before,.course-toggle::after{
  content:"";position:absolute;left:50%;top:50%;width:12px;height:1.6px;background:var(--ink-soft);
  transform:translate(-50%,-50%);transition:background-color .2s ease;
}
.course-toggle::after{transform:translate(-50%,-50%) rotate(90deg);}
.course-head:hover .course-toggle{border-color:var(--accent);}
.course-item.open .course-toggle{transform:rotate(45deg);background:var(--accent);border-color:var(--accent);}
.course-item.open .course-toggle::before,.course-item.open .course-toggle::after{background:#fff;}

.course-body{max-height:0;overflow:hidden;transition:max-height .32s ease;}
.course-links{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;
  padding:4px 20px 20px 90px;
}
.course-link{
  display:flex;align-items:center;gap:12px;padding:12px 14px;
  background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--ink);
  transition:border-color .2s ease,background-color .2s ease,transform .2s ease;
}
.course-link:hover{border-color:var(--accent);background:var(--tile);color:var(--ink);transform:translateY(-1px);}
.cl-icon{
  flex:0 0 auto;width:38px;height:38px;border-radius:9px;display:grid;place-items:center;
  background:var(--tile);border:1px solid var(--line);color:var(--accent);
}
.cl-icon svg{width:20px;height:20px;}
.cl-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.cl-label{font-weight:600;font-size:.9rem;line-height:1.3;}
.cl-hint{font-size:.76rem;color:var(--ink-soft);margin-top:2px;}
.cl-go{flex:0 0 auto;color:var(--ink-soft);display:grid;place-items:center;transition:color .2s ease,transform .2s ease;}
.cl-go svg{width:16px;height:16px;}
.course-link:hover .cl-go{color:var(--accent);transform:translateX(2px);}

/* ========================= KATALOG MATERIAŁÓW ========================= */
.browser{--accent:var(--red);--accent-tint:var(--red-tint);}
.browser.accent-green{--accent:var(--green);--accent-tint:var(--green-tint);}

.back-link{display:inline-flex;align-items:center;gap:8px;font-size:.88rem;font-weight:600;color:var(--ink-soft);margin-bottom:18px;}
.back-link svg{width:16px;height:16px;transform:rotate(180deg);transition:transform .2s ease;}
.back-link:hover{color:var(--accent);}
.back-link:hover svg{transform:rotate(180deg) translateX(3px);}

/* --- nagłówek przedmiotu --- */
.br-hero{
  position:relative;overflow:hidden;display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap;
  background:var(--tile);border:1px solid var(--line);border-radius:14px;
  padding:26px 26px 24px 30px;margin-bottom:16px;box-shadow:0 1px 2px rgba(20,25,29,.04);
}
.br-hero::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);}
.course-mono.br-mono{min-width:64px;height:56px;font-size:.9rem;background:var(--accent);color:#fff;}
.br-hero-text{flex:1 1 320px;min-width:0;}
.br-title{font-size:clamp(1.6rem,3vw,2.15rem);line-height:1.15;margin:0 0 8px;}
.br-meta{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:.88rem;color:var(--ink-soft);}
.br-meta span+span::before{content:"·";margin-right:10px;color:var(--line-strong);}
.br-chips{display:flex;gap:8px;align-items:center;margin-top:14px;}
.br-actions{display:flex;gap:8px;flex-wrap:wrap;align-self:center;}
.br-action{
  display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:10px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);font-weight:600;font-size:.88rem;
  transition:border-color .2s ease,background-color .2s ease;
}
.br-action svg{width:18px;height:18px;color:var(--accent);}
.br-action:hover{border-color:var(--accent);background:var(--tile);color:var(--ink);}

/* --- ścieżka (breadcrumb) --- */
.br-crumbs{
  display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:8px 10px;margin-bottom:16px;
  background:var(--tile);border:1px solid var(--line);border-radius:12px;font-size:.9rem;
}
.br-crumbs a{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:8px;color:var(--ink-soft);font-weight:500;}
.br-crumbs a:hover{background:var(--surface);color:var(--accent);}
.br-crumbs a.current{color:var(--ink);font-weight:600;}
.br-crumbs svg{width:16px;height:16px;}
.br-crumbs .sep{display:inline-flex;color:var(--line-strong);}
.br-crumbs .sep svg{width:14px;height:14px;}

/* --- opis folderu (_info.txt) --- */
.br-note{
  display:flex;gap:12px;align-items:flex-start;padding:14px 18px;margin-bottom:16px;border-radius:12px;
  background:var(--accent-tint);border:1px solid var(--line);
  border-color:color-mix(in srgb,var(--accent) 22%,transparent);
  font-size:.9rem;line-height:1.65;color:var(--ink);
}
.br-note svg{flex:0 0 auto;width:20px;height:20px;color:var(--accent);margin-top:2px;}
.br-note a{color:var(--accent);font-weight:600;overflow-wrap:anywhere;}
.br-note-warn{--accent:#B54708;--accent-tint:#FDF1E3;}

.br-up{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px;font-size:.88rem;font-weight:600;color:var(--ink-soft);}
.br-up svg{width:16px;height:16px;}
.br-up:hover{color:var(--accent);}

/* --- foldery jako kafelki --- */
.br-folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px;margin-bottom:18px;}
.br-folder{
  display:flex;align-items:center;gap:14px;padding:16px;color:var(--ink);
  background:var(--tile);border:1px solid var(--line);border-radius:12px;
  transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.br-folder:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:0 6px 16px rgba(20,25,29,.07);color:var(--ink);}
.br-folder-icon{flex:0 0 auto;width:44px;height:44px;border-radius:10px;display:grid;place-items:center;background:var(--accent-tint);color:var(--accent);}
.br-folder-icon svg{width:22px;height:22px;}
.br-folder-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.br-folder-name{font-weight:600;font-size:.95rem;line-height:1.3;overflow-wrap:break-word;}
.br-folder-meta{font-size:.78rem;color:var(--ink-soft);margin-top:3px;}
.br-folder-go{flex:0 0 auto;display:grid;place-items:center;color:var(--ink-soft);transition:color .2s ease,transform .2s ease;}
.br-folder-go svg{width:18px;height:18px;}
.br-folder:hover .br-folder-go{color:var(--accent);transform:translateX(2px);}
.br-folder.pinned{background:var(--accent-tint);border-color:var(--line);border-color:color-mix(in srgb,var(--accent) 25%,transparent);}
.br-folder.pinned .br-folder-icon{background:var(--accent);color:#fff;}
.br-folder.pinned:hover{border-color:var(--accent);}

/* --- lista plików --- */
.br-list{background:var(--tile);border:1px solid var(--line);border-radius:12px;overflow:hidden;}
.br-row{
  display:grid;grid-template-columns:44px minmax(0,1fr) 130px 84px 96px 24px;align-items:center;gap:14px;
  padding:11px 18px;color:var(--ink);border-top:1px solid var(--line);transition:background-color .15s ease;
}
.br-row-head{
  border-top:none;padding-top:10px;padding-bottom:10px;background:var(--surface);
  font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:var(--ink-soft);
}
a.br-row:hover{background:var(--surface);color:var(--ink);}
.br-row .num{text-align:right;font-variant-numeric:tabular-nums;}
.br-badge{
  width:44px;height:38px;border-radius:8px;display:grid;place-items:center;
  font-size:.62rem;font-weight:700;letter-spacing:.3px;color:var(--k);background:var(--k-tint);
}
.br-name{min-width:0;display:flex;flex-direction:column;}
.br-name-text{font-weight:500;font-size:.93rem;line-height:1.35;overflow-wrap:break-word;}
a.br-row:hover .br-name-text{color:var(--k);}
.br-name-meta{display:none;font-size:.76rem;color:var(--ink-soft);margin-top:2px;}
.br-type,.br-size,.br-date{font-size:.84rem;color:var(--ink-soft);}
.br-dl{display:grid;place-items:center;color:var(--ink-soft);}
.br-dl svg{width:18px;height:18px;}
a.br-row:hover .br-dl{color:var(--k);}

.kind-pdf{--k:#B42318;--k-tint:#FBE9E7;}
.kind-slides{--k:#B54708;--k-tint:#FDF0E1;}
.kind-doc{--k:#1F5FA8;--k-tint:#E6EFF9;}
.kind-data{--k:#00693C;--k-tint:#E3F0E8;}
.kind-code{--k:#5B3FA8;--k-tint:#EEE9F9;}
.kind-archive{--k:#5E6670;--k-tint:#ECEEEF;}
.kind-image{--k:#0E7490;--k-tint:#E1F2F5;}
.kind-media{--k:#9C2C6B;--k-tint:#F7E6EF;}
.kind-other{--k:#59636C;--k-tint:#ECEEEF;}
.kind-link{--k:#0F766E;--k-tint:#DFF2EF;}

.br-empty{
  display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:44px 20px;
  background:var(--tile);border:1px dashed var(--line-strong);border-radius:12px;color:var(--ink-soft);
}
.br-empty p{margin:0;max-width:46ch;}
.br-summary{font-size:.8rem;color:var(--ink-soft);margin:12px 2px 0;}

@media(max-width:760px){
  .br-hero{padding:20px 18px 18px 22px;gap:16px;}
  .br-actions{width:100%;}
  .br-meta{flex-direction:column;gap:2px;}
  .br-meta span+span::before{content:none;}
  .br-row{grid-template-columns:40px minmax(0,1fr) 22px;gap:12px;padding:12px 14px;}
  .br-row-head{display:none;}
  .br-row-head + .br-row{border-top:none;}
  .br-type,.br-size,.br-date{display:none;}
  .br-name-meta{display:block;}
  .br-badge{width:40px;height:36px;}
}

/* ========================= TERMINAL (Badania) ========================= */
.terminal-window{
  background:#10161A;border-radius:10px;box-shadow:0 12px 34px rgba(16,22,26,.28);
  margin-top:30px;overflow:hidden;font-family:'Fira Code','Courier New',monospace;
  color:#e0e6e8;position:relative;border:1px solid #232c32;
}
.terminal-header{background:#1a2228;padding:10px 15px;display:flex;align-items:center;border-bottom:1px solid #232c32;}
.dot{width:12px;height:12px;border-radius:50%;margin-right:8px;}
.dot-red{background:#ff5f56;}.dot-yellow{background:#ffbd2e;}.dot-green{background:#27c93f;}
.terminal-body{padding:20px;font-size:.95rem;line-height:1.6;}
.terminal-line{margin-bottom:5px;word-wrap:break-word;}
.cursor{
  display:inline-block;width:10px;height:1.2em;background:var(--teal-glow);
  animation:blink 1s step-end infinite;position:absolute;margin-left:20px;margin-top:-30px;
}
@keyframes blink{0%,100%{opacity:1;}50%{opacity:0;}}

/* ========================= PROJEKTY ========================= */
.project{
  --accent:var(--red);--accent-tint:var(--red-tint);
  background:var(--tile);border:1px solid var(--line);border-radius:14px;overflow:hidden;
  margin-bottom:14px;box-shadow:0 1px 2px rgba(20,25,29,.04);scroll-margin-top:110px;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.project.accent-green{--accent:var(--green);--accent-tint:var(--green-tint);}
.project:hover{border-color:var(--line-strong);}
.project.open{border-color:var(--accent);box-shadow:0 8px 24px rgba(20,25,29,.08);}

/* --- nagłówek (klikalny) --- */
.project-head{
  display:block;width:100%;padding:0;border:none;background:none;cursor:pointer;
  text-align:left;font:inherit;color:inherit;
}
.project-head:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:14px;}
.project-bar{
  display:flex;align-items:center;gap:0;padding:10px 15px;
  background:#1a2228;border-bottom:1px solid #232c32;
  font-family:'Fira Code',monospace;font-size:.78rem;color:#8b979e;
}
.project-summary{display:flex;align-items:center;gap:18px;padding:18px 24px 20px;}
.project-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.project-head .project-title{
  display:block;font-family:'Cormorant Garamond',serif;font-weight:600;color:var(--ink);
  font-size:clamp(1.4rem,2.3vw,1.75rem);line-height:1.15;margin:0;transition:color .2s ease;
}
.project-head:hover .project-title{color:var(--accent);}
.project-head .project-tagline{display:block;color:var(--ink-soft);font-size:.92rem;margin:4px 0 0;}
.project-toggle{
  flex:0 0 auto;position:relative;width:34px;height:34px;border-radius:50%;
  border:1px solid var(--line-strong);background:var(--tile);
  transition:transform .3s ease,background-color .2s ease,border-color .2s ease;
}
.project-toggle::before,.project-toggle::after{
  content:"";position:absolute;left:50%;top:50%;width:12px;height:1.6px;background:var(--ink-soft);
  transform:translate(-50%,-50%);transition:background-color .2s ease;
}
.project-toggle::after{transform:translate(-50%,-50%) rotate(90deg);}
.project-head:hover .project-toggle{border-color:var(--accent);}
.project.open .project-toggle{transform:rotate(45deg);background:var(--accent);border-color:var(--accent);}
.project.open .project-toggle::before,.project.open .project-toggle::after{background:#fff;}

/* --- treść (rozwijana) --- */
.project-collapse{max-height:0;overflow:hidden;transition:max-height .38s ease;}
.project-path{margin-left:6px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.project-status{
  margin-left:auto;padding-left:12px;display:inline-flex;align-items:center;gap:7px;white-space:nowrap;color:#9aa5ab;
}
.project-status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;}
.project-status.status-live{color:#27c93f;}
.project-status.status-live::before{animation:pulse 2s ease-in-out infinite;}
.project-status.status-dev{color:#ffbd2e;}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(39,201,63,.55);}50%{box-shadow:0 0 0 5px rgba(39,201,63,0);}}

.project-body{
  display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:22px 30px;
  grid-template-areas:"main media" "links links";padding:22px 24px 24px;
  border-top:1px solid var(--line);
}
.project-body.no-media{grid-template-columns:1fr;grid-template-areas:"main" "links";}
.project-main{grid-area:main;min-width:0;}
.project-desc p{font-size:.93rem;line-height:1.68;margin:0 0 10px;}
.project-desc em{font-style:normal;font-weight:600;color:var(--accent);}

.project-meta{margin:16px 0 0;padding:12px 0 0;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px;font-size:.86rem;}
.project-meta div{display:flex;gap:10px;}
.project-meta dt{flex:0 0 118px;color:var(--ink-soft);}
.project-meta dd{margin:0;font-weight:500;}

.project-tags{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.project-tags li{
  font-family:'Fira Code',monospace;font-size:.72rem;color:var(--ink-soft);
  background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:3px 8px;
}

.project-media{grid-area:media;margin:0;min-width:0;align-self:start;}
.yt-facade,.project-media iframe{
  display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:12px;overflow:hidden;background:#10161A;
}
.yt-facade{position:relative;padding:0;cursor:pointer;box-shadow:0 10px 28px rgba(16,22,26,.22);}
.yt-facade img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease,filter .3s ease;filter:saturate(.9) brightness(.85);}
.yt-facade:hover img{transform:scale(1.03);filter:none;}
.yt-play{
  position:absolute;left:50%;top:50%;width:64px;height:64px;transform:translate(-50%,-50%);
  display:grid;place-items:center;border-radius:50%;background:var(--accent);color:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.35);transition:transform .2s ease;
}
.yt-play svg{width:28px;height:28px;margin-left:3px;}
.yt-facade:hover .yt-play{transform:translate(-50%,-50%) scale(1.08);}
.yt-facade:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
.project-shot{
  position:relative;display:block;border-radius:12px;overflow:hidden;background:#10161A;
  box-shadow:0 10px 28px rgba(16,22,26,.22);
}
.project-shot img{display:block;width:100%;height:auto;transition:transform .4s ease;}
.project-shot:hover img{transform:scale(1.02);}
.shot-go{
  position:absolute;right:12px;top:12px;width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;background:var(--accent);color:#fff;
  opacity:0;transform:translateY(-4px);transition:opacity .2s ease,transform .2s ease;
}
.shot-go svg{width:18px;height:18px;}
.project-shot:hover .shot-go,.project-shot:focus-visible .shot-go{opacity:1;transform:none;}
.project-shot:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
.project-media figcaption{display:flex;flex-direction:column;margin-top:10px;font-size:.85rem;}
.yt-title{font-weight:600;line-height:1.35;}
.yt-author{color:var(--ink-soft);font-size:.78rem;margin-top:2px;}

.project-links{
  grid-area:links;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;
  padding-top:20px;border-top:1px solid var(--line);
}

.terminal-window.project-next{margin-top:8px;box-shadow:none;opacity:.92;}
.project-next .terminal-body{font-size:.88rem;padding:16px 20px;}
.cursor-inline{
  display:inline-block;width:9px;height:1.05em;margin-left:4px;vertical-align:text-bottom;
  background:var(--teal-glow);animation:blink 1s step-end infinite;
}

@media(max-width:860px){
  .project-body{grid-template-columns:1fr;grid-template-areas:"main" "media" "links";padding:22px 20px;}
}
@media(max-width:560px){
  .project-bar{font-size:.7rem;}
  .project-summary{padding:14px 16px 16px;gap:12px;}
  .project-toggle{width:30px;height:30px;}
  .project-body{padding:18px 16px 18px;}
  .project-meta div{flex-direction:column;gap:0;}
  .project-meta dt{flex:none;}
  .project-links{grid-template-columns:1fr;}
}

/* ========================= STOPKA ========================= */
footer{border-top:1px solid var(--line);padding:26px 0;color:var(--ink-soft);font-size:.82rem;margin-top:40px;}
footer .wrap{max-width:1120px;margin:0 auto;padding:0 22px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;}
footer .mono{font-family:'Fira Code',monospace;font-size:.72rem;}

/* ========================= RESPONSYWNOŚĆ ========================= */
@media(max-width:860px){
  .bento{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "hero hero"
      "hero hero"
      "portrait portrait"
      "students projekty"
      "contact contact";
  }
}
@media(max-width:560px){
  .bento{grid-template-columns:1fr;grid-template-areas:"hero" "portrait" "students" "projekty" "contact";}
  .head-inner{flex-direction:column;align-items:flex-start;}
  .nav{gap:16px;flex-wrap:wrap;}
  .portrait{min-height:300px;}
  .contact{flex-direction:column;align-items:flex-start;}
  .section h2{font-size:1.7rem;}
  .course-group-header{padding:18px 18px 14px 22px;}
  .course-group-content{padding:14px 14px 16px 18px;}
  .course-head{gap:12px;padding:14px;}
  .course-mono{min-width:44px;height:40px;font-size:.72rem;}
  .course-name{font-size:1.15rem;}
  .lang-chip{display:none;}
  .course-links{padding:2px 14px 14px;grid-template-columns:1fr;}
}

