:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --ink: #0e1726;
  --muted: #637083;
  --line: rgba(14, 23, 38, 0.12);
  --teal: #0f766e;
  --teal-2: #0d9488;
  --blue: #1d4ed8;
  --coral: #ef7b45;
  --gold: #d6a84f;
  --shadow: 0 24px 70px rgba(14, 23, 38, 0.14);
  --radius: 8px;
  --max: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1118;
  --surface: #131a23;
  --surface-2: #1a2430;
  --ink: #f5f7fb;
  --muted: #a6b0c2;
  --line: rgba(245, 247, 251, 0.14);
  --teal: #2dd4bf;
  --teal-2: #5eead4;
  --blue: #7aa2ff;
  --coral: #f59e6c;
  --gold: #f5d484;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 7%, transparent), transparent 28%),
    linear-gradient(220deg, color-mix(in srgb, var(--gold) 9%, transparent), transparent 36%),
    var(--bg);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
}

::selection {
  color: #ffffff;
  background: var(--teal);
}

.page-shell {
  opacity: 1;
  transform: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.22);
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-panel a,
.theme-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-panel a:hover,
.nav-panel a.is-active,
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.theme-icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset -5px -3px 0 currentColor;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  background: currentColor;
  transition: opacity 180ms ease, transform 180ms ease;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--teal) 18%, transparent), transparent 40%),
    linear-gradient(245deg, color-mix(in srgb, var(--gold) 13%, transparent), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 24%, var(--bg)), color-mix(in srgb, var(--surface) 52%, var(--bg)));
}

.hero {
  min-height: calc(100svh - 74px);
  display: grid;
  align-items: center;
  padding: 72px 0 88px;
}

.page-hero {
  padding: 88px 0 72px;
}

.hero-grid,
.split-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}

.page-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero .lead {
  margin-bottom: 30px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section-action {
  margin-top: 24px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

.btn-secondary {
  background: var(--surface);
}

.btn-dark {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.social-row a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  transition: color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.social-row a:hover {
  color: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.social-row svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.portrait-stage {
  justify-self: center;
  width: min(84vw, 410px);
}

.portrait-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5.65;
  object-fit: cover;
  object-position: center top;
}

.status-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 22px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--teal) 36%, var(--line));
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 14px 40px rgba(14, 23, 38, 0.08);
  font-weight: 900;
}

.status-ribbon span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--teal) 16%, transparent);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.stat,
.card,
.project-card,
.social-card,
.timeline-item,
.contact-panel,
.business-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 36px rgba(14, 23, 38, 0.07);
}

.stat {
  min-height: 92px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.stat strong {
  font-size: 1.28rem;
}

.stat span,
.muted,
.card p,
.project-card p,
.timeline-item p,
.social-card p,
.business-card p,
.contact-panel p {
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 800;
  font-size: 0.88rem;
}

.badge-strong {
  color: #ffffff;
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.section-head {
  max-width: 790px;
  margin-bottom: 38px;
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.grid-2,
.grid-3,
.grid-4,
.project-grid,
.timeline,
.social-grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

.card,
.business-card {
  min-height: 210px;
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.card:hover,
.project-card:hover,
.social-card:hover,
.business-card:hover {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  transform: translateY(-4px);
}

.icon-pill {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--ink);
  font-weight: 900;
}

.feature-band {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.story-block {
  max-width: 850px;
}

.story-block p {
  color: var(--muted);
  font-size: 1.06rem;
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.timeline-date {
  color: var(--teal);
  font-weight: 900;
}

.resume-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resume-preview img {
  width: 100%;
  height: auto;
}

.project-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card .repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.repo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  font-size: 0.78rem;
  font-weight: 850;
}

.project-card a {
  width: fit-content;
  margin-top: auto;
  color: var(--teal);
  font-weight: 900;
}

.business-hero-card {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.proof-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(26px, 5vw, 58px);
}

.letter-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.letter-card img {
  width: 100%;
  height: auto;
}

.proof-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.proof-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.proof-list span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.business-logo {
  width: 118px;
  height: 118px;
  border-radius: 26px;
  object-fit: cover;
}

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

.social-card {
  min-height: 154px;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.social-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.contact-panel {
  padding: 28px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px;
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}

.field textarea {
  min-height: 142px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 16%, transparent);
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list a,
.contact-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--teal);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms ease, transform 620ms ease;
}

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(390px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    top: 74px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-panel a,
  .theme-toggle {
    justify-content: center;
    border-color: var(--line);
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero-grid,
  .split-grid,
  .contact-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4,
  .project-grid,
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 68px;
  }

  .page-hero {
    padding: 62px 0 56px;
  }

  .brand span:last-child {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-row {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .quick-stats,
  .grid-2,
  .grid-3,
  .grid-4,
  .project-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    padding: 26px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .page-shell,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
