/*
Theme Name:   Piekarek Blocksy Child
Theme URI:    https://by-piekarek.com
Description:  Dark child theme for Blocksy — by-piekarek.com
Author:       Michael Piekarek
Author URI:   https://by-piekarek.com
Template:     blocksy
Version:      1.0.0
License:      GNU General Public License v2 or later
Text Domain:  piekarek-blocksy-child
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --bg: #0d0f0e;
  --surface: #141714;
  --border: #232623;
  --accent: #b8f55a;
  --accent2: #5af5c2;
  --accent3: #f5a35a;
  --text: #e8ede8;
  --muted: #7a8a7a;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header,
header.site-header {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 15, 14, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Blocksy header overrides */
.ct-header {
  background: rgba(13, 15, 14, 0.85) !important;
  border-bottom: 1px solid var(--border) !important;
}

.site-logo a,
.ct-site-title a {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  text-decoration: none;
}

.ct-site-title a span,
.logo-accent {
  color: var(--accent);
}

/* Nav */
.ct-main-nav a,
.main-navigation a {
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.ct-main-nav a:hover,
.main-navigation a:hover {
  color: var(--accent) !important;
}

/* ============================================================
   FRONT PAGE — HERO
   ============================================================ */
.bp-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.bp-hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.bp-hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 245, 90, 0.08) 0%, transparent 70%);
  top: 10%; left: -10%;
  pointer-events: none;
  animation: bp-pulse 6s ease-in-out infinite;
}

.bp-hero-glow2 {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 245, 194, 0.06) 0%, transparent 70%);
  bottom: 20%; right: 5%;
  pointer-events: none;
  animation: bp-pulse 8s ease-in-out infinite reverse;
}

@keyframes bp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

.bp-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem 4rem 4rem;
  position: relative;
  z-index: 2;
}

.bp-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.bp-hero-tag::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}

.bp-hero-left h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(3rem, 5vw, 5rem) !important;
  font-weight: 800 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.04em !important;
  margin-bottom: 1.5rem !important;
  color: var(--text) !important;
}

.bp-hero-left h1 em {
  font-style: normal;
  color: var(--accent);
  display: block;
}

.bp-hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.bp-hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* CTA Buttons */
.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.bp-btn-primary {
  background: var(--accent);
  color: #0d0f0e !important;
  font-weight: 500;
}

.bp-btn-primary:hover {
  background: #ceff7a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 245, 90, 0.25);
  color: #0d0f0e !important;
}

.bp-btn-secondary {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}

.bp-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

/* Hero right — dynamic tag cloud */
.bp-hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 4rem 4rem 4rem 2rem;
}

.bp-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 400px;
}

.bp-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.2s;
  animation: bp-floatIn 0.6s ease both;
}

.bp-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.bp-tag.featured {
  background: rgba(184, 245, 90, 0.08);
  border-color: rgba(184, 245, 90, 0.3);
  color: var(--accent);
}

@keyframes bp-floatIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.bp-section {
  padding: 6rem 4rem;
  position: relative;
}

.bp-section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.bp-section-title {
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 3.5vw, 3rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  margin-bottom: 3rem !important;
  color: var(--text) !important;
}

/* ============================================================
   INTERESTS GRID
   ============================================================ */
.bp-interests {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.bp-interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.bp-interest-card {
  background: var(--surface);
  padding: 2rem;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}

.bp-interest-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.bp-interest-card:hover { background: #181c18; }
.bp-interest-card:hover::after { width: 100%; }

.bp-interest-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.bp-interest-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.bp-interest-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.bp-interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.bp-interest-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent2);
  background: rgba(90, 245, 194, 0.07);
  border: 1px solid rgba(90, 245, 194, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ============================================================
   ABOUT
   ============================================================ */
.bp-about-section {
  padding: 6rem 4rem;
}

.bp-about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.bp-about-text p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.75;
}

.bp-about-text p strong {
  color: var(--text);
  font-weight: 400;
}

.bp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.bp-stat {
  background: var(--surface);
  padding: 1.5rem;
}

.bp-stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}

.bp-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

/* ============================================================
   COMING SOON
   ============================================================ */
.bp-coming-soon {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6rem 4rem;
}

.bp-coming-soon-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.bp-coming-soon-inner .bp-section-label,
.bp-coming-soon-inner .bp-section-title {
  text-align: center;
}

.bp-coming-soon-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.bp-tag-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer,
footer.site-footer {
  padding: 2.5rem 4rem !important;
  border-top: 1px solid var(--border) !important;
  background: var(--bg) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.bp-footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.bp-footer-copy a {
  color: var(--accent);
  text-decoration: none;
}

.bp-footer-links {
  display: flex;
  gap: 1.5rem;
}

.bp-footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.bp-footer-links a:hover {
  color: var(--accent);
}

/* Override Blocksy footer */
.ct-footer {
  background: var(--bg) !important;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.bp-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.bp-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .bp-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .bp-hero-right {
    display: none;
  }

  .bp-hero-left {
    padding: 5rem 2rem 3rem;
  }

  .bp-section,
  .bp-about-section,
  .bp-coming-soon {
    padding: 4rem 2rem;
  }

  .bp-interests-grid {
    grid-template-columns: 1fr;
  }

  .bp-about-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .site-footer,
  footer.site-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 2rem !important;
  }
}

@media (max-width: 600px) {
  .site-header,
  header.site-header {
    padding: 1rem 1.5rem;
  }
}

/* ============================================================
   BLOCKSY GLOBAL OVERRIDES
   ============================================================ */
.ct-container,
.ct-section {
  background: transparent !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display) !important;
  color: var(--text) !important;
}

p {
  color: var(--muted);
}

/* Disable Blocksy's default header on front page */
body.front-page .ct-header-sticky-wrapper {
  background: transparent !important;
}
