/* ══════════════════════════════════════════════
   CHENG LIU · PERSONAL PAGE — SHARED STYLES
   ══════════════════════════════════════════════ */

:root {
  /* Blue pixel-game palette (replaces purple) */
  --ink:    #0f172a;
  --ink2:   #334155;
  --muted:  #64748b;
  --pale:   #e0f2fe;
  --card:   #f8fafc;
  --border: #93c5fd;
  --accent: #2563eb;
  --pink:   #38bdf8;
  --gold:   #f59e0b;
  --white:  #ffffff;
  --teal:   #0ea5e9;
  /* Stronger pixel grid + chunky shadows */
  --pixel-grid: rgba(37, 99, 235, 0.11);
  --pixel-grid-b: rgba(15, 23, 42, 0.06);
  --pixel-step: 4px;
  --pixel-shadow: 4px 4px 0 rgba(15, 23, 42, 0.18);
  --pixel-shadow-accent: 4px 4px 0 rgba(37, 99, 235, 0.35);
  --font-pixel: 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: #bfdbfe;
  background-image:
    linear-gradient(var(--pixel-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--pixel-grid) 1px, transparent 1px),
    linear-gradient(var(--pixel-grid-b) 1px, transparent 1px),
    linear-gradient(90deg, var(--pixel-grid-b) 1px, transparent 1px);
  background-size:
    var(--pixel-step) var(--pixel-step),
    var(--pixel-step) var(--pixel-step),
    calc(var(--pixel-step) * 4) calc(var(--pixel-step) * 4),
    calc(var(--pixel-step) * 4) calc(var(--pixel-step) * 4);
  background-position: 0 0, 0 0, 0 0, 2px 2px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  image-rendering: auto;
}
button, input, textarea, select { font: inherit; }

/* ── SAKURA ────────────────────────────────── */
.sakura-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal {
  position: absolute; top: -20px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate(0,0)       rotate(0deg);   opacity: 0; }
  5%   { opacity: .6; }
  90%  { opacity: .25; }
  100% { transform: translate(-60px,105vh) rotate(720deg); opacity: 0; }
}

/* ── LAYOUT ────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ────────────────────────────────── */
aside {
  width: 260px; flex-shrink: 0;
  background: var(--white);
  border-right: 4px solid var(--accent);
  box-shadow: var(--pixel-shadow);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 32px 22px 24px;
  overflow: hidden;
}
aside::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0,
    var(--accent) 8px,
    var(--pink) 8px,
    var(--pink) 16px,
    var(--gold) 16px,
    var(--gold) 24px
  );
  image-rendering: pixelated;
}
/* nav */
nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: auto; }
nav a {
  font-size: 17px; color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 0;
  border: 2px solid transparent;
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.05s ease, border-color 0.05s ease;
  letter-spacing: 0.04em;
  font-family: var(--font-pixel);
}
nav a:hover, nav a.active {
  background: var(--pale);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.25);
}
nav a .nav-dot {
  width: 6px; height: 6px;
  border-radius: 0;
  background: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.side-links {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 20px; flex-wrap: wrap;
}
.side-link {
  font-size: 14px; color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  font-family: var(--font-pixel);
  padding: 5px 10px;
  border: 3px solid var(--border);
  border-radius: 0;
  transition: transform 0.05s ease;
  box-shadow: 2px 2px 0 rgba(15, 23, 42, 0.12);
}
.side-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--pale);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.3);
}

.side-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; color: #15803d;
  justify-content: center; margin-top: 12px;
  font-family: var(--font-pixel);
}
.sdot {
  width: 6px; height: 6px; border-radius: 50%; background: #5a9a4a;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

.side-quote {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--border); text-align: center;
  margin-top: 12px; line-height: 1.8;
  letter-spacing: 0.04em;
}

/* ── MAIN (centered column in the area right of sidebar) ─ */
main {
  width: 100%;
  max-width: 880px;
  min-width: 0;
  justify-self: center;
  padding: 56px clamp(28px, 4vw, 56px) 88px clamp(36px, 5vw, 72px);
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.94);
  border-left: 4px solid var(--accent);
  border-right: 4px solid rgba(56, 189, 248, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.sec-label {
  font-family: var(--font-pixel);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0,
    var(--border) 6px,
    transparent 6px,
    transparent 10px
  );
}
.sec-title {
  font-family: var(--font-pixel);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-shadow: 3px 3px 0 rgba(147, 197, 253, 0.9), 5px 5px 0 rgba(37, 99, 235, 0.12);
}
.sec-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 48px;
  height: 6px;
  background: var(--accent);
  border: 2px solid #0f172a;
  box-shadow: 3px 3px 0 var(--pink);
  border-radius: 0;
}
.sec-title.about-sec-title { margin-bottom: 10px; }
section { margin-bottom: 72px; scroll-margin-top: 40px; }

