:root {
  color-scheme: light dark;
  --font-heading: "Manrope", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --bg: #f4f4ee;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-strong: #fffdf7;
  --text: #1e2722;
  --text-muted: #5d6a62;
  --border: rgba(48, 72, 60, 0.14);
  --accent: #0d7b70;
  --accent-strong: #08635b;
  --accent-soft: rgba(13, 123, 112, 0.12);
  --accent-warm: #c76a34;
  --shadow: 0 20px 45px rgba(20, 33, 26, 0.09);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: min(1160px, calc(100vw - 32px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1514;
    --bg-elevated: rgba(17, 24, 23, 0.86);
    --bg-strong: #13201d;
    --text: #edf4ef;
    --text-muted: #a8bbb1;
    --border: rgba(173, 210, 193, 0.14);
    --accent: #44b7a7;
    --accent-strong: #78d3c8;
    --accent-soft: rgba(68, 183, 167, 0.16);
    --accent-warm: #f0a16a;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(199, 106, 52, 0.12), transparent 34%),
    radial-gradient(circle at right 20%, rgba(13, 123, 112, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-strong), var(--bg));
  color: var(--text);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  width: var(--container);
  margin: 0 auto;
  padding: 10px 0 48px;
}

main {
  display: grid;
  gap: 10px;
}

.hero,
.section,
.footer {
  position: relative;
}

.hero {
  padding: 0 0 24px;
}

.topbar {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(244, 244, 238, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 38px rgba(16, 27, 22, 0.12);
}

@media (prefers-color-scheme: dark) {
  .topbar {
    background: rgba(10, 17, 16, 0.78);
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-muted);
  align-items: center;
}

.topbar-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-links a {
  position: relative;
  transition: color 180ms ease, transform 180ms ease;
}

.topbar-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.topbar-links a:hover,
.topbar-links a:focus-visible,
.contact-pills a:hover,
.contact-pills a:focus-visible,
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.topbar-links a:hover::after,
.topbar-links a:focus-visible::after {
  transform: scaleX(1);
}

.topbar-links a.is-active {
  color: var(--text);
}

.topbar-links a.is-active::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.hero-copy,
.hero-card,
.metrics article,
.card {
  background: var(--bg-elevated);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 36px;
  border-radius: var(--radius-xl);
  animation: float-in 600ms ease both;
}

.hero-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 24px;
  align-self: start;
  animation: float-in 720ms ease both;
}

.eyebrow,
.meta-label,
.project-badge,
.timeline-role {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.8rem, 4vw, 5rem);
  margin-top: 14px;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: 1.32rem;
}

.lead {
  max-width: 56ch;
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--text);
}

.summary,
.prose-card p,
.project-card p,
.credentials-card p {
  color: var(--text-muted);
  line-height: 1.72;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #fff;
}

.button-nav {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.94rem;
}

.button-secondary {
  border-color: var(--border);
  background: transparent;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.contact-pills a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--border);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

@media (prefers-color-scheme: dark) {
  .contact-pills a {
    background: rgba(255, 255, 255, 0.04);
  }
}

.contact-pills a:hover,
.contact-pills a:focus-visible {
  border-color: rgba(13, 123, 112, 0.35);
  background: var(--accent-soft);
}

.contact-pills svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.avatar-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 1px solid var(--border);
}

.avatar-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  inset: auto -22% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(8px);
}

.hero-meta {
  display: grid;
  gap: 16px;
}

.hero-meta p:last-child,
.meta-label {
  margin-bottom: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.metrics article {
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  animation: float-in 840ms ease both;
}

.metrics strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.metrics span {
  color: var(--text-muted);
  line-height: 1.55;
}

.section {
  padding-top: 52px;
  scroll-margin-top: 112px;
}

body.ui-ready .section {
  opacity: 0;
  transform: translateY(42px);
  filter: blur(10px);
  transition:
    opacity 680ms ease,
    transform 680ms ease,
    filter 680ms ease;
}

.section::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(68, 183, 167, 0.34), transparent);
}

