:root {
  --bg: #d9e1d3;
  --bg-soft: #f5f1ea;
  --surface: rgba(245, 241, 234, 0.74);
  --surface-strong: rgba(255, 251, 246, 0.9);
  --text: #181816;
  --muted: #596156;
  --line: rgba(24, 24, 22, 0.1);
  --accent: #9a8ac3;
  --accent-soft: rgba(154, 138, 195, 0.16);
  --shadow: 0 20px 60px rgba(24, 24, 22, 0.08);
  --shadow-soft: 0 12px 34px rgba(24, 24, 22, 0.06);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --container: 1180px;
  --transition: 280ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 251, 246, 0.65), transparent 32%),
    linear-gradient(180deg, #dce5d6 0%, #d4ddd0 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

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

.section {
  padding: 4.8rem 0;
  position: relative;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(12px);
  opacity: 0.42;
}

.page-glow-left {
  top: -8rem;
  left: -10rem;
  background: rgba(154, 138, 195, 0.16);
}

.page-glow-right {
  right: -8rem;
  top: 26rem;
  background: rgba(255, 251, 246, 0.5);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(217, 225, 211, 0.94);
  border-bottom: 1px solid rgba(24, 24, 22, 0.06);
  transition: box-shadow 220ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 18px rgba(24, 24, 22, 0.04);
}

.nav-shell {
  min-height: 5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #c0b0e2 100%);
  box-shadow: 0 0 0 8px rgba(154, 138, 195, 0.12);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.site-nav a,
.mobile-menu a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color var(--transition);
}

.site-nav a:hover,
.mobile-menu a:hover,
.site-nav a:focus-visible,
.mobile-menu a:focus-visible {
  color: var(--text);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.nav-cta {
  padding: 0.85rem 1.2rem;
  background: rgba(255, 251, 246, 0.8);
  border: 1px solid rgba(24, 24, 22, 0.08);
  font-weight: 700;
}

.nav-cta:hover,
.button:hover {
  box-shadow: var(--shadow-soft);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(24, 24, 22, 0.08);
  border-radius: 50%;
  background: rgba(255, 251, 246, 0.75);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}

.menu-toggle span {
  width: 1rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-open span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  padding: 0 1rem 1rem;
  flex-direction: column;
  gap: 0.9rem;
}

.mobile-menu.is-open {
  display: flex;
}

.hero {
  padding-top: 2.2rem;
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.8fr);
  gap: 1.6rem;
  align-items: end;
}

.eyebrow,
.card-label,
.project-type,
.meta,
.fact-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.eyebrow,
.card-label,
.meta,
.fact-label {
  color: var(--muted);
}

.hero-copy h1,
.section-heading h2,
.footer-copy h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero-copy h1 {
  max-width: 12ch;
  margin-top: 0.7rem;
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
}

.hero-intro {
  max-width: 56ch;
  margin: 1.25rem 0 0;
  font-size: 1.02rem;
  color: rgba(24, 24, 22, 0.82);
}

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

.button {
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--text);
  color: #fdfbf7;
}

.button-secondary {
  background: rgba(255, 251, 246, 0.76);
  border-color: rgba(24, 24, 22, 0.08);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-facts div,
.hero-card,
.content-card,
.skill-card,
.timeline-card,
.detail-card,
.project-card,
.contribution-shell,
.contact-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 260ms ease, border-color 260ms ease;
}

.hero-facts div {
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
}

.hero-facts strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.98rem;
}

