:root {
  --bg: #0b1220;
  --card: #111a2d;
  --muted: #16233d;
  --text: #dce7ff;
  --subtext: #9cb0d8;
  --brand: #4f8cff;
  --brand-soft: #6aa0ff;
  --border: #2a3b61;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #070c16 0%, #0b1220 30%, #0d1527 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-muted {
  background-color: rgba(19, 30, 52, 0.45);
  border-top: 1px solid rgba(87, 120, 191, 0.16);
  border-bottom: 1px solid rgba(87, 120, 191, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(7, 12, 22, 0.85);
  border-bottom: 1px solid rgba(87, 120, 191, 0.22);
  z-index: 99;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-soft);
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  color: var(--subtext);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  color: var(--brand-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 12px 0;
  line-height: 1.2;
}

h1 span {
  color: var(--brand-soft);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 18px;
}

.lead {
  color: var(--subtext);
  max-width: 760px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--brand);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text);
}

.hero-card,
.skill-card,
.project-card,
.contact-card {
  background-color: rgba(18, 28, 48, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.hero-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--subtext);
}

.text-block {
  color: var(--subtext);
  max-width: 860px;
}

.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

#projects h2 {
  text-align: center;
}

.projects-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
  margin: 0 auto;
}

.skill-card h3,
.project-card h3 {
  margin-top: 0;
}

.skill-card p,
.project-card p {
  margin-bottom: 0;
  color: var(--subtext);
}

.project-type {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a9c1ff;
  margin-bottom: 8px;
}

.project-highlight {
  border-color: rgba(107, 155, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(107, 155, 255, 0.12);
}

.project-link {
  display: inline-block;
  margin-top: 14px;
  color: #b5cdff;
  font-weight: 600;
}

.project-gallery {
  margin-top: 28px;
}

.project-gallery h3 {
  margin: 0 0 12px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.gallery-item {
  margin: 0;
  background-color: rgba(18, 28, 48, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 10px 12px;
  color: var(--subtext);
  font-size: 0.92rem;
}

.contact-card a {
  color: #b5cdff;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.site-footer {
  border-top: 1px solid rgba(87, 120, 191, 0.18);
  padding: 20px 0;
  color: var(--subtext);
}

@media (max-width: 900px) {
  .hero-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .projects-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 640px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(1100px, 94%);
  }

  .nav-wrap {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    padding: 64px 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
    width: 100%;
  }

  .project-card,
  .gallery-item,
  .contact-card,
  .hero-card,
  .skill-card {
    padding: 18px;
  }

  .gallery-item img {
    height: 190px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .lead,
  .text-block,
  .project-card p,
  .skill-card p,
  .contact-card p {
    font-size: 0.95rem;
  }

  .gallery-item img {
    height: 170px;
  }
}
