/* Base reset + sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 8px; /* 1rem = 8px */
  scroll-behavior: smooth;
}

body.page {
  font-family: system-ui, sans-serif;
  background-color: #121212; /* dark grey */
  color: #e0e0e0; /* light grey text */
  line-height: 1.6;
}

/* Containers */
.container {
  width: 100%;
  max-width: 140rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Light mode styles */
body[data-theme="light"] {
  background-color: #f5f5f5;
  color: #222222;
}

body[data-theme="light"] .header {
  background-color: #ffffff;
  border-bottom-color: #e0e0e0;
}

body[data-theme="light"] .header__brand {
  color: #0d7a0d;
}

body[data-theme="light"] .header__theme-toggle {
  border-color: #0d7a0d;
  color: #0d7a0d;
}

body[data-theme="light"] .header__menu {
  border-color: #0d7a0d;
  color: #0d7a0d;
}

body[data-theme="light"] .nav {
  background-color: #ffffff;
  border-color: #e0e0e0;
}

body[data-theme="light"] .nav__link {
  color: #222222;
}

body[data-theme="light"] .nav__link:hover {
  background-color: #f0f0f0;
  color: #0d7a0d;
}

body[data-theme="light"] .hero {
  background-color: #fafafa;
  border-bottom-color: #e0e0e0;
}

body[data-theme="light"] .hero__title {
  color: #0d7a0d;
}

body[data-theme="light"] .hero__subtitle {
  color: #555555;
}

body[data-theme="light"] .hero__avatar {
  border-color: #0d7a0d;
}

body[data-theme="light"] .btn {
  border-color: #0d7a0d;
}

body[data-theme="light"] .btn--primary {
  background-color: #0d7a0d;
  color: #ffffff;
}

body[data-theme="light"] .btn--primary:hover {
  background-color: #0a5a0a;
}

body[data-theme="light"] .btn--ghost {
  color: #0d7a0d;
}

body[data-theme="light"] .btn--ghost:hover {
  background-color: #f0f0f0;
}

body[data-theme="light"] .section {
  border-bottom-color: #e0e0e0;
}

body[data-theme="light"] .section--alt {
  background-color: #ffffff;
}

body[data-theme="light"] .section__title {
  color: #0d7a0d;
}

body[data-theme="light"] .section__lead {
  color: #555555;
}

body[data-theme="light"] .about__item {
  color: #222222;
}

body[data-theme="light"] .card {
  background-color: #ffffff;
  border-color: #e0e0e0;
}

body[data-theme="light"] .card__title {
  color: #0d7a0d;
}

body[data-theme="light"] .card__text {
  color: #555555;
}

body[data-theme="light"] .skills__item {
  border-color: #0d7a0d;
  color: #0d7a0d;
}

body[data-theme="light"] .contact__link {
  color: #0d7a0d;
  border-bottom-color: #0d7a0d;
}

body[data-theme="light"] .contact__link:hover {
  color: #0a5a0a;
}

body[data-theme="light"] .footer {
  background-color: #f0f0f0;
  color: #555555;
}

body[data-theme="light"] .footer__top {
  color: #0d7a0d;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #1a1a1a;
  border-bottom: 0.2rem solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
}

.header__brand {
  font-size: 2rem;
  color: #39ff14; /* neon green */
  text-decoration: none;
  font-weight: 700;
}

.header__theme-toggle {
  background: transparent;
  border: 0.2rem solid #39ff14;
  border-radius: 0.8rem;
  color: #39ff14;
  font-size: 2rem;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  margin-left: auto;
  margin-right: 1.6rem;
}

.header__menu {
  display: none;
  background: transparent;
  border: 0.2rem solid #39ff14;
  border-radius: 0.8rem;
  color: #39ff14;
  font-size: 2rem;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav__link {
  font-size: 1.6rem;
  color: #e0e0e0;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.4rem;
}

.nav__link:hover {
  background-color: #2a2a2a;
  color: #39ff14;
}

/* Hero */
.hero {
  background-color: #181818;
  padding: 8rem 0;
  border-bottom: 0.2rem solid #2a2a2a;
  text-align: center;
}

.hero__title {
  font-size: 5rem;
  color: #39ff14;
  margin-bottom: 1.6rem;
}

.hero__subtitle {
  font-size: 2rem;
  color: #b0b0b0;
  margin-bottom: 2.4rem;
}

.hero__avatar {
  margin-top: 4rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  border: 0.4rem solid #39ff14;
  object-fit: cover;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 1.6rem;
  padding: 1.2rem 2rem;
  border-radius: 0.8rem;
  border: 0.2rem solid #39ff14;
  margin-right: 1.6rem;
  transition: 0.2s ease-in-out;
}

.btn--primary {
  background-color: #39ff14;
  color: #121212;
  font-weight: 600;
}

.btn--primary:hover {
  background-color: #2fd40f;
}

.btn--ghost {
  background: transparent;
  color: #39ff14;
}

.btn--ghost:hover {
  background-color: #2a2a2a;
}

/* Sections */
.section {
  padding: 8rem 0;
  border-bottom: 0.2rem solid #2a2a2a;
}

.section--alt {
  background-color: #1a1a1a;
}

.section__title {
  font-size: 3.2rem;
  margin-bottom: 2.4rem;
  color: #39ff14;
}

.section__lead {
  font-size: 2rem;
  color: #b0b0b0;
  margin-bottom: 2.4rem;
}

/* About */
.about__list {
  list-style: none;
  display: grid;
  gap: 1.6rem;
}

.about__item {
  font-size: 1.8rem;
  color: #e0e0e0;
}

/* Projects grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 2.4rem;
}

.card {
  background-color: #1a1a1a;
  border: 0.2rem solid #2a2a2a;
  border-radius: 1.2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__image {
  width: 100%;
  height: 20rem;
  object-fit: cover;
}

.card__body {
  padding: 2rem;
}

.card__title {
  font-size: 2.4rem;
  margin-bottom: 1.2rem;
  color: #39ff14;
}

.card__text {
  font-size: 1.6rem;
  color: #b0b0b0;
  margin-bottom: 2rem;
}

/* Skills */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
}

.skills__item {
  font-size: 1.6rem;
  padding: 0.8rem 1.6rem;
  border: 0.2rem solid #39ff14;
  border-radius: 0.8rem;
  color: #39ff14;
}

/* Contact */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.contact__link {
  font-size: 1.6rem;
  color: #39ff14;
  text-decoration: none;
  border-bottom: 0.2rem dashed #39ff14;
}

.contact__link:hover {
  color: #2fd40f;
}

/* Footer */
.footer {
  background-color: #0f0f0f;
  padding: 2rem 0;
  text-align: center;
  font-size: 1.4rem;
  color: #b0b0b0;
}

.footer__top {
  display: block;
  margin-top: 1.2rem;
  color: #39ff14;
  text-decoration: none;
}

/* Responsive nav toggle */
@media (max-width: 72rem) {
  .header__theme-toggle {
    margin-right: 1.2rem;
  }
  .header__menu {
    display: inline-block;
  }
  .nav {
    position: absolute;
    top: 6rem;
    right: 2rem;
    background-color: #1a1a1a;
    border: 0.2rem solid #2a2a2a;
    border-radius: 0.8rem;
    padding: 1.2rem;
    display: grid;
    gap: 1.2rem;
    width: 20rem;
  }
  .nav[data-state="closed"] {
    display: none;
  }
}