.hero-card {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.hero-card-media {
  margin-bottom: 1rem;
}

.hero-portrait-shell {
  position: relative;
  overflow: hidden;
  min-height: 18rem;
  border-radius: 28px;
  border: 1px solid rgba(24, 24, 22, 0.06);
  background:
    radial-gradient(circle at 20% 20%, rgba(154, 138, 195, 0.24), transparent 36%),
    linear-gradient(180deg, rgba(255, 251, 246, 0.95), rgba(229, 236, 224, 0.92));
}

.hero-portrait {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-portrait.is-missing {
  display: none;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(24, 24, 22, 0.34);
}

.hero-card-content h2 {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.hero-card h2 {
  margin: 0.3rem 0 0;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-card p {
  margin: 0.85rem 0 0;
  color: rgba(24, 24, 22, 0.8);
}

.hero-points {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  padding-left: 1.2rem;
  margin-top: 0.6rem;
}

.hero-points li::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.marquee {
  margin-top: 2.4rem;
  overflow: hidden;
  border-top: 1px solid rgba(24, 24, 22, 0.08);
  border-bottom: 1px solid rgba(24, 24, 22, 0.08);
  background: rgba(255, 251, 246, 0.24);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3rem;
  padding: 0.9rem 0;
  animation: marquee 36s linear infinite;
}

.marquee-track span {
  font-size: clamp(0.98rem, 1.7vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(24, 24, 22, 0.64);
  white-space: nowrap;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1.6rem;
  align-items: start;
}

.section-heading h2,
.footer-copy h2 {
  max-width: 12ch;
  margin-top: 0.55rem;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.content-card,
.timeline-card,
.detail-card,
.project-card {
  border-radius: var(--radius-lg);
}

.content-card {
  padding: 1.7rem;
}

.content-card p {
  margin: 0;
  font-size: 1rem;
  color: rgba(24, 24, 22, 0.82);
}

.content-card p + p {
  margin-top: 0.95rem;
}

.skills-grid,
.details-grid,
.projects-grid,
.contribution-grid {
  display: grid;
  gap: 1rem;
}

.skills-grid {
  margin-top: 1.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.skill-card h3,
.timeline-card h3,
.detail-card strong,
.project-card h3,
.contribution-grid h3 {
  margin: 0.4rem 0 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.skill-card h3 {
  font-size: 1.38rem;
}

.skill-card ul,
.timeline-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.skill-card li,
.timeline-card li {
  margin-top: 0.48rem;
  color: rgba(24, 24, 22, 0.82);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.timeline-card,
.detail-card {
  padding: 1.6rem;
}

.meta {
  margin-top: 0.6rem;
}

.details-grid {
  margin-top: 1rem;
  grid-template-columns: 1.15fr 0.82fr 0.95fr;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.chip,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 251, 246, 0.78);
  border: 1px solid rgba(24, 24, 22, 0.06);
  font-size: 0.9rem;
}

.mini-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(24, 24, 22, 0.08);
}

.projects-grid {
  margin-top: 1.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  padding: 1.55rem;
}

.project-card:hover,
.skill-card:hover,
.timeline-card:hover,
.detail-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(154, 138, 195, 0.24);
}

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

.project-type {
  color: var(--accent);
}

.project-card p {
  color: rgba(24, 24, 22, 0.82);
}

.project-card h3 {
  font-size: 1.35rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.text-link {
  display: inline-flex;
  margin-top: 1.15rem;
  color: var(--text);
  font-weight: 700;
  position: relative;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform var(--transition);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
}

.contribution-shell {
  border-radius: 36px;
  padding: 1.8rem;
}

.contribution-grid {
  margin-top: 1.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contribution-grid article {
  padding: 1.2rem 0;
  border-top: 1px solid rgba(24, 24, 22, 0.08);
}

.contribution-grid p {
  max-width: 40ch;
  margin-bottom: 0;
  color: rgba(24, 24, 22, 0.82);
}

.site-footer {
  padding-top: 0.5rem;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 1.6rem;
  align-items: start;
}

.footer-copy p:last-child {
  max-width: 46ch;
  margin-top: 1rem;
  color: rgba(24, 24, 22, 0.8);
}

.contact-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
}

.contact-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(24, 24, 22, 0.08);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-row span {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-row a {
  transition: color var(--transition);
}

.contact-row a:hover,
.contact-row a:focus-visible {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-delay {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}

@media (max-width: 1040px) {
  .site-nav,
  .nav-cta {
    display: none;
  }

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

  .hero-grid,
  .split-layout,
  .footer-shell,
  .timeline-grid,
  .details-grid,
  .projects-grid,
  .skills-grid,
  .contribution-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .section-heading h2,
  .footer-copy h2 {
    max-width: none;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .hero-portrait-shell {
    min-height: 16rem;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 3.8rem 0;
  }

  .nav-shell {
    min-height: 4.5rem;
  }

  .brand {
    font-size: 0.88rem;
  }

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

  .hero-copy h1 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .hero-intro,
  .content-card p,
  .project-card p,
  .contribution-grid p,
  .footer-copy p:last-child {
    font-size: 0.98rem;
  }

  .hero-card,
  .content-card,
  .skill-card,
  .timeline-card,
  .detail-card,
  .project-card,
  .contribution-shell,
  .contact-card {
    padding: 1.25rem;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .mini-list div {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-portrait-shell {
    min-height: 14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
