:root {
  --bg: #0f1115;
  --bg-elev: #151922;
  --panel: #0b0d12;
  --text: #e6eaf2;
  --muted: #aab3c5;
  --accent: #8ab4f8;
  --accent-2: #9ce6e6;
  --note: #1b2130;
  --ok: #8ae68a;
  --warn: #ffd479;
  --link: #7fc4ff;
  --border: #202838;
  --shadow: rgba(0, 0, 0, 0.35);
  --tag-bg: #1b2130;
}
[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --panel: #eff3fb;
  --text: #0d1020;
  --muted: #485164;
  --accent: #2563eb;
  --accent-2: #0ea5a5;
  --note: #eef3ff;
  --ok: #16a34a;
  --warn: #b7791f;
  --link: #1d4ed8;
  --border: #d7deeb;
  --shadow: rgba(0, 0, 0, 0.12);
  --tag-bg: #eef3ff;
}

[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  display: grid;
  grid-template-rows: 52px 1fr;
  grid-template-columns: 280px 1fr 300px;
  grid-template-areas:
    "top top top"
    "left main right";
  overflow-x: hidden;
}

/* Top bar */
header {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  /* position: sticky; */
  /* top: 0; */
  z-index: 10;
}
img,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .dot {
  color: var(--accent);
}

/* Drawer */
.drawer {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top, 0px));
  height: calc(100%-52px);
  width: 100%;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 24px var(--shadow);
  overflow: auto;
  transform: translateX(100%);
  transition: transform 180ms ease-out;
  z-index: 1000;
  will-change: transform;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-backdrop {
  position: fixed;
  inset: 52px 0 0 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
  z-index: 999;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: 1;
  max-width: 920px;
  box-shadow: 0 1px 0 var(--shadow) inset;
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.icon {
  opacity: 0.85;
}

.top-actions {
  display: flex;
  gap: 8px;
}
.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.05);
}

/* Left sidebar */
aside.left {
  grid-area: left;
  border-right: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 14px;
  overflow: auto;
}
.section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 10px 0 6px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li {
  margin: 4px 0;
}
.nav-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-list a.active,
.nav-list a:hover {
  background: var(--panel);
  border: 1px solid var(--border);
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--note);
  border: 1px solid var(--border);
  margin: 2px;
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
}

.tag:hover {
  background: var(--bg-elev);
  text-decoration: none;
}

/* Main */
main {
  grid-area: main;
  padding: 18px 22px 90px;
  overflow: auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin: 0.5rem 0;
  box-shadow: 0 6px 18px var(--shadow);
  max-width: 100%;
}

.grid {
  display: grid;
  gap: 14px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  body {
    grid-template-areas:
      "top top top"
      "left main main";
  }
}

@media (min-width: 861px) {
  .drawer,
  .drawer-backdrop,
  .mobile-only {
    display: none !important;
  }
}

/* single column for mobile view */
@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "main";
  }
  aside.left,
  aside.right {
    display: none;
  }
  .drawer {
    width: 100vw;
  }
  .search {
    width: 100px;
    overflow: hidden;
  }
  .brand {
    display: none;
  }
  main {
    padding: 12px;
    width: 100vw;
  }
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .mobile-only {
    display: inlline-flex;
  }
}

.meta {
  color: var(--muted);
  font-size: 12px;
  padding-left: 0.5rem;
}
a {
  text-decoration: none;
  color: var(--link);
}
.link {
  color: var(--link);
  text-decoration: none;
}

/* Outliner blocks */
.block {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
}
.block:hover {
  background: var(--panel);
}
.bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  margin-top: 6px;
  cursor: pointer;
}
.children {
  margin-left: 18px;
  border-left: 1px dashed var(--border);
  padding-left: 10px;
}
.block-title {
  font-weight: 600;
}
.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

/* Resume */
.resume {
  display: grid;
  gap: 1.2rem;
  font-size: 11pt;
  line-height: 1.35;
}

.resume .section-header {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13pt;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-top: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.25rem;
}

.resume .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding-bottom: 0.3rem 0 0.6rem;
  border-bottom: 1px dashed var(--border);
}

.resume .title {
  font-weight: 600;
  font-size: 12pt;
  color: var(--text);
}

