/* Minimal — monochrome, pill-tagged, brutalist-table portfolio theme for Md. Tariquzzaman */

@import url('fonts/HelveticaNowDisplay/stylesheet.css');

:root {
  --bg-primary: #fcfcfc;
  --bg-surface: #ffffff;
  --bg-card: #f4f4f4;
  --bg-hover: #eaeaea;

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;

  --border-color: #e0e0e0;
  --border-light: #e8e8e8;
  --border-muted: #f0f0f0;

  --pill-yellow-bg: #eef483;
  --pill-yellow-text: #111111;

  --pill-blue-bg: #d4e9f7;
  --pill-blue-text: #0d3859;

  --pill-green-bg: #52ea9c;
  --pill-green-text: #053b1e;

  --pill-purple-bg: #e4d5ff;
  --pill-purple-text: #321466;

  --pill-orange-bg: #ffe3c4;
  --pill-orange-text: #592d00;

  --pill-pink-bg: #ffd6d6;
  --pill-pink-text: #5e1313;

  --pill-default-bg: #ffffff;
  --pill-default-text: #111111;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --font-family: 'Helvetica Now Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-surface: #1a1a1a;
  --bg-card: #222222;
  --bg-hover: #2a2a2a;

  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-tertiary: #777777;

  --border-color: #2e2e2e;
  --border-light: #242424;
  --border-muted: #1c1c1c;

  --pill-yellow-bg: #d8df42;
  --pill-yellow-text: #000000;

  --pill-blue-bg: #3275a8;
  --pill-blue-text: #ffffff;

  --pill-green-bg: #27a862;
  --pill-green-text: #ffffff;

  --pill-purple-bg: #7b4ec2;
  --pill-purple-text: #ffffff;

  --pill-orange-bg: #c96b18;
  --pill-orange-text: #ffffff;

  --pill-pink-bg: #c94040;
  --pill-pink-text: #ffffff;

  --pill-default-bg: #242424;
  --pill-default-text: #ffffff;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  padding-bottom: 80px;
}

.container { max-width: 840px; margin: 0 auto; padding: 0 20px; }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

/* Top utility bar */
.top-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.date-badge .date-day {
  color: var(--text-secondary);
  font-weight: 500;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}

.resume-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pill-yellow-text);
  background-color: var(--pill-yellow-bg);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.resume-download-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-sm); }

/* Floating bottom nav dock */
.navbar-wrapper {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 4px 8px;
  width: auto;
  max-width: calc(100vw - 32px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, background-color var(--transition-normal), border-color var(--transition-normal);
}

.navbar-wrapper.nav-hidden { transform: translate(-50%, 120px) !important; opacity: 0 !important; pointer-events: none; }

[data-theme="dark"] .navbar-wrapper { background-color: rgba(22, 22, 22, 0.88); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }

.navbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px; }

.nav-icon-btn, .nav-icon-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.nav-links li { list-style: none !important; margin: 0 !important; padding: 0 !important; display: inline-flex; }
.nav-icon-btn svg, .nav-icon-link svg { width: 18px; height: 18px; display: block; }

.nav-icon-btn:hover, .nav-icon-link:hover {
  transform: translateY(-3px) scale(1.12);
  background-color: var(--bg-hover);
  border-color: var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-icon-btn.active, .nav-icon-link.active { background-color: var(--bg-hover); border-color: var(--border-light); }

/* Accessibility popover */
.a11y-popover {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.95);
  z-index: 1050;
  width: 310px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.a11y-popover.active { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }

.a11y-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary);
  border-bottom: 1px solid var(--border-light); padding-bottom: 8px;
}

.a11y-close-btn { background: none; border: none; color: var(--text-secondary); font-size: 14px; cursor: pointer; padding: 2px 6px; }
.a11y-group { margin-bottom: 12px; }
.a11y-group:last-child { margin-bottom: 0; }
.a11y-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.a11y-btn-trio { display: flex; gap: 4px; background-color: var(--bg-card); padding: 3px; border-radius: 8px; }
.a11y-btn { flex: 1; background: none; border: none; padding: 6px 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); border-radius: 6px; cursor: pointer; transition: all var(--transition-fast); }
.a11y-btn.active { background-color: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.a11y-row-toggle { display: flex; align-items: center; justify-content: space-between; }
.a11y-row-toggle .a11y-label { margin-bottom: 0; }
.a11y-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--text-primary); }

[data-fontsize="large"] body { zoom: 1.15; }
[data-fontsize="xlarge"] body { zoom: 1.30; }

[data-underline="true"] .section-title,
[data-underline="true"] .hero-name,
[data-underline="true"] .project-name,
[data-underline="true"] .timeline-role {
  text-decoration: underline 3px currentColor !important;
  text-underline-offset: 4px !important;
}

