:root,
html[data-theme="dark"] {
  --bg: #14110e;
  --text: #f4efe6;
  --text-body: #b8afa3;
  --text-muted: #8a8176;
  --highlight: #1c1915;
  --line: rgba(244, 239, 230, 0.22);
  --toggle-shell: #1c1915;
  --toggle-track: #2a2622;
  --toggle-thumb: #f4efe6;
  --toggle-icon: #f4efe6;
  --brand: #f06738;
  --grad: linear-gradient(
    135deg,
    hsla(303, 79%, 76%, 1) 0%,
    hsla(318, 80%, 73%, 1) 22%,
    hsla(338, 84%, 70%, 1) 48%,
    hsla(360, 86%, 67%, 1) 76%,
    #f06738 100%
  );
  --max: 38rem;
}

html[data-theme="light"] {
  --bg: #f4efe6;
  --text: #14110e;
  --text-body: #5c564e;
  --text-muted: #8a8176;
  --highlight: #e8e0d4;
  --line: rgba(20, 17, 14, 0.16);
  --toggle-shell: #fffdf8;
  --toggle-track: #ddd5c8;
  --toggle-thumb: #ffffff;
  --toggle-icon: #14110e;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.theme-toggle {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 1.15rem;
  left: 1.15rem;
  z-index: 20;
  width: 4.6rem;
  height: 2.25rem;
  padding: 0.22rem;
  border: 0;
  border-radius: 999px;
  background: var(--toggle-shell);
  box-shadow: 0 6px 18px rgba(20, 17, 14, 0.18);
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme="dark"] .theme-toggle {
  box-shadow:
    0 0 0 1px rgba(244, 239, 230, 0.32),
    0 8px 22px rgba(0, 0, 0, 0.45);
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 100%;
  border-radius: inherit;
  background: var(--toggle-track);
}

.theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 0.19rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--toggle-thumb);
  box-shadow: 0 1px 3px rgba(20, 17, 14, 0.18);
  transform: translateY(-50%);
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

html[data-theme="dark"] .theme-toggle-thumb {
  left: auto;
  right: 0.19rem;
  transform: translateY(-50%);
}

.theme-toggle-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--toggle-icon);
  pointer-events: none;
}

html[data-theme="dark"] .theme-toggle-icon:last-child {
  color: #14110e;
}

html[data-theme="dark"] .theme-toggle-icon:last-child svg {
  transform: translate(0.08rem, 0.02rem);
}

.theme-toggle-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.hero {
  max-width: 72rem;
  animation: fade-up 0.7s ease both;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.portrait {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 40%;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--text-body);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0.75rem 0.14rem hsla(338, 84%, 70%, 0.75);
  animation: status-pulse 2.2s ease-out infinite;
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0.75rem 0.14rem hsla(338, 84%, 70%, 0.75);
  }
  70% {
    box-shadow:
      0 0 0.75rem 0.14rem hsla(338, 84%, 70%, 0.4),
      0 0 0 0.75rem hsla(303, 79%, 76%, 0);
  }
  100% {
    box-shadow: 0 0 0.75rem 0.14rem hsla(338, 84%, 70%, 0.75);
  }
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

.content {
  margin-top: 3.5rem;
  display: grid;
  gap: 2.5rem;
  animation: fade-up 0.7s ease 0.15s both;
}

.about {
  max-width: var(--max);
}

.about p {
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-body);
}

.about p + p {
  margin-top: 1.35rem;
}

.about strong {
  font-weight: 700;
  color: var(--text);
}

.about a {
  color: #f06738;
  font-weight: 400;
  text-decoration: none;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-shadow: inset 0 -0.09em 0 hsla(338, 84%, 70%, 0.9);
}

.about a:hover {
  filter: brightness(1.08);
}

.highlight {
  min-width: 0;
}

.highlight-intro {
  margin-bottom: 1.15rem;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
}

.accordion details {
  border-top: 1px solid var(--line);
}

