:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f5;
  --text: #14201c;
  --text-muted: #4d5a56;
  --accent: #1f7a5c;
  --accent-contrast: #ffffff;
  --border: #e2e6e4;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px rgba(20, 32, 28, 0.08), 0 8px 24px rgba(20, 32, 28, 0.06);
}

:root[data-theme="dark"] {
  --bg: #0f1513;
  --bg-alt: #141c19;
  --text: #eef3f1;
  --text-muted: #a6b3af;
  --accent: #4fd8a8;
  --accent-contrast: #08130f;
  --border: #253430;
  --card-bg: #141c19;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513;
    --bg-alt: #141c19;
    --text: #eef3f1;
    --text-muted: #a6b3af;
    --accent: #4fd8a8;
    --accent-contrast: #08130f;
    --border: #253430;
    --card-bg: #141c19;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */

.hero {
  height: 100svh;
  min-height: 480px;
  position: relative;
  color: #fff;
  background-image: linear-gradient(
      180deg,
      rgba(10, 16, 14, 0.55) 0%,
      rgba(10, 16, 14, 0.35) 45%,
      rgba(10, 16, 14, 0.75) 100%
    ),
    url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.hero-content p {
  margin: 0 0 24px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
}

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

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

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

.btn-primary:hover,
.btn-ghost:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-ghost {
  color: #fff;
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  animation: bounce 2.2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 6px);
  }
}

/* Sections */

section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 40px;
}

.section-header .eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

.section-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.about-body p {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Skills */

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* Contact */

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-weight: 600;
}

.contact-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

footer {
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .nav-links {
    gap: 14px;
  }

  .nav-links li {
    display: none;
  }
}