.resume .meta {
  color: var(--muted);
  font-size: 10.5pt;
  white-space: nowrap;
}
.resume .details {
  grid-column: 1 / -1;
  padding-left: 1.2rem;
  margin-top: 0.25rem;
}
.resume .details .item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 10.5pt;
}
.resume .details .item::before {
  content: "•";
  color: var(--accent-2);
  margin-right: 0.3rem;
}

.resume .skills-group {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
}
.resume .skills-group .group-title {
  font-weight: 600;
  font-size: 11pt;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.resume .skills-group .skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.resume .skills-group .skill {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10pt;
  background: var(--panel);
  color: var(--muted);
}

.resume section {
  margin-bottom: 1.2rem;
}

.resume-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.resume-toolbar .btn {
  padding: 6px 10px;
}

.resume a {
  color: inherit !important;
  text-decoration: none !important;
}

.resume .pill {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  background: var(--panel);
}

/* Footer */
footer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 8px 24px var(--shadow);
}

/* === One-page Resume Print Mode === */
@media print {
  @page {
    size: Letter;
    margin: 0.6in;
  } /* switch to A4 if you prefer */

  /* Hide app chrome */
  header,
  .sidebar,
  .rightbar,
  #breadcrumbs,
  #q,
  .tips,
  .nav-list,
  .btn.link,
  .pill {
    display: none !important;
  }

  /* Expand content */
  main,
  #view,
  .resume {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  main,
  .card {
    max-width: 100%;
  }

  /* Neutral background & text */
  body,
  .card {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* .resume {
    font-size: 11pt;
    line-height: 1.25;
  }
  .resume .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 0;
    margin: 0 0 10px 0;
  }
  .resume .row .title {
    font-weight: 600;
    font-size: 12pt;
  }
  .resume .row .meta {
    font-size: 15pt;
    opacity: 1;
  }
  .resume .row .meta::before {
    content: "";
  } */

  /* Hide buttons on resume page */
  .no-print {
    display: none !important;
  }

  /* Links appear as plain text */
  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}

/* Screen-only tweaks for the print button area */
.resume-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.resume-toolbar .btn {
  padding: 6px 10px;
}

.article-body {
  max-width: 96ch;
  margin: auto;
}
.article-body code {
  padding: 0 4px;
  border-radius: 6px;
  background: var(--tag-bg);
  /* no color here */
}

.article-body pre {
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.article-body pre code {
  padding: 0;
  background: transparent;
}

.hljs {
  background: transparent;
}
/* Images inside articles */
.article-body .article-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 6px 18px var(--shadow);
}

/* Optional figure + caption */
.article-body .article-figure {
  margin: 14px 0;
  text-align: center;
}
.article-body .article-figure figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.article-body > p {
  line-height: 1.75rem;
}

/* === About Page Typography Enhancements === */
.about {
  color: var(--text);
  line-height: 1.7;
  max-width: 82ch;
  margin: auto;
}

/* Headings */
.about h1 {
  font-size: clamp(2rem, 2.2rem + 1vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 700;
}

.about h2,
.about h3 {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  font-variant-caps: small-caps;
  color: var(--muted);
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  text-transform: none;
}

/* Paragraphs */
.about p {
  margin: 0.9rem 0;
}

/* Drop cap for opening paragraph */
.about .lede.dropcap::first-letter {
  float: left;
  font-size: 3rem;
  line-height: 0.9;
  padding: 0.15rem 0.35rem 0 0;
  font-weight: 700;
  color: var(--accent);
}

/* Callout box for your “I want to showcase my journey” line */
.about .callout {
  background: var(--note);
  border: 1px solid var(--bg-elev);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 1.75rem 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.about .callout b {
  color: var(--accent);
}

/* Light divider for strong skill statements */
.about .beat {
  border-top: 1px solid var(--bg-elev);
  padding-top: 1rem;
  margin-top: 1.25rem;
}

/* Subtle gray for secondary remarks */
.about .muted {
  color: var(--muted);
}

/* Signature line */
.about .sig {
  margin-top: 1.5rem;
  font-weight: 700;
}

/* Anchor link styling */
.about a {
  color: var(--accent-2);
  text-decoration: none;
}

.about a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Turn off auto-hyphenation sitewide */
.about * {
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  word-break: normal;
  overflow-wrap: anywhere;
}
