:root {
  --bg: #0b132b;
  --panel: #0f1c3f;
  --accent: #f77f00;
  --accent-2: #4ecdc4;
  --text: #e6e9f0;
  --muted: #94a2c4;
  --card: #111a35;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  --content-width: 1100px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(78, 205, 196, 0.12), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(247, 127, 0, 0.12), transparent 30%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  min-height: 100vh;
}

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

a:hover {
  color: var(--accent);
}

.hero {
  padding: 32px clamp(16px, 4vw, 56px) 96px;
  background: linear-gradient(135deg, rgba(15, 28, 63, 0.95), rgba(11, 19, 43, 0.9));
}

.nav-shell,
.hero__content,
main {
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  padding: 10px 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo__name {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 2.5rem;
}

.logo__subtitle {
  text-transform: uppercase;
  letter-spacing: 1.1px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Constrain logo image size */
.logo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.nav {
  display: flex;
  gap: 14px;
  font-size: 0.95rem;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.hero__content {
  max-width: 780px;
  margin-top: 32px; /* reduced from 64px */
  display: grid;
  gap: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

h2 {
  margin: 6px 0 0;
  font-size: 1.8rem;
}

p {
  margin: 0;
}

.lede {
  color: var(--muted);
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(247, 127, 0, 0.35);
  outline: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

main {
  padding: 0 clamp(16px, 4vw, 56px) 80px;
  display: grid;
  gap: 48px;
}

.section {
  background: var(--panel);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.04);
  scroll-margin-top: 96px;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.about__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.pill-list li {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.card h3 {
  margin: 0;
}

.text-link {
  color: var(--accent-2);
  font-weight: 600;
}

.contact {
  display: grid;
  gap: 6px;
}

.footer {
  padding: 32px 16px 48px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.card-grid {
  display: grid;
  gap: 16px; /* adds space between project cards */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 640px) {
  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    padding-top: 24px;
  }

  .hero__content {
    margin-top: 48px;
  }
}

@media (max-width: 960px) {
  .hero__content {
    text-align: center;
    justify-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  h1 {
    font-size: clamp(1.9rem, 6vw, 2.6rem);
  }

  h2 {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }
}

@media (max-width: 780px) {
  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    text-align: center;
  }

  .logo img {
    width: 64px;
    height: 64px;
  }

  main {
    padding-bottom: 64px;
  }
}

@media (max-width: 540px) {
  .nav a {
    flex-basis: 100%;
  }

  .hero__actions {
    width: 100%;
  }

  .btn,
  .btn--ghost {
    width: 100%;
    justify-content: center;
  }

  .logo__name {
    font-size: 2rem;
  }
}
