:root {
  --ink: #102027;
  --muted: #52646c;
  --paper: #f7fbfa;
  --white: #ffffff;
  --teal: #0f8b8d;
  --teal-dark: #08656a;
  --coral: #f25f4c;
  --gold: #f4b740;
  --mint: #dff7ec;
  --line: rgba(16, 32, 39, 0.12);
  --shadow: 0 22px 55px rgba(16, 32, 39, 0.14);
  --radius: 8px;
  --site-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration-color: rgba(15, 139, 141, 0.45);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-dark);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 251, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  aspect-ratio: 1;
  background: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(16, 32, 39, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle {
  flex-direction: column;
  gap: 5px;
}

.nav-open .nav-toggle::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span {
  opacity: 0;
}

.nav-open .nav-toggle::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-links a {
  padding: 0.72rem 0.78rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 760;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(15, 139, 141, 0.1);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.hero--home {
  min-height: min(760px, 86vh);
}

.hero--home::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(16, 32, 39, 0.94), rgba(16, 32, 39, 0.74) 46%, rgba(16, 32, 39, 0.28)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero--home::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 40%;
  background: linear-gradient(0deg, rgba(16, 32, 39, 0.72), transparent);
}

.hero--home {
  --hero-image: url("../img/coding-desk-student-developer.jpg");
}

.hero-inner {
  position: relative;
  display: grid;
  align-items: center;
  min-height: inherit;
  padding-block: 5rem 4rem;
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: 5.9rem;
}

h2 {
  font-size: 3.1rem;
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0;
}

.hero-text {
  max-width: 62ch;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.25rem;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 25px rgba(15, 139, 141, 0.28);
}

.button:hover {
  color: var(--white);
  background: var(--teal-dark);
}

.button--ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

.button--ghost:hover {
  color: var(--ink);
  background: var(--white);
}

.button--light {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  box-shadow: none;
}

.button--light:hover {
  color: var(--white);
  background: var(--ink);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 720px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.hero-facts strong {
  display: block;
  font-size: 1.7rem;
}

.hero-facts span {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

.hero-portrait {
  position: absolute;
  right: max(0rem, calc((100vw - var(--site-width)) / 2));
  bottom: 0;
  width: clamp(190px, 26vw, 360px);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.38));
}

.band {
  padding-block: clamp(3.8rem, 8vw, 7rem);
}

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

.band--mint {
  background: var(--mint);
}

.band--ink {
  color: var(--white);
  background: var(--ink);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: 2rem;
}

.section-header p,
.lead {
  color: var(--muted);
  font-size: 1.12rem;
}

.band--ink .section-header p,
.band--ink .lead {
  color: rgba(255, 255, 255, 0.75);
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.band--ink .eyebrow {
  color: var(--gold);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.image-panel {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.portrait-panel {
  display: grid;
  place-items: end center;
  padding: 1.25rem 1.25rem 0;
  background: linear-gradient(135deg, var(--ink), var(--teal-dark));
}

.portrait-panel img {
  width: min(100%, 420px);
  max-height: 620px;
  aspect-ratio: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
}

.metric-grid,
.card-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric,
.card,
.skill,
.contact-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 35px rgba(16, 32, 39, 0.08);
}

.metric,
.skill,
.contact-tile {
  padding: 1.2rem;
}

.metric strong {
  display: block;
  color: var(--teal-dark);
  font-size: 2rem;
  line-height: 1;
}

.metric span,
.skill p,
.card p,
.contact-tile p,
.timeline p {
  color: var(--muted);
}

.card {
  display: grid;
  overflow: hidden;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  padding: 0.3rem 0.55rem;
  color: var(--teal-dark);
  background: rgba(15, 139, 141, 0.1);
  border: 1px solid rgba(15, 139, 141, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 1.3rem;
  align-items: stretch;
}

.feature-copy {
  display: grid;
  gap: 1rem;
  align-content: center;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), #163f42);
  border-radius: var(--radius);
}

.feature-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.timeline {
  display: grid;
  gap: 1rem;
  border-left: 3px solid rgba(15, 139, 141, 0.25);
  padding-left: 1.2rem;
}

.timeline-item {
  position: relative;
  padding: 0.25rem 0 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.2rem - 8px);
  top: 0.55rem;
  width: 13px;
  aspect-ratio: 1;
  background: var(--teal);
  border: 3px solid var(--paper);
  border-radius: 50%;
}

.timeline time {
  display: block;
  color: var(--teal-dark);
  font-weight: 900;
}

.page-hero {
  min-height: 390px;
  display: grid;
  align-items: end;
  padding-block: clamp(4rem, 9vw, 7rem) 3.2rem;
}

.page-hero--about {
  --hero-image: url("../img/creative-coding-workspace.jpg");
}

.page-hero--projects,
.page-hero--nono {
  --hero-image: url("../img/nono-gravity-game-world.jpg");
}

.page-hero--learning {
  --hero-image: url("../img/coding-desk-student-developer.jpg");
}

.page-hero--contact {
  --hero-image: url("../img/creative-coding-workspace.jpg");
}

.page-hero h1 {
  max-width: 14ch;
}

.page-hero p {
  max-width: 62ch;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
}

.split-list {
  display: grid;
  gap: 1rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.split-list li {
  padding: 1rem;
  background: rgba(15, 139, 141, 0.08);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.detail-list strong {
  color: var(--teal-dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-tile a {
  overflow-wrap: anywhere;
  font-weight: 850;
}

.site-footer {
  padding: 2rem 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover {
  color: var(--gold);
}

@media (max-width: 920px) {
  h1 {
    font-size: 4.4rem;
  }

  h2 {
    font-size: 2.55rem;
  }

  .section-header,
  .two-column,
  .feature-row,
  .project-detail {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .card-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-portrait {
    opacity: 0.42;
    width: clamp(190px, 38vw, 310px);
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 3.15rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hero-text,
  .page-hero p,
  .section-header p,
  .lead {
    font-size: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: 72px 0 auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.8rem 1rem 1.2rem;
    background: rgba(247, 251, 250, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(16, 32, 39, 0.16);
  }

  .nav-open .nav-links {
    display: grid;
  }

  .nav-links a {
    padding: 0.95rem 0.8rem;
  }

  .hero--home {
    min-height: auto;
  }

  .hero--home::before {
    background-image:
      linear-gradient(180deg, rgba(16, 32, 39, 0.96), rgba(16, 32, 39, 0.76)),
      var(--hero-image);
  }

  .hero-inner {
    padding-block: 4rem 2.5rem;
  }

  .hero-portrait {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(260px, 68vw);
    margin-top: 1.5rem;
    opacity: 1;
  }

  .hero-facts,
  .metric-grid,
  .card-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    min-height: 330px;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  h1 {
    font-size: 3.4rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .hero--home {
    min-height: auto;
  }

  .hero-inner {
    padding-block: 3.2rem 2rem;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .page-hero {
    min-height: 300px;
    padding-block: 3rem 2rem;
  }
}

@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;
  }
}
