:root {
  --bg: #111315;
  --bg-deep: #090a0c;
  --panel: rgba(22, 25, 29, 0.9);
  --panel-strong: rgba(28, 32, 37, 0.96);
  --panel-soft: rgba(17, 20, 24, 0.78);
  --ink: #f5f5f5;
  --muted: #a4a9b0;
  --muted-strong: #d7dbe0;
  --line: rgba(245, 245, 245, 0.1);
  --line-strong: rgba(245, 245, 245, 0.2);
  --accent: #d9dde2;
  --accent-strong: #ffffff;
  --accent-soft: rgba(245, 245, 245, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Archivo", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 22%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.05), transparent 20%),
    linear-gradient(180deg, #171a1f 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 80px;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 10, 21, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand,
.eyebrow,
.stat-label,
.timeline-year,
.project-kicker {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--muted-strong);
}

.brand-logo {
  width: auto;
  height: 18px;
  flex: 0 0 auto;
  display: block;
  filter: brightness(1.08) contrast(1.05);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-nav a {
  font-family: "Archivo", sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.portfolio {
  display: grid;
  gap: 28px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 28px;
  padding: 44px;
}

.hero-copy,
.hero-side,
.section-block {
  position: relative;
  z-index: 1;
}

.eyebrow,
.stat-label,
.project-kicker {
  margin: 0 0 14px;
  font-size: 0.72rem;
  color: var(--accent);
}

.hero h1,
.section-heading h2,
.inner-heading h3,
.expertise-card h3,
.project-card h3,
.timeline-card h3,
.info-card h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: none;
  font-size: clamp(1.95rem, 5.8vw, 4.7rem);
  line-height: 0.98;
  white-space: nowrap;
  text-wrap: nowrap;
  font-weight: 700;
}

.lede {
  max-width: 34rem;
  margin: 22px 0 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.68;
  color: var(--muted-strong);
  text-wrap: pretty;
}

.summary {
  max-width: 38rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.74;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Archivo", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #111315;
  background: linear-gradient(135deg, #d9dde2, #ffffff);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.14);
}

.button-primary:hover {
  color: #111315;
}

.button-secondary,
.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.signal-strip span,
.cert-grid span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 0.82rem;
}

.hero-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.info-card,
.mini-stat,
.copy-card,
.checklist-card,
.expertise-card,
.project-card,
.timeline-card,
.link-card {
  padding: 24px;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 45%),
    var(--panel-strong);
}

.info-card h2 {
  font-size: 1.34rem;
  line-height: 1.18;
}

.info-card p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.mini-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.14rem;
  letter-spacing: -0.035em;
}

.mini-stat p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-block {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 8px;
}

.section-heading h2 {
  max-width: none;
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
  line-height: 1.12;
  font-weight: 700;
  white-space: nowrap;
}

.section-note {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.66;
  text-wrap: pretty;
}

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

.split-grid > .panel {
  padding: 24px;
}

.copy-card,
.checklist-card {
  min-height: 100%;
}

.copy-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
  line-height: 1.74;
  text-wrap: pretty;
}

.copy-card p + p {
  margin-top: 16px;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li,
.stack-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.66;
}

.checklist li + li,
.stack-list li + li {
  margin-top: 12px;
}

.checklist li::before,
.stack-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.06);
}

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

.expertise-card,
.project-card,
.timeline-card,
.resource-link {
  transition:
    transform 220ms ease-out,
    border-color 220ms ease-out,
    background-color 220ms ease-out,
    box-shadow 220ms ease-out;
}

.expertise-card:hover,
.project-card:hover,
.resource-link:hover {
  transform: translateY(-3px);
}

.expertise-card:hover,
.project-card:hover,
.timeline-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.expertise-card h3,
.project-card h3,
.timeline-card h3,
.inner-heading h3 {
  font-size: 1.08rem;
  line-height: 1.22;
  text-wrap: balance;
}

.expertise-card p,
.project-card p,
.timeline-card p,
.inner-heading p,
.resource-link {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.64;
}

