:root {
  --bg: #0a0e14;
  --bg-alt: #10161f;
  --surface: #131b26;
  --text: #d7dde5;
  --text-dim: #8b97a8;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --border: #1f2a38;
  --max-width: 1100px;
  --font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #f2f5f8;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}

.logo img {
  height: 28px;
  width: 28px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s ease;
}

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

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

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

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/background-fallback.jpg");
  background-size: cover;
  background-position: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video.is-hidden {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 14, 20, 0.72);
}

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

.eyebrow {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero h2 {
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  color: var(--text-dim);
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-intro {
  max-width: 540px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #04140f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(94, 234, 212, 0.25);
}

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

.btn-outline:hover {
  background: rgba(94, 234, 212, 0.08);
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* Sections */
section {
  padding: 120px 0;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 48px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-number {
  color: var(--accent);
  font-size: 1.1rem;
}

/* About */
.about-content p {
  max-width: 680px;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  border-color: var(--accent-dim);
}

.project-card-header {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

.tech-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tech-list li {
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-heading);
}

.project-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-status {
  border-color: var(--border);
  color: var(--text-dim);
  cursor: default;
}

/* Contact */
.contact {
  text-align: center;
}

.contact-intro {
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-links {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.social-links a {
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 300px;
  }

  .nav-links a {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  section {
    padding: 80px 0;
  }

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

  .btn {
    text-align: center;
  }
}
