:root {
  color-scheme: light;
  --bg: #fbfdfc;
  --bg-band: #f0f7f3;
  --surface: #ffffff;
  --surface-soft: #eef7f1;
  --text: #171923;
  --muted: #626875;
  --quiet: #718078;
  --line: #dce8e1;
  --accent: #168a4a;
  --accent-strong: #0f6f3a;
  --accent-soft: #dff3e7;
  --success: #16a34a;
  --shadow: 0 24px 70px rgba(22, 138, 74, 0.14);
  --soft-shadow: 0 18px 46px rgba(28, 92, 58, 0.08);
  --radius: 8px;
  --max-width: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1512;
  --bg-band: #15211a;
  --surface: #1a231f;
  --surface-soft: #203229;
  --text: #f2f4f8;
  --muted: #b6c5bd;
  --quiet: #879a90;
  --line: #2e4438;
  --accent: #4ade80;
  --accent-strong: #86efac;
  --accent-soft: #193c29;
  --success: #4ade80;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 42%, transparent) 0, transparent 520px),
    linear-gradient(225deg, color-mix(in srgb, var(--surface-soft) 52%, transparent) 0, transparent 620px),
    var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

button {
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(122deg, transparent 0 31%, color-mix(in srgb, var(--accent-soft) 42%, transparent) 31% 51%, transparent 51% 100%),
    linear-gradient(24deg, transparent 0 48%, color-mix(in srgb, var(--bg-band) 54%, transparent) 48% 65%, transparent 65% 100%);
  opacity: 0.48;
  transform: translate3d(0, var(--parallax-offset, 0px), 0);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

img,
svg {
  display: block;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 92px 1fr 48px;
  gap: 1rem;
  align-items: center;
  width: min(100% - 2rem, var(--max-width));
  min-height: 80px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

.theme-toggle svg,
.button svg,
.card-icon svg,
.skill-icon svg,
.contact-icon svg,
.highlight-pill svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-moon,
:root[data-theme="dark"] .icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100% - 2rem, var(--max-width));
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 2.15rem 0 2.6rem;
  text-align: center;
}

.avatar-wrap {
  width: 152px;
  height: 152px;
  padding: 5px;
  border: 2px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  box-shadow: 0 22px 70px rgba(22, 138, 74, 0.18);
  transform: translate3d(0, calc(var(--hero-parallax, 0px) * -0.12), 0);
  will-change: transform;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  border: 5px solid var(--bg);
  border-radius: 50%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.45rem 0 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--soft-shadow);
  transform: translate3d(0, calc(var(--hero-parallax, 0px) * -0.06), 0);
  will-change: transform;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 16%, transparent);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.05;
}

h1 {
  max-width: 880px;
  margin-top: 1.45rem;
  font-size: 3.65rem;
  font-weight: 850;
  line-height: 1.04;
}

h1 span {
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #34d399));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typing-heading {
  min-height: 1.08em;
}

.typing-heading .typed-prefix {
  background: none;
  color: var(--text);
}

.typing-heading .typed-name {
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #34d399));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typing-cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.09em;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(0.08em);
  animation: cursor-blink 900ms steps(2, start) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

h2 {
  font-size: 2.45rem;
  font-weight: 850;
}

h3 {
  font-size: 1.18rem;
  font-weight: 800;
}

.role-line {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.14rem;
  font-weight: 700;
}

.hero-lede {
  max-width: 720px;
  margin: 0.95rem auto 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  min-height: 48px;
  padding: 0.72rem 1.08rem;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button-primary {
  border: 1px solid var(--accent-strong);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

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

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--soft-shadow);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 2rem;
  width: min(680px, 100%);
  margin-top: 2.45rem;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: var(--accent);
  font-size: 1.82rem;
  font-weight: 850;
  line-height: 1;
}

.hero-stats span {
  margin-top: 0.45rem;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2.4rem;
  color: var(--quiet);
  font-size: 0.82rem;
  font-weight: 500;
}

.scroll-cue span {
  position: relative;
  width: 25px;
  height: 38px;
  border: 2px solid color-mix(in srgb, var(--quiet) 58%, transparent);
  border-radius: 999px;
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.section {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 5.4rem 0;
}

.section-heading {
  margin-bottom: 2.35rem;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: end;
}

.center-heading {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.section-heading p,
.about-card p,
.timeline-top p,
.timeline-card li,
.project-card p,
.featured-project p,
.education-card p,
.contact-card span {
  color: var(--muted);
}

.section-heading > p,
.split-heading > p,
.center-heading p:last-child {
  margin: 0;
  font-size: 1rem;
}

.center-heading p:last-child {
  margin-top: 1rem;
}

.about-grid,
.project-grid,
.skills-grid,
.contact-grid {
  display: grid;
  gap: 1.1rem;
}

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

.about-card,
.project-card,
.skill-group,
.education-card,
.contact-card,
.featured-project,
.timeline-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--soft-shadow);
}

.about-card,
.project-card {
  padding: 1.45rem;
}

.card-icon,
.skill-icon,
.contact-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.15rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent);
}

