:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1520;
  --bg-card: #131a28;
  --bg-card-hover: #1a2236;
  --border: #1e2a3f;
  --border-glow: #2d8c5a;
  --text-primary: #e0e6ed;
  --text-secondary: #7a8ba3;
  --text-muted: #4a5a72;
  --accent: #33d17a;
  --accent-dim: #2d8c5a;
  --accent-glow: rgba(51, 209, 122, 0.15);
  --amber: #e8a435;
  --amber-dim: #b07d28;
  --red: #e85555;
  --blue: #5599e8;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

a:hover {
  color: var(--text-primary);
}

/* ─── Navbar ──────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.nav-logo:hover {
  color: var(--text-primary);
}

.logo-icon {
  width: 44px;
  height: auto;
  transition: filter 0.3s;
}

.nav-logo:hover .logo-icon {
  filter: drop-shadow(0 0 8px var(--accent));
}

.nav-logo-text .accent {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* ─── Hero ────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
  background-image: url('images/hero-banner.png');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 14, 23, 0.97) 0%,
    rgba(10, 14, 23, 0.85) 50%,
    rgba(10, 14, 23, 0.4) 100%
  );
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-symbol {
  color: var(--accent);
}

.typed-text {
  color: var(--amber);
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero h1 {
  font-family: var(--font-body);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}

.pty-ltd {
  display: block;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 440px;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-ascii {
  display: flex;
  justify-content: center;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-dim);
  line-height: 1.6;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  box-shadow: 0 0 40px rgba(51, 209, 122, 0.05);
  white-space: pre;
  animation: glow 4s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 20px rgba(51, 209, 122, 0.03); }
  to { box-shadow: 0 0 40px rgba(51, 209, 122, 0.08); }
}

/* ─── Sections ────────────────────────────────── */

.section {
  padding: 6rem 0;
}

.section-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.title-decoration {
  color: var(--accent-dim);
  font-family: var(--font-mono);
  margin-right: 0.75rem;
  font-weight: 400;
}

.section-intro {
  color: var(--text-secondary);
  margin-top: -2rem;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* ─── About ───────────────────────────────────── */

.about {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.about-text .lead {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.about-text strong {
  color: var(--accent);
  font-weight: 500;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.3s;
}

.detail-card:hover {
  border-color: var(--accent-dim);
}

.detail-icon {
  font-size: 1.5rem;
  color: var(--accent);
  width: 2.5rem;
  text-align: center;
  flex-shrink: 0;
}

.detail-card h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.detail-card p {
  font-size: 0.95rem;
}

.placeholder-text {
  color: var(--amber-dim);
  font-family: var(--font-mono);
  font-style: italic;
}

/* ─── Projects ────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.project-card.featured.image-right {
  grid-template-columns: 1fr 1.2fr;
}

.project-card.featured.image-right .project-image {
  order: 2;
}

.project-card.featured.image-right .project-info {
  order: 1;
}

.project-card.legacy {
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s;
}

.project-card.legacy:hover {
  opacity: 1;
}

.project-image {
  position: relative;
  overflow: hidden;
}

.image-placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.featured .image-placeholder {
  aspect-ratio: auto;
  height: 100%;
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.image-placeholder .site-preview-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  text-align: center;
  padding: 1rem;
}

.image-placeholder .preview-title {
  font-family: var(--font-body);
  letter-spacing: 1px;
}

.image-placeholder .preview-tagline {
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.image-placeholder.vt-theme {
  background: linear-gradient(135deg, #000 0%, #0a1a0a 50%, #001100 100%);
}

.image-placeholder.s2s-theme {
  background: linear-gradient(135deg, #1a1008 0%, #2a1a0e 50%, #1a0e06 100%);
}

.image-placeholder.smm-theme {
  background: linear-gradient(135deg, #0a1520 0%, #0e1e2a 50%, #0a1218 100%);
}

.image-placeholder.wbw-theme {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #0d0d1a 100%);
}

.project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  display: block;
}

.placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 1;
  background: var(--bg-card);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px dashed var(--border);
}

.placeholder-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 1;
}

.project-info {
  padding: 1.75rem;
}

.project-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.project-status.live {
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
}

.project-status.archive {
  color: var(--amber);
  background: rgba(232, 164, 53, 0.1);
  border: 1px solid var(--amber-dim);
}

.project-status.coming-soon {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid #6d4fc2;
}

.project-info h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link .arrow {
  transition: transform 0.2s;
}

.project-link:hover .arrow {
  transform: translateX(4px);
}

/* ─── Lab ─────────────────────────────────────── */

.lab {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}

.lab-card:hover {
  border-color: var(--accent-dim);
}

.lab-card-image {
  margin: -2rem -2rem 1.5rem -2rem;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid var(--border);
}

.lab-card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.lab-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lab-card h3 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.lab-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.lab-card em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 500;
}

.lab-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.lab-card-badge.open-source {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid #2563a8;
}

.video-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}

.video-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  transition: background 0.3s;
}

.video-placeholder:hover .video-thumb-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.video-placeholder .play-button,
.video-placeholder .video-note {
  position: relative;
  z-index: 1;
}

.video-placeholder:hover {
  background: linear-gradient(135deg, #111820 0%, #1c222d 100%);
}

.play-button {
  width: 64px;
  height: 64px;
  border: 2px solid var(--accent-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  transition: all 0.3s;
}

.video-placeholder:hover .play-button {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.video-placeholder p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.video-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.video-info {
  padding: 2rem 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-info h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.video-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── Contact ─────────────────────────────────── */

.contact-content {
  max-width: 600px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: var(--red); opacity: 0.7; }
.terminal-dot.yellow { background: var(--amber); opacity: 0.7; }
.terminal-dot.green { background: var(--accent); opacity: 0.7; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.terminal-body {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-body .t-green { color: var(--accent); }
.terminal-body .t-blue { color: var(--blue); }
.terminal-body .t-yellow { color: var(--amber); }

.terminal-body a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terminal-body a:hover {
  color: var(--text-primary);
}

.contact-terminal {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* ─── Footer ──────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-logo {
  width: 36px;
  height: auto;
  opacity: 0.6;
}

.footer-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-copy p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Scroll Reveal ───────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ─── Responsive ──────────────────────────────── */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-ascii {
    display: none;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-template-columns: 1fr;
  }

  .featured .image-placeholder {
    aspect-ratio: 16 / 10;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .video-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .video-info {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 1.25rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.35s ease;
  }

  .nav-links.open {
    right: 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}