/* About: cyclist easter egg */
.about-cyclist-lane {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
  height: 84px;
  margin-bottom: 18px;
  border-radius: 0;
  border: 4px solid var(--accent);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(37, 99, 235, 0.05) 66%, rgba(37, 99, 235, 0.1) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    inset 0 -12px 20px rgba(37, 99, 235, 0.05),
    4px 4px 0 rgba(37, 99, 235, 0.18);
}
.about-cyclist-lane::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  height: 4px;
  border-radius: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(37, 99, 235, 0.35) 0,
    rgba(37, 99, 235, 0.35) 8px,
    rgba(56, 189, 248, 0.3) 8px,
    rgba(56, 189, 248, 0.3) 16px
  );
  opacity: 0.95;
  image-rendering: pixelated;
}
.about-cyclist {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 176px;
  height: 78px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.08));
  animation: about-cyclist-pingpong 9.6s ease-in-out infinite;
}
.about-cyclist-svg {
  display: block;
  overflow: visible;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
@keyframes about-cyclist-pingpong {
  0%, 100% { left: 0; transform: scaleX(1); }
  46% { left: calc(100% - 176px); transform: scaleX(1); }
  50% { left: calc(100% - 176px); transform: scaleX(-1); }
  96% { left: 0; transform: scaleX(-1); }
  99% { left: 0; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .about-cyclist { animation: none; left: 12%; transform: none; }
}

/* ── HERO ────────────────────────────────────── */
#hero {
  padding: 0 0 28px;
  margin-bottom: 36px;
}
.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.hero-avatar {
  width: 130px; height: 130px; flex-shrink: 0;
  border-radius: 0;
  background: #dbeafe;
  border: 4px solid var(--accent);
  box-shadow: var(--pixel-shadow-accent), 6px 6px 0 rgba(15, 23, 42, 0.1);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* Sits slightly below the name line; tweak to taste */
  margin-top: 36px;
  align-self: flex-start;
}
.hero-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 0;
  image-rendering: pixelated;
}
.hero-avatar svg { display: block; }
.hero-content { flex: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 1px;
  color: var(--accent);
  font-family: var(--font-pixel);
  margin-bottom: 14px;
}
.hero-tag span { width: 20px; height: 1px; background: var(--accent); }
.hero-name {
  font-family: var(--font-pixel);
  font-size: 42px; line-height: 1.25;
  font-weight: 700; color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.hero-name em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 3px 3px 0 rgba(147, 197, 253, 0.85);
}
.hero-sub {
  font-size: 14px; color: var(--muted);
  margin-bottom: 24px; line-height: 2;
  max-width: 100%;
}
.hero-sub strong { color: var(--ink2); font-weight: 600; }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 0;
  border: 3px solid var(--accent);
  color: var(--ink2);
  letter-spacing: 0.02em;
  background: var(--white);
  font-family: var(--font-pixel);
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.2);
}

/* ── ABOUT ────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}
.about-card {
  background: var(--card);
  border: 4px solid var(--accent);
  border-radius: 0;
  box-shadow: var(--pixel-shadow-accent), 8px 8px 0 rgba(15, 23, 42, 0.08);
  padding: 20px;
  position: relative; overflow: hidden;
}
.about-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; border-radius: 3px 0 0 3px;
}
.about-card.blue::before  { background: var(--accent); }
.about-card.pink::before  { background: var(--pink); }
.about-card.gold::before  { background: var(--gold); }
.about-card.teal::before  { background: var(--teal); }
.about-card-icon  { font-size: 18px; margin-bottom: 8px; }
.about-card-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.about-card-sub   { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ── PUBLICATIONS ─────────────────────────────── */
.pub-list { display: flex; flex-direction: column; gap: 18px; }
.pub-card {
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: 0;
  box-shadow: var(--pixel-shadow-accent), 8px 8px 0 rgba(15, 23, 42, 0.06);
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: stretch;
  transition: border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.pub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--pixel-shadow-accent), 10px 10px 0 rgba(15, 23, 42, 0.06);
  transform: translate(-2px, -2px);
}