.about-card h3,
.project-card h3 {
  margin-bottom: 0.7rem;
}

.about-card p,
.project-card p {
  margin: 0;
}

.band-section {
  width: 100%;
  max-width: none;
  background: var(--bg-band);
}

.band-section > .section-heading,
.timeline {
  width: min(100% - 2rem, var(--max-width));
  margin-right: auto;
  margin-left: auto;
}

.timeline {
  position: relative;
  display: grid;
  gap: 2.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: color-mix(in srgb, var(--accent) 46%, transparent);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 1rem;
}

.timeline-dot {
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 9px solid var(--bg-band);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 42%, transparent);
}

.timeline-content {
  padding: 1.65rem;
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: start;
}

.timeline-top h3 {
  margin-bottom: 0.35rem;
}

.timeline-top p {
  margin: 0;
  font-size: 1rem;
}

.timeline-top span {
  flex: 0 0 auto;
  color: var(--quiet);
  font-weight: 800;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.timeline-card ul {
  display: grid;
  gap: 0.65rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline-card li {
  position: relative;
  padding-left: 1.15rem;
}

.timeline-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.projects-section,
.skills-section,
.education-section,
.contact-section {
  border-top: 1px solid var(--line);
}

.featured-project {
  padding: 2rem;
  margin-bottom: 1.2rem;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--surface-soft) 76%, transparent), transparent 70%),
    var(--surface);
}

.featured-project h3 {
  max-width: 790px;
  margin-bottom: 0.85rem;
  font-size: 1.65rem;
}

.featured-project p {
  max-width: 860px;
  margin: 0;
  font-size: 1rem;
}

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

.project-label {
  margin: 0 0 0.7rem;
  color: var(--quiet);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stack-list,
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.stack-list span,
.skill-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.36rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

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

.skill-group {
  padding: 1.6rem;
  min-height: 420px;
  text-align: center;
}

.skill-icon {
  margin-right: auto;
  margin-left: auto;
}

.skill-group h3 {
  margin-bottom: 1rem;
}

.skill-group .skill-tags {
  justify-content: center;
}

.education-section {
  width: 100%;
  max-width: none;
  background: var(--bg-band);
}

.education-section > .section-heading,
.education-card {
  width: min(100% - 2rem, var(--max-width));
  margin-right: auto;
  margin-left: auto;
}

.education-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.8rem;
  max-width: 760px;
}

.education-card .card-icon {
  margin-bottom: 0;
}

.education-card h3 {
  margin-bottom: 0.5rem;
}

.education-card p {
  margin: 0;
}

.contact-section {
  text-align: center;
}

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

.contact-card {
  display: grid;
  justify-items: center;
  padding: 1.55rem 1rem;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.contact-card .contact-icon {
  margin-bottom: 1rem;
}

.contact-card strong {
  font-size: 1.05rem;
}

.contact-card span {
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}

.is-placeholder {
  color: var(--quiet);
}

.final-cta {
  margin-top: 2.2rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 74px 1fr 48px;
  }

  .nav-links {
    gap: 1rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2rem;
  }

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

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr 48px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .avatar-wrap {
    width: 132px;
    height: 132px;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .role-line,
  .hero-lede {
    font-size: 0.96rem;
  }

  .hero-stats,
  .split-heading,
  .about-grid,
  .project-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    display: none;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-top {
    display: grid;
  }

  .highlight-pill {
    align-items: flex-start;
  }

  .section {
    padding: 3.9rem 0;
  }

  .skill-group {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .site-header,
  .hero,
  .section,
  .band-section > .section-heading,
  .timeline,
  .education-section > .section-heading,
  .education-card,
  .site-footer {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .button,
  .hero-actions {
    width: 100%;
  }

  .status-pill {
    align-items: flex-start;
    text-align: left;
  }

  h1 {
    font-size: 1.92rem;
  }

  h2 {
    font-size: 1.52rem;
  }

  .featured-project,
  .timeline-content,
  .education-card {
    padding: 1.2rem;
  }

  .featured-project h3 {
    font-size: 1.45rem;
  }
}
