/* ===================================================
   BASS Meble — Premium Technical Aesthetic
   =================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --bg:       #1A1C20;
  --bg-light: #22242A;
  --text:     #F4F4F5;
  --text-dim: #9A9CA3;
  --accent:   #C19A6B;
  --gold:     #D4AF37;
  --line:     #4A4D55;
  --line-faint: rgba(74,77,85,.18);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --gap: clamp(1rem, 3vw, 3rem);
  --container: min(90rem, 92vw);
  --section-py: clamp(5rem, 10vh, 9rem);
  --radius: 4px;

  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; border: none; background: none; outline: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- Utility ---------- */
.container { width: var(--container); margin-inline: auto; }
.section { position: relative; padding: var(--section-py) 0; }
.text-accent { color: var(--accent); }
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2.5rem;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 2rem; height: 1px;
  background: var(--accent);
}

/* ---------- Technical Grid BG ---------- */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Corner Crosshairs ---------- */
.corner {
  position: absolute;
  width: 48px; height: 48px;
  z-index: 2;
  opacity: .5;
}
.corner--tl { top: var(--gap); left: var(--gap); }
.corner--tr { top: var(--gap); right: var(--gap); }
.corner--br { bottom: var(--gap); right: var(--gap); }
.corner--bl { bottom: var(--gap); left: var(--gap); }

/* ============================
   CUSTOM CURSOR
   ============================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--text);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform .15s var(--ease-out), opacity .2s;
}
.cursor-ring {
  position: absolute;
  top: -14px; left: -14px;
  width: 28px; height: 28px;
  border: 1px solid rgba(244,244,245,.4);
  border-radius: 50%;
  transform: translate(-50%,-50%) translate(14px,14px);
  transition: width .35s var(--ease-spring), height .35s var(--ease-spring),
              top .35s var(--ease-spring), left .35s var(--ease-spring),
              border-color .3s, background .3s;
}
.cursor-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: var(--font-heading);
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transition: opacity .25s;
  white-space: nowrap;
}
body.cursor-expand .cursor-ring {
  width: 72px; height: 72px;
  top: -36px; left: -36px;
  transform: translate(-50%,-50%) translate(36px,36px);
  border-color: var(--accent);
  background: rgba(193,154,107,.12);
}
body.cursor-expand .cursor-label { opacity: 1; }
body.cursor-expand .cursor-dot { transform: translate(-50%,-50%) scale(0); }

/* ============================
   NAV
   ============================ */
.nav {
  position: fixed; top: 0; left: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem var(--gap);
  z-index: 1000;
  transition: background .4s, box-shadow .4s, padding .4s;
}
.nav.scrolled {
  background: rgba(26,28,32,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-faint);
  padding-block: .75rem;
}
.nav-logo img {
  display: block;
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.1));
  transition: filter .3s, transform .3s;
}
.nav-logo:hover img {
  filter: drop-shadow(0 0 14px rgba(193,154,107,.45));
  transform: scale(1.05);
}
.nav-menu {
  display: flex; gap: 2.5rem; align-items: center;
}
.nav-menu a {
  font-family: var(--font-heading);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  padding: .25rem 0;
  cursor: none;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s var(--ease-out);
}
.nav-menu a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--accent) !important;
  padding: .45rem 1.2rem !important;
  border-radius: var(--radius);
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }
.nav-cta::after { display: none !important; }

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 6px;
  cursor: auto;
  width: 28px;
  z-index: 1001;
  position: relative; /* Wymuszenie twardej pozycji */
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ============================
   HERO
   ============================ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding-top: 5rem;
  position: relative; z-index: 1;
}
.hero-grid {
  width: var(--container); margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.hero-text { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: clamp(.95rem, 1.1vw, 1.15rem);
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3/2;
}
.hero-image-inner {
  width: 100%; height: 120%;
  position: absolute; top: -10%; left: 0;
}
.hero-image-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Mask reveal animation */
.reveal-mask {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.2s var(--ease-out);
}
.reveal-mask.visible {
  clip-path: inset(0 0% 0 0);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: scaleY(.6); }
  50%      { opacity: 1;  transform: scaleY(1); }
}

/* ============================
   BUTTON
   ============================ */
.btn {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--font-heading);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: color .35s, transform .25s var(--ease-spring);
  cursor: none;
  z-index: 1;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--bg); }
.btn svg { transition: transform .3s; }
.btn:hover svg { transform: translateX(4px); }

/* ============================
   ABOUT
   ============================ */
