﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Lora:wght@400;600;700&display=swap");

:root {
  /* Color */
  --bg: #1A1A1A;
  --bg-elev: rgba(26, 26, 26, 0.94);
  --page-text: #F9F9F9;
  --panel: #222422;
  --panel-soft: #1E211F;
  --text: #F9F9F9;
  --muted: #B8C2BB;
  --accent: #264C3E;
  --accent-strong: #184626;
  --purple-note: #2B1331;
  --title-text: #F9F9F9;
  --link: #D8EADF;
  --link-hover: #F9F9F9;
  --border: #2B1331;
  --shadow: 0 12px 28px rgba(43, 19, 49, 0.22), 0 2px 10px rgba(0, 0, 0, 0.32);
  --focus: 0 0 0 3px rgba(38, 76, 62, 0.62);

  /* Layout */
  --radius: 8px;
  --page-max: 1480px;
  --page-gutter: 20px;

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: "Lora", ui-serif, Georgia, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --title-size: 46px;
  --title-letterspace: 0.4px;

  /* UI details */
  --scroll-track: rgba(249, 249, 249, 0.08);
  --scroll-thumb: rgba(38, 76, 62, 0.72);
  --scroll-thumb-hover: rgba(38, 76, 62, 0.92);
  --marquee-opacity: 0.92;
  --shortcut-width: 72px;
  --shortcut-width-sm: 64px;
  --shortcut-icon-size: 42px;

  color-scheme: dark;
}

/* Base */
html { font-family: var(--font-sans); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--page-text);
  padding-bottom: 44px;
  line-height: 1.55;
  accent-color: var(--accent-strong);
}

p { margin: 10px 0; }
p, li, span, div, a, button, input, textarea { font-family: inherit; }
code, pre { font-family: var(--font-mono); }

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

a { color: var(--link); text-decoration: none; text-underline-offset: 0.16em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--purple-note); color: var(--page-text); }
.muted { color: var(--muted); }
#summary .content p:not(.muted),
#about .content > p:not(.muted),
#tooling .content p:not(.muted) {
  color: var(--page-text);
  font-weight: 600;
}
.content a { text-decoration: underline; text-decoration-thickness: 1px; }
.content a.button, .shortcut, .site-title-link, #taskbar a { text-decoration: none; }

/* Page layout */
header {
  position: relative;
  min-height: 76px;
  margin: 32px auto 20px;
  max-width: var(--page-max);
  display: flex;
  align-items: center;
}

main {
  width: min(100% - (2 * var(--page-gutter)), var(--page-max));
  height: fit-content;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 20px;
}

.middle { border: none; height: 100%; flex: 1 1 680px; max-width: 800px; padding-bottom: 20px; }
.left, .right { flex: 0 1 300px; padding-bottom: 20px; }
.center { flex: 1; display: flex; justify-content: center; align-items: center; }
section { margin-bottom: 20px; }

/* Header shortcuts */
.site-title-link { display: inline-flex; align-items: baseline; }
#header-name {
  font-family: var(--font-serif);
  font-size: var(--title-size);
  letter-spacing: var(--title-letterspace);
  color: var(--page-text);
}

#shortcut-nav {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  width: 100%;
  pointer-events: none;
}

.shortcut-cluster {
  position: absolute;
  top: 50%;
  color: rgba(247, 248, 250, 0.78);
  display: flex;
  flex-direction: row;
  gap: 40px;
  transform: translateY(-50%);
  pointer-events: auto;
}

.shortcut-cluster-left {
  left: var(--page-gutter);
}

.shortcut-cluster-right {
  right: var(--page-gutter);
  justify-content: flex-end;
}

