:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #cbd5e1;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-alt: #334155;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --border: #475569;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.navbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.theme-toggle {
  position: relative;
  width: 56px;
  height: 30px;
  display: inline-block;
}

.theme-toggle input {
  display: none;
}

.slider {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--surface-alt);
  border: 2px solid var(--primary);
  border-radius: 999px;
  position: relative;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
}

main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero,
.projects-section,
.about-section,
.contact-section {
  padding: 4rem 0;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.9s ease;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
}

h2,
h3 {
  margin-top: 0;
}

.hero-description,
.section-heading p,
.card p,
.about-box p,
.contact-section p,
.hero-card li {
  color: var(--text-muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.hero-card,
.card,
.about-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.5rem;
}

.hero-card ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.about-flex {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-box {
  padding: 1.5rem;
}

.contact-section {
  text-align: center;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav-links {
    flex-direction: row;
    align-items: center;
  }

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

  .about-flex {
    flex-direction: row;
  }

  .about-box {
    flex: 1;
  }
}


@media (min-width: 1000px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text,
  .hero-card {
    flex: 1;
  }

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