:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --bg-soft: #12161d;
  --surface: rgba(24, 28, 35, 0.92);
  --surface-strong: rgba(31, 36, 45, 0.96);
  --surface-subtle: rgba(255, 255, 255, 0.045);
  --text: #f7f5f0;
  --muted: #b9c1ca;
  --muted-strong: #d5dae0;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #4bb3fd;
  --accent-soft: rgba(75, 179, 253, 0.14);
  --accent-2: #e0445f;
  --accent-2-soft: rgba(224, 68, 95, 0.14);
  --accent-3: #65c58f;
  --accent-3-soft: rgba(101, 197, 143, 0.14);
  --gold: #f0c45f;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 24px rgba(0, 0, 0, 0.18);
  --radius-panel: 14px;
  --radius-card: 8px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-subtle: rgba(14, 20, 28, 0.045);
  --text: #151922;
  --muted: #5f6b78;
  --muted-strong: #384454;
  --line: rgba(20, 28, 40, 0.12);
  --line-strong: rgba(20, 28, 40, 0.2);
  --accent: #0d67c7;
  --accent-soft: rgba(13, 103, 199, 0.1);
  --accent-2: #b3243e;
  --accent-2-soft: rgba(179, 36, 62, 0.1);
  --accent-3: #247a52;
  --accent-3-soft: rgba(36, 122, 82, 0.1);
  --gold: #986f13;
  --shadow: 0 16px 34px rgba(31, 44, 66, 0.12);
  --shadow-soft: 0 10px 22px rgba(31, 44, 66, 0.08);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI Variable", "Aptos", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(224, 68, 95, 0.08) 0 12%, transparent 12% 100%),
    linear-gradient(210deg, rgba(101, 197, 143, 0.08) 0 10%, transparent 10% 100%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 42%, var(--bg));
}

body::selection {
  color: #ffffff;
  background: var(--accent-2);
}

a {
  color: inherit;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 78%);
}

.backdrop-band {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(75, 179, 253, 0.08) 18% 19%, transparent 19% 100%),
    linear-gradient(100deg, transparent 0 71%, rgba(224, 68, 95, 0.08) 71% 72%, transparent 72% 100%);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, var(--accent-2-soft), transparent 44%),
    linear-gradient(180deg, var(--surface-strong), var(--surface));
  color: var(--accent);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.brand strong,
.brand span span {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand span span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.94rem;
}

.theme-toggle {
  appearance: none;
  min-width: 72px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(310px, 0.72fr);
  gap: 24px;
  min-height: 430px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(75, 179, 253, 0.14), transparent 38%),
    linear-gradient(45deg, transparent 0 58%, rgba(224, 68, 95, 0.12) 58% 74%, transparent 74% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background:
    linear-gradient(180deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.eyebrow,
.panel-kicker,
.section-kicker,
.project-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 18px;
  max-width: 14ch;
  font-size: 3.55rem;
  line-height: 1.04;
  font-weight: 800;
}

.lead {
  margin: 0;
  max-width: 69ch;
  color: var(--muted-strong);
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.button-link.primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--accent), #2d8feb);
  color: #ffffff;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-panel {
  align-self: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(13, 15, 18, 0.56);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .hero-panel {
  background: rgba(255, 255, 255, 0.68);
}

.focus-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.focus-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-subtle);
}

.focus-item h2 {
  margin: 0;
  font-size: 1rem;
}

.focus-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.signal {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-left: 1px solid var(--line);
}

.signal:first-child {
  border-left: 0;
}

.signal-value {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
}

