:root {
  --ink: #101723;
  --navy: #071a31;
  --blue: #0e63a8;
  --teal: #18a999;
  --gold: #d5a03f;
  --coral: #ef6f61;
  --paper: #f7f5ee;
  --white: #ffffff;
  --muted: #657184;
  --dark-muted: #b7c4d6;
  --line: rgba(16, 23, 35, 0.12);
  --shadow: 0 24px 80px rgba(7, 26, 49, 0.18);
  --shell-max: 1180px;
  --page-gutter: clamp(18px, 4vw, 56px);
  --section-y: clamp(72px, 8vw, 108px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background: #050812;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

#hero-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 1;
  background:
    radial-gradient(circle at 18% 18%, rgba(24, 169, 153, 0.2), transparent 32%),
    radial-gradient(circle at 86% 14%, rgba(213, 160, 63, 0.16), transparent 28%),
    radial-gradient(circle at 74% 78%, rgba(14, 99, 168, 0.22), transparent 34%),
    radial-gradient(circle at 28% 88%, rgba(239, 111, 97, 0.08), transparent 28%),
    linear-gradient(135deg, #040712 0%, #071a31 42%, #050812 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px var(--page-gutter);
  background: rgba(5, 8, 18, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 138px;
  height: 46px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(135deg, #061424, #0b2d4f 64%, #102c44);
  color: var(--white);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 1.82rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 12px 30px rgba(7, 26, 49, 0.22);
  border: 1px solid rgba(213, 160, 63, 0.38);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.brand span {
  transform: translateY(-1px);
}

.nav-links {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.nav-links a {
  white-space: nowrap;
}

.nav-links a,
.header-action,
.theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.header-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(7, 26, 49, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle span {
  font-size: 1.18rem;
  line-height: 1;
}

.header-action,
.secondary-button,
.primary-button {
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-action {
  padding: 0 18px;
  color: var(--white);
  background: var(--blue);
  white-space: nowrap;
}

.header-action:hover,
.theme-toggle:hover,
.primary-button:hover,
.secondary-button:hover,
.cert-card:hover {
  transform: translateY(-2px);
}

.section-shell {
  width: min(var(--shell-max), calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(30px, 6vw, 82px);
  padding: clamp(42px, 6vw, 72px) 0 clamp(72px, 8vw, 112px);
}

.hero-copy,
.hero-portrait {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4.2rem, 8vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--white);
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--navy);
}

h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-lede {
  max-width: 680px;
  color: var(--dark-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.primary-button,
.secondary-button {
  min-width: 0;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  line-height: 1.22;
  text-align: center;
  white-space: normal;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: 0 16px 38px rgba(14, 99, 168, 0.24);
}

.secondary-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.secondary-button.dark {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 12px;
  max-width: 660px;
}

.metric-strip div {
  min-height: 98px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 8px;
}

.metric-strip strong {
  display: block;
  color: var(--coral);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 8px;
  color: var(--dark-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-portrait {
  position: relative;
  perspective: 1000px;
  justify-self: end;
  width: 100%;
}

.hero-portrait img {
  width: min(100%, 460px);
  aspect-ratio: 0.78;
  object-fit: cover;
  object-position: center top;
  margin-left: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotateY(-7deg) rotateX(4deg);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.portrait-badge {
  position: absolute;
  left: -18px;
  bottom: 34px;
  width: min(260px, 72%);
  padding: 16px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(7, 26, 49, 0.92);
  box-shadow: 0 18px 42px rgba(7, 26, 49, 0.28);
}

.portrait-badge span {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portrait-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.intro-band,
.freelance-band {
  background: rgba(248, 249, 246, 0.92);
  color: var(--ink);
  border-block: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-grid,
.freelance-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: var(--section-y) 0;
}

.intro-grid p:last-child,
.freelance-list p {
  color: #394861;
  font-size: 1.06rem;
}

.experience-section,
.skills-section,
.rates-section,
.contact-section {
  padding: var(--section-y) 0;
}

.experience-section,
.skills-section {
  color: var(--white);
}

.experience-section h2,
.skills-section h2 {
  color: var(--white);
}

html[data-theme="dark"] .experience-section .section-heading h2,
html[data-theme="dark"] .skills-section .section-heading h2 {
  color: #ffffff;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 18px;
}

.timeline-item,
.skill-panel,
.contact-card,
.cert-card {
  border-radius: 8px;
  border: 1px solid rgba(16, 23, 35, 0.11);
}

.timeline-item {
  min-width: 0;
  min-height: 286px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.timeline-item.featured {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.timeline-item span,
.cert-card span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-item.featured span {
  color: var(--gold);
}

.role {
  margin-bottom: 14px;
  color: var(--blue);
  font-weight: 800;
}

.timeline-item.featured .role {
  color: var(--gold);
}

.timeline-item p:last-child {
  color: #526072;
  margin-bottom: 0;
}

.timeline-item.featured p:last-child {
  color: rgba(255, 255, 255, 0.78);
}

.cert-section {
  padding: var(--section-y) 0;
  background: var(--navy);
  color: var(--white);
}

.cert-section h2 {
  color: var(--white);
}

.cert-section .eyebrow {
  color: var(--gold);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.cert-card {
  min-width: 0;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease;
}

.cert-card img {
  width: 100%;
  aspect-ratio: 1.42;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.cert-card span,
.cert-card strong {
  margin-inline: 18px;
}

.cert-card span {
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--gold);
}

.cert-card strong {
  display: block;
  min-height: 56px;
  margin-bottom: 18px;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.skill-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.skill-panel {
  min-width: 0;
  min-height: 330px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.72);
}

.skill-panel h3 {
  color: var(--blue);
}

.skill-panel ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.skill-panel li {
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: #34425b;
  font-weight: 700;
}

.rates-section {
  background:
    linear-gradient(135deg, rgba(7, 26, 49, 0.98), rgba(12, 72, 103, 0.94)),
    var(--navy);
  color: var(--white);
}

.rates-section h2 {
  color: var(--white);
}

.rates-section .eyebrow {
  color: var(--gold);
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.rate-card {
  min-width: 0;
  min-height: 300px;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.14);
}

.rate-card.is-featured {
  background:
    linear-gradient(135deg, rgba(24, 169, 153, 0.22), rgba(213, 160, 63, 0.16)),
    rgba(255, 255, 255, 0.1);
  border-color: rgba(213, 160, 63, 0.58);
}

.rate-card span {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rate-card strong {
  display: block;
  color: var(--white);
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.92;
}

.rate-card p {
  margin: 12px 0 26px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.rate-card small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.96rem;
  line-height: 1.55;
}

.freelance-list {
  display: grid;
  gap: 18px;
}

.contact-card {
  padding: clamp(28px, 6vw, 62px);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(7, 26, 49, 0.98), rgba(14, 99, 168, 0.92)),
    var(--navy);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  color: var(--white);
  max-width: 820px;
}

.contact-card p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-actions a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact-card .eyebrow {
  color: var(--gold);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(7, 26, 49, 0.86);
}

.modal.is-open {
  display: grid;
}

.modal img {
  width: min(1080px, 100%);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

html[data-theme="light"] body {
  color: var(--ink);
  background: var(--paper);
}

html[data-theme="light"] #hero-scene {
  opacity: 0.74;
  background:
    radial-gradient(circle at 16% 22%, rgba(24, 169, 153, 0.22), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(213, 160, 63, 0.2), transparent 30%),
    radial-gradient(circle at 72% 82%, rgba(239, 111, 97, 0.12), transparent 28%),
    linear-gradient(135deg, #f8f6ef 0%, #e9f4f6 42%, #f9f5eb 100%);
}

html[data-theme="light"] .site-header {
  background: rgba(247, 245, 238, 0.84);
  border-bottom-color: rgba(16, 23, 35, 0.08);
}

html[data-theme="light"] .nav-links {
  color: #253349;
}

html[data-theme="light"] .theme-toggle {
  color: var(--navy);
  border-color: rgba(7, 26, 49, 0.16);
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .eyebrow {
  color: var(--blue);
}

html[data-theme="light"] h1 {
  color: var(--navy);
  text-shadow: none;
}

html[data-theme="light"] .hero-lede {
  color: #30415c;
}

html[data-theme="light"] .secondary-button {
  color: var(--ink);
  border-color: rgba(7, 26, 49, 0.2);
  background: rgba(255, 255, 255, 0.56);
}

html[data-theme="light"] .metric-strip div {
  border-color: rgba(16, 23, 35, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

html[data-theme="light"] .metric-strip span {
  color: var(--muted);
}

html[data-theme="light"] .hero-portrait img {
  border-color: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .intro-band,
html[data-theme="light"] .freelance-band {
  background: rgba(255, 255, 255, 0.72);
  border-block-color: rgba(16, 23, 35, 0.08);
}

html[data-theme="light"] .experience-section,
html[data-theme="light"] .skills-section {
  color: var(--ink);
}

html[data-theme="light"] .experience-section h2,
html[data-theme="light"] .skills-section h2 {
  color: var(--navy);
}

html[data-theme="light"] .timeline-item,
html[data-theme="light"] .skill-panel {
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .timeline-item.featured {
  background: var(--navy) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow);
}

html[data-theme="light"] .timeline-item.featured h3 {
  color: var(--white);
}

html[data-theme="light"] .timeline-item.featured .role {
  color: var(--gold);
}

html[data-theme="light"] .timeline-item.featured p:last-child {
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 1440px) {
  :root {
    --shell-max: 1320px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  }

  .hero-portrait img {
    width: min(100%, 500px);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-controls {
    justify-self: end;
  }

  .hero,
  .intro-grid,
  .freelance-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-portrait {
    justify-self: center;
  }

  .hero-portrait img {
    width: min(100%, 420px);
    margin: 0 auto;
    transform: rotateY(0deg) rotateX(0deg);
  }
}

@media (max-width: 620px) {
  :root {
    --page-gutter: 14px;
    --section-y: 72px;
  }

  .section-shell {
    width: min(100% - 28px, var(--shell-max));
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-inline: 14px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    overflow-x: visible;
    font-size: 0.82rem;
  }

  .brand {
    width: 128px;
    font-size: 1.66rem;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 4.4rem);
  }

  h2 {
    font-size: clamp(1.9rem, 10vw, 2.7rem);
  }

  .metric-strip,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metric-strip {
    max-width: 100%;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    text-align: center;
  }

  .portrait-badge {
    left: 12px;
    bottom: 18px;
  }

  .experience-section,
  .skills-section,
  .cert-section,
  .rates-section,
  .contact-section {
    padding: 72px 0;
  }

  .timeline-item,
  .skill-panel,
  .rate-card {
    min-height: auto;
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-block: 12px;
  }

  .brand {
    width: min(116px, 40vw);
    height: 42px;
    font-size: clamp(1.35rem, 7vw, 1.55rem);
  }

  .header-action {
    display: none;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .nav-links {
    gap: 6px 10px;
    font-size: 0.78rem;
  }

  .contact-actions .primary-button {
    font-size: 0.92rem;
  }
}
