/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors */
  --forest-deep: #1a3a2e;
  --moss-main: #2d5a4a;
  --sage-medium: #6b8f71;
  --fern-bright: #95c7a0;

  /* Neutral Tones */
  --stone-dark: #3d3d3d;
  --stone-medium: #6b6b6b;
  --mist-light: #e8ebe9;
  --cloud-white: #f7f9f8;
  --pure-white: #ffffff;

  /* Accent Colors */
  --earth-warm: #c9a277;
  --sky-pale: #d4e5e8;
  --bark-brown: #5a4a3a;

  /* Semantic */
  --error: #a85f52;

  /* Typography */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --max-width: 1100px;
  --transition: 0.3s ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 58, 46, 0.05);
  --shadow-base: 0 2px 8px rgba(26, 58, 46, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 58, 46, 0.1);
  --shadow-lg: 0 8px 24px rgba(26, 58, 46, 0.12);

  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--cloud-white);
  color: var(--stone-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--moss-main);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--forest-deep);
}

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

:focus-visible {
  outline: 2px solid var(--moss-main);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--fern-bright);
  border-radius: 2px;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--moss-main);
  color: var(--pure-white);
  border-color: var(--moss-main);
}

.btn-primary:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: var(--pure-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 90, 74, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--moss-main);
  border-color: var(--sage-medium);
}

.btn-outline:hover {
  background: var(--mist-light);
  border-color: var(--moss-main);
  transform: translateY(-2px);
}

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

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 70px;
  background: rgba(247, 249, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(107, 143, 113, 0.1);
  transition: background var(--transition);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-deep);
  letter-spacing: 1px;
}

.nav-logo:hover {
  color: var(--moss-main);
}

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

.nav-links a {
  color: var(--stone-medium);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  border-bottom: none;
}

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

.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(--forest-deep);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--cloud-white) 0%, var(--sky-pale) 50%, var(--mist-light) 100%);
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--sage-medium);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--forest-deep);
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--stone-medium);
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-weight: 300;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--stone-medium);
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Projects ────────────────────────────────────────── */
.projects {
  padding: 96px 0;
}

.section-subtitle {
  color: var(--stone-medium);
  font-size: 1.05rem;
  margin-bottom: 32px;
  margin-top: -24px;
}

.project-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--mist-light);
  border-radius: 4px;
  background: transparent;
  color: var(--stone-medium);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--moss-main);
  color: var(--moss-main);
  background: rgba(45, 90, 74, 0.05);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--pure-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-base);
  border: 1px solid var(--mist-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 200px;
  background: var(--mist-light);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--forest-deep);
  margin-bottom: 8px;
}

.project-info p {
  color: var(--stone-medium);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-tags span {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: rgba(45, 90, 74, 0.08);
  color: var(--moss-main);
  border-radius: 4px;
  font-family: var(--font-mono);
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-card-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--mist-light);
  background: transparent;
  box-shadow: none;
  min-height: 200px;
}

.project-card-soon .project-info {
  text-align: center;
}

.project-card-soon h3 {
  color: var(--sage-medium);
}

.project-card-soon p {
  color: var(--stone-medium);
  font-style: italic;
}

/* ── About ───────────────────────────────────────────── */
.about {
  padding: 96px 0;
  background: var(--mist-light);
}

.about-grid {
  max-width: 720px;
}

.about-text p {
  color: var(--stone-medium);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.75;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.skill-tag {
  padding: 8px 18px;
  background: var(--pure-white);
  color: var(--moss-main);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(45, 90, 74, 0.15);
  box-shadow: var(--shadow-sm);
}

/* ── Contact ─────────────────────────────────────────── */
.contact {
  padding: 96px 0;
}

.contact-intro {
  color: var(--stone-medium);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 500px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 620px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 24px;
  background: var(--pure-white);
  border: 1px solid var(--mist-light);
  border-radius: 8px;
  box-shadow: var(--shadow-base);
  transition: all var(--transition);
  text-decoration: none;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--moss-main);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--stone-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-value {
  font-size: 1rem;
  color: var(--forest-deep);
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  padding: 32px 24px;
  text-align: center;
  color: var(--stone-medium);
  font-size: 0.85rem;
  border-top: 1px solid var(--mist-light);
}

/* ── Scroll Animations ───────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Accessibility ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(247, 249, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px 40px;
    gap: 20px;
    border-bottom: 1px solid var(--mist-light);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .projects,
  .about,
  .contact {
    padding: 70px 0;
  }

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