:root {
  --bg: #11111b;
  --bg-soft: #171827;
  --bg-strong: #0b0c14;
  --panel: rgba(16, 18, 29, 0.88);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f4f3ef;
  --muted: #a7adbb;
  --accent: #39d17d;
  --accent-soft: #88f3b5;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --sidebar-width: 260px;
}

body.light {
  --bg: #f2efe8;
  --bg-soft: #ece6d9;
  --bg-strong: #f8f4eb;
  --panel: rgba(255, 252, 247, 0.9);
  --panel-border: rgba(16, 20, 27, 0.18);
  --text: #12151c;
  --muted: #5c6471;
  --accent: #179556;
  --accent-soft: #8cddb0;
  --shadow: 0 28px 70px rgba(26, 24, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(57, 209, 125, 0.18), transparent 18rem),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05), transparent 26rem),
    linear-gradient(135deg, var(--bg-soft), var(--bg));
  font-family: "Manrope", sans-serif;
  transition: background-color 220ms ease, color 220ms ease;
}

body.is-ready .sidebar {
  animation: sidebar-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.is-ready .hero__intro,
body.is-ready .hero__headline,
body.is-ready .hero__body,
body.is-ready .hero__actions,
body.is-ready .hero__stats,
body.is-ready .hero__visual {
  animation: fade-up 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.is-ready .hero__headline {
  animation-delay: 90ms;
}

body.is-ready .hero__body {
  animation-delay: 150ms;
}

body.is-ready .hero__actions {
  animation-delay: 210ms;
}

body.is-ready .hero__stats {
  animation-delay: 270ms;
}

body.is-ready .hero__visual {
  animation-delay: 180ms;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 95%);
}

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

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

.page-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 2rem 1.4rem 1.5rem;
  background: rgba(8, 10, 18, 0.9);
  border-right: 1px solid var(--panel-border);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 2rem;
}

body.light .sidebar {
  background: rgba(255, 251, 243, 0.84);
}

.sidebar__orb {
  position: absolute;
  top: -6rem;
  left: -3rem;
  width: 13rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  filter: saturate(110%);
  animation: float-orb 12s ease-in-out infinite;
}

.sidebar__identity,
.sidebar__nav,
.sidebar__footer {
  position: relative;
  z-index: 1;
}

.sidebar__topbar {
  position: relative;
  z-index: 2;
}

.sidebar__avatar-ring {
  width: 5.5rem;
  aspect-ratio: 1;
  padding: 0.24rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, var(--accent-soft));
  margin-bottom: 1rem;
}

.sidebar__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sidebar__eyebrow,
.section-heading__label,
.section-card__label,
.hero__intro,
.hero__kicker,
.hero__stats dt,
.nav-link,
.sidebar__footer {
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sidebar__eyebrow,
.sidebar__footer,
.hero__intro,
.hero__stats dt,
.section-heading__label,
.section-card__label {
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.sidebar__eyebrow-icon {
  width: 0.82rem;
  height: 0.82rem;
  color: var(--accent);
  flex: 0 0 auto;
}

.sidebar__name {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 0.95;
}

.sidebar__nav {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.nav-link {
  position: relative;
  padding: 0.95rem 0;
  font-size: 0.73rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 180ms ease, padding-left 180ms ease, opacity 180ms ease;
}

body.light .nav-link {
  border-top-color: rgba(16, 20, 27, 0.14);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.65rem;
  height: 1px;
  background: var(--accent);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent-soft);
  padding-left: 1rem;
}

body.light .nav-link:hover,
body.light .nav-link.is-active {
  color: var(--accent);
}

.nav-link:hover::before,
.nav-link.is-active::before {
  transform: translateY(-50%) scaleX(1);
}

.sidebar__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-self: end;
}

.sidebar__footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 180ms ease, transform 180ms ease;
}

.sidebar__footer a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.sidebar__footer-icon {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 3.15rem;
  height: 3.15rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  flex-direction: column;
}

.nav-toggle__line {
  display: block;
  width: 1.7rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #f5f3eb;
  transition: transform 180ms ease, opacity 180ms ease;
}

body.light .nav-toggle__line {
  background: #181a23;
}

.main-panel {
  position: relative;
  padding: 1.2rem;
}