[data-highcontrast="true"] {
  --bg-primary: #000000 !important;
  --bg-surface: #0a0a0a !important;
  --bg-card: #141414 !important;
  --bg-hover: #222222 !important;
  --text-primary: #ffffff !important;
  --text-secondary: #ffffff !important;
  --border-color: #ffffff !important;
  --border-light: #ffffff !important;
}

[data-highcontrast="true"] .pill,
[data-highcontrast="true"] .social-icon-btn,
[data-highcontrast="true"] .avatar-card,
[data-highcontrast="true"] .navbar-wrapper,
[data-highcontrast="true"] .institution-logo-box,
[data-highcontrast="true"] .brutalist-table td {
  border: 1px solid #ffffff !important;
}

/* Hero */
.hero-section { padding-top: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--border-light); }
.hero-title { margin-bottom: 18px; }
.hero-greeting { display: block; font-size: 16px; font-weight: 400; letter-spacing: 0.02em; color: var(--text-secondary); margin-bottom: 4px; }
.hero-name { display: block; font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--text-primary); }

@media (max-width: 640px) {
  .hero-greeting { font-size: 14px; }
  .hero-name { font-size: 32px; }
}

.pill-group { display: flex; flex-wrap: wrap; gap: 8px 6px; margin-bottom: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; border: none; text-decoration: none; font-family: var(--font-family);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.pill-yellow { background-color: var(--pill-yellow-bg); color: var(--pill-yellow-text); }
.pill-blue { background-color: var(--pill-blue-bg); color: var(--pill-blue-text); }
.pill-green { background-color: var(--pill-green-bg); color: var(--pill-green-text); }
.pill-purple { background-color: var(--pill-purple-bg); color: var(--pill-purple-text); }
.pill-orange { background-color: var(--pill-orange-bg); color: var(--pill-orange-text); }
.pill-pink { background-color: var(--pill-pink-bg); color: var(--pill-pink-text); }
.pill-default { background-color: var(--pill-default-bg); color: var(--pill-default-text); border: 1px solid var(--border-color); }

.hero-content-grid { display: grid; grid-template-columns: 1fr 200px; gap: 28px; align-items: start; }

@media (max-width: 768px) {
  .hero-content-grid { grid-template-columns: 1fr; gap: 20px; }
  .avatar-card { max-width: 280px; width: 100%; margin: 0 auto; }
}

.bio-text { font-size: 15px; line-height: 1.65; color: var(--text-primary); font-weight: 400; letter-spacing: -0.005em; }
.bio-text strong { font-weight: 800; }

.social-icons-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.social-icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-color);
  background-color: var(--bg-surface); color: var(--text-primary); display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.social-icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.social-icon-btn:hover { transform: translateY(-3px) scale(1.1); background-color: var(--text-primary); color: var(--bg-primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }

.avatar-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-card:hover { transform: scale(1.02); }
.avatar-monogram {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.avatar-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background-color: #27a862; display: inline-block;
  box-shadow: 0 0 0 2px rgba(39, 168, 98, 0.2); animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 168, 98, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(39, 168, 98, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 168, 98, 0); }
}

/* Sections */
.section { padding-top: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border-light); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.section-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }

.brutalist-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--border-color); }
.brutalist-table tr { border-bottom: 1px solid var(--border-light); }
.brutalist-table td { padding: 16px 0; vertical-align: top; font-size: 15px; line-height: 1.6; }
.table-label { width: 140px; font-weight: 600; font-size: 13px; color: var(--text-secondary); padding-right: 18px; line-height: 1.5; }
.table-value { color: var(--text-primary); font-weight: 400; line-height: 1.6; }