.about {
  background: var(--bg-light);
  z-index: 1;
  position: relative;
}
.about::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,77,85,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,77,85,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--gap) * 2);
  align-items: center;
}
.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 1rem;
  max-width: 38rem;
}
.about-stats {
  display: flex; gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-lbl {
  display: block;
  font-size: .78rem;
  color: var(--text-dim);
  margin-top: .35rem;
}
.about-image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.about-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  min-height: 420px;
}
.cad-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s;
}
.about-image-wrap:hover .cad-lines,
.cad-lines.visible { opacity: 1; }

/* ============================
   PORTFOLIO
   ============================ */
.portfolio { z-index: 1; position: relative; }
.portfolio .container { margin-bottom: 2.5rem; }
.portfolio h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 6px;
  width: var(--container);
  margin-inline: auto;
}
/* Explicit placement for perfect bento */
.pi-large  { grid-column: 1 / 3; grid-row: 1 / 3; }
.portfolio-item:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
.pi-tall   { grid-column: 4 / 5; grid-row: 1 / 3; }
.portfolio-item:nth-child(4) { grid-column: 3 / 4; grid-row: 2 / 3; }
.pi-wide   { grid-column: 1 / 3; grid-row: 3 / 4; }
.portfolio-item:nth-child(6) { grid-column: 3 / 4; grid-row: 3 / 4; }
.portfolio-item:nth-child(7) { grid-column: 4 / 5; grid-row: 3 / 4; }

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: none;
}
.pi-img {
  width: 100%; height: 100%;
}
.pi-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out), filter .6s;
}
.portfolio-item:hover .pi-img img {
  transform: scale(1.05);
  filter: brightness(.55);
}

/* Overlay with dimension lines */
.pi-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.portfolio-item:hover .pi-overlay { opacity: 1; }
.pi-name {
  font-family: var(--font-heading);
  font-size: clamp(.8rem, 1vw, 1rem);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
}
/* Dimension annotations */
.pi-dim {
  position: absolute;
  font-family: var(--font-heading);
  font-size: .65rem;
  letter-spacing: .1em;
  color: var(--accent);
}
.pi-dim-h {
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
}
.pi-dim-h::before, .pi-dim-h::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  width: 40px;
  background: var(--accent);
}
.pi-dim-h::before { right: calc(100% + 8px); }
.pi-dim-h::after  { left:  calc(100% + 8px); }
.pi-dim-v {
  right: 16px; top: 50%;
  transform: translateY(-50%) rotate(90deg);
}
.pi-dim-v::before, .pi-dim-v::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  width: 30px;
  background: var(--accent);
}
.pi-dim-v::before { right: calc(100% + 6px); }
.pi-dim-v::after  { left:  calc(100% + 6px); }

/* ============================
   PROCESS / TIMELINE
   ============================ */
.process { z-index: 1; position: relative; overflow: hidden; }
.process .container { margin-bottom: 3rem; }
.process h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.timeline {
  width: var(--container); margin-inline: auto;
  position: relative;
  padding-bottom: 2rem;
}
.timeline-ruler {
  position: relative;
  height: 40px;
  margin-bottom: 3rem;
}
.timeline-track {
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  background: var(--line);
  transform: translateY(-50%);
}
.timeline-progress {
  position: absolute;
  top: 50%; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: translateY(-50%);
  transition: width .1s linear;
}
.ruler-ticks {
  position: absolute; inset: 0;
  display: flex; justify-content: space-between;
}
.ruler-tick {
  width: 1px;
  background: var(--line);
  align-self: center;
}
.ruler-tick.major { height: 18px; }
.ruler-tick.minor { height: 8px; opacity: .4; }

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.timeline-step {
  position: relative;
  opacity: .35;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.timeline-step.active {
  opacity: 1;
  transform: translateY(0);
}
.step-marker {
  width: 14px; height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  margin-bottom: 1.25rem;
  position: relative;
  transition: border-color .4s, background .4s;
}
.timeline-step.active .step-marker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(193,154,107,.2);
}
.step-num {
  font-family: var(--font-heading);
  font-size: .7rem;
  letter-spacing: .15em;
  color: var(--accent);
  display: block;
  margin-bottom: .4rem;
}
.timeline-step h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.timeline-step p {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ============================
   CONTACT
   ============================ */
.contact { z-index: 1; position: relative; }
.contact-wrap { max-width: 52rem; }
.contact h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 3rem;
}

