/* ============================================
   PZHACKER — STYLES
   Minimal Hacker Aesthetic | Dark/Light Theme
   ============================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Syne:wght@400;500;600;700;800&display=swap');

/* --- CSS VARIABLES --- */
:root {
  /* Dark Theme (default) */
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #1a1a1a;
  --surface: #141414;
  --border: #222222;
  --border-hover: #333333;
  --text: #e8e8e8;
  --text-muted: #666666;
  --text-dim: #444444;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.1);
  --accent-glow: rgba(0, 255, 136, 0.3);
  --white: #ffffff;
  --nav-bg: rgba(10, 10, 10, 0.92);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-pad: 120px;
  --container: 1200px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f5f5f0;
  --bg-2: #eeeeea;
  --bg-3: #e8e8e3;
  --surface: #ffffff;
  --border: #ddddd8;
  --border-hover: #cccccc;
  --text: #111111;
  --text-muted: #888888;
  --text-dim: #bbbbbb;
  --accent: #007a42;
  --accent-dim: rgba(0, 122, 66, 0.08);
  --accent-glow: rgba(0, 122, 66, 0.2);
  --nav-bg: rgba(245, 245, 240, 0.92);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  cursor: none;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* --- CUSTOM CURSOR --- */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
  mix-blend-mode: difference;
}
.cursor-trail {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.12s var(--ease), top 0.12s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
  opacity: 0.5;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 20px; height: 20px; }
body:has(a:hover) .cursor-trail,
body:has(button:hover) .cursor-trail { width: 50px; height: 50px; opacity: 0.2; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* --- CONTAINER --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

/* --- TYPOGRAPHY --- */
.mono { font-family: var(--font-mono); }

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, padding 0.3s var(--ease), background 0.4s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  padding: 14px 40px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--accent); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s, transform 0.3s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(180deg); }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.mobile-link {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--accent); }

/* --- SECTIONS --- */
.section { position: relative; }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.06;
}
#matrixCanvas { width: 100%; height: 100%; }
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 40px;
  padding-top: 80px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  border: 1px solid var(--accent-glow);
  padding: 6px 14px;
  border-radius: 2px;
  background: var(--accent-dim);
}
.tag-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
}
.hero-sub .mono { color: var(--text-dim); font-size: 0.8rem; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 40px; right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 14px 28px;
  border-radius: 2px;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform 0.3s var(--ease);
  z-index: 0;
}
.btn span { position: relative; z-index: 1; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* --- SECTION HEADER --- */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 64px;
}
.section-num {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* --- ABOUT --- */
.about {
  padding: var(--section-pad) 0;
  background: var(--bg-2);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text);
}
.about-text p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 16px;
}
.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.skills-block { margin-bottom: 32px; }
.skills-title {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-weight: 400;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* --- SERVICES --- */
.services {
  padding: var(--section-pad) 0;
  background: var(--bg);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--bg);
  padding: 48px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s var(--ease);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.service-card:hover { background: var(--bg-2); }
.service-card:hover::before { width: 100%; }
.card-num {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}
.card-icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: 20px;
}
.card-icon svg { width: 100%; height: 100%; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.card-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}
.card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-list li {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.service-card:hover .card-list li { color: var(--text-muted); }

/* --- CONTACT --- */
.contact {
  padding: var(--section-pad) 0;
  background: var(--bg-2);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text);
}
.contact-sub {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 40px;
}
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-link:hover { color: var(--accent); }

/* --- FORM --- */
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 14px 16px;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus { border-color: var(--accent); background: var(--bg-3); }
.form-textarea { resize: vertical; min-height: 140px; }
.btn-arrow { transition: transform 0.2s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.form-success {
  display: none;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent);
  padding: 12px;
  border: 1px solid var(--accent-glow);
  background: var(--accent-dim);
  border-radius: 2px;
}
.form-success.show { display: block; }

/* --- FOOTER --- */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy, .footer-status {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-status { display: flex; align-items: center; gap: 8px; }
.status-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- GLITCH EFFECT --- */
@keyframes glitch {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 1px); }
  40% { clip-path: inset(50% 0 30% 0); transform: translate(3px, -1px); }
  60% { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 2px); }
  80% { clip-path: inset(10% 0 80% 0); transform: translate(2px, -2px); }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-scroll { display: none; }
  .container { padding: 0 24px; }
  .nav { padding: 16px 24px; }
  .nav.scrolled { padding: 12px 24px; }
  .service-card { padding: 32px 24px; }
}

@media (max-width: 600px) {
  :root { --section-pad: 80px; }
  .hero-title { font-size: clamp(2.4rem, 10vw, 4rem); }
  .about-stats { gap: 24px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .cursor, .cursor-trail { display: none; }
  body { cursor: auto; }
  button, a { cursor: pointer; }
}