/* ===========================
   Global Styles
   =========================== */

:root {
  color-scheme: dark;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-feature-settings: 'rlig' 1, 'calt' 1, 'ss01' 1;
}

body {
  background-color: #0a0a0a;
  color: #e6edf7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(124, 212, 253, 0.03), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(106, 123, 255, 0.03), transparent 50%);
}

/* ===========================
   Typography
   =========================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  line-height: 1.15;
}

h2 {
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease-out;
}

code {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  color: #ffffff;
}

/* ===========================
   Navigation
   =========================== */

nav {
  background-color: rgba(10, 13, 18, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
}

nav a {
  position: relative;
  color: #99a2b3;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease-out;
}

nav a:hover {
  color: #ffffff;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===========================
   Sections & Layout
   =========================== */

section {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6rem 0;
}

main {
  margin-top: 6rem;
}

@media (min-width: 768px) {
  section {
    padding: 10rem 0;
  }
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===========================
   Animations
   =========================== */

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

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

  section .fade-in {
    animation-delay: 0ms;
  }

  section .fade-in:nth-child(1) { animation-delay: 0ms; }
  section .fade-in:nth-child(2) { animation-delay: 80ms; }
  section .fade-in:nth-child(3) { animation-delay: 160ms; }
  section .fade-in:nth-child(4) { animation-delay: 240ms; }
  section .fade-in:nth-child(5) { animation-delay: 320ms; }
}

/* ===========================
   Utility Classes
   =========================== */

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
}

.underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===========================
   Selection
   =========================== */

::selection {
  background-color: rgba(255, 255, 255, 0.2);
  color: #e6edf7;
}
