:root {
  --green-900: #163b33;
  --green-700: #2f5d50;
  --green-100: #e6eee8;
  --gold: #d6a94a;
  --gold-dark: #a97812;
  --white: #ffffff;
  --gray-50: #f5f7f2;
  --gray-200: #dce3da;
  --gray-500: #68736e;
  --ink: #10231f;
  --shadow: 0 18px 45px rgba(22, 59, 51, 0.14);
  --radius: 8px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--gray-50);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 5rem;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--green-900);
  font-weight: 700;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 242, 0.92);
  border-bottom: 1px solid rgba(22, 59, 51, 0.12);
  backdrop-filter: blur(14px);
}

.navbar {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  color: var(--green-900);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-toggle {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-content: center;
  gap: 0.25rem;
  border: 1px solid rgba(22, 59, 51, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  width: 1.25rem;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: var(--green-900);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  position: fixed;
  inset: 4.75rem 1rem auto;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid rgba(22, 59, 51, 0.12);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-links.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-links a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  color: var(--green-900);
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  background: var(--green-100);
  outline: none;
}

.hero {
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(22, 59, 51, 0.97), rgba(47, 93, 80, 0.9)),
    url("assets/portfolio-hero.png") center / cover,
    var(--green-900);
  color: var(--white);
  padding: 3.75rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 46rem;
}

.eyebrow,
.section-kicker,
.project-status {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.section-grid h2,
.contact h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 14ch;
  font-size: 2.65rem;
}

.hero-text {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.btn {
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease,
    border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-900);
  box-shadow: 0 14px 28px rgba(214, 169, 74, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #e3bb63;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--white);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.social-links a {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(214, 169, 74, 0.65);
  text-underline-offset: 0.3rem;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--white);
}

.hero-visual {
  display: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(7, 22, 18, 0.35);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.section-grid {
  display: grid;
  gap: 2rem;
}

.about-intro {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.profile-photo {
  width: 8.75rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.section-grid h2,
.section-heading h2,
.contact h2 {
  color: var(--green-900);
  font-size: 2rem;
}

.section-copy {
  color: var(--gray-500);
  font-size: 1.05rem;
}

.section-copy p,
.contact p,
.project-card p {
  margin: 0;
}

.skills {
  background: var(--white);
}

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

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.skills-list li {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  border: 1px solid rgba(22, 59, 51, 0.12);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--gray-50);
  color: var(--green-900);
  font-weight: 750;
  box-shadow: 0 10px 25px rgba(22, 59, 51, 0.06);
  transition: transform 180ms ease, border-color 180ms ease;
}

.skills-list li:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 169, 74, 0.75);
}

.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(22, 59, 51, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(22, 59, 51, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 93, 80, 0.26);
  box-shadow: var(--shadow);
}

.featured-card {
  border-top: 4px solid var(--gold);
}

.project-card-header h3,
.project-card h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.35rem;
  line-height: 1.2;
}

.project-card p {
  color: var(--gray-500);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.tech-list li {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.25rem;
}

.btn-card {
  align-self: flex-start;
  border-color: rgba(47, 93, 80, 0.22);
  background: var(--green-900);
  color: var(--white);
}

.btn-card:hover,
.btn-card:focus-visible {
  background: var(--green-700);
}

.btn-card-light {
  background: var(--white);
  color: var(--green-900);
}

.btn-card-light:hover,
.btn-card-light:focus-visible {
  background: var(--green-100);
}

.placeholder-card {
  background: linear-gradient(180deg, var(--white), #f9faf6);
}

.placeholder-card .project-status {
  color: var(--gold-dark);
}

.interactive-preview {
  background: #0f2823;
  color: var(--white);
}

.interactive-panel {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.interactive-copy {
  max-width: 38rem;
}

.interactive-copy h2 {
  margin: 0;
  color: var(--white);
  font-size: 2rem;
  line-height: 1.08;
}

.interactive-copy p:not(.section-kicker) {
  margin: 1rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.78);
}

.interactive-character {
  justify-self: center;
  width: min(16rem, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(214, 169, 74, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(transparent 89%, rgba(214, 169, 74, 0.22) 89%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #163b33;
  background-size: auto, 28px 28px, 28px 28px, auto;
  box-shadow: var(--shadow);
}

.interactive-character img {
  width: 72%;
  max-height: 96%;
  object-fit: contain;
  image-rendering: pixelated;
}

.contact {
  background: var(--white);
}

.contact-panel {
  display: grid;
  gap: 2rem;
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--green-900);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contact h2 {
  color: var(--white);
}

.contact p {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.82);
}

.contact-links {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.contact-links a:not(.btn) {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(214, 169, 74, 0.7);
  text-underline-offset: 0.28rem;
}

.contact-links a:not(.btn):hover,
.contact-links a:not(.btn):focus-visible {
  color: var(--white);
}

.site-footer {
  padding: 1.5rem 0;
  background: #0f2823;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 640px) {
  .hero {
    background:
      linear-gradient(135deg, rgba(22, 59, 51, 0.98), rgba(47, 93, 80, 0.92)),
      var(--green-900);
    padding: 4.5rem 0 3.75rem;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

  .hero-visual {
    display: block;
  }

  .section-grid h2,
  .section-heading h2,
  .contact h2 {
    font-size: 2.4rem;
  }

  .skills-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .section {
    padding: 5.5rem 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-links a {
    padding: 0.65rem 0.85rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.8fr);
  }

  .hero-visual img {
    aspect-ratio: 4 / 3;
  }

  .section-grid,
  .contact-panel,
  .interactive-panel {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .skills-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .featured-card {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 4.35rem;
  }

  .section-grid h2,
  .section-heading h2,
  .contact h2,
  .interactive-copy h2 {
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
