:root {
  --bg: #05060a;
  --paper: #0f111b;
  --text: #f5f7ff;
  --muted: #9aa0b2;
  --line: #1b1f2c;
  --link: #8dd7ff;
  --link-hover: #b5e4ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.95);
}

.site-header__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand {
  margin-bottom: 0.75rem;
  display: inline-block;
}

.site-title {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-family: "Patrick Hand", "Outfit", sans-serif;
  font-size: clamp(1.8rem, 6.2vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
}

.site-subtitle {
  display: block;
  margin: -0.06rem 0 0;
  color: var(--muted);
  font-family: "Patrick Hand", "Outfit", sans-serif;
  font-size: clamp(0.72rem, 1.6vw, 1.08rem);
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: right;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.25rem;
}

.nav a {
  color: var(--link);
  font-size: 0.97rem;
  display: inline-block;
  padding-bottom: 0.2rem;
  text-decoration-line: underline;
  text-decoration-color: rgba(76, 189, 162, 0.9);
  text-decoration-style: wavy;
  text-underline-offset: 0.2rem;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.nav a:hover {
  color: var(--link-hover);
  text-decoration-color: rgba(79, 124, 196, 0.9);
}

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

.page {
  max-width: 760px;
  margin: 1rem auto 1.8rem;
  padding: 0 1rem;
  width: 100%;
  flex: 1 0 auto;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.site-footer__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.9rem 1rem 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.content {
  background: transparent;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 4.2vw, 2rem);
}

h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.12rem, 3.2vw, 1.25rem);
}

p,
li {
  margin: 0 0 0.95rem;
}

.lead {
  margin-top: -0.05rem;
  color: var(--muted);
}

.home-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: 1.2rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.55);
}

.home-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 60%);
}

.home-copy {
  display: flex;
  flex-direction: column;
}

.home-rant,
.home-lede {
  margin: 0 0 0.4rem;
  line-height: 1.6;
}

.home-lede {
  color: rgba(255, 255, 255, 0.8);
}

.home-rant {
  color: var(--muted);
}

@media (max-width: 640px) {
  .home-intro {
    flex-direction: column;
    text-align: center;
  }

  .home-lede,
  .home-rant {
    margin-bottom: 0.3rem;
  }
}

.home-copy p {
  margin-bottom: 0.45rem;
}

.home-rant {
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
  line-height: 1.45;
  margin-bottom: 0.28rem;
}
.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.35rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 16px 30px rgba(15, 15, 15, 0.05);
}

.feature-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.feature-lead {
  margin: 0 0 1rem;
  color: var(--text);
  font-weight: 500;
}

