:root {
  --bg: #0b0f14;
  --surface: #11161d;
  --surface-2: #0f141a;
  --border: #1f2733;

  --text: #e6edf3;
  --text-soft: #b8c0cc;
  --text-faint: #6b7280;

  --accent: #7ee787;
  --accent-hover: #9befa3;
  --accent-soft: rgba(126, 231, 135, 0.12);

  --link: #6cb6ff;
  --link-hover: #96cbff;

  --container: 1100px;
  --reading: 820px;

  --radius-sm: 6px;
  --radius-md: 10px;

  --font-sans: "JetBrains Mono", monospace;
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

main {
  flex: 1;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

a:hover {
  color: var(--link-hover);
}

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

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.reading {
  width: min(var(--reading), 100%);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: lowercase;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

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

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero p.lead {
  max-width: 60ch;
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  color: var(--text-soft);
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: lowercase;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
}

.button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}

/* Generic sections */
.section {
  padding: 3rem 0;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Page layout */
.page {
  padding: 4rem 0 4rem;
}

.page-title {
  margin: 0 0 2rem;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-intro {
  max-width: 72ch;
}

.page-intro p {
  margin: 0 0 1.25rem;
  color: var(--text-soft);
}

.page-intro p:last-child {
  margin-bottom: 0;
}

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: start;
}

.about-subtitle {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  color: #cfd6df;
  font-weight: 700;
}

.about-main {
  max-width: 72ch;
}

.about-main p {
  margin: 0 0 1.25rem;
  color: var(--text-soft);
}

.about-side {
  display: grid;
  gap: 1rem;
}

.about-side h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

/* Grid / cards */
.grid {
  display: grid;
  gap: 1rem;
}

.grid.projects {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.card h2,
.card h3 {
  margin: 0 0 0.6rem;
  color: var(--text);
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-soft);
}

.meta {
  margin-top: 1rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.90rem;
}

/* Posts */
.post-list {
  display: grid;
  gap: 0;
}

.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item h3 {
  margin: 0.45rem 0 0.6rem;
  font-size: 1.15rem;
}

.post-item p {
  margin: 0;
  color: var(--text-soft);
}

.post-item .meta {
  margin-top: 0;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.9rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(126, 231, 135, 0.18);
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 1.4;
}
/* Footer */
.site-footer {
  padding: 1.5rem 0 2.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.95rem;
}

.footer-col-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: center;
}

.footer-col {
  text-align: center;
}

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

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.footer-social a {
  color: var(--link);
}

.footer-social a:hover {
  color: var(--link-hover);
}

.footer-copyright {
  margin-top: 1rem;
  text-align: center;
}

/* Utilities */
.muted {
  color: var(--text-soft);
}

.faint {
  color: var(--text-faint);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

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

  .page {
    padding: 3rem 0 4rem;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(var(--container), calc(100% - 1.25rem));
  }

  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 0.98rem;
    line-height: 1;
  }

  .nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .nav-links a {
    font-size: 0.84rem;
    line-height: 1;
    white-space: nowrap;
  }

  .hero {
    padding: 2.75rem 0 2.5rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .section,
  .page {
    padding: 2.25rem 0;
  }
}

.projects-page {
  padding-top: 0.5rem;
}

.page-lead {
  max-width: 68ch;
  margin: 0 0 2rem;
  color: var(--text-soft);
}

.projects-heading {
  margin: 0 0 1.25rem;
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.featured-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.project-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.project-card.featured {
  min-height: 250px;
}

.project-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.project-card h3 a {
  color: var(--link);
}

.project-card h3 a:hover {
  color: var(--link-hover);
}

.project-card p {
  margin: 0;
  color: var(--text-soft);
  flex: 1;
}

.project-card .meta {
  margin-top: 1.25rem;
}

.post-content {
  margin-top: 2rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

.post-content p {
  margin: 0 0 1.35rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
  margin: 0 0 1.4rem;
}

.post-content strong {
  color: #f5f7fa;
  font-weight: 600;
}

.post-content hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  width: 85%;
  margin: 5rem auto 5rem 0;
}

.post-content h2::before,
.post-content h3::before,
.post-content h4::before {
  color: #7f8896;
  margin-right: 0.35rem;
  font-size: 0.8em;
}

.post-content h2::before {
  content: "#";
}

.post-content h3::before {
  content: "##";
}

.post-content h4::before {
  content: "###";
}

.post-content h2 {
  color: #eef2f6;
  font-size: 2rem;
  line-height: 1.2;
  margin-top: 3.2rem;
  margin-bottom: 1.1rem;
  font-weight: 700;
}
.post-content h3 {
  color: #eef2f6;
  font-size: 1.45rem;
  line-height: 1.3;
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  font-weight: 700;
}

.post-content h4 {
  color: #eef2f6;
  font-size: 1.25rem;
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-soft);
}

.post-content li {
  margin-bottom: 0.55rem;
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.post-content pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.post-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.post-content blockquote {
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  color: var(--text-faint);
}

.post-header .page-title,
.post-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  max-width: 22ch;
  margin: 0 0 1rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 1.5rem;
}

.post-tags .tag {
  padding: 0.18rem 0.5rem;
  font-size: 0.82rem;
  opacity: 0.9;
}