.shortcut {
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  color: var(--page-text);
  width: var(--shortcut-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.shortcut img {
  width: var(--shortcut-icon-size);
  height: var(--shortcut-icon-size);
  display: block;
  object-fit: contain;
}

/* Window panels */
.window {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--accent);
  color: var(--title-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 750;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.content { padding: 12px; color: var(--text); background: var(--panel); }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }

.subtitle {
  color: rgba(249, 249, 249, 0.72);
  font-weight: 700;
}

/* Shared components */
.button, button.button {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(38, 76, 62, 0.22);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  font-weight: 750;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.button:hover {
  border-color: rgba(249, 249, 249, 0.28);
  background: rgba(38, 76, 62, 0.38);
}

.button:active { transform: translateY(1px); }

.compact-list {
  margin: 8px 0;
  padding: 0 20px;
}

.preview-list {
  display: grid;
  gap: 14px;
}

.preview-item h2 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.25;
}

.preview-item p { margin: 0; }

.scroll-panel {
  overflow-y: auto;
  max-height: 240px;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.scroll-panel::-webkit-scrollbar { width: 10px; }
.scroll-panel::-webkit-scrollbar-track { background: var(--scroll-track); }
.scroll-panel::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }
.scroll-panel::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* Homepage content */
.about-content {
  display: flow-root;
}

.about-content > div > .muted {
  margin-bottom: 0;
}

.portrait-photo {
  display: block;
  float: right;
  width: 32%;
  min-width: 84px;
  max-width: 112px;
  margin: 2px 0 4px 12px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  shape-margin: 8px;
  border: 2px solid var(--link);
  border-radius: var(--radius);
  background: var(--panel-soft);
}
#home-content { display: flex; gap: 14px; }
#home-content > div { min-width: 0; }

.badge-card-list {
  display: grid;
  gap: 10px;
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.badge-card-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
}

.badge-card span {
  display: grid;
  gap: 2px;
}

.badge-card strong { line-height: 1.2; }

.badge-card .muted {
  font-size: 13px;
  line-height: 1.3;
}

.education-entry + .education-entry {
  margin-top: 12px;
}

.education-degree {
  color: var(--page-text);
  font-weight: 750;
}

.education-school {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.education-notes {
  margin-top: 6px;
  color: var(--page-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.marquee img { opacity: var(--marquee-opacity); }

.badge {
  height: 32px;
  width: auto;
  vertical-align: middle;
  image-rendering: auto;
}

/* Footer */
footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: calc(100% - 8px);
  height: 32px;
  background-color: var(--bg-elev);
  padding: 4px;
  border-top: 1px solid rgba(247, 248, 250, 0.16);
  display: inline;
  backdrop-filter: blur(6px);
}

#taskbar { display: flex; gap: 4px; align-items: center; }
.vl { width: 2px; height: 30px; background: rgba(247, 248, 250, 0.14); }
.banners { flex: 1; }
.site-date {
  border: 1px solid rgba(247, 248, 250, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(247, 248, 250, 0.90);
  background: rgba(247, 248, 250, 0.06);
}

/* Post template */
.post-page header {
  width: min(100% - (2 * var(--page-gutter)), 960px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.post-page .center {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center;
}

.post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.post-nav a {
  color: var(--page-text);
  font-size: 14px;
}

.post-page main.post-main {
  display: block;
  max-width: 960px;
}

.post-article { padding: clamp(18px, 3vw, 32px); }

.post-article h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
}

.post-lede {
  max-width: 72ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.post-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.post-meta-item {
  display: grid;
  gap: 3px;
}

.post-meta-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-meta-item strong {
  font-size: 14px;
  line-height: 1.25;
}

.at-glance {
  margin: 18px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.at-glance h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.at-glance ul {
  margin: 0;
  padding-left: 20px;
}

.hero-placeholder {
  display: grid;
  min-height: 260px;
  margin: 24px 0;
  place-items: center;
  border: 1px dashed rgba(24, 33, 42, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(38, 76, 62, 0.28), rgba(43, 19, 49, 0.16) 55%, transparent),
    var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

.toc {
  margin: 22px 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc ul, .doc-links {
  margin: 0;
  padding-left: 20px;
}

.post-section {
  padding-top: 6px;
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

.post-section h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.post-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Responsive */
@media (max-width: 1250px) {
  header { -webkit-flex-direction: column; flex-direction: column; align-items: center; justify-content: center; }
  .shortcut-cluster { position: initial; margin: 0; transform: none; }
  #shortcut-nav { position: initial; inset: auto; width: initial; gap: 28px; pointer-events: auto; }
  #home-content { flex-direction: column; gap: 0; }
}

@media (max-width: 960px) {
  main { -webkit-flex-direction: column; flex-direction: column; align-items: center; justify-content: center; }
  .middle, .left, .right { width: 100%; max-width: 760px; flex: none; }
  #shortcut-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }
  .shortcut-cluster {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
  }
  .shortcut-cluster-right { justify-content: center; }
  #home-content { flex-direction: row; gap: 8px; }
  .post-page header { align-items: center; }
  .post-nav { justify-content: center; }
}

@media (max-width: 550px) {
  #home-content { flex-direction: column; gap: 0; }
  :root { --page-gutter: 12px; }
  header { margin-top: 20px; }
  #shortcut-nav { gap: 10px; }
  .shortcut-cluster { gap: 18px; }
  .shortcut { width: var(--shortcut-width-sm); font-size: 13px; }
  .post-article { padding: 16px; }
  .post-meta { grid-template-columns: 1fr; }
  .hero-placeholder { min-height: 180px; }
}








