/* =====================================================
   Kawi Xiao — Portfolio
   Layout: Fixed sidebar + content panel
   ===================================================== */

/* ----- Custom properties (light) ------------------- */
:root {
  --bg:           #f9f8f5;
  --bg-alt:       #f2f0ec;
  --bg-card:      #ffffff;
  --bg-hover:     #eceae4;
  --text:         #1c1917;
  --text-muted:   #78716c;
  --text-faint:   #a8a29e;
  --accent:       #0d9488;
  --accent-hover: #0f766e;
  --border:       #e7e5e0;
  --code-bg:      #ede9e3;

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  --sidebar-w:   240px;
  --mobile-h:    56px;
  --radius:      8px;
  --ease:        200ms ease;
}

/* ----- Dark theme ---------------------------------- */
[data-theme="dark"] {
  --bg:           #171614;
  --bg-alt:       #1f1e1c;
  --bg-card:      #242220;
  --bg-hover:     #2a2826;
  --text:         #e9e7e3;
  --text-muted:   #a8a29e;
  --text-faint:   #78716c;
  --accent:       #2dd4bf;
  --accent-hover: #5eead4;
  --border:       #2e2c29;
  --code-bg:      #2a2826;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #171614;
    --bg-alt:       #1f1e1c;
    --bg-card:      #242220;
    --bg-hover:     #2a2826;
    --text:         #e9e7e3;
    --text-muted:   #a8a29e;
    --text-faint:   #78716c;
    --accent:       #2dd4bf;
    --accent-hover: #5eead4;
    --border:       #2e2c29;
    --code-bg:      #2a2826;
  }
}

/* ----- Reset --------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background var(--ease), color var(--ease);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}

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

ul { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
}

/* ----- App shell: sidebar + panel ------------------- */
.app {
  display: flex;
  min-height: 100vh;
}

/* ====================================================
   SIDEBAR
   ==================================================== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.75rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
  transition: background var(--ease);
  z-index: 10;
}

.sidebar-top {
  margin-bottom: 2.5rem;
}

.sidebar-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color var(--ease);
}

.sidebar-name:hover { color: var(--accent); }

.sidebar-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Nav links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
}

.sidebar-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--bg-alt);
}

/* Bottom: socials + theme toggle */
.sidebar-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.sidebar-social {
  display: flex;
  gap: 0.75rem;
}

.sidebar-social a {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  transition: color var(--ease);
}

.sidebar-social a:hover { color: var(--accent); }

/* Theme toggle (shared styles) */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--ease), border-color var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ====================================================
   MAIN PANEL
   ==================================================== */
.main-panel {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* no page scroll on desktop */
}

/* About page: allow scroll */
.main-panel-scroll {
  overflow-y: auto;
  height: 100vh;
}

.panel-inner {
  padding: 2.5rem 3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Section label */
.panel-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

/* ── Writing section (flex: 1, takes remaining space) */
.panel-writing {
  flex: 1;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.panel-writing .panel-inner {
  justify-content: flex-start;
}

/* Article grid — 2-col: featured left, 2 stacked right */
.article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
  flex: 1;
}

.article-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color var(--ease), background var(--ease);
  overflow: hidden;
  min-height: 0; /* allow grid shrinking */
}

.article-item:hover {
  border-color: var(--accent);
}

/* Featured (latest) article spans both rows in column 1 */
.article-item--featured {
  grid-row: 1 / 3;
}

/* "Latest" label above the title */
.article-featured-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.article-link {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.article-link:hover .article-title {
  color: var(--accent);
}

.article-text {
  flex: 1;
  min-width: 0;
  margin-bottom: 1rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color var(--ease);
  line-height: 1.35;
}

/* Featured article gets a larger title */
.article-item--featured .article-title {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

.article-item--featured .article-excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
}

.article-excerpt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: auto;
}

.article-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-muted);
  white-space: nowrap;
}

.article-date {
  font-size: 0.8125rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* View more link */
.view-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.25rem;
  transition: color var(--ease);
}

.view-more:hover { color: var(--accent); }

.view-more-right {
  align-self: flex-end;
}

/* ── Projects section (~35vh) */
.panel-projects {
  height: 38vh;
  min-height: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.panel-projects .panel-inner {
  justify-content: center;
}

/* Project cards — fill full row, collapse gracefully with fewer items */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  flex: 1;
  align-items: stretch;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color var(--ease), background var(--ease);
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card-link {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.35rem;
}

.project-card-title {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--ease);
}

.project-card-icon {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color var(--ease);
}

.project-card:hover .project-card-title { color: var(--accent); }
.project-card:hover .project-card-icon { color: var(--accent); }

.project-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 0.75rem;
}