.inner-heading {
  margin-bottom: 18px;
}

.inner-heading p {
  margin: 10px 0 0;
}

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-grid .cert-badge {
  display: inline-grid;
  gap: 2px;
  align-items: start;
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 120%),
    rgba(255, 255, 255, 0.03);
}

.cert-grid .cert-badge strong {
  font-size: 0.9rem;
  line-height: 1.1;
  color: var(--ink);
}

.cert-grid .cert-badge small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.cert-caption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.52;
}

.credential-link {
  margin-top: 14px;
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline {
  --timeline-rail: rgba(245, 245, 245, 0.26);
  --timeline-rail-soft: rgba(245, 245, 245, 0.08);
  --timeline-node-size: 7px;
  --timeline-card-radius: 24px;
  position: relative;
  display: flex;
  gap: 18px;
  align-items: center;
  overflow-x: auto;
  padding: 18px 4px 22px;
  margin: 0;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 245, 245, 0.26) transparent;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--timeline-rail-soft), var(--timeline-rail), var(--timeline-rail-soft));
}

.timeline::-webkit-scrollbar {
  height: 8px;
}

.timeline::-webkit-scrollbar-thumb {
  background: rgba(245, 245, 245, 0.24);
  border-radius: 999px;
}

.timeline::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.timeline-card {
  position: relative;
  z-index: 1;
  min-width: clamp(248px, 28vw, 320px);
  width: clamp(248px, 28vw, 320px);
  scroll-snap-align: start;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(245, 245, 245, 0.14);
  border-radius: var(--timeline-card-radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 38%),
    var(--panel);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 1px;
  background: rgba(245, 245, 245, 0.16);
}

.timeline-card::after {
  content: "";
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--timeline-node-size);
  height: var(--timeline-node-size);
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, 0.64);
  background: var(--bg-deep);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.02),
    0 0 6px rgba(255, 255, 255, 0.1);
}

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

.timeline-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 58px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(245, 245, 245, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
  text-align: left;
}

.timeline-card > div {
  display: grid;
  gap: 8px;
}

.timeline-card h3 {
  font-size: 1rem;
  line-height: 1.24;
}

.timeline-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.56;
}

.project-kicker {
  margin-bottom: 12px;
}

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

.resource-link {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  cursor: pointer;
}

.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.site-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  padding: 2px;
  object-fit: contain;
  filter: grayscale(1) saturate(0) brightness(1.12) contrast(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.site-icon-wide {
  object-fit: cover;
  object-position: left center;
  padding: 0;
}

.link-with-icon span:last-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.resource-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

@media (max-width: 1080px) {
  .hero,
  .about-grid,
  .split-grid,
  .expertise-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 34px;
  }
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 20px, 1220px);
    padding-top: 14px;
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .panel,
  .info-card,
  .mini-stat,
  .copy-card,
  .checklist-card,
  .expertise-card,
  .project-card,
  .timeline-card,
  .link-card {
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8.2vw, 2.5rem);
  }

  .section-heading h2 {
    font-size: 1.62rem;
    white-space: normal;
  }

  .timeline-card {
    min-width: min(84vw, 300px);
    width: min(84vw, 300px);
    border-radius: 22px;
  }

  .timeline {
    gap: 14px;
    padding: 16px 0 20px;
  }

  .timeline-year {
    margin-bottom: 4px;
  }
}

@media (max-width: 560px) {
  .timeline {
    padding: 14px 0 18px;
  }

  .timeline-card {
    min-width: min(88vw, 288px);
    width: min(88vw, 288px);
    padding: 20px;
  }
  html {
    font-size: 16px;
  }

  .page-shell {
    width: min(100% - 16px, 1220px);
    padding-bottom: 48px;
  }

  .hero {
    padding: 24px;
  }

  .button {
    width: 100%;
  }

  .site-nav {
    gap: 8px;
  }

  .site-nav a,
  .resource-link {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