.conv-form {
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 2.6;
}
.conv-line { margin-bottom: .5rem; color: var(--text-dim); }
.form-field-wrap {
  display: inline-block;
  position: relative;
}
.form-field-wrap select,
.form-field-wrap input {
  font-size: inherit;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding: 0 .25rem .15rem;
  min-width: 10rem;
  background: transparent;
  transition: border-color .3s;
  cursor: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-field-wrap select { padding-right: 1.2rem; }
.form-field-wrap select option { background: var(--bg); color: var(--text); }
.form-field-wrap--wide input { min-width: 16rem; }
.form-field-wrap select:focus,
.form-field-wrap input:focus {
  border-color: var(--accent);
}
.form-field-wrap input::placeholder { color: var(--line); }
.conv-form .btn { margin-top: 2rem; }
.form-success {
  display: none;
  margin-top: 1.5rem;
  color: var(--accent);
  font-family: var(--font-heading);
}
.form-success.show { display: block; }

/* ============================
   FOOTER
   ============================ */
.footer {
  border-top: 1px solid var(--line-faint);
  background: rgba(26,28,32,.3);
  padding: 5rem 0 2rem;
  position: relative; z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: center;
  gap: 6rem;
  margin-bottom: 4rem;
  text-align: center;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.footer-col p {
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.text-link {
  color: var(--text-dim);
  transition: color .3s;
  cursor: none;
  display: inline-block;
}
.text-link:hover { color: var(--accent); }

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--line-faint);
  padding-top: 2rem;
}
.footer-left {
  grid-column: 2;
  text-align: center;
  font-size: .78rem; color: var(--text-dim);
}
.footer-right {
  grid-column: 3;
  display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: flex-end;
}
.social-links {
  display: flex; gap: 1rem; align-items: center; justify-content: center;
}
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-faint);
  color: var(--text-dim);
  transition: all .3s var(--ease-out);
  cursor: none;
}
.social-icon:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-4px);
}
.social-icon svg { width: 22px; height: 22px; }
.footer-right a {
  font-family: var(--font-heading);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .3s;
  cursor: none;
}
.footer-right a:hover { color: var(--accent); }

/* ============================
   REVEAL ANIMATIONS
   ============================ */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: .15s; }
.delay-2 { transition-delay: .3s; }