.pub-thumb-wrap {
  flex: 0 0 148px;
  width: 148px;
  border-radius: 0;
  overflow: hidden;
  border: 3px solid var(--accent);
  background: #e0f2fe;
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.15);
  align-self: flex-start;
}
.pub-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  vertical-align: middle;
}
.pub-thumb-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  aspect-ratio: 16 / 10;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.pub-thumb-fallback--arxiv {
  background: linear-gradient(180deg, #b31b1b 32%, #f5f5f5 32%);
  border: none;
}
.pub-thumb-fallback__arxiv-strip {
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: auto;
  padding-top: 8px;
}
.pub-thumb-fallback__hint {
  font-size: 10px;
  color: #555;
  padding-bottom: 10px;
}
.pub-thumb-fallback--venue {
  background: linear-gradient(145deg, var(--pale), #fff);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: 500;
}

.pub-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.pub-number {
  font-family: var(--font-pixel);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  width: 32px;
  user-select: none;
  padding-top: 2px;
}
.pub-body { flex: 1; min-width: 0; }
h3.pub-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.5;
}
.pub-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.pub-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pub-authors { font-size: 12px; color: var(--muted); margin-bottom: 6px; line-height: 1.45; }
.pub-authors strong { color: var(--accent); }
.pub-venue,
a.pub-venue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--accent);
  background: var(--pale);
  padding: 4px 10px;
  border-radius: 0;
  border: 2px solid rgba(37, 99, 235, 0.35);
  margin-bottom: 4px;
  box-shadow: 2px 2px 0 rgba(37, 99, 235, 0.12);
}
a.pub-venue--link {
  text-decoration: none;
  cursor: pointer;
}
a.pub-venue--link:hover {
  border-color: var(--accent);
  background: #dbeafe;
}

.pub-thumb-wrap .pub-thumb-link {
  display: block;
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
}
.pub-thumb-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pub-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.badge {
  font-family: var(--font-pixel);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 0;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: opacity 0.15s;
  border-width: 2px;
  border-style: solid;
  box-shadow: 2px 2px 0 rgba(15, 23, 42, 0.08);
}
.badge:hover { opacity: .75; }
.badge-oral { background: #fef3e0; color: #b45309; border: 1px solid #fcd34d; }
.badge-pdf  { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.badge-code { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.badge-demo { background: #fdf4ff; color: #9333ea; border: 1px solid #e9d5ff; }
.badge-arxiv {
  background: #faf5f5;
  color: #8b1a1a;
  border: 1px solid #e7c8c8;
  font-weight: 600;
}

@media (max-width: 700px) {
  .pub-card { flex-direction: column; }
  .pub-thumb-wrap {
    width: 100%;
    max-width: 280px;
    flex-basis: auto;
  }
  .pub-main { flex-direction: row; }
}

/* Site admin FAB (blog) */
.site-admin-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  font-family: var(--font-pixel);
}
.site-admin-fab__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 4px 20px rgba(26, 10, 46, 0.12);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.site-admin-fab__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.18);
}
.site-admin-fab__panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: min(320px, calc(100vw - 32px));
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(26, 10, 46, 0.12);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink2);
}
.site-admin-fab__title {
  font-family: var(--font-pixel);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}
.site-admin-fab__row { margin: 0 0 10px; }
.site-admin-fab__label { display: block; font-size: 10px; color: var(--muted); letter-spacing: .5px; margin-bottom: 4px; }
.site-admin-fab__code {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--pale);
  border-radius: 4px;
  margin-bottom: 6px;
}
.site-admin-fab__hint { display: block; color: var(--muted); font-size: 11px; }
.site-admin-fab__preview {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--ink2);
}
.site-admin-fab__preview input { margin-top: 3px; flex-shrink: 0; }
.site-admin-fab__status {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.site-admin-fab__on { color: #15803d; font-style: normal; }
.site-admin-fab__off { color: #b45309; font-style: normal; }

/* Blog closed gate */
.blog-gate {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.blog-gate-card {
  max-width: 420px;
  background: var(--card);
  border: 4px solid var(--accent);
  border-radius: 0;
  box-shadow: var(--pixel-shadow-accent);
  padding: 36px 32px;
  text-align: center;
}
.blog-gate-msg {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 16px 0 24px;
}
.blog-gate-card .contact-link { display: inline-block; }

/* ── PROJECTS ─────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-card {
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: 0;
  box-shadow: var(--pixel-shadow-accent), 8px 8px 0 rgba(15, 23, 42, 0.06);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: all .25s; position: relative; overflow: hidden;
}
.project-card::after {
  content: ''; position: absolute;
  top: 0; right: 0; width: 64px; height: 64px;
  border-radius: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  background: linear-gradient(135deg, var(--pale), transparent);
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translate(-3px, -3px);
  box-shadow: var(--pixel-shadow-accent), 12px 12px 0 rgba(15, 23, 42, 0.06);
}
.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-icon { font-size: 24px; line-height: 1; }
.project-links { display: flex; gap: 6px; flex-shrink: 0; }
.project-link {
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 0;
  border: 2px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-pixel);
  letter-spacing: 0.02em;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(15, 23, 42, 0.1);
}
.project-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--pale);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.25);
}
.project-name {
  font-size: 15px; font-weight: 500;
  color: var(--ink); line-height: 1.3;
}
.project-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; flex: 1; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tag {
  font-size: 14px;
  padding: 3px 8px;
  border-radius: 0;
  background: var(--pale);
  color: var(--accent);
  font-family: var(--font-pixel);
  border: 2px solid rgba(37, 99, 235, 0.25);
  box-shadow: 2px 2px 0 rgba(37, 99, 235, 0.1);
}

/* NEWS timeline by year */
.news-list { display: flex; flex-direction: column; gap: 0; }

.news-year-group:not(:first-child) {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.news-year-label {
  font-family: var(--font-pixel);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 rgba(147, 197, 253, 0.8);
}

.news-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.9);
}
.news-year-group .news-item:last-child { border-bottom: none; }

.news-date {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
  width: 88px;
  padding-top: 2px;
  line-height: 1.45;
}
.news-text {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.65;
}
.news-text strong { font-weight: 500; color: var(--ink); }

/* EXPERIENCE — flat list (no year groups) */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.exp-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.9);
}
.exp-list .exp-item:last-child { border-bottom: none; }
.exp-date {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
  width: 132px;
  padding-top: 2px;
  line-height: 1.45;
}
.exp-body {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.65;
}
.exp-body strong { font-weight: 500; color: var(--ink); }
.exp-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.35;
}

