/* =========================================================
   GRAFEN – Studenckie Koło Naukowe Inżynierii Danych
   Politechnika Świętokrzyska w Kielcach
   Arkusz stylów wspólny dla wszystkich podstron
   ========================================================= */

:root {
  --navy-900: #0b1626;
  --navy-800: #12233a;
  --navy-700: #1c3352;
  --teal-500: #12b5a5;
  --teal-400: #3fd0c1;
  --teal-100: #e3f7f5;
  --ink: #1d2733;
  --muted: #5d6b7a;
  --line: #e2e7ee;
  --bg: #f6f8fb;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 22, 38, .08);
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-500); text-decoration: none; }
a:hover { color: var(--navy-700); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; color: var(--navy-900); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: .02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--teal-500); color: var(--white); padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; }

/* ---------- Nagłówek i nawigacja ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 22, 38, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 70px;
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--white); font-weight: 800; font-size: 1.25rem; letter-spacing: .14em;
}
.brand:hover { color: var(--white); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }

.menu { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.menu a {
  display: block; padding: .5rem .95rem; border-radius: 999px;
  color: #c9d4e2; font-weight: 600; font-size: .95rem;
}
.menu a:hover { color: var(--white); background: rgba(255, 255, 255, .08); text-decoration: none; }
.menu a[aria-current="page"] { color: var(--navy-900); background: var(--teal-400); }

/* przełącznik menu mobilnego (CSS-only) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: .5rem; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block; width: 24px; height: 2px; background: var(--white);
  position: relative; transition: transform .2s ease;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after { content: ""; position: absolute; }
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after  { top: 7px; }

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle-label { display: block; }
  .menu {
    display: none; flex-direction: column; width: 100%;
    padding: .5rem 0 1rem;
  }
  .nav-toggle:checked ~ .menu { display: flex; }
  .nav-toggle:checked + .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label span::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span::after  { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  color: #dbe5f1;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(18, 181, 165, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
}
/* motyw sieci heksagonalnej – nawiązanie do grafenu */
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 97' fill='none' stroke='%233fd0c1' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: linear-gradient(to left, #000 20%, transparent 85%);
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 85%);
}
.hero .container { position: relative; }
.hero h1 { color: var(--white); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46rem; color: #c3d1e2; }
.eyebrow {
  display: inline-block; margin-bottom: 1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal-400);
}
.hero--small { padding: clamp(3rem, 7vw, 4.5rem) 0; }

.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal-500); color: var(--white); }
.btn-primary:hover { background: var(--teal-400); color: var(--navy-900); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Sekcje ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--white { background: var(--white); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }

.split {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.1fr .9fr; align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.figure {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem; border: 1px solid var(--line);
}
.figure figcaption { font-size: .85rem; color: var(--muted); margin-top: .75rem; text-align: center; }

.grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem;
  display: grid; place-items: center;
  background: var(--teal-100); color: var(--teal-500);
}
.card .icon svg { width: 24px; height: 24px; }

/* blok spotkań */
.meeting {
  display: grid; gap: 1.5rem; grid-template-columns: auto 1fr; align-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #d3deeb; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
}
.meeting h2, .meeting h3 { color: var(--white); }
.meeting a { color: var(--teal-400); }
.meeting-date {
  text-align: center; background: var(--teal-500); color: var(--white);
  border-radius: 12px; padding: 1rem 1.3rem; min-width: 120px; line-height: 1.2;
}
.meeting-date strong { display: block; font-size: 2.2rem; }
.meeting-date span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 600px) { .meeting { grid-template-columns: 1fr; } .meeting-date { justify-self: start; } }

.callout {
  border-left: 4px solid var(--teal-500); background: var(--teal-100);
  padding: 1.2rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Aktualności ---------- */

.news-layout {
  display: grid; gap: 2.5rem; grid-template-columns: 1fr 300px; align-items: start;
}
@media (max-width: 900px) { .news-layout { grid-template-columns: 1fr; } }

.news-list { display: grid; gap: 1.5rem; }

.post {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.post:target { outline: 3px solid var(--teal-400); outline-offset: 3px; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  font-size: .85rem; color: var(--muted); margin-bottom: .7rem;
}
.tag {
  display: inline-block; padding: .15rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-100); color: #0b7d72;
}
.tag--event { background: #fff1db; color: #9a5b00; }
.tag--info  { background: #e8edff; color: #3346a8; }
.post h2 { font-size: 1.45rem; margin-bottom: .5em; }
.post h2 a { color: var(--navy-900); }
.post h2 a:hover { color: var(--teal-500); }
.post p:last-child { margin-bottom: 0; }

.post--featured { border-top: 5px solid var(--teal-500); }

.sidebar { display: grid; gap: 1.5rem; position: sticky; top: 90px; }
@media (max-width: 900px) { .sidebar { position: static; } }
.sidebar .card h3 { font-size: 1.05rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list time { display: block; font-size: .8rem; color: var(--muted); }

/* ---------- Kontakt ---------- */

.table {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.table th, .table td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--navy-800); color: var(--white); font-weight: 600; width: 40%; }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }
.table td.empty { color: var(--muted); font-style: italic; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .8rem; padding: .45rem 0; }
.contact-list svg { width: 20px; height: 20px; flex: none; margin-top: .3rem; color: var(--teal-500); }

/* ---------- Stopka ---------- */

.site-footer {
  background: var(--navy-900); color: #8fa1b7; font-size: .9rem;
  padding: 2.5rem 0;
}
.site-footer a { color: #c9d4e2; }
.site-footer a:hover { color: var(--teal-400); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center;
}
.footer-inner p { margin: 0; }
.footer-menu { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Dostępność i druk ---------- */

:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .btn-row { display: none; }
  .hero { background: none; color: #000; padding: 1rem 0; }
  .hero h1, .hero .lead { color: #000; }
  .card, .post, .figure { box-shadow: none; }
}
