/*
Theme Name: Hype & Space
Author: Hype & Space
Version: 3.1
Description: Osobisty motyw blogowy Hype & Space
*/

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

:root {
  --bg: #ECDFD2;
  --ink: #081849;
  --accent: #893172;
  --muted: #5F3475;
  --card: #CCCACC;
  --border: #b8b6c0;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

/* ── LINKS ──────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}
a:hover    { color: var(--muted); }
a:active   { color: var(--ink); }
a:visited  { color: var(--muted); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAVBAR ─────────────────────────────── */
#site-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover, .nav-logo:visited { color: var(--ink); }
.nav-logo span { color: var(--accent); font-style: italic; }

#nav-menu {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
#nav-menu li a {
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
  white-space: nowrap;
}
#nav-menu li a:hover   { color: var(--accent); }
#nav-menu li a:visited { color: var(--muted); }

/* Hamburger — ukryty na desktopie */
#nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  flex-shrink: 0;
}
#nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .28s, opacity .28s;
}
#nav-burger[data-open="1"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-burger[data-open="1"] span:nth-child(2) { opacity: 0; }
#nav-burger[data-open="1"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px) {
  #site-nav { padding: 1rem 1.5rem; }
  #nav-burger { display: flex; }
  #nav-menu {
    display: none;
    position: fixed;
    top: 57px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 6px 20px rgba(8,24,73,.08);
    flex-direction: column;
    gap: 0;
    z-index: 99;
    padding: 0;
  }
  #nav-menu[data-open="1"] { display: flex; }
  #nav-menu li a {
    display: block;
    padding: .9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
  }
  #nav-menu li:last-child a { border-bottom: none; }
}

/* ── HERO ───────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 92vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://hypeandspace.pl/wp-content/themes/hype-space/header.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(8,24,73,0.62) 0%, rgba(95,52,117,0.42) 50%, rgba(8,24,73,0.58) 100%);
  z-index: 1;
}

.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,24,73,0.05) 0%, rgba(8,24,73,0) 40%, rgba(8,24,73,0.4) 100%);
  z-index: 2;
}

.hero-content {
  position: relative; z-index: 3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-eyebrow {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.6rem;
  opacity: .9;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: #F5F0E8;
  letter-spacing: -.01em;
}

.hero-divider {
  width: 48px; height: 1px;
  background: rgba(245,240,232,.25);
  margin: 2rem auto;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(245,240,232,.55);
  max-width: 380px;
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.7;
}

/* ── STRIP ──────────────────────────────── */
.strip {
  display: flex; align-items: center;
  gap: 2rem;
  padding: 1.2rem 4rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.strip-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 500;
}
.strip-items {
  display: flex; gap: 2.5rem; list-style: none;
}
.strip-items a {
  text-decoration: none;
  font-size: .83rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.strip-items a:hover { color: var(--ink); }

/* ── SECTION HEADER ─────────────────────── */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}
.section-link {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.section-link:hover { text-decoration: underline; }

/* ── POSTS GRID ─────────────────────────── */
.posts-section { padding: 5rem 4rem; }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}

.card-image {
  width: 100%;
  background: linear-gradient(135deg, #CCCACC, #b0aec0);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,.2);
  font-size: .8rem;
  letter-spacing: .06em;
  overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card--featured .card-image { height: 340px; }
.card--small .card-image { height: 160px; }

.card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; gap: .6rem; }

.card-meta { display: flex; gap: .8rem; align-items: center; }
.card-tag {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.card-date { font-size: .75rem; color: var(--muted); }

.card-title {
  font-family: var(--serif);
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
}
.card--featured .card-title { font-size: 1.55rem; }
.card--small .card-title { font-size: 1.05rem; }

.card-excerpt { font-size: .88rem; color: var(--muted); font-weight: 300; flex: 1; }

.card-footer { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: var(--muted);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-author { font-size: .78rem; color: var(--muted); }

/* ── SIDEBAR LAYOUT ─────────────────────── */
.main-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  padding: 0 4rem 5rem;
}

/* ── LATEST POSTS (list) ────────────────── */
.post-list { display: flex; flex-direction: column; gap: 2rem; }

.post-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }

.post-thumb {
  height: 90px;
  background: linear-gradient(135deg, #CCCACC, #b0aec0);
  border-radius: 2px;
  overflow: hidden;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-info { display: flex; flex-direction: column; gap: .4rem; }
.post-tag {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.post-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
}
.post-title:hover { color: var(--accent); }
.post-meta { font-size: .78rem; color: var(--muted); }

/* ── SIDEBAR ────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 2.5rem; }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.5rem;
}

.widget-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--border);
}

/* About widget */
.about-widget { text-align: center; }
.about-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5F3475, #893172);
  margin: 0 auto 1rem;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.about-avatar img,
.about-avatar-img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
}
.about-name { font-family: var(--serif); font-size: 1.15rem; margin-bottom: .4rem; }
.about-bio { font-size: .83rem; color: var(--muted); font-weight: 300; line-height: 1.6; }

/* Tags widget */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── SINGLE POST ────────────────────────── */
.single-post {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 2rem;
}
.single-post .post-content p { margin-bottom: 1.4rem; }
.single-post .post-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
}
.single-post .post-content img {
  width: 100%; border-radius: 3px; margin: 1.5rem 0;
}

/* ── POST HERO ──────────────────────────── */
.post-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4rem;
}
.post-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #081849 0%, #213885 50%, #0d1f5c 100%);
  z-index: 0;
}
.post-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: .55;
}
.post-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,24,73,.2) 0%, rgba(8,24,73,.55) 60%, rgba(8,24,73,.85) 100%);
  z-index: 1;
}
.post-hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 820px;
}
.post-hero-category {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #893172;
  font-weight: 500;
  margin-bottom: 1.2rem;
  display: block;
}
.post-hero-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #F5F0E8;
  margin-bottom: 1.2rem;
}
.post-hero-meta {
  font-size: .83rem;
  color: rgba(245,240,232,.55);
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.post-hero-meta span::before { content: '·'; margin-right: 1rem; opacity: .4; }
.post-hero-meta span:first-child::before { display: none; }

/* ── FOOTER ─────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand { font-family: var(--serif); font-size: 1.2rem; }
.footer-brand span { font-style: italic; color: var(--accent); }
.footer-copy { font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .78rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ── NAV TOGGLE (hamburger) — domyślnie ukryty ── */
/* (stary .nav-toggle usunięty — zastąpiony przez .nav-toggle--always w .nav-post) */

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 1024px) {
  .nav-post, .posts-section, .main-with-sidebar, footer { padding-left: 2rem; padding-right: 2rem; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .card--featured { grid-column: span 2; }
  .main-with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-post { padding: 1rem 1.5rem; }
  .nav-logo { font-size: 1.2rem; }
  .nav-post ul { width: 100%; right: 0; border-left: none; }

  /* Hero */
  .hero { height: 70vh; }
  .hero-title { font-size: clamp(3rem, 14vw, 5rem); }

  /* Post hero */
  .post-hero { height: 55vh; }
  .post-hero-title { font-size: clamp(1.6rem, 7vw, 2.5rem); }

  /* Content */
  .posts-section, .main-with-sidebar, footer { padding: 2.5rem 1.5rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .card--featured { grid-column: span 1; }
  .strip { padding: 1rem 1.5rem; gap: 1rem; }
  .strip-items { gap: 1.2rem; flex-wrap: wrap; }

  /* Single post */
  .single-post { padding: 0 1.2rem; margin: 2rem auto; }
}