.signal-label {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.tabs {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: 18px 0 0;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 24, 31, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .tabs {
  background: rgba(255, 255, 255, 0.86);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 0 max-content;
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section {
  margin-top: 44px;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 28px;
  align-items: start;
}

.profile-layout .section-heading,
.profile-copy {
  grid-column: 1;
}

.profile-copy {
  display: grid;
  gap: 14px;
  color: var(--muted-strong);
  line-height: 1.75;
}

.profile-copy p {
  margin: 0;
}

.attribute-grid {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 14px;
}

.attribute-card,
.skill-group,
.timeline-card,
.feature-card,
.project-card,
.education-card,
.credential-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.attribute-card,
.skill-group,
.feature-card,
.project-card,
.education-card,
.credential-card,
.contact-card {
  padding: 20px;
}

.attribute-card {
  border-left: 4px solid var(--accent);
}

.attribute-card:nth-child(2) {
  border-left-color: var(--accent-2);
}

.attribute-card:nth-child(3) {
  border-left-color: var(--accent-3);
}

.attribute-tag {
  display: inline-flex;
  width: max-content;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attribute-card h3,
.skill-group h3,
.timeline-card h3,
.feature-card h3,
.project-card h3,
.education-card h3,
.credential-card h3,
.contact-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
}

.attribute-card p,
.feature-card p,
.project-card p,
.education-card p,
.timeline-card li,
.project-card li {
  color: var(--muted);
  line-height: 1.65;
}

.attribute-card p,
.feature-card p,
.project-card p,
.education-card p {
  margin: 10px 0 0;
}

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

.skill-group {
  display: grid;
  gap: 14px;
}

.chip-row,
.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row span,
.mini-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.1;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-card {
  position: relative;
  padding: 22px 22px 22px 28px;
  overflow: hidden;
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--line-strong);
}

.timeline-card.featured::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.timeline-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.meta-line {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.timeline-card ul,
.project-card ul {
  margin: 0;
  padding-left: 18px;
}

.timeline-card li + li,
.project-card li + li {
  margin-top: 8px;
}

.feature-grid,
.project-grid,
.credential-grid {
  display: grid;
  gap: 14px;
}

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

.feature-card {
  display: grid;
  gap: 12px;
  border-top: 4px solid var(--accent);
}

.feature-card:nth-child(2) {
  border-top-color: var(--accent-2);
}

.feature-card:nth-child(3) {
  border-top-color: var(--accent-3);
}

.feature-card:nth-child(4) {
  border-top-color: var(--gold);
}

.feature-card p {
  margin: 0;
}

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

.project-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.project-card p,
.project-card ul {
  margin-top: 0;
}

.education-layout {
  display: grid;
  gap: 14px;
}

.education-card {
  display: grid;
  gap: 12px;
}

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

.credential-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
}

.resume-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 86px;
}

.contact-card a {
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.resume-frame {
  display: grid;
  gap: 10px;
  margin: 0;
}

.resume-document {
  width: 100%;
  height: 880px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.resume-pdf {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.resume-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.org-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
}

.org-mark span {
  position: relative;
  z-index: 1;
}

.org-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 62%);
}

.org-mark.logo-image {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.org-mark.logo-image::after {
  content: none;
}

.org-mark.logo-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.org-mark.ibm img {
  padding: 9px 6px;
}

.org-mark.usc img {
  padding: 5px;
}

.org-mark.aws {
  background: linear-gradient(135deg, #232f3e, #4a5568);
}

.org-mark.google {
  background: linear-gradient(135deg, #1a73e8, #34a853);
}

.org-mark.broadview {
  background: linear-gradient(135deg, #0f5132, #1d7a5b);
}

.org-mark.leadership {
  background: linear-gradient(135deg, #7a1f35, #c23b55);
}

.footer {
  margin-top: 42px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-panel {
    align-self: stretch;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-layout .section-heading,
  .profile-copy,
  .attribute-grid {
    grid-column: auto;
    grid-row: auto;
  }

  .attribute-grid,
  .project-grid,
  .credential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 24px, 1180px);
  }

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

  .hero {
    padding: 32px 24px 28px;
  }

  h1 {
    font-size: 2.85rem;
  }

  .signal-strip,
  .feature-grid,
  .skills-grid,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .signal {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .signal:first-child {
    border-top: 0;
  }

  .contact-card {
    position: static;
  }

  .resume-document {
    height: 720px;
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }

  .topbar {
    flex-direction: column;
  }

  .theme-toggle {
    width: 100%;
  }

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

  .hero {
    padding: 28px 18px 22px;
  }

  .hero::before {
    width: 5px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions,
  .resume-actions {
    flex-direction: column;
  }

  .button-link {
    width: 100%;
  }

  .tabs {
    top: 8px;
  }

  .tab {
    padding: 9px 12px;
  }

  .section {
    margin-top: 34px;
  }

  .section-title {
    font-size: 1.55rem;
  }

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

  .timeline-head,
  .credential-card,
  .focus-item {
    grid-template-columns: 44px 1fr;
  }

  .org-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .timeline-card {
    padding: 18px 18px 18px 22px;
  }

  .resume-document {
    height: 620px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