/* SVG draw lines */
.draw-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1.6s var(--ease-out);
}
.draw-line.visible {
  stroke-dashoffset: 0;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }
  .pi-large { grid-column: 1 / 3; grid-row: span 1; }
  .pi-tall  { grid-column: auto;  grid-row: span 1; }
  .pi-wide  { grid-column: 1 / 3; grid-row: span 1; }
  .portfolio-item:nth-child(2) { grid-column: auto; grid-row: auto; }
  .portfolio-item:nth-child(3) { grid-column: auto; grid-row: auto; }
  .portfolio-item:nth-child(4) { grid-column: auto; grid-row: auto; }
  .portfolio-item:nth-child(6) { grid-column: auto; grid-row: auto; }
  .portfolio-item:nth-child(7) { grid-column: auto; grid-row: auto; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor { display: none; }

  .nav-menu {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; align-items: center;
    background: rgba(26,28,32,.96);
    backdrop-filter: blur(20px);
    gap: 2rem;
    opacity: 0; pointer-events: none;
    transition: opacity .4s;
  }
  .nav-menu.open { opacity: 1; pointer-events: all; }
  .nav-menu a { font-size: 1.1rem; }
  .nav-toggle { display: flex; }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2rem;
  }
  .hero-sub br { display: none; }
  .hero-image { order: -1; max-height: 45vh; margin-bottom: 1.5rem; }
  .hero-image-inner { height: 100%; top: 0; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image { order: -1; }
  .about-stats { flex-direction: column; gap: 1rem; align-items: center; border-top: none; padding-top: 0; margin-top: 1.5rem; }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .pi-large, .pi-wide, .pi-tall,
  .portfolio-item:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .timeline-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .timeline-ruler { display: none; }

  .conv-form { font-size: 1rem; }
  .form-field-wrap select,
  .form-field-wrap input { min-width: 100%; width: 100%; margin-bottom: 1rem; border-bottom: 2px solid var(--line-faint); }
  .form-field-wrap--wide input { min-width: 100%; }

  .footer-inner { flex-direction: column; gap: 3rem; text-align: center; margin-bottom: 2rem; }
  .footer-bottom { display: flex; flex-direction: column; gap: 1rem; text-align: center; }
  .footer-right { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .about-stats { flex-direction: column; gap: 1rem; }
  .form-field-wrap select,
  .form-field-wrap input { display: block; width: 100%; min-width: 100%; margin-top: .25rem; }
  .form-field-wrap--wide input { min-width: 100%; }
}

/* ============================
   PROJECTS PAGE
   ============================ */

/* Page Hero */
.page-hero {
  position: relative;
  z-index: 1;
  padding: 10rem 0 4rem;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.page-hero-sub {
  font-size: clamp(.95rem, 1.1vw, 1.1rem);
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 40rem;
}

/* Filter Bar */
.filter-bar {
  position: sticky;
  top: 56px;
  z-index: 100;
  background: rgba(26,28,32,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-faint);
  padding: 1rem 0;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.filter-pill {
  font-family: var(--font-heading);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .5rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .3s var(--ease-out);
}
.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Projects Grid — Masonry via columns */
.projects-section {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}
.projects-grid {
  column-count: 3;
  column-gap: 16px;
}
.project-card {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  border: 1px solid var(--line-faint);
  cursor: pointer;
  transition: transform .4s var(--ease-out), box-shadow .4s;
  animation: cardIn .5s var(--ease-out) both;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-img {
  position: relative;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  display: block;
  transition: transform .6s var(--ease-out), filter .6s;
}
.project-card:hover .card-img img {
  transform: scale(1.04);
  filter: brightness(.85);
}
.card-info {
  padding: 1.1rem 1.25rem 1.25rem;
}
.card-info h3 {
  font-family: var(--font-heading);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: .4rem;
  color: var(--text);
}
.card-info p {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Projects CTA */
.projects-cta {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
  border-top: 1px solid var(--line-faint);
}
.projects-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
}

/* ============================
   LIGHTBOX
   ============================ */
.lightbox {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(10,11,14,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
  cursor: none;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lb-content {
  max-width: 85vw;
  max-height: 85vh;
  position: relative;
}
.lb-content img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.lb-caption {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--text-dim);
}
.lb-counter {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: .7rem;
  letter-spacing: .15em;
  color: var(--line);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  z-index: 10;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
  transition: color .3s, transform .3s;
  background: none; border: none;
  padding: .5rem;
}
.lb-close { top: 1.5rem; right: 2rem; font-size: 2.5rem; }
.lb-prev  { left: 2rem; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 2rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  color: var(--accent);
  transform: scale(1.15);
}
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.15); }

/* ============================
   PROJECTS RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .projects-grid { column-count: 2; }
}
@media (max-width: 768px) {
  .projects-grid { column-count: 1; max-width: 32rem; margin-inline: auto; }
  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { white-space: nowrap; font-size: .75rem; padding: .5rem 1rem; }
  .page-hero { padding: 8rem 0 3rem; }
  .lb-prev { left: .5rem; }
  .lb-next { right: .5rem; }
  .lb-content img { max-width: 95vw; }
}

/* ============================
   BLOG PAGE
   ============================ */
.blog-section {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2rem;
}
.blog-section .container {
  max-width: 52rem;
}

/* Blog Post */
.blog-post {
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--line-faint);
}
.blog-post:last-child {
  border-bottom: none;
}
.blog-post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.blog-date {
  font-family: var(--font-heading);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.blog-tag {
  font-family: var(--font-heading);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .25rem .75rem;
  border: 1px solid rgba(193,154,107,.3);
  border-radius: 100px;
}
.blog-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
}

/* Blog Hero Image */
.blog-hero-img {
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-hero-img img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

/* Blog Body */
.blog-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-dim);
}
.blog-lead {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}
.blog-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 .75rem;
}
.blog-body p {
  margin-bottom: 1rem;
}
.blog-body ul, .blog-body ol {
  margin: .75rem 0 1.25rem 1.5rem;
}
.blog-body ul { list-style: none; }
.blog-body ul li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: .5rem;
}
.blog-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: .7em;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}
.blog-body ol { padding-left: 1.5rem; }
.blog-body ol li {
  margin-bottom: .5rem;
  padding-left: .4rem;
}
.blog-body ol li::marker {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
}
.blog-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Inline Images */
.blog-inline-img {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  border: 1px solid var(--line-faint);
}
.blog-inline-img img {
  width: 100%;
  display: block;
}
.blog-img-caption {
  display: block;
  padding: .75rem 1rem;
  font-size: .8rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Blog Table */
.blog-table-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-faint);
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.blog-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: left;
  padding: .85rem 1rem;
  background: rgba(193,154,107,.1);
  color: var(--accent);
  border-bottom: 1px solid var(--line-faint);
}
.blog-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line-faint);
  color: var(--text-dim);
  vertical-align: top;
}
.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:hover td { background: rgba(255,255,255,.02); }