.section::after {
  content: "";
  position: absolute;
  top: -8px;
  right: min(4vw, 48px);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(68, 183, 167, 0.16), transparent 72%);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 680ms ease 80ms, transform 680ms ease 80ms;
  pointer-events: none;
}

body.ui-ready .section.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: none;
}

.section.is-visible::after {
  opacity: 1;
  transform: scale(1);
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  grid-column: 1 / -1;
  max-width: 760px;
  padding-bottom: 8px;
}

body.ui-ready .section-heading {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 560ms ease 60ms, transform 560ms ease 60ms;
}

.section-heading::after {
  content: "";
  width: min(240px, 100%);
  height: 1px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 260ms ease, background 260ms ease;
}

body.ui-ready .section.is-visible .section-heading {
  opacity: 1;
  transform: translateY(0);
}

.card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

body.ui-ready .section .card {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 560ms ease var(--reveal-delay, 0s),
    transform 560ms ease var(--reveal-delay, 0s),
    border-color 180ms ease,
    box-shadow 220ms ease;
}

body.ui-ready .section.is-visible .card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section.is-targeted .section-heading::after {
  width: min(360px, 100%);
  background: linear-gradient(90deg, var(--accent-warm), var(--accent), transparent);
}

.section.is-targeted .card {
  border-color: rgba(68, 183, 167, 0.34);
  box-shadow: 0 24px 60px rgba(12, 40, 32, 0.18);
}

.prose-card,
.highlights-card,
.project-card,
.credentials-card,
.contact-card,
.form-card {
  align-self: start;
}

.check-list,
.bullet-list {
  padding-left: 18px;
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 48px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 33px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 0 5px rgba(13, 123, 112, 0.12);
}

.timeline-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.timeline-date {
  white-space: nowrap;
  color: var(--text-muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-card h3 {
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(13, 123, 112, 0.16);
  color: var(--text);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.tag-list span:hover {
  transform: translateY(-2px);
  background: rgba(13, 123, 112, 0.18);
  border-color: rgba(13, 123, 112, 0.34);
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(199, 106, 52, 0.12);
  color: var(--accent-warm);
}

.stacked-items {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.stacked-items article {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.stacked-items article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.stacked-items strong {
  display: block;
  margin-bottom: 6px;
}

.contact-details a {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

@media (prefers-color-scheme: dark) {
  .field input,
  .field textarea {
    background: rgba(255, 255, 255, 0.04);
  }
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(13, 123, 112, 0.48);
  box-shadow: 0 0 0 4px rgba(13, 123, 112, 0.12);
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--text-muted);
}

.form-status.is-success {
  color: var(--accent);
}

.form-status.is-error {
  color: #bb5738;
}

.footer {
  padding-top: 44px;
  color: var(--text-muted);
  text-align: center;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .skills-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .timeline-head,
  .project-topline {
    flex-direction: column;
    align-items: start;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 8px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
    top: 6px;
    margin-bottom: 28px;
    padding: 14px;
  }

  .topbar-actions {
    gap: 14px;
  }

  .topbar-links,
  .topbar-cta {
    width: 100%;
  }

  .topbar-cta {
    flex-wrap: wrap;
  }

  .button-nav {
    flex: 1 1 180px;
  }

  .hero-copy,
  .hero-card,
  .card {
    padding: 22px;
  }

  h1 {
    font-size: clamp(2.3rem, 13vw, 3.4rem);
  }

  .lead {
    font-size: 1.02rem;
  }

  .section {
    padding-top: 42px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .timeline {
    gap: 14px;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-item {
    padding-left: 34px;
  }

  .timeline-item::before {
    left: 7px;
  }
}

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

  .hero-copy,
  .hero-card,
  .metrics article,
  .section,
  .section::after,
  .section-heading,
  .section .card,
  .topbar-links a,
  .topbar-links a::after,
  .button,
  .contact-pills a,
  .tag-list span {
    animation: none !important;
    transition: none !important;
  }

  .section,
  .section-heading,
  .section .card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