/* ── CONTACT ──────────────────────────────────── */
.contact-box {
  background: var(--card);
  border: 4px solid var(--accent);
  border-radius: 0;
  box-shadow: var(--pixel-shadow-accent), 10px 10px 0 rgba(15, 23, 42, 0.08);
  padding: 36px;
  text-align: center; position: relative; overflow: hidden;
}
.contact-box::before {
  content: ''; position: absolute; inset: 0; border-radius: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,.06), transparent 60%);
  pointer-events: none;
}
.contact-box > * {
  position: relative;
  z-index: 1;
}
.contact-email {
  font-family: var(--font-pixel);
  font-size: 18px;
  margin: 12px 0 24px;
  font-style: normal;
  line-height: 1.7;
  letter-spacing: 0.04em;
}
.contact-email a {
  color: var(--accent);
  text-decoration: none;
}
.contact-email a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.contact-link {
  font-size: 17px;
  padding: 10px 18px;
  border-radius: 0;
  border: 3px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-pixel);
  letter-spacing: 0.03em;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
  box-shadow: 3px 3px 0 rgba(15, 23, 42, 0.12);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--pale);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(37, 99, 235, 0.25);
}

/* ── SCROLL REVEAL ────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════
   BLOG STYLES
   ══════════════════════════════════════════════ */

/* Blog list: view switch & topic filters */
.blog-view-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.blog-view-hint {
  font-family: var(--font-pixel);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.blog-seg {
  display: inline-flex;
  border: 3px solid var(--accent);
  border-radius: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.2);
}
.blog-seg-btn {
  font-family: var(--font-pixel);
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.08s, color 0.08s;
}
.blog-seg-btn + .blog-seg-btn { border-left: 3px solid var(--border); }
.blog-seg-btn:hover { color: var(--accent); background: var(--pale); }
.blog-seg-btn.active {
  background: var(--accent);
  color: var(--white);
  font-weight: 500;
}