/* Active nav link */
.nav-menu a.active { color: var(--accent); }
.nav-menu a.active::after { width: 100%; background: var(--accent); }

/* ============================
   LATEST POSTS SECTION
   ============================ */
.latest-posts {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line-faint);
}
.latest-posts h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 600;
  margin-bottom: 2rem;
}
.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.latest-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  border: 1px solid var(--line-faint);
  cursor: pointer;
  transition: transform .4s var(--ease-out), box-shadow .4s;
  text-decoration: none;
  color: inherit;
}
.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.latest-card-img {
  overflow: hidden;
  aspect-ratio: 16/10;
}
.latest-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.latest-card:hover .latest-card-img img { transform: scale(1.06); }
.latest-card-info {
  padding: 1rem 1.1rem 1.2rem;
}
.latest-card-info .blog-tag {
  font-size: .6rem;
  margin-bottom: .5rem;
  display: inline-block;
}
.latest-card-info h3 {
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: .5rem;
  color: var(--text);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest-card-info .blog-date { font-size: .7rem; }

/* ============================
   BLOG 2-COLUMN LAYOUT
   ============================ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
  max-width: 1200px !important;
}
.blog-articles {
  max-width: 52rem;
  min-width: 0;
  order: 1;
}

/* ============================
   SIDEBAR
   ============================ */
.blog-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  order: 2;
}

/* Categories Box */
.sidebar-box {
  background: var(--bg-light);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.sidebar-title {
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line-faint);
}
.cat-list {
  list-style: none !important;
  margin: 0 !important; padding: 0 !important;
}
.cat-list li { margin-bottom: 0 !important; padding-left: 0 !important; }
.cat-list li::before { display: none !important; }
.cat-list a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  font-size: .85rem;
  color: var(--text-dim);
  transition: color .3s;
  cursor: pointer;
  border-bottom: 1px solid rgba(74,77,85,.1);
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list a:hover { color: var(--accent); }
.cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.cat-count {
  margin-left: auto;
  font-family: var(--font-heading);
  font-size: .7rem;
  color: var(--line);
  background: rgba(74,77,85,.15);
  padding: .15rem .5rem;
  border-radius: 100px;
}

/* Sidebar CTA Box */
.sidebar-cta {
  background: var(--bg-light);
  border: 1px solid rgba(193,154,107,.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.sidebar-cta-accent {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.sidebar-cta h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .6rem;
}
.sidebar-cta p {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: .75rem;
}
.sidebar-cta-list {
  list-style: none !important;
  margin: 0 0 1.2rem !important;
  padding: 0 !important;
}
.sidebar-cta-list li {
  font-size: .8rem;
  color: var(--accent);
  padding: .2rem 0 !important;
  margin: 0 !important;
}
.sidebar-cta-list li::before { display: none !important; }
.btn-sidebar {
  width: 100%;
  justify-content: center;
  font-size: .78rem;
  padding: .75rem 1rem;
}

/* ============================
   BLOG RESPONSIVE (updated)
   ============================ */
@media (max-width: 1024px) {
  .latest-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    order: -1;
  }
}
@media (max-width: 768px) {
  .blog-post { margin-bottom: 3rem; padding-bottom: 3rem; }
  .blog-title { font-size: 1.3rem; }
  .blog-body { font-size: .95rem; }
  .blog-lead { font-size: 1rem; }
  .blog-table { font-size: .8rem; }
  .blog-table th, .blog-table td { padding: .5rem .6rem; }
  .latest-grid { grid-template-columns: 1fr; }
  .blog-sidebar { grid-template-columns: 1fr; }
}

/* ============================
   COOKIE BANNER
   ============================ */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: min(90vw, 600px);
  background: rgba(26, 28, 32, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: transform .6s var(--ease-spring), opacity .6s;
  pointer-events: none;
  opacity: 0;
}
.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
  opacity: 1;
}
.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cookie-content p {
  font-family: var(--font-heading);
  font-size: .82rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
}
.cookie-content a {
  color: var(--accent);
  text-decoration: underline;
}
.cookie-content .btn--small {
  padding: 0.6rem 1.2rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 1rem;
    padding: 1rem;
    width: 92vw;
  }
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}