.project-header-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.project-name { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.project-url-link { color: var(--text-primary); text-decoration: none; font-family: var(--font-family); border-bottom: 1px solid var(--text-primary); font-weight: 500; transition: opacity var(--transition-fast); }
.project-url-link:hover { opacity: 0.7; }

.text-link { color: var(--text-primary); text-decoration: none; font-family: var(--font-family); border-bottom: 1px solid var(--text-primary); font-weight: 500; transition: opacity var(--transition-fast); }
.text-link:hover { opacity: 0.7; }

.keyword-text { color: var(--text-secondary); font-size: 14px; font-weight: 400; }

.tool-icons-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.tool-icon-item { display: inline-flex; align-items: center; gap: 7px; }
.tool-icon-item img { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.tool-icon-item span { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

.project-name-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; text-decoration: none; color: var(--text-primary); }
.project-name-link:hover .project-name { text-decoration: underline; text-underline-offset: 2px; }
.project-link-icon { width: 16px; height: 16px; flex-shrink: 0; display: block; color: var(--text-tertiary); transition: color var(--transition-fast); }
.project-name-link:hover .project-link-icon { color: var(--text-secondary); }


.institution-logo-box {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border-light);
  background-color: var(--bg-surface); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; box-shadow: var(--shadow-sm); font-size: 12px; font-weight: 800; color: var(--text-primary);
}
.institution-logo-img { width: 100%; height: 100%; object-fit: contain; }
.institution-header-flex { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }

.project-list { display: flex; flex-direction: column; gap: 40px; }
.project-item { display: flex; flex-direction: column; }
.project-number { font-size: 40px; font-weight: 800; line-height: 1; color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.04em; }

.timeline-item { border-top: 1px solid var(--border-color); padding: 20px 0; }
.timeline-item:last-child { border-bottom: 1px solid var(--border-light); }
.timeline-grid { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .timeline-grid { grid-template-columns: 1fr; gap: 8px; } }
.timeline-year { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.timeline-role { font-size: 16px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.timeline-org { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.timeline-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.timeline-desc ul { padding-left: 18px; }
.timeline-desc li { margin-bottom: 4px; }

.scroll-top-btn {
  position: fixed; bottom: 32px; right: 32px; width: 56px; height: 56px; border-radius: 50%;
  background-color: var(--text-primary); color: var(--bg-primary); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer;
  box-shadow: var(--shadow-lg); transition: transform var(--transition-fast), opacity var(--transition-fast);
  opacity: 0; pointer-events: none; z-index: 90;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-4px) scale(1.05); }

.footer { padding-top: 64px; padding-bottom: 48px; }
.footer-headline { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 32px; }
@media (max-width: 640px) { .footer-headline { font-size: 36px; } }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-light); font-size: 14px; color: var(--text-tertiary);
}

strong { font-weight: 800; }

/* ============================================
   Essay-style project case study page
   (single-column, monochrome, editorial)
   ============================================ */

.essay-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.essay-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}

.essay-back {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.essay-back:hover { color: var(--text-primary); }

.essay-theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: none; border: 1px solid var(--border-light); color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition-fast); flex-shrink: 0;
}
.essay-theme-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.essay-theme-btn svg { width: 15px; height: 15px; display: block; }

.essay-tools-box {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 36px 24px 28px;
  margin-bottom: 48px;
}

.essay-tools-box-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.essay-tools-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
@media (min-width: 641px) {
  .essay-tools-grid { gap: 72px; }
}

.essay-tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.essay-tool-icon {
  width: 52px;
  height: 52px;
  display: block;
}

.essay-tool-name {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.essay-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.essay-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}
@media (max-width: 640px) { .essay-title { font-size: 30px; } }

.essay-standfirst {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}

.essay-body p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.essay-body p em { color: var(--text-secondary); }

.essay-section-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.essay-rule {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 40px 0;
}

.essay-figure {
  margin: 28px 0 32px;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
}

.essay-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 12px;
}

.essay-flow-step {
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.essay-flow-step.ef-green { background: var(--pill-green-bg); color: var(--pill-green-text); }
.essay-flow-step.ef-pink { background: var(--pill-pink-bg); color: var(--pill-pink-text); }
.essay-flow-step.ef-purple { background: var(--pill-purple-bg); color: var(--pill-purple-text); }
.essay-flow-step.ef-blue { background: var(--pill-blue-bg); color: var(--pill-blue-text); }

.essay-flow-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  line-height: 1.4;
}

.essay-figure-caption {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
}

.essay-image-figure {
  margin: 28px 0 32px;
}
.essay-image-figure img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-light);
}
.essay-image-caption {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.essay-image-row {
  display: flex;
  gap: 20px;
  margin: 28px 0 32px;
}
.essay-image-row .essay-image-figure {
  flex: 1;
  margin: 0;
  min-width: 0;
}
@media (max-width: 640px) {
  .essay-image-row { flex-direction: column; }
}

.essay-stat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.essay-stat-list li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}
.essay-stat-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}
.essay-stat-list strong { color: var(--text-primary); }

.essay-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.essay-list li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  padding-left: 18px;
  position: relative;
}
.essay-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

.essay-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}
.essay-repo-link svg { flex-shrink: 0; }
.essay-repo-link:hover span { text-decoration: underline; text-underline-offset: 3px; }

.essay-footnotes {
  margin-top: 12px;
}
.essay-footnotes p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
}
.essay-footnotes sup { margin-right: 2px; }

.essay-footer {
  margin-top: 40px;
}
.essay-footer p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.essay-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.code-page-intro {
  margin: 24px 0 28px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.code-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-tertiary);
}

.code-copy-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.code-copy-btn:hover { color: var(--text-primary); border-color: var(--text-tertiary); }

.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 0 0 12px 12px;
  padding: 20px 22px;
  overflow-x: auto;
  margin-bottom: 32px;
}
.code-block pre { margin: 0; }
.code-block code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre;
}
