/* ═══════════════════════════════════════════════
   BIREWA.COM — Portfolio Stylesheet
   Dark theme · Dot-grid texture · Copper accent
   Mobile-first responsive
   ═══════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────── */
:root {
  --bg:          #0a0a0b;
  --bg-surface:  #111114;
  --bg-raised:   #18181c;
  --accent:      #e8762d;
  --accent-hover:#f09040;
  --accent-glow: rgba(232, 118, 45, 0.12);
  --text:        #e8e8e8;
  --text-muted:  #8a8a96;
  --border:      #1f1f26;
  --border-hover:#2e2e38;

  --font:        'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:        'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --max-w:       1100px;
  --pad:         1.25rem;
  --section-py:  5rem;
  --nav-h:       3.75rem;
  --radius:      6px;

  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Layout ────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: var(--section-py) 0;
}

/* ── Skip Link (a11y) ──────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* ── Scroll Progress ───────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 10001;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.7; }
.accent { color: var(--accent); }

/* Desktop links */
.nav-links {
  display: none;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Right group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color 0.2s;
}
.lang-toggle:hover {
  border-color: var(--accent);
}
.lang-opt {
  color: var(--text-muted);
  transition: color 0.2s;
}
.lang-opt.active {
  color: var(--accent);
}
.lang-sep {
  color: var(--border);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 3rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -15%;
  right: -15%;
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-first {
  display: block;
  color: var(--text);
}

.hero-last {
  display: block;
  color: var(--text);
  opacity: 0.6;
}

.hero-pitch {
  max-width: 540px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-loc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pulse dot */
.pulse {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* Hero stagger animation */
.anim-hero {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeSlideUp 0.7s var(--ease) forwards;
}
.anim-hero:nth-child(1) { animation-delay: 0.1s; }
.anim-hero:nth-child(2) { animation-delay: 0.2s; }
.anim-hero:nth-child(3) { animation-delay: 0.35s; }
.anim-hero:nth-child(4) { animation-delay: 0.5s; }
.anim-hero:nth-child(5) { animation-delay: 0.65s; }

@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   SHARED SECTION STYLES
   ═══════════════════════════════════════════════ */
.section-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 2rem;
}

/* ── Scroll-reveal ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════ */
.about-body {
  max-width: 640px;
}
.about-body p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.highlight {
  text-align: center;
}

.highlight-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.highlight-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ═══════════════════════════════════════════════
   STACK
   ═══════════════════════════════════════════════ */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.stack-cat h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.4rem 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 118, 45, 0.06);
}

/* ═══════════════════════════════════════════════
   WORK
   ═══════════════════════════════════════════════ */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.work-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  border-left-color: var(--accent-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px var(--border-hover);
}

.work-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.work-role {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.work-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.work-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════ */
.contact-heading {
  font-size: clamp(2rem, 5vw, 3rem);
}

.contact-desc {
  max-width: 520px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

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

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contact-link {
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.2s;
}

.email-link {
  color: var(--accent);
}

.email-link:hover {
  color: var(--accent-hover);
}

.social-links {
  display: flex;
  gap: 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-link:hover {
  color: var(--accent);
}

.social-link svg {
  display: inline;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer p {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════ */
.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: clamp(5rem, 20vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: var(--border);
  letter-spacing: -0.04em;
}

.error-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

.error-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
}

.error-link {
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.2s;
}
.error-link:hover {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet (≥ 640px)
   ═══════════════════════════════════════════════ */
@media (min-width: 640px) {
  :root {
    --pad: 2rem;
    --section-py: 6rem;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Desktop (≥ 1024px)
   ═══════════════════════════════════════════════ */
@media (min-width: 1024px) {
  :root {
    --pad: 2.5rem;
    --section-py: 7.5rem;
  }

  body {
    font-size: 1.05rem;
  }

  /* Show desktop nav, hide hamburger */
  .nav-links {
    display: flex;
  }
  .hamburger {
    display: none;
  }

  .hero-pitch {
    font-size: 1.15rem;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-body {
    max-width: 680px;
  }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .anim-hero { opacity: 1; transform: none; }
}