.feature-image {
  margin: 0 0 0.6rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-image figcaption {
  margin: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(240, 238, 233, 0.8);
}

.feature-video {
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.feature-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Inline code ──────────────────────────────────────────────────────────── */
/* Replaces the old light-background inline code with a dark GitHub-style look */

p code,
li code,
td code {
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #161b22;          /* GitHub Dark panel */
  border: 1px solid #30363d;    /* GitHub Dark border */
  color: #e6edf3;               /* GitHub Dark default text */
  font-size: 0.9em;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

/* ─── Block code / pre ─────────────────────────────────────────────────────── */
/* Base pre/highlight reset — overridden fully by .feature-card .highlight     */

pre,
.highlight {
  margin: 1rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
}

pre code {
  display: block;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  color: #e6edf3;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 0.93rem;
  line-height: 1.6;
}

.highlight pre {
  margin: 0;
  border: 0;
}

/* ─── Feature-card code block (styled shell) ───────────────────────────────── */

.feature-card code {
  background: #161b22;
  color: #e6edf3;
  padding: 0.45rem;
  border-radius: 8px;
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  overflow-x: auto;
}

.feature-card .highlight {
  margin-top: 1rem;
  border-radius: 12px;
  background: #161b22;           /* GitHub Dark background */
  box-shadow: inset 0 0 0 1px #30363d, 0 8px 24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  border: 1px solid #30363d;
  position: relative;
}

.feature-card .highlight::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.65rem;
  left: 1.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #8b949e;                /* GitHub Dark comment / muted */
}

.feature-card .highlight pre {
  margin: 0;
  padding: 1.35rem 1.4rem 1.2rem;
  background: transparent;
  border: 0;
  color: #e6edf3;                /* GitHub Dark default text */
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-card .highlight code {
  display: block;
  color: inherit;
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* Subtle top-right glow removed — GitHub Dark is clean and flat */
.feature-card .highlight::after {
  content: none;
}

/* ─── GitHub Dark syntax tokens ────────────────────────────────────────────── */

.highlight .token.comment,
.highlight .token.prolog,
.highlight .token.doctype,
.highlight .token.cdata {
  color: #8b949e;                /* muted grey — GH dark comments */
  font-style: italic;
}

.highlight .token.namespace {
  opacity: 0.7;
}

/* Keywords: if, const, return, import … */
.highlight .token.keyword,
.highlight .token.important {
  color: #ff7b72;                /* GH red */
}

/* Operators and punctuation */
.highlight .token.operator,
.highlight .token.punctuation {
  color: #c9d1d9;
}

/* Strings and chars */
.highlight .token.string,
.highlight .token.char,
.highlight .token.inserted,
.highlight .token.attr-value {
  color: #a5d6ff;                /* GH light blue */
}

/* Numbers, booleans, constants */
.highlight .token.number,
.highlight .token.boolean,
.highlight .token.constant,
.highlight .token.symbol {
  color: #79c0ff;                /* GH blue */
}

/* Functions */
.highlight .token.function {
  color: #d2a8ff;                /* GH purple */
}

/* Variables, parameters */
.highlight .token.variable,
.highlight .token.parameter {
  color: #ffa657;                /* GH orange */
}

/* Tags (HTML/JSX) */
.highlight .token.tag {
  color: #7ee787;                /* GH green */
}

/* Attribute names */
.highlight .token.attr-name {
  color: #79c0ff;                /* GH blue */
}

/* Class names, type identifiers */
.highlight .token.class-name,
.highlight .token.builtin {
  color: #ffa657;                /* GH orange */
}

/* Selectors (CSS) */
.highlight .token.selector {
  color: #7ee787;                /* GH green */
}

/* Properties (CSS) */
.highlight .token.property {
  color: #79c0ff;
}

/* Regex */
.highlight .token.regex {
  color: #a5d6ff;
}

/* Deleted */
.highlight .token.deleted {
  color: #ff7b72;
}

/* ─── Everything else unchanged below ─────────────────────────────────────── */

.about-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.about-headline h1 {
  margin-bottom: 0;
}

.about-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: 0 0 108px;
  background: #f3f1ec;
}

.about-intro {
  font-size: clamp(1.16rem, 2.5vw, 1.55rem);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.curl-blue,
.curl-green,
.curl-orange {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1.6px;
  text-underline-offset: 0.16em;
}

.curl-blue {
  text-decoration-color: #4f7cc4;
}

.curl-green {
  text-decoration-color: #2f8f61;
}

.curl-orange {
  text-decoration-color: #c17a2a;
}

.education-grid {
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.8rem;
  max-width: 560px;
}

.education-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.education-row:first-child {
  border-top: 0;
}

.education-key,
.education-value {
  padding: 0.75rem 0.9rem;
}

.education-key {
  background: rgba(141, 215, 255, 0.08);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.education-value {
  color: #dfe5ff;
}

.connect-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  max-width: 560px;
  background: rgba(14, 17, 30, 0.9);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
}

.connect-box p {
  margin: 0 0 0.4rem;
}

.connect-box p:last-child {
  margin-bottom: 0;
}

.about-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.6rem;
}

.about-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.about-actions a:hover {
  background: rgba(141, 215, 255, 0.12);
  border-color: var(--link);
  transform: translateY(-1px);
}

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

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

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0.1rem 0 0;
}

.post-item {
  padding: 0.2rem 0;
}

.post-item + .post-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.6rem;
}

.post-item a {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 500;
}

.post-item a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.research-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.research-action {
  display: inline-block;
  border: 1px solid rgba(141, 215, 255, 0.5);
  background: rgba(141, 215, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  padding: 0.42rem 0.72rem;
  border-radius: 6px;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.research-action:hover {
  border-color: var(--link);
  background: rgba(141, 215, 255, 0.18);
  transform: translateY(-1px);
}

.giscus-comments {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(15, 15, 15, 0.08);
}

.giscus-comments #giscus {
  width: 100%;
}

blockquote {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--line);
  color: #8b949e;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.6rem 0;
}

code,
kbd,
samp {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-title {
    line-height: 0.95;
  }

  .site-header__inner {
    padding-top: 1rem;
    padding-bottom: 0.85rem;
  }

  .nav {
    gap: 0.7rem;
    width: 100%;
  }

  .nav a {
    font-size: 0.94rem;
  }

  .page {
    margin-top: 1rem;
  }

  .content {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  .home-intro {
    align-items: center;
    gap: 0.85rem;
  }

  .home-avatar {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 60%);
  }

  .post-item {
    padding: 0.72rem 0;
  }

  .post-item a {
    font-size: 1.03rem;
    line-height: 1.4;
  }

  .post-item .meta {
    display: block;
    margin-top: 0.1rem;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
  }

  .about-avatar {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }

  pre code {
    font-size: 0.86rem;
  }
}
