/* ========================================
   Design system
   ======================================== */

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a25;
  --bg-card-hover: #22222f;
  --text-primary: #e8e8ed;
  --text-secondary: #9898a6;
  --text-muted: #6b6b7b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border: #2a2a3a;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --nav-height: 64px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ========================================
   Reset
   ======================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}


/* ========================================
   Utilities
   ======================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s var(--ease);
}

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

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

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

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   Nav
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(10, 10, 15, 0);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-scrolled {
  background-color: rgba(10, 10, 15, 0.95);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.nav-brand {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

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

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

.nav-links .btn {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

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

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


/* ========================================
   Hero
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}


/* ========================================
   Services (What I build)
   ======================================== */

.services {
  background-color: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.service-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-card-hover);
}

.service-card-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.service-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ========================================
   Process (How it works)
   ======================================== */

.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.process-step {
  position: relative;
  padding-left: 3.5rem;
}

.step-number {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-glow);
  border-radius: 8px;
}

.process-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.process-step p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ========================================
   Projects (Things I've built)
   ======================================== */

.projects {
  background-color: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}

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

img.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
}

div.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  border: 2px dashed var(--border);
  border-radius: 12px 12px 0 0;
}

.project-body {
  padding: var(--space-xl);
}

.project-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.project-body p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background-color: var(--accent-glow);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
}


/* ========================================
   About
   ======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.about-bio p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about-sidebar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.credentials {
  margin-bottom: var(--space-xl);
}

.credentials li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
}

.credentials li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  transform: translateY(-50%);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}


/* ========================================
   CTA
   ======================================== */

.cta-section {
  background-color: var(--bg-secondary);
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}


/* ========================================
   Footer
   ======================================== */

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

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

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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


/* ========================================
   Responsive — tablet (640px)
   ======================================== */

@media (min-width: 640px) {
  .section-heading {
    font-size: 2rem;
  }

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

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

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .process-step {
    padding-left: 0;
    padding-top: 3.5rem;
  }

  .step-number {
    top: 0;
    left: 0;
  }

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

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

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


/* ========================================
   Responsive — desktop (1024px)
   ======================================== */

@media (min-width: 1024px) {
  .section-heading {
    font-size: 2.25rem;
  }

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

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

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

  .about-grid {
    grid-template-columns: 3fr 2fr;
  }

  .cta-section h2 {
    font-size: 2.5rem;
  }
}


/* ========================================
   Mobile nav overlay (< 640px)
   ======================================== */

@media (max-width: 639px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2xl);
    padding: var(--space-2xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-links .btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

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