* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b0e13;
  --bg-alt: #0f1420;
  --surface: #131926;
  --border: #223049;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.35);
  --text: #eef2f7;
  --muted: #8b98ad;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.15;
}

/* Terminal/network-style monospace for anything metadata-like (dates,
   section labels, mono chips) - fits an IT/network-engineering background
   without leaning on a cliché "hacker green on black" look. */
.eyebrow,
.section-label,
.timeline-date,
.role-date,
.edu-year,
.cert-chip {
  font-family: 'IBM Plex Mono', monospace;
}

/* --- background canvas: subtle animated network-node field, same real
   Canvas 2D technique (no GPU/AI model) used on the Clear Explainer site,
   themed to this project's own cyan/slate palette. --- */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* --- topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 14, 19, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.mark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

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

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

/* --- hero --- */
.hero {
  padding: 6rem 0 4rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.role {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.cert-chip {
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #04121c;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  box-shadow: none;
}

/* --- sections --- */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: 1.9rem;
  margin-bottom: 2.25rem;
}

/* --- experience timeline: a real connected rail, not a bullet list -
   deliberate echo of the same "annotation, not decoration" instinct used
   on the Clear Explainer site, here reading as a literal network topology
   line given the subject matter. --- */
.timeline {
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1.25rem;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-rail::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: -2.5rem;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child .timeline-rail::before {
  display: none;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
  margin-top: 4px;
}

.timeline-content {
  padding-bottom: 2.5rem;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.timeline-head h3 {
  font-size: 1.3rem;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.82rem;
}

.role-block {
  background: var(--surface);
  border-top: 2px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.9rem;
}

.role-block:last-child {
  margin-bottom: 0;
}

.role-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.role-date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.role-block ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.role-block li {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

/* --- skills --- */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.skill-group h3 {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  border-radius: 5px;
}

.certs h3 {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.cert-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--surface);
  border-top: 2px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  min-width: 260px;
}

/* In-progress cert/chip - visually distinct (dashed, muted) from an
   actually-held credential so the site never overstates status. */
.cert-chip-progress {
  border-style: dashed;
  color: var(--muted);
}

.cert-card-progress {
  border-top-style: dashed;
  opacity: 0.85;
}

.cert-card-progress .cert-card-badge {
  background: transparent;
  border: 1px dashed var(--accent-dim);
}

.cert-card-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cert-card-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.cert-card-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

/* --- projects --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border-top: 2px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1.5rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
}

.project-tag {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.project-card p:not(.project-tag) {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- education --- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.edu-card {
  background: var(--surface);
  border-top: 2px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1.25rem;
}

.edu-year {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.edu-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.edu-school {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- contact --- */
.contact h2 {
  margin-bottom: 0.75rem;
}

.contact .lede {
  margin-bottom: 2rem;
}

/* --- footer --- */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .timeline-item {
    grid-template-columns: 20px 1fr;
    gap: 0.9rem;
  }
}

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