/* ========================================
   vl43den — dark, minimal
   One accent, hairline borders, no decoration for its own sake.
   ======================================== */

:root {
  --bg: #07080a;
  --surface: #0c0e11;
  --surface-hover: #101318;
  --line: #1a1e24;
  --line-strong: #2a3038;

  --text: #e8eaed;
  --text-2: #a3aab5;
  --text-3: #7b8390;

  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.1);
  --accent-line: rgba(94, 234, 212, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  --wrap: 960px;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ========================================
   Header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 10, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-line);
}

.site-header nav {
  display: flex;
  gap: 0.25rem;
}

.site-header nav a {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-3);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.site-header nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.site-header nav a[aria-current='page'] {
  color: var(--text);
}

/* ========================================
   Layout
   ======================================== */

.page {
  flex: 1;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.page-head {
  margin-bottom: 3rem;
}

.page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-head p {
  margin-top: 0.75rem;
  color: var(--text-2);
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

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

.section {
  margin-top: 5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.section-head a {
  font-size: 0.85rem;
  color: var(--text-3);
  transition: color 0.15s var(--ease);
}

.section-head a:hover {
  color: var(--accent);
}

.section-note {
  margin: -0.25rem 0 0.5rem;
  color: var(--text-2);
  font-size: 0.925rem;
  max-width: 62ch;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  padding: 3rem 0 1rem;
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero .lede {
  margin-top: 1.5rem;
  max-width: 54ch;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-2);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.btn:hover {
  border-color: var(--text-3);
  background: var(--surface-hover);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04110e;
}

.btn-primary:hover {
  background: #8ef2e1;
  border-color: #8ef2e1;
}

/* Stat strip */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.stat {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: none;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-label {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ========================================
   Rows (projects, write-ups, posts)
   ======================================== */

.rows {
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding: 1.25rem 0.75rem;
  margin: 0 -0.75rem;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.15s var(--ease);
}

.row:hover {
  background: var(--surface);
}

.row-title {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.row-title::after {
  content: '\2197';
  margin-left: 0.4rem;
  color: var(--text-3);
  opacity: 0;
  transform: translate(-3px, 3px);
  display: inline-block;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), color 0.15s var(--ease);
}

.row:hover .row-title::after {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

.row-desc {
  grid-column: 1;
  color: var(--text-2);
  font-size: 0.925rem;
  max-width: 62ch;
}

.row-meta {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
  white-space: nowrap;
}

.tags {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tag {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
}

.tag.live {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ========================================
   Timeline
   ======================================== */

.timeline {
  list-style: none;
  position: relative;
}

.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.5rem;
  padding: 0 0 1.75rem;
  position: relative;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 7.5rem;
  top: 0.65rem;
  bottom: -0.65rem;
  margin-left: 0.75rem;
  width: 1px;
  background: var(--line);
}

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

.timeline li::after {
  content: '';
  position: absolute;
  left: 7.5rem;
  top: 0.55rem;
  margin-left: calc(0.75rem - 3px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--text-3);
}

.timeline li:first-child::after {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-line);
}

.timeline time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
  padding-top: 0.2rem;
}

.timeline .tl-body {
  padding-left: 1.5rem;
}

.timeline .tl-title {
  font-weight: 500;
}

.timeline .tl-title a {
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.timeline .tl-title a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.timeline .tl-desc {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* Certifications */

.certs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.certs li {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--text-2);
}

.certs li strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  margin-right: 0.4rem;
}

/* ========================================
   Prose (markdown content)
   ======================================== */

.prose {
  max-width: 68ch;
  color: var(--text-2);
}

.prose > * + * {
  margin-top: 1.25rem;
}

.prose h1 {
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose h2 {
  margin-top: 3rem;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin-top: 2rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color 0.15s var(--ease);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li::marker {
  color: var(--text-3);
}

.prose blockquote {
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent-line);
  color: var(--text-2);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
}

.prose pre {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  color: var(--text);
  font-weight: 500;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Article chrome */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

.article-meta a {
  color: var(--accent);
}

.article-head {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  transition: color 0.15s var(--ease);
}

.back:hover {
  color: var(--accent);
}

.empty {
  padding: 2rem 0;
  color: var(--text-3);
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  color: var(--text-3);
  font-size: 0.85rem;
}

.site-footer .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 0.25rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-3);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.social-link:hover {
  color: var(--accent);
  background: var(--surface-hover);
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
  .wrap {
    padding: 0 1.25rem;
  }

  .page {
    padding-top: 2.5rem;
  }

  .site-header .bar {
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
  }

  .site-header nav {
    margin-left: -0.75rem;
    flex-wrap: wrap;
  }

  .section {
    margin-top: 3.5rem;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: none;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .row-meta {
    grid-column: 1;
    grid-row: auto;
    order: -1;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding-left: 1.25rem;
  }

  .timeline li::before {
    left: 0;
    margin-left: 3px;
  }

  .timeline li::after {
    left: 0;
    margin-left: 0;
  }

  .timeline .tl-body {
    padding-left: 0;
  }
}

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

  * {
    transition: none !important;
  }
}