.accordion details:last-child {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::marker {
  content: "";
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.accordion summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.accordion-plus {
  position: relative;
  flex-shrink: 0;
  width: 0.8rem;
  height: 0.8rem;
}

.accordion-plus::before,
.accordion-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-plus::before {
  width: 100%;
  height: 1.5px;
}

.accordion-plus::after {
  width: 1.5px;
  height: 100%;
}

.accordion details.is-expanded .accordion-plus::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.accordion-panel {
  overflow: hidden;
  height: 0;
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion:not(.is-ready) details[open] .accordion-panel {
  height: auto;
}

.accordion details p {
  padding: 0 0 1.05rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: var(--grad);
  color: #fffdf8;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  gap: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 8px 22px hsla(338, 70%, 55%, 0.32);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover,
.cta:focus-visible {
  filter: brightness(1.07);
  box-shadow: 0 10px 26px hsla(338, 70%, 55%, 0.42);
}

.cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

.back-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.text-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.25rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.text-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

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

.resume-lede {
  max-width: 36rem;
  margin-top: 1.15rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-body);
}

.resume-kicker {
  margin: 3.25rem 0 1.5rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.resume-education .resume-kicker {
  margin-top: 1.25rem;
}

.timeline {
  --dot: 0.95rem;
  --rail: 1.35rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-areas:
    "rail when"
    "rail body";
  column-gap: 1rem;
  align-items: stretch;
}

.timeline-when {
  grid-area: when;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  min-height: var(--dot);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--text);
}

.timeline-range {
  font-weight: 500;
  color: var(--text-muted);
}

.timeline-rail {
  grid-area: rail;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 99px;
  background-color: var(--brand);
  background-image: var(--grad);
}

.timeline-item:first-child .timeline-rail::before {
  top: calc(var(--dot) / 2);
}

.timeline-item:last-child .timeline-rail::before {
  bottom: auto;
  height: calc(var(--dot) / 2);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: var(--dot);
  height: var(--dot);
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 0.22rem var(--bg);
}

.timeline-item.is-current .timeline-dot {
  box-shadow:
    0 0 0 0.22rem var(--bg),
    0 0 0.85rem 0.16rem hsla(338, 84%, 70%, 0.8);
}

.timeline-body {
  grid-area: body;
  padding-top: 0.45rem;
  padding-bottom: 2.6rem;
}

.timeline-item:last-child .timeline-body {
  padding-bottom: 0;
}

.timeline-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.timeline-org {
  margin-top: 0.2rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-place {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.timeline-body p:not(.timeline-org):not(.timeline-place) {
  margin-top: 0.7rem;
  max-width: 38rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-body);
}

.timeline-compact .timeline-body {
  padding-top: 0.1rem;
  padding-bottom: 1.5rem;
}

.timeline-compact .timeline-item:last-child .timeline-body {
  padding-bottom: 0;
}

.resume-cta-wrap {
  max-width: 22rem;
  margin-top: 3.5rem;
}

footer {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5.5rem;
  animation: fade-up 0.7s ease 0.25s both;
}

footer p {
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
}

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

@media (min-width: 768px) {
  .theme-toggle {
    top: auto;
    right: auto;
    bottom: 1.5rem;
    left: 1.75rem;
  }

  main {
    padding: 8rem 2.5rem 5rem;
  }

  .content {
    margin-top: 4.5rem;
  }

  .timeline-item {
    grid-template-columns: 7.75rem var(--rail) minmax(0, 42rem);
    grid-template-areas: "when rail body";
    column-gap: 0.2rem;
  }

  .timeline-when {
    display: block;
    padding-right: 1.15rem;
    text-align: right;
    line-height: 1.25;
  }

  .timeline-range {
    display: block;
    margin-top: 0.2rem;
  }

  .timeline-body {
    padding-top: 0;
    padding-left: 1.35rem;
  }

  .timeline-compact .timeline-body {
    padding-top: 0;
  }

  footer {
    padding: 4rem 2.5rem 6.5rem;
  }
}

@media (min-width: 960px) {
  .content {
    grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
    align-items: start;
    gap: 3.5rem;
  }

  .about {
    max-width: none;
  }

  .sidebar {
    position: sticky;
    top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .content,
  footer,
  body,
  .highlight,
  .cta,
  .theme-toggle-thumb,
  .status-dot,
  .accordion-plus::before,
  .accordion-plus::after,
  .accordion-panel {
    animation: none;
    transition: none;
  }
}

@media print {
  .theme-toggle,
  .back-link,
  .resume-cta-wrap,
  .cta,
  .text-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #14110e;
  }

  .timeline-rail::before {
    background: #14110e;
  }

  .timeline-dot,
  .status-dot {
    box-shadow: none;
    animation: none;
  }
}