.project-card-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-card-tags code {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  background: var(--code-bg);
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ====================================================
   PROJECTS PAGE
   ==================================================== */
.projects-page {
  max-width: 720px;
  padding: 3rem 3rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.projects-header {
  /* border-bottom: 1px solid var(--border); */
  padding-bottom: 1rem;
}

.projects-title {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.projects-lead {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.projects-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.projects-group-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
}

.project-entry {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.project-entry:first-child {
  border-top: 1px solid var(--border);
}

.project-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.project-entry-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--ease);
  line-height: 1.3;
}

.project-entry-title:hover { color: var(--accent); }

.project-entry-title:hover .project-entry-icon { color: var(--accent); }

.project-entry-icon {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color var(--ease);
  position: relative;
  top: 1px;
}

.project-entry-icon--github {
  top: 0;
}

.project-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.project-year {
  font-size: 0.8125rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.project-entry-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 600px;
}

.project-entry-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.project-entry-tags code {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  background: var(--code-bg);
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ====================================================
   ARTICLE PAGE
   ==================================================== */
.article-page {
  max-width: 720px;
  padding: 3rem 3rem 5rem;
}

.article-page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-page-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.article-page-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Prose styles */
.article-page-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-page-content > * + * { margin-top: 1.25em; }

.article-page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-page-content h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

.article-page-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-page-content a:hover { color: var(--accent-hover); }

.article-page-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  color: var(--text);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.article-page-content pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
}

.article-page-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article-page-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
}

.article-page-content ul,
.article-page-content ol {
  padding-left: 1.5rem;
}

.article-page-content ul { list-style: disc; }
.article-page-content ol { list-style: decimal; }

.article-page-content li { margin-bottom: 0.35rem; }

.article-page-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-back {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.article-back:hover { color: var(--accent); }

/* ====================================================
   ARTICLES LISTING PAGE
   ==================================================== */
.articles-listing { max-width: 680px; }

.articles-listing-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px between cards — keeps the list compact but breathable */
}

.articles-listing-item {
  border-radius: var(--radius);
}

.articles-listing-link {
  display: block;
  padding: 1.25rem 1rem; /* 20px vertical — meets 44px min touch target with content */
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--ease);
}

.articles-listing-item:hover .articles-listing-link {
  background: var(--bg-hover);
}

.articles-listing-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.articles-listing-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  transition: color var(--ease);
}

.articles-listing-item:hover .articles-listing-title {
  color: var(--accent);
}

.articles-listing-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ====================================================
   ABOUT PAGE
   ==================================================== */
.about-page {
  max-width: 760px;
  padding: 3rem 3rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-title {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.btn-resume {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.btn-resume:hover { color: var(--accent); }

.about-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-bio p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 600px;
}

.about-bio p:last-child { margin-bottom: 0; }

.about-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.about-meta-block h2 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.625rem;
}

.about-meta-block p,
.skill-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-list li::before {
  content: '— ';
  color: var(--accent);
}

.about-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.about-footer p {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.about-footer-nav {
  display: flex;
  gap: 1.25rem;
}

.about-footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.about-footer-nav a:hover { color: var(--accent); }

/* ====================================================
   MOBILE HEADER
   ==================================================== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-h);
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  transition: background var(--ease);
}

.mobile-logo {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

/* Hamburger button */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background var(--ease);
}

.hamburger:hover { background: var(--bg-hover); }

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background var(--ease);
}

/* ====================================================
   MOBILE DRAWER
   ==================================================== */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg);
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 0;
  overflow-y: auto;
}

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

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  align-self: flex-end;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  transition: color var(--ease);
}

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

.drawer-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.drawer-nav a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
  min-height: 48px;         /* touch target */
  display: flex;
  align-items: center;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  color: var(--accent);
  background: var(--bg-alt);
}

.drawer-social {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.drawer-social a {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  transition: color var(--ease);
}

.drawer-social a:hover { color: var(--accent); }

/* ====================================================
   RESPONSIVE — Mobile (<768px)
   ==================================================== */
@media (max-width: 767px) {

  /* Show mobile header, hide desktop sidebar */
  .mobile-header { display: flex; }
  .drawer-overlay { display: block; }
  .sidebar { display: none; }

  /* App shell resets to normal flow */
  .app {
    display: block;
    padding-top: var(--mobile-h);
  }

  .main-panel {
    margin-left: 0;
    height: auto;
    overflow: visible;       /* allow page scroll */
    display: block;
  }

  .main-panel-scroll {
    height: auto;
    overflow: visible;
  }

  /* Writing section */
  .panel-writing {
    overflow: visible;
    border-bottom: 1px solid var(--border);
  }

  .panel-writing .panel-inner {
    justify-content: flex-start;
  }

  .panel-inner {
    padding: 1.75rem 1.25rem;
    height: auto;
  }

  /* Articles: single column on mobile, reset row spans */
  .article-list {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.75rem;
  }

  .article-item--featured {
    grid-row: auto;
  }

  .article-item--featured .article-title {
    font-size: 1.2rem;
  }

  .article-link {
    padding: 1.25rem;
  }

  /* Projects: 2-col grid on mobile */
  .panel-projects {
    height: auto;
    min-height: unset;
    border-top: none;
  }

  .project-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .project-card-link {
    padding: 0.875rem 1rem;
  }

  /* Projects page */
  .projects-page {
    padding: 1.75rem 1.25rem 3rem;
    gap: 2rem;
  }

  .project-entry-title {
    font-size: 1.05rem;
  }

  /* About page */
  .about-page {
    padding: 1.75rem 1.25rem 3rem;
  }

  .about-meta-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Article page */
  .article-page {
    padding: 1.75rem 1.25rem 3rem;
  }

  .article-page-title { font-size: 1.5rem; }

}

/* Very small screens */
@media (max-width: 380px) {
  .project-list {
    grid-template-columns: 1fr;
  }
}

/* ====================================================
   RESPONSIVE — Medium (768px–1023px)
   ==================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --sidebar-w: 200px; }

  .panel-inner { padding: 2rem 2rem; }

  .article-item--featured .article-title { font-size: 1.2rem; }

  .project-list { gap: 0.75rem; }

  .project-card-link { padding: 0.875rem 1rem; }
}