.theme-toggle {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.theme-toggle--desktop {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 8;
}

.theme-toggle--mobile {
  display: none;
}

body.light .theme-toggle {
  background: #181a23;
}

.theme-toggle__sun {
  position: relative;
  display: block;
  width: 1rem;
  height: 1rem;
  margin: auto;
  border-radius: 50%;
  background: #131621;
}

body.light .theme-toggle__sun {
  background: #f5f2e8;
}

.theme-toggle__sun::after {
  content: "";
  position: absolute;
  right: -0.05rem;
  top: -0.18rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  transition: transform 220ms ease;
}

body.light .theme-toggle__sun::after {
  background: #181a23;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.03);
}

.theme-toggle:hover .theme-toggle__sun::after {
  transform: translateX(-0.12rem);
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.panel + .panel {
  margin-top: 1.25rem;
}

.hero {
  min-height: min(46rem, calc(100vh - 2.4rem));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.78fr);
  align-items: center;
  padding: 2.4rem 2.6rem;
  gap: 0.8rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 42rem;
  height: 42rem;
  right: -14rem;
  top: -8rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero::after {
  width: 24rem;
  height: 24rem;
  right: 18%;
  bottom: -8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 32rem;
}

.hero__kicker {
  margin: 0.35rem 0 0.75rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.hero__headline {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.8rem, 7vw, 6.2rem);
  line-height: 0.92;
  max-width: 12ch;
}

.hero__body,
.section-card p,
.project-card p,
.timeline__summary {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.96rem;
}

.hero__actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button--icon {
  gap: 0.55rem;
}

.button__icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.button--primary {
  color: #08110c;
  background: var(--accent);
}

body:not(.light) .button--primary {
  color: #ffffff;
  background: #127245;
}

body.light .button--primary {
  color: #ffffff;
}

.button--ghost {
  border-color: var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}

body.light .button--ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(18, 21, 28, 0.1);
  color: #1b2230;
  box-shadow: 0 12px 28px rgba(26, 24, 20, 0.08);
}

body.light .button--ghost:hover {
  background: rgba(23, 149, 86, 0.09);
  border-color: rgba(23, 149, 86, 0.18);
}

.button--dark {
  border-color: rgba(255, 255, 255, 0.08);
  background: #090b12;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.button--dark:hover {
  background: #111521;
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

body.light .button--dark {
  border-color: rgba(18, 21, 28, 0.1);
  background: #141922;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(26, 24, 20, 0.12);
}

body.light .button--dark:hover {
  background: #1a2230;
  border-color: rgba(18, 21, 28, 0.16);
  color: #ffffff;
}

.hero__stats {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin-top: 1.7rem;
  max-width: 34rem;
}

.hero__stats dd {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero__stat-card dd {
  display: flex;
  align-items: center;
}

.hero__stat-education {
  gap: 0.6rem;
}

.hero__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: rgba(57, 209, 125, 0.14);
  color: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(57, 209, 125, 0.12);
  flex: 0 0 auto;
}

body.light .hero__stat-icon {
  background: rgba(23, 149, 86, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(23, 149, 86, 0.12);
}

.hero__stat-svg {
  width: 0.95rem;
  height: 0.95rem;
}

.hero__stat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, color 180ms ease, opacity 180ms ease;
}

.hero__stat-link:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

.hero__stat-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: rgba(57, 209, 125, 0.14);
  color: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(57, 209, 125, 0.12);
  flex: 0 0 auto;
}

body.light .hero__stat-link-badge {
  background: rgba(23, 149, 86, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(23, 149, 86, 0.12);
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: end;
  width: min(100%, 32rem);
  min-height: clamp(22rem, 34vw, 29rem);
  transition: transform 300ms ease;
}

.hero__backdrop {
  position: absolute;
  border-radius: 50%;
}

.hero__backdrop--large {
  width: clamp(18rem, 88%, 32rem);
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.24);
  right: -4%;
  top: 6%;
  transition: transform 420ms ease, opacity 320ms ease;
}

body.light .hero__backdrop--large {
  background: rgba(17, 21, 28, 0.07);
}

.hero__backdrop--small {
  width: clamp(4.5rem, 12vw, 6.5rem);
  aspect-ratio: 1;
  left: 4%;
  bottom: 14%;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  transition: transform 420ms ease, opacity 320ms ease;
}

body.light .hero__backdrop--small {
  border-color: rgba(18, 21, 28, 0.14);
}

.hero__portrait-frame {
  position: relative;
  width: clamp(17rem, 30vw, 25rem);
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__portrait-bg {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: var(--accent);
}

.hero__portrait {
  position: relative;
  z-index: 1;
  width: 88%;
  height: 88%;
  object-fit: cover;
  object-position: center 24%;
  border-radius: 50%;
  filter: saturate(104%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.hero:hover .hero__portrait-frame {
  transform: translateY(-4px);
}

.hero:hover .hero__portrait {
  transform: scale(1.02);
  filter: saturate(108%);
}

.hero__badge {
  position: absolute;
  left: 1rem;
  bottom: 1.2rem;
  max-width: 12rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--panel-border);
  border-radius: 1.2rem;
  background: rgba(8, 10, 18, 0.58);
  backdrop-filter: blur(10px);
}

body.light .hero__badge {
  background: rgba(255, 250, 243, 0.72);
}

.hero__badge span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.hero__badge strong {
  line-height: 1.45;
  font-size: 0.82rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1rem;
  padding: 2rem;
}

.section-heading h3,
.contact-panel h3 {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.section-card {
  min-height: 13rem;
  padding: 1.4rem;
  border-radius: 1.4rem;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}

body.light .section-card {
  background: rgba(255, 255, 255, 0.45);
}

.section-card--wide {
  grid-column: span 2;
}

.section-card h4 {
  margin: 0.45rem 0 0.65rem;
  font-size: 1.4rem;
}

.section-heading--inline,
.contact-panel {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  padding: 2rem;
}

.timeline,
.project-grid {
  padding: 0 2rem 2rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  gap: 1.2rem;
  align-items: start;
  padding: 1.3rem 0;
  border-top: 1px solid var(--panel-border);
  transition: transform 220ms ease, border-color 220ms ease;
}

.timeline-item:first-child {
  border-top: none;
}

.timeline__date {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.timeline__title {
  margin: 0;
  font-size: 1.18rem;
}

.timeline__company {
  margin: 0.2rem 0 0.6rem;
  color: var(--accent-soft);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.light .timeline__company {
  color: #0f6f43;
}

.timeline__stack {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.project-card {
  min-height: 18rem;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(160deg, rgba(57, 209, 125, 0.16), transparent 35%),
    rgba(255, 255, 255, 0.02);
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

body.light .project-card {
  background:
    linear-gradient(160deg, rgba(23, 149, 86, 0.12), transparent 35%),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 40px rgba(26, 24, 20, 0.06);
}

.project-card h4 {
  margin: 0.5rem 0 0.7rem;
  font-size: 1.35rem;
}

.project-card__tagline {
  color: var(--accent-soft);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.project-card__stack span {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  font-size: 0.72rem;
  transition: transform 180ms ease, background 180ms ease;
}

body.light .project-card__stack span {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(18, 21, 28, 0.1);
  color: #1f2837;
  box-shadow: 0 8px 18px rgba(26, 24, 20, 0.05);
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.project-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 243, 239, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

body.light .project-card__action {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(18, 21, 28, 0.08);
  color: #243041;
  box-shadow: 0 10px 22px rgba(26, 24, 20, 0.05);
}

.project-card__action-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.project-card__action-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.95rem;
  line-height: 1;
}

.project-card__action-icon,
.project-card__action-emoji {
  color: #08110c;
}

.project-card__action > :first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(57, 209, 125, 0.22);
  flex: 0 0 auto;
}

.project-card__action:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 209, 125, 0.24);
  background: rgba(57, 209, 125, 0.1);
  color: #ffffff;
}

body.light .project-card__action:hover {
  background: rgba(23, 149, 86, 0.1);
  border-color: rgba(23, 149, 86, 0.16);
  color: #16202d;
}

.project-card__action--disabled {
  opacity: 0.68;
  cursor: default;
}

.project-card__action--disabled > :first-child {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.project-card__action--disabled:hover {
  transform: none;
  border-color: var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 243, 239, 0.96);
}

body.light .project-card__action--disabled {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.7);
  color: rgba(36, 48, 65, 0.58);
}

body.light .project-card__action--disabled > :first-child {
  background: rgba(18, 21, 28, 0.08);
  color: rgba(36, 48, 65, 0.6);
}

body.light .project-card__action--disabled:hover {
  border-color: rgba(18, 21, 28, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(36, 48, 65, 0.58);
}

.timeline-item:hover,
.project-card:hover,
.contact-panel:hover {
  transform: translateY(-4px);
}

.project-card:hover {
  border-color: rgba(57, 209, 125, 0.24);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.18);
}

.project-card:hover .project-card__stack span {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

body.light .project-card:hover .project-card__stack span {
  background: rgba(255, 255, 255, 1);
}

.timeline-item:hover {
  border-color: rgba(57, 209, 125, 0.18);
}

.motion-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-reveal[data-delay="1"] {
  transition-delay: 70ms;
}

.motion-reveal[data-delay="2"] {
  transition-delay: 140ms;
}

.motion-reveal[data-delay="3"] {
  transition-delay: 210ms;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sidebar-rise {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float-orb {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(10px, 8px, 0);
  }
}

.contact-panel {
  align-items: center;
  flex-wrap: wrap;
}

.contact-form-wrap {
  width: 100%;
  margin-top: 1.2rem;
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.contact-form-wrap iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
}

body.light .contact-form-wrap {
  background: rgba(255, 255, 255, 0.66);
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.72fr);
    gap: 1rem;
  }

  .hero__visual {
    width: min(100%, 27rem);
    min-height: clamp(20rem, 31vw, 25rem);
  }

  .hero__portrait-frame {
    width: clamp(15.5rem, 28vw, 22rem);
  }
}

@media (max-width: 1100px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar__orb {
    display: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    min-height: 0;
    padding: 1rem;
    grid-template-rows: auto;
    gap: 0;
    overflow: visible;
    background: rgba(8, 10, 18, 0.96);
    backdrop-filter: blur(12px);
  }

  body.light .sidebar {
    background: rgba(255, 251, 243, 0.96);
  }

  .sidebar__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 2;
    padding: 0.65rem 0;
  }

  .theme-toggle {
    box-shadow: var(--shadow);
  }

  .theme-toggle--desktop {
    display: none;
  }

  .theme-toggle--mobile {
    display: inline-flex;
    position: static;
    top: auto;
    right: auto;
    z-index: 1;
    flex: 0 0 auto;
    width: 2.9rem;
    height: 2.9rem;
  }

  .sidebar__identity {
    display: none;
  }

  .sidebar__avatar-ring {
    width: 3.6rem;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .sidebar__name {
    font-size: 1.45rem;
  }

  .sidebar__eyebrow {
    display: none;
  }

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

  .sidebar__nav,
  .sidebar__footer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 220ms ease, opacity 180ms ease, margin-top 180ms ease;
  }

  .sidebar.sidebar--open .sidebar__nav,
  .sidebar.sidebar--open .sidebar__footer {
    max-height: 20rem;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar.sidebar--open .sidebar__nav {
    margin-top: 1rem;
  }

  .sidebar.sidebar--open .sidebar__footer {
    margin-top: 1rem;
  }

  .sidebar.sidebar--open .nav-toggle__line:first-child {
    transform: translateY(0.45rem) rotate(45deg);
  }

  .sidebar.sidebar--open .nav-toggle__line:last-child {
    transform: translateY(-0.45rem) rotate(-45deg);
  }

  .main-panel {
    padding: 0.85rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    min-height: auto;
  }

  .hero__visual {
    justify-self: center;
    width: 100%;
    min-height: 20rem;
    order: -1;
  }

  .hero__portrait-frame {
    width: min(20rem, 74vw);
  }

  .section-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-card--wide {
    grid-column: span 1;
  }

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

  .section-heading--inline,
  .contact-panel {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .sidebar__identity {
    display: none;
  }

  .sidebar__topbar {
    justify-content: space-between;
  }

  .sidebar {
    padding: 1.25rem 1rem;
  }

  .sidebar__footer {
    gap: 0.7rem;
  }

  .hero__headline {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .hero__visual {
    min-height: 17rem;
  }

  .hero__portrait-frame {
    width: min(17rem, 78vw);
  }

  .hero__stats {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .hero__badge {
    position: static;
    margin-top: 0.8rem;
    max-width: none;
  }

  .theme-toggle--mobile {
    width: 2.7rem;
    height: 2.7rem;
  }
}

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

  .motion-reveal,
  .motion-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