.blog-theme-filters { margin-bottom: 22px; }
.blog-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.blog-filter-row:last-child { margin-bottom: 0; }
.blog-filter-label {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  width: 36px;
  flex-shrink: 0;
  padding-top: 7px;
}
.blog-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.blog-filter-btn {
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.blog-filter-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
}
.blog-filter-btn.active {
  border-color: var(--accent);
  background: var(--pale);
  color: var(--accent);
}
.blog-time-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Blog: time view year blocks */
.blog-time-group { margin-bottom: 28px; }
.blog-time-group:last-child { margin-bottom: 0; }
.blog-time-year {
  font-family: var(--font-pixel);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.blog-time-group:not(:first-child) .blog-time-year {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.blog-time-list { display: flex; flex-direction: column; gap: 14px; }

.blog-empty { font-size: 13px; color: var(--muted); margin: 0; }

/* blog list page */
.blog-grid { display: flex; flex-direction: column; gap: 16px; }
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 26px;
  text-decoration: none; color: inherit;
  transition: all .25s; display: block;
  position: relative; overflow: hidden;
}
.blog-card:hover {
  border-color: rgba(37,99,235,.35);
  transform: translateX(4px);
  box-shadow: 0 4px 24px rgba(37,99,235,.07);
}
.blog-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.blog-card-date {
  font-family: var(--font-pixel);
  font-size: 11px; color: var(--muted); flex-shrink: 0;
}
.blog-card-theme {
  font-size: 11px;
  color: var(--ink2);
  line-height: 1.4;
  text-align: right;
}
.blog-post-theme-inline {
  font-size: 11px;
  color: var(--muted);
}
.blog-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-card-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 8px;
  background: var(--pale); color: var(--accent);
  font-family: var(--font-pixel);
  border: 1px solid rgba(37,99,235,.15);
}
.blog-card-title {
  font-family: var(--font-pixel);
  font-size: 16px; font-weight: 700;
  color: var(--ink); margin-bottom: 8px; line-height: 1.35;
  letter-spacing: 0.03em;
}
.blog-card-excerpt {
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.blog-card-footer {
  display: flex; justify-content: flex-end; margin-top: 14px;
}
.blog-read-more {
  font-family: var(--font-pixel);
  font-size: 11px; color: var(--accent); letter-spacing: .5px;
}

/* blog post reader */
.blog-post-nav {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 36px;
}
.blog-back-btn {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 0;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
  box-shadow: 2px 2px 0 rgba(15, 23, 42, 0.1);
}
.blog-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--pale);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(37, 99, 235, 0.2);
}

.blog-post-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.blog-post-date {
  font-family: var(--font-pixel);
  font-size: 11px; color: var(--muted);
}
.blog-post-title {
  font-family: var(--font-pixel);
  font-size: 30px; font-weight: 700;
  color: var(--ink); margin-bottom: 32px;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.blog-post-loading,
.blog-post-error {
  margin: 0;
  padding: 1em 1.2em;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
}
.blog-post-loading {
  background: var(--pale);
}
.blog-post-error {
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(254,226,226,.08);
  color: #b91c1c;
}

/* markdown content */
.blog-post-content {
  font-size: 14px; line-height: 2;
  color: var(--ink2); max-width: 720px;
}
.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3 {
  font-family: var(--font-pixel);
  color: var(--ink); margin: 2em 0 .75em;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.blog-post-content h1 { font-size: 28px; }
.blog-post-content h2 { font-size: 22px; }
.blog-post-content h3 { font-size: 18px; }
.blog-post-content p  { margin-bottom: 1.2em; }
.blog-post-content ul,
.blog-post-content ol { margin: 1em 0 1em 1.5em; }
.blog-post-content li { margin-bottom: .4em; }
.blog-post-content a  { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.blog-post-content code {
  font-family: var(--font-pixel);
  font-size: .9em; background: var(--pale);
  padding: 2px 6px; border-radius: 5px;
  color: var(--accent);
}
.blog-post-content pre {
  background: #0f2744; border-radius: 8px;
  border: 2px solid #1e3a5f;
  padding: 20px 24px; overflow-x: auto;
  margin: 1.5em 0;
}
.blog-post-content pre code {
  background: none; color: #bae6fd; padding: 0; font-size: .88em;
}
.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .8em 1.2em; margin: 1.5em 0;
  background: var(--pale); border-radius: 0 10px 10px 0;
  font-style: normal; color: var(--muted);
}
.blog-post-content hr {
  border: none; border-top: 1px solid var(--border);
  margin: 2em 0;
}
.blog-post-content img {
  max-width: 100%; border-radius: 10px;
  margin: 1.5em 0; border: 1px solid var(--border);
}
.blog-post-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.5em 0; font-size: 13px;
}
.blog-post-content th {
  background: var(--pale); color: var(--ink);
  padding: 8px 14px; text-align: left;
  font-family: var(--font-pixel);
  font-size: 11px; letter-spacing: .5px;
}
.blog-post-content td {
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  color: var(--ink2);
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .shell {
    grid-template-columns: 1fr;
  }
  aside { display: none; }
  main {
    max-width: none;
    justify-self: stretch;
    padding: 36px 22px 72px;
    border-left: none;
    border-right: none;
    background: rgba(248, 250, 252, 0.96);
  }
  .about-grid, .projects-grid { grid-template-columns: 1fr; }
  .hero-name { font-size: 36px; }
  .hero-inner { flex-direction: column; gap: 24px; }
  .hero-avatar { width: 100px; height: 100px; margin-top: 0; align-self: center; }
  .blog-post-title { font-size: 26px; }
}
