:root {
  --bg: #08090a;
  --text: #e8ecea;
  --text-bright: #f4f6f5;
  --muted: #a7aeab;
  --muted-2: #8a918d;
  --dim: #5b625e;
  --line: #17191b;
  --card-border: #191c1e;
  --card-border-hover: #2b2f31;
  --card-bg: #0a0c0d;
  --card-bg-hover: #0d0f10;
  --pill-bg: #101315;
  --pill-text: #8b928e;
  --accent: oklch(0.72 0.14 155);
  --accent-soft: oklch(0.72 0.11 155);
  --accent-softer: oklch(0.72 0.09 155);
  --heading-dim: #7f8783;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

::selection { background: oklch(0.72 0.14 155 / 0.3); color: var(--text-bright); }

img, svg { display: block; max-width: 100%; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  background: var(--accent);
  color: #08090a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Links */
.lnk {
  transition: color 0.18s ease, border-color 0.18s ease;
}
.lnk:hover { color: var(--text-bright); }

a:focus-visible,
.lnk:focus-visible,
.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Reveal animation, degrades gracefully */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Header / Hero */
header.hero {
  padding: 112px 0 88px;
  border-bottom: 1px solid var(--line);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px oklch(0.72 0.14 155 / 0.6);
  flex-shrink: 0;
}
.status-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-softer);
}

h1.name {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--text-bright);
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent-soft);
  margin-top: 14px;
  letter-spacing: 0.01em;
}

.intro {
  max-width: 620px;
  font-size: 17.5px;
  color: var(--muted);
  margin-top: 26px;
  text-wrap: pretty;
}

.pill-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid transparent;
  background: var(--pill-bg);
  padding: 6px 11px;
  border-radius: 5px;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 38px;
  align-items: center;
}
.hero-nav a {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.hero-nav a span.sym { color: var(--accent-soft); }

/* Sections */
section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 44px;
}
.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-softer);
  flex-shrink: 0;
}
.section-title {
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--heading-dim);
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Cards */
.card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--card-border-hover); background: var(--card-bg-hover); }

.card-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--pill-text);
  background: var(--pill-bg);
  border: 1px solid transparent;
  padding: 4px 9px;
  border-radius: 4px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.project-card {
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
}
.project-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.project-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  flex-shrink: 0;
}
.project-summary {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-softer);
  margin-top: 9px;
  letter-spacing: 0.01em;
}
.project-body {
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 16px;
  text-wrap: pretty;
  flex: 1;
}
.project-tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.project-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.project-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-links a span.sym { color: var(--accent-soft); }

/* Certs grid */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cert-card {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 132px;
}
.cert-title {
  font-size: 15.5px;
  font-weight: 600;
  color: #eceeed;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.cert-org {
  font-size: 13.5px;
  color: var(--muted-2);
  margin-top: 7px;
}
.cert-spacer { flex: 1; }
.cert-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.cert-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.cert-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-softer);
  border-bottom: 1px solid oklch(0.72 0.09 155 / 0.25);
  padding-bottom: 1px;
  white-space: nowrap;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 24px;
}
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.skill-list li {
  font-size: 15px;
  color: var(--text);
}

/* Footer */
footer {
  padding: 64px 0 80px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-2);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

@media (max-width: 480px) {
  header.hero { padding: 72px 0 56px; }
  section { padding: 64px 0; }
  .section-title { font-size: 12.5px; }
  .project-card-top { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Below ~348px the 300px/280px minmax tracks no longer fit inside the
   24px-padded wrap, so drop to a single column and tighten padding. */
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .projects-grid,
  .certs-grid,
  .skills-grid { grid-template-columns: 1fr; }
}
