:root {
  --bg-dark: #050716;
  --bg-dark-elevated: #090b1c;
  --bg-light: #f8fafc;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-strong: #a855f7;
  --border-subtle: rgba(148, 163, 184, 0.4);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 999px;
  --nav-height: 72px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  scroll-behavior: smooth;
}

.body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
  color: var(--text-main);
}

.body--light {
  background: radial-gradient(circle at top, #e5f0ff 0, #eef2ff 55%, #e5e7eb 100%);
  color: #0f172a;
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

main {
  padding-top: var(--nav-height);
}

/* Navbar */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.75),
    transparent
  );
}

.body--light .nav {
  background: linear-gradient(
    to bottom,
    rgba(241, 245, 249, 0.98),
    rgba(241, 245, 249, 0.9),
    transparent
  );
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  cursor: pointer;
}

.nav__brand-mark {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__link {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.nav__link:hover {
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-main);
  transform: translateY(-1px);
}

.body--light .nav__link:hover {
  background: rgba(226, 232, 240, 0.9);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav__theme-toggle,
.nav__menu {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(51, 65, 85, 0.9), #020617);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
}

.body--light .nav__theme-toggle,
.body--light .nav__menu {
  background: #e5e7eb;
  color: #0f172a;
}

.nav__menu {
  display: none;
}

.nav__mobile {
  display: none;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 0.75rem;
}

.nav__mobile-link {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.5rem 0.75rem;
  margin-top: 0.4rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  cursor: pointer;
}

.body--light .nav__mobile-link {
  background: #f1f5f9;
  color: #0f172a;
}

/* Hero */

.hero {
  position: relative;
  margin-top: 1.75rem;
  border-radius: 32px;
  padding: 2.4rem 2.4rem 2.2rem;
  background: radial-gradient(circle at top, #1f2937, #020617);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.body--light .hero {
  background: radial-gradient(circle at top, #eff6ff, #e0f2fe);
}

.hero__overlay-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(148, 163, 184, 0.15) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.15) 1px,
      transparent 1px
    );
  background-size: 44px 44px;
  opacity: 0.3;
  mask-image: radial-gradient(circle at top, black, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.3rem;
  align-items: start;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__title {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.05;
  margin: 0 0 0.85rem;
}

.hero__title-accent {
  display: inline-block;
  color: var(--accent);
}

.hero__subtitle {
  margin: 0 0 1.3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero__stat {
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.3), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.body--light .hero__stat {
  background: linear-gradient(to bottom, #e0f2fe, #eff6ff);
}

.hero__stat-value {
  font-size: 1rem;
  font-weight: 600;
}

.hero__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.hero__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
}

.console {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: radial-gradient(circle at top, #020617, #020617);
}

.body--light .console {
  background: #0f172a;
}

.console__header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  background: linear-gradient(to right, #0b1120, #020617);
}

.console__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.console__dot--red {
  background: #f87171;
}

.console__dot--yellow {
  background: #facc15;
}

.console__dot--green {
  background: #22c55e;
}

.console__title {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.console__body {
  padding: 0.9rem 1.05rem 1.05rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 0.78rem;
}

.console__line {
  margin: 0 0 0.3rem;
}

.console__prompt {
  color: var(--accent);
  margin-right: 0.3rem;
}

.console__token {
  color: #a5b4fc;
}

.console__string {
  color: #fbbf24;
  margin-left: 0.16rem;
}

.console__line--muted {
  color: var(--text-muted);
  font-style: italic;
}

.hero__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero__kpi-card {
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.78rem;
}

.body--light .hero__kpi-card {
  background: linear-gradient(to bottom, #e0f2fe, #f9fafb);
}

.hero__kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.hero__kpi-value {
  font-weight: 600;
  margin-top: 0.25rem;
}

.hero__kpi-desc {
  margin-top: 0.35rem;
  color: var(--text-muted);
}

/* Sections */

.section {
  margin-top: 2.8rem;
}

.section__inner {
  padding: 1.75rem 2rem 1.9rem;
  border-radius: 28px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.body--light .section__inner {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.section__header {
  margin-bottom: 1.5rem;
}

.section__eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

.section__title {
  font-size: 1.35rem;
  margin: 0;
}

.section__content {
  margin-top: 0.2rem;
}

/* Buttons, chips, etc. */

.btn {
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease,
    color 0.12s ease;
}

.btn--primary {
  background: radial-gradient(circle at top left, var(--accent), var(--accent-strong));
  color: #0b1120;
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.45);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.55);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-main);
}

.body--light .btn--ghost {
  color: #0f172a;
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.85);
}

.body--light .btn--ghost:hover {
  background: #e2e8f0;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-muted);
}

.chip--stack {
  background: rgba(15, 23, 42, 0.9);
}

.chip--tag {
  background: rgba(15, 23, 42, 0.85);
}

.chip--filter {
  background: rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

.chip--filter-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
}

.badge--soft {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}

.link {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.text-highlight {
  color: var(--accent);
}

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 2.1rem;
  font-size: 0.94rem;
}

.about__primary p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

.about__sidebar {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.body--light .about__sidebar {
  background: #eff6ff;
  border-style: solid;
}

.about__sidebar-title {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
}

.about__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.about__list li + li {
  margin-top: 0.35rem;
}

/* Timeline */

.timeline {
  border-radius: 20px;
  padding: 1.3rem 1.3rem 1.1rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.body--light .timeline {
  background: #f1f5f9;
}

.timeline__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.1rem;
}

.timeline__item + .timeline__item {
  margin-top: 1.1rem;
}

.timeline__marker {
  margin-top: 0.35rem;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid var(--accent);
}

.timeline__period {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline__title {
  margin: 0.15rem 0 0.25rem;
  font-size: 0.98rem;
}

.timeline__org {
  color: var(--accent);
}

.timeline__summary {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.timeline__outcomes {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Skills */

.skills {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 1.6rem;
}

.skills__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skills__tab {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.5rem 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.skills__tab--active {
  background: linear-gradient(to right, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
  color: var(--accent);
  border-color: var(--accent);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.skills__card {
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.86rem;
}

.body--light .skills__card {
  background: #e5edff;
}

.skills__card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.skills__name {
  margin: 0;
  font-size: 0.9rem;
}

.skills__level {
  font-size: 0.7rem;
  color: var(--accent);
}

.skills__usecase {
  margin: 0;
  color: var(--text-muted);
}

/* Case studies */

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.case-card {
  border-radius: 16px;
  padding: 0.9rem 0.9rem 0.8rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), #020617);
  border: 1px solid rgba(148, 163, 184, 0.7);
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.case-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
}

.case-card__header {
  margin-bottom: 0.35rem;
}

.case-card__title {
  margin: 0;
  font-size: 0.95rem;
}

.case-card__role {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.case-card__context {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.case-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.case-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  font-size: 0.75rem;
}

.case-card__metric-label {
  color: var(--text-muted);
}

.case-card__metric-after {
  color: var(--accent);
}

.case-card__footer {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--accent);
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  max-width: 880px;
  width: 100%;
  margin: 1.25rem;
  border-radius: 26px;
  background: radial-gradient(circle at top, #020617, #000);
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 1.8rem 1.75rem 1.6rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.modal__close {
  position: absolute;
  right: 1.1rem;
  top: 1rem;
  border-radius: 999px;
  border: none;
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  cursor: pointer;
}

.modal__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.3rem;
}

.modal__title {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
}

.modal__role {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal__context {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
}

.modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.modal__column h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.modal__column p {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.modal__metrics {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.modal__metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal__metric-values {
  font-size: 0.8rem;
}

.modal__metric-after {
  color: var(--accent);
}

.modal__diagram {
  margin-top: 0.9rem;
}

.diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.78rem;
}

.diagram__node {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

.diagram__arrow {
  color: var(--accent);
}

/* Projects */

.projects__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  border-radius: 16px;
  padding: 0.85rem 0.9rem 0.8rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.84rem;
}

.body--light .project-card {
  background: #eff6ff;
}

.project-card__title {
  margin: 0 0 0.2rem;
  font-size: 0.96rem;
}

.project-card__tagline {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
}

.project-card__tags,
.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}

.project-card__links {
  display: flex;
  gap: 0.6rem;
}

/* Insights */

.insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.insight-card {
  border-radius: 16px;
  padding: 0.9rem 0.95rem 0.85rem;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.75);
  font-size: 0.84rem;
}

.body--light .insight-card {
  background: #eff6ff;
}

.insight-card__meta {
  margin-bottom: 0.25rem;
}

.insight-card__title {
  margin: 0 0 0.25rem;
  font-size: 0.96rem;
}

.insight-card__summary {
  margin: 0 0 0.45rem;
  color: var(--text-muted);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.8rem;
}

.contact__form {
  display: grid;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.2rem;
}

.field__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field__input,
.field__textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
}

.field__textarea {
  resize: vertical;
}

.body--light .field__input,
.body--light .field__textarea {
  background: #ffffff;
  color: #0f172a;
}

.contact__sidebar {
  font-size: 0.86rem;
}

.contact__sidebar-title {
  margin: 0 0 0.5rem;
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
}

.contact__label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.contact__note {
  margin: 0;
  color: var(--text-muted);
}

/* Footer */

.footer {
  margin-top: 2.4rem;
  padding-bottom: 0.25rem;
}

.footer__inner {
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  padding-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.4fr);
  }

  .hero__panel {
    margin-top: 1.3rem;
  }

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

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

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

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

@media (max-width: 768px) {
  .app {
    padding-inline: 1rem;
  }

  .hero {
    padding: 1.6rem 1.5rem 1.5rem;
    border-radius: 26px;
  }

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

  .section__inner {
    padding: 1.4rem 1.3rem 1.5rem;
    border-radius: 22px;
  }

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

  .modal__content {
    margin: 0.75rem;
    padding: 1.4rem 1.3rem 1.3rem;
  }

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

  .projects__grid,
  .case-grid,
  .insights {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav__links {
    display: none;
  }

  .nav__menu {
    display: inline-flex;
  }

  .nav__mobile {
    display: block;
  }
}

