/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600&display=swap');

/* ============================================
   THEME TOKENS — Editorial (default)
   ============================================ */
[data-theme="editorial"] {
  --bg: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-code: #1A1A1A;
  --text: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-tertiary: #8A8A8A;
  --accent: #1B2A4A;
  --accent-hover: #142038;
  --accent-glow: transparent;
  --border: #E8E4DF;
  --border-style: solid;
  --card-shadow-hover: 0 2px 12px rgba(0, 0, 0, 0.04);
  --tag-bg: rgba(27, 42, 74, 0.07);
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --serif: 'Source Serif 4', Charter, 'Bitstream Charter', Cambria, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hero: var(--serif);
  --font-body: var(--serif);
  --font-title: var(--sans);
  --font-meta: var(--mono);
  --font-nav: var(--mono);
  --hero-weight: 700;
  --hero-size: 2.4rem;
  --hero-line-height: 1.25;
  --hero-letter-spacing: -0.02em;
  --card-radius: 6px;
  --card-border-width: 1px;
  --philosophy-style: italic;
  --toggle-label-left-opacity: 1;
  --toggle-label-right-opacity: 0.5;
  cursor: default;
}

/* ============================================
   THEME TOKENS — Terminal (dark)
   ============================================ */
[data-theme="terminal"] {
  --bg: #0A0F0D;
  --bg-card: #0F1613;
  --bg-code: #060A08;
  --text: #D4E4D4;
  --text-secondary: #8FA88F;
  --text-tertiary: #5A7A5A;
  --accent: #3CEC6A;
  --accent-hover: #5CF285;
  --accent-glow: rgba(60, 236, 106, 0.15);
  --border: #1C2E24;
  --border-style: dashed;
  --card-shadow-hover: 0 0 24px rgba(60, 236, 106, 0.08);
  --tag-bg: rgba(60, 236, 106, 0.1);
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --serif: 'Source Serif 4', Charter, 'Bitstream Charter', Cambria, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hero: var(--serif);
  --font-body: var(--mono);
  --font-title: var(--mono);
  --font-meta: var(--mono);
  --font-nav: var(--mono);
  --hero-weight: 700;
  --hero-size: 2.2rem;
  --hero-line-height: 1.3;
  --hero-letter-spacing: -0.01em;
  --card-radius: 2px;
  --card-border-width: 1px;
  --philosophy-style: normal;
  --toggle-label-left-opacity: 0.5;
  --toggle-label-right-opacity: 1;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='3' fill='%233CEC6A'/%3E%3Ccircle cx='10' cy='10' r='6' fill='none' stroke='%233CEC6A' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E") 10 10, crosshair;
}

/* Green pointer cursor for interactive elements in terminal mode */
[data-theme="terminal"] a,
[data-theme="terminal"] .theme-toggle,
[data-theme="terminal"] [role="button"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='4' fill='%233CEC6A'/%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%233CEC6A' stroke-width='1' opacity='0.5'/%3E%3C/svg%3E") 10 10, pointer;
}

/* ============================================
   BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background 0.5s ease, color 0.4s ease;
  position: relative;
  min-height: 100vh;
}

/* ============================================
   MATRIX RAIN CANVAS
   ============================================ */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

[data-theme="terminal"] #matrix-canvas {
  opacity: 1;
}

.page-wrapper {
  position: relative;
  z-index: 1;
}

/* ============================================
   CRT EFFECTS (terminal only)
   ============================================ */

/* Scanlines */
[data-theme="terminal"] .page-wrapper::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.06) 2px,
      rgba(0, 0, 0, 0.06) 4px);
}

/* CRT flicker animations */
@keyframes crt-on {
  0% {
    opacity: 0;
    transform: scaleY(0.005);
  }

  30% {
    opacity: 0.5;
    transform: scaleY(0.005);
  }

  35% {
    opacity: 1;
    transform: scaleY(1);
  }

  40% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }

  60% {
    opacity: 0.9;
    filter: brightness(1.3);
  }

  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

@keyframes crt-off {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }

  20% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.5);
  }

  40% {
    opacity: 0.8;
    transform: scaleY(0.01) scaleX(1.1);
    filter: brightness(2);
  }

  70% {
    opacity: 0.5;
    transform: scaleY(0.005) scaleX(0.3);
    filter: brightness(3);
  }

  100% {
    opacity: 0;
    transform: scaleY(0) scaleX(0);
  }
}

.crt-on {
  animation: crt-on 0.35s ease-out forwards;
}

.crt-off {
  animation: crt-off 0.2s ease-in forwards;
}

/* Mobile: softer turn-off (fade only, no scale collapse) */
@media (max-width: 768px) {
  @keyframes crt-off-mobile {
    0% {
      opacity: 1;
      filter: brightness(1);
    }

    50% {
      opacity: 0.6;
      filter: brightness(1.2);
    }

    100% {
      opacity: 0;
      filter: brightness(1);
    }
  }

  .crt-off {
    animation: crt-off-mobile 0.15s ease-in forwards;
  }
}

/* Vignette */
[data-theme="terminal"] .page-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(ellipse at center,
      transparent 50%,
      rgba(0, 0, 0, 0.4) 100%);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Oh. Logo Mark */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: #0a0a0a;
  border-radius: 8px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 10px;
  flex-shrink: 0;
  transition: background 0.4s, box-shadow 0.4s;
}

[data-theme="terminal"] .logo-mark {
  background: #0a0a0a;
  box-shadow: 0 0 12px rgba(60, 236, 106, 0.1);
}

.logo-text {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  line-height: 1;
}

.logo-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #2563eb;
  border-radius: 1px;
  margin-left: 1px;
  vertical-align: baseline;
  animation: cursor-blink 1.1s step-end infinite;
  transition: background 0.4s;
}

[data-theme="terminal"] .logo-dot {
  background: var(--accent);
}

@keyframes cursor-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-dot {
    animation: none;
  }
}

.logo-name {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

.site-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav .nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.site-nav .nav-links a {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.site-nav .nav-links a:hover {
  color: var(--text);
}

[data-theme="terminal"] .site-nav .nav-links a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.site-nav .nav-links a.active {
  color: var(--text);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
  padding: 0.35rem 0.65rem;
  border: 1px var(--border-style) var(--border);
  border-radius: var(--card-radius);
  transition: all 0.4s;
}

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

[data-theme="terminal"] .theme-toggle:hover {
  box-shadow: 0 0 12px rgba(60, 236, 106, 0.1);
}

.toggle-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.4s, opacity 0.4s;
}

.toggle-label-left {
  color: var(--text-secondary);
  opacity: var(--toggle-label-left-opacity);
}

.toggle-label-right {
  color: var(--accent);
  opacity: var(--toggle-label-right-opacity);
}

.toggle-track {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--border);
  position: relative;
  transition: background 0.4s;
}

[data-theme="terminal"] .toggle-track {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(60, 236, 106, 0.3);
}

.toggle-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease, background 0.4s;
}

[data-theme="terminal"] .toggle-thumb {
  transform: translateX(14px);
  background: var(--bg);
}

/* ============================================
   HOMEPAGE SECTION ORDERING (flex container)
   ============================================ */
.main-content {
  display: flex;
  flex-direction: column;
}

/* Editorial: Hero → Background → Projects → Writing */
.hero {
  order: 1;
}

.experience-strip {
  order: 2;
}

.projects-section {
  order: 3;
}

.writing-section {
  order: 4;
}

/* Terminal: Hero → Projects → Writing → Background */
[data-theme="terminal"] .hero {
  order: 1;
}

[data-theme="terminal"] .projects-section {
  order: 2;
}

[data-theme="terminal"] .writing-section {
  order: 3;
}

[data-theme="terminal"] .experience-strip {
  order: 4;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  width: 100%;
}

.hero h1 {
  font-family: var(--font-hero);
  font-size: var(--hero-size);
  font-weight: var(--hero-weight);
  line-height: var(--hero-line-height);
  letter-spacing: var(--hero-letter-spacing);
  color: var(--text);
  max-width: 640px;
  transition: all 0.4s;
}

.hero .tagline-accent {
  color: var(--accent);
  transition: color 0.4s, text-shadow 0.4s;
}

[data-theme="terminal"] .hero .tagline-accent {
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero .hero-sub {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  transition: all 0.4s;
}

[data-theme="terminal"] .hero .hero-sub {
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   TERMINAL BADGE ("$ hello, world" typing)
   ============================================ */
.terminal-badge {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  width: fit-content;
  overflow: hidden;
  height: 1.2em;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

[data-theme="terminal"] .terminal-badge {
  visibility: visible;
  opacity: 1;
}

.terminal-prompt {
  color: var(--text-tertiary);
  margin-right: 0.35rem;
  opacity: 0;
  transition: opacity 0.3s;
}

[data-theme="terminal"] .terminal-prompt {
  opacity: 1;
  transition-delay: 0.3s;
}

.typing-text {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid transparent;
  transition: none;
}

[data-theme="terminal"] .typing-text {
  animation: typing 1.2s steps(14) 0.6s forwards, blink-caret 0.8s step-end 0.6s infinite;
}

[data-theme="editorial"] .typing-text {
  max-width: 0;
  border-right-color: transparent;
  animation: none;
}

@keyframes typing {
  from {
    max-width: 0;
    border-right-color: var(--accent);
  }

  to {
    max-width: 13ch;
    border-right-color: var(--accent);
  }
}

@keyframes blink-caret {

  from,
  to {
    border-right-color: var(--accent);
  }

  50% {
    border-right-color: transparent;
  }
}

/* ============================================
   HERO META (social links)
   ============================================ */
.hero .hero-meta {
  margin-top: 1.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.hero .hero-meta a {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero .hero-meta a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

[data-theme="terminal"] .hero .hero-meta a:hover {
  text-shadow: 0 0 8px var(--accent-glow);
}

.separator-dot,
.separator-pipe {
  color: var(--border);
  font-size: 0.75rem;
}

[data-theme="terminal"] .separator-dot {
  display: none;
}

[data-theme="terminal"] .separator-pipe {
  display: inline;
}

[data-theme="editorial"] .separator-dot {
  display: inline;
}

[data-theme="editorial"] .separator-pipe {
  display: none;
}

/* ============================================
   SECTIONS (shared)
   ============================================ */
.section {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px var(--border-style) var(--border);
  transition: border-color 0.4s;
}

.section-header h2 {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  transition: color 0.4s;
}

[data-theme="terminal"] .section-header h2::before {
  content: '> ';
  color: var(--accent);
}

.section-header a {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ============================================
   PROJECT CARDS
   ============================================ */
.projects-section {
  margin-bottom: 3.5rem;
}

.project-card {
  display: block;
  background: var(--bg-card);
  border: var(--card-border-width) var(--border-style) var(--border);
  border-radius: var(--card-radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

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

/* Terminal: corner accents on hover */
[data-theme="terminal"] .project-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-radius: 2px 0 0 0;
  opacity: 0;
  transition: opacity 0.3s;
}

[data-theme="terminal"] .project-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 0 2px 0;
  opacity: 0;
  transition: opacity 0.3s;
}

[data-theme="terminal"] .project-card:hover::before,
[data-theme="terminal"] .project-card:hover::after {
  opacity: 1;
}

[data-theme="terminal"] .project-card:hover {
  box-shadow: var(--card-shadow-hover), inset 0 1px 0 0 rgba(60, 236, 106, 0.15);
}

.project-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.project-card h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.4s;
}

[data-theme="terminal"] .project-card h3 {
  color: var(--accent);
  letter-spacing: 0;
}

.project-card .card-tag {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--tag-bg);
  padding: 0.2rem 0.55rem;
  border-radius: var(--card-radius);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: all 0.4s;
}

[data-theme="terminal"] .project-card .card-tag {
  border: 1px solid rgba(60, 236, 106, 0.2);
}

.project-card .card-philosophy {
  font-family: var(--font-body);
  font-style: var(--philosophy-style);
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  transition: all 0.4s;
}

[data-theme="terminal"] .project-card .card-philosophy {
  font-size: 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent);
}

.project-card .card-description {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: all 0.4s;
}

[data-theme="terminal"] .project-card .card-description {
  font-size: 0.85rem;
  line-height: 1.65;
}

.project-card .card-bottom {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px var(--border-style) var(--border);
  flex-wrap: wrap;
  transition: border-color 0.4s;
}

.project-card .card-bottom span {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  transition: color 0.4s;
}

[data-theme="terminal"] .project-card .card-bottom span::before {
  content: '• ';
  color: var(--accent);
}

/* ============================================
   GITHUB STATS (Projects page)
   ============================================ */
.github-stats {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px var(--border-style) var(--border);
  text-align: center;
  transition: border-color 0.4s;
}

.github-stats-header h2 {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  transition: color 0.4s;
}

[data-theme="terminal"] .github-stats-header h2::before {
  content: '> ';
  color: var(--accent);
}

.github-stats-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.github-stats-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--card-radius);
}

/* Theme-based show/hide for stat images */
.github-stats-terminal { display: none; }
.github-stats-editorial { display: inline; }

[data-theme="terminal"] .github-stats-terminal { display: inline; }
[data-theme="terminal"] .github-stats-editorial { display: none; }

.github-stats-note {
  margin-top: 1.25rem;
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: color 0.4s;
}

.github-stats-note a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

.github-stats-note a:hover {
  text-decoration: underline;
}

/* ============================================
   WRITING LIST
   ============================================ */
.writing-section {
  margin-bottom: 4rem;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px var(--border-style) var(--border);
  transition: all 0.3s;
}

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

[data-theme="terminal"] .post-item:hover .post-title::before {
  content: '> ';
  color: var(--accent);
}

[data-theme="terminal"] .post-item:hover .post-title {
  text-shadow: 0 0 8px var(--accent-glow);
}

.post-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s;
}

.post-date {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: 2rem;
  flex-shrink: 0;
}

/* ============================================
   BACKGROUND / EXPERIENCE STRIP
   ============================================ */
.experience-strip {
  margin-bottom: 3.5rem;
}

.experience-strip .strip-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
  transition: all 0.4s;
}

[data-theme="terminal"] .experience-strip .strip-content {
  font-size: 0.9rem;
  line-height: 1.75;
}

.experience-strip .strip-content strong {
  color: var(--text);
  font-weight: 600;
  transition: color 0.4s;
}

[data-theme="terminal"] .experience-strip .strip-content strong {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.experience-strip .resume-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-meta);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

.experience-strip .resume-link:hover {
  color: var(--accent-hover);
}

.experience-strip .resume-link::after {
  content: ' →';
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px var(--border-style) var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.4s;
  position: relative;
  z-index: 1;
}

.site-footer .footer-left {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: color 0.4s;
}

.footer-build {
  display: none;
}

[data-theme="terminal"] .footer-build {
  display: inline;
}

.footer-status {
  display: none;
}

[data-theme="terminal"] .footer-status {
  display: inline;
  color: var(--accent);
}

[data-theme="terminal"] .footer-status::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.4rem;
  vertical-align: middle;
  box-shadow: 0 0 4px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px var(--accent);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 8px var(--accent);
  }
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
}

.site-footer .footer-links a {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-footer .footer-links a svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.site-footer .footer-links a:hover {
  color: var(--accent);
}

[data-theme="terminal"] .site-footer .footer-links a:hover {
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   INNER PAGE STYLES (non-homepage)
   ============================================ */

/* Single pages (articles, about, project detail) */
.single-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

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

.page-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.page-description {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0.75rem 0 0 0;
}

.page-meta {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-meta time {
  letter-spacing: 0.02em;
}

.page-meta .meta-separator {
  color: var(--border);
}

.page-meta .tag {
  background: rgba(27, 42, 74, 0.07);
  color: var(--accent);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.72rem;
}

/* Article content */
.page-content {
  max-width: 680px;
}

.page-content h2 {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2.5rem 0 0.75rem 0;
}

.page-content h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.5rem 0;
}

.page-content p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.2em;
}

.page-content strong {
  font-weight: 600;
  color: var(--text);
}

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

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

.page-content ul,
.page-content ol {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 1.2em 1.5em;
  padding: 0;
}

.page-content li {
  margin-bottom: 0.4em;
}

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

.page-content blockquote p {
  margin-bottom: 0.5em;
}

.page-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(27, 42, 74, 0.05);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.page-content pre {
  background: #1A1A1A;
  color: #E8E4DF;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

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

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5em 0;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.single-page.about-page-v2 {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f1ec;
  --text: #1a1a1a;
  --text-dim: #6f6f6f;
  --text-faint: #a0a0a0;
  --accent: #1b2a4a;
  --accent-glow: transparent;
  --accent-dim: rgba(27, 42, 74, 0.08);
  --accent-rgb: 27, 42, 74;
  --tag-border: rgba(27, 42, 74, 0.22);
  --tag-hover-bg: rgba(27, 42, 74, 0.18);
  --timeline-mid: rgba(27, 42, 74, 0.24);
  --timeline-glow: rgba(27, 42, 74, 0.22);
  --timeline-track-width: 3px;
  --timeline-track-top: rgba(27, 42, 74, 0.95);
  --timeline-track-mid: rgba(27, 42, 74, 0.52);
  --timeline-dot-border: rgba(27, 42, 74, 0.55);
  --timeline-entry-bg: rgba(255, 255, 255, 0.72);
  --timeline-entry-hover-bg: rgba(255, 255, 255, 0.95);
  --timeline-entry-border: rgba(27, 42, 74, 0.18);
  --timeline-entry-shadow: 0 14px 30px rgba(27, 42, 74, 0.12);
  --timeline-entry-sheen: rgba(27, 42, 74, 0.1);
  --mono: 'JetBrains Mono', monospace;
  --serif: 'Source Serif 4', Georgia, serif;
  --border: #e8e4df;
  --hero-overlay-rgb: 250, 248, 245;
  --hero-image-filter: brightness(0.38) contrast(1.06) saturate(1.05);
  --hero-title-color: #ffffff;
  --hero-subtitle-color: rgba(255, 255, 255, 0.92);
  --hero-em-color: rgba(255, 255, 255, 0.95);
  --hero-title-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 0, 0, 0.4);
  --hero-subtitle-shadow: 0 1px 8px rgba(0, 0, 0, 0.65), 0 0 28px rgba(0, 0, 0, 0.35);
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  overflow: hidden;
}

[data-theme="terminal"] .single-page.about-page-v2 {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --text: #e0e0e0;
  --text-dim: #888;
  --text-faint: #555;
  --accent: #3cec6a;
  --accent-glow: rgba(60, 236, 106, 0.3);
  --accent-dim: rgba(60, 236, 106, 0.15);
  --accent-rgb: 60, 236, 106;
  --tag-border: rgba(60, 236, 106, 0.2);
  --tag-hover-bg: rgba(60, 236, 106, 0.25);
  --timeline-mid: rgba(60, 236, 106, 0.3);
  --timeline-glow: rgba(60, 236, 106, 0.3);
  --timeline-track-width: 2px;
  --timeline-track-top: rgba(60, 236, 106, 0.95);
  --timeline-track-mid: rgba(60, 236, 106, 0.5);
  --timeline-dot-border: rgba(60, 236, 106, 0.55);
  --timeline-entry-bg: rgba(15, 22, 19, 0.7);
  --timeline-entry-hover-bg: rgba(20, 30, 25, 0.88);
  --timeline-entry-border: rgba(60, 236, 106, 0.22);
  --timeline-entry-shadow: 0 0 26px rgba(60, 236, 106, 0.12);
  --timeline-entry-sheen: rgba(60, 236, 106, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --hero-overlay-rgb: 10, 10, 10;
  --hero-image-filter: brightness(0.65) contrast(1.1) saturate(1.1);
  --hero-title-color: #ffffff;
  --hero-subtitle-color: rgba(255, 255, 255, 0.72);
  --hero-em-color: rgba(255, 255, 255, 0.9);
  --hero-title-shadow: 0 0 18px rgba(0, 0, 0, 0.32);
  --hero-subtitle-shadow: 0 0 14px rgba(0, 0, 0, 0.28);
}

.about-page-v2 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.about-page-v2 .about-v2-hero {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 72vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-page-v2 .hero-image-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.about-page-v2 .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: var(--hero-image-filter);
  animation: about-v2-ken-burns 25s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}

@keyframes about-v2-ken-burns {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.08);
  }
}

.about-page-v2 .hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80%;
  background: linear-gradient(to top, var(--bg) 0%, rgba(var(--hero-overlay-rgb), 0.97) 15%, rgba(var(--hero-overlay-rgb), 0.7) 45%, transparent 100%);
  z-index: 2;
}

.about-page-v2 .hero-melt-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 22%;
  background: linear-gradient(to bottom, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .hero-melt-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 15%;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .hero-melt-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 15%;
  height: 100%;
  background: linear-gradient(to left, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .hero-content {
  position: relative;
  z-index: 3;
  width: min(100%, 900px);
  padding: 0 clamp(1.5rem, 6vw, 6rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-page-v2 .hero-prompt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
  min-height: 1.2em;
}

[data-theme="terminal"] .about-page-v2 .hero-prompt {
  color: var(--accent);
  text-shadow: none;
}

.about-page-v2 .hero-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--hero-title-color);
  text-shadow: var(--hero-title-shadow);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: about-v2-slide-up 0.7s ease 0.8s forwards;
}

.about-page-v2 .hero-title .accent {
  color: #c0d4f0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="terminal"] .about-page-v2 .hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.about-page-v2 .hero-subtitle {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--hero-subtitle-color);
  text-shadow: var(--hero-subtitle-shadow);
  max-width: 680px;
  line-height: 1.7;
  opacity: 0;
  animation: about-v2-slide-up 0.7s ease 1.1s forwards;
  margin: 0 auto;
}

.about-page-v2 .hero-subtitle em {
  color: var(--hero-em-color);
  font-style: italic;
}

.about-page-v2 .hero-terminal-cta {
  margin-top: 1.5rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  animation: about-v2-slide-up 0.7s ease 1.35s forwards;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.about-page-v2 .hero-terminal-cta:hover {
  transform: translateY(-1px);
  background: #243660;
  border-color: #243660;
}

.about-page-v2 .hero-terminal-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.22);
}

[data-theme="terminal"] .about-page-v2 .hero-terminal-cta {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

[data-theme="terminal"] .about-page-v2 .hero-terminal-cta:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

.about-page-v2 .photo-break {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 300px;
  overflow: hidden;
  margin: 0;
}

.about-page-v2 .photo-break-image {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.5) contrast(1.1) saturate(0.9);
  animation: about-v2-ken-burns-slow 30s ease-in-out infinite alternate;
}

@keyframes about-v2-ken-burns-slow {
  0% {
    transform: scale(1.05) translateY(0);
  }

  100% {
    transform: scale(1.12) translateY(-2%);
  }
}

.about-page-v2 .photo-break-melt-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to bottom, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .photo-break-melt-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .photo-break-melt-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 20%;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .photo-break-melt-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 20%;
  height: 100%;
  background: linear-gradient(to left, var(--bg), transparent);
  z-index: 2;
}

.about-page-v2 .inline-photo-wrap {
  position: relative;
  width: 280px;
  height: 380px;
  overflow: hidden;
  border-radius: 4px;
  flex-shrink: 0;
}

.about-page-v2 .inline-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.85) contrast(1.05) saturate(0.95);
  animation: about-v2-ken-burns-subtle 20s ease-in-out infinite alternate;
}

@keyframes about-v2-ken-burns-subtle {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.05);
  }
}

.about-page-v2 .inline-photo-melt {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
}

.about-page-v2 .inline-photo-melt-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(to left, var(--bg), transparent);
  z-index: 1;
}

.about-page-v2 .content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.about-page-v2 section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-page-v2 section.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-page-v2 section:last-child {
  border-bottom: none;
}

.about-page-v2 .section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.about-page-v2 .section-label::before {
  content: '>';
  opacity: 0.5;
}

.about-page-v2 p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

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

.about-page-v2 .callout {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--accent-dim);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  border-radius: 0 4px 4px 0;
}

.about-page-v2 .punchline {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
  margin: 2rem 0;
  opacity: 0.9;
}

.about-page-v2 .punchline::before {
  content: '// ';
  opacity: 0.4;
}

.about-page-v2 .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 2.5rem 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.about-page-v2 .stat-cell {
  background: var(--bg-card);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: background 0.3s, transform 0.3s;
}

.about-page-v2 .stat-cell:hover {
  background: var(--bg-card-hover);
  transform: scale(1.02);
  z-index: 1;
}

.about-page-v2 .stat-number {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.about-page-v2 .stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.about-page-v2 .work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.about-page-v2 .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--tag-border);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  white-space: nowrap;
  transition: all 0.3s;
  cursor: default;
}

.about-page-v2 .tag:hover {
  background: var(--tag-hover-bg);
  border-color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  transform: translateY(-1px);
}

.about-page-v2 .timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 2.5rem;
}

.about-page-v2 .timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1rem;
  bottom: 0.1rem;
  width: var(--timeline-track-width);
  background: linear-gradient(to bottom, var(--timeline-track-top) 0%, var(--timeline-track-mid) 50%, var(--timeline-track-top) 100%);
  border-radius: 999px;
}

.about-page-v2 .timeline-entry {
  position: relative;
  margin-bottom: 2.8rem;
  padding-left: 1.5rem;
}

.about-page-v2 .timeline-entry:last-child {
  margin-bottom: 0;
}

.about-page-v2 .timeline-entry::before {
  content: '';
  position: absolute;
  left: -2.8rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--timeline-dot-border);
  z-index: 1;
}

.about-page-v2 .timeline-entry:first-child::before,
.about-page-v2 .timeline-entry:last-child::before {
  border-color: var(--accent);
  background: var(--accent);
}

.about-page-v2 .timeline-cmd {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
  opacity: 0.85;
}

.about-page-v2 .timeline-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.about-page-v2 .timeline-text {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
}

.about-page-v2 .timeline-text strong {
  color: var(--text);
  font-weight: 600;
}

[data-theme="terminal"] .about-page-v2 .timeline-text strong {
  color: #fff;
}

.about-page-v2 .cta-block {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.about-page-v2 .cta-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
}

.about-page-v2 .cta-text {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
  line-height: 1.6;
}

.about-page-v2 .cursor-blink {
  animation: about-v2-blink 1s step-end infinite;
}

.about-page-v2 .elsewhere-layout {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  align-items: flex-start;
}

.about-page-v2 .elsewhere-text {
  flex: 1;
}

.about-page-v2 .elsewhere-text p {
  font-size: 0.95rem;
}

.about-page-v2 .elsewhere-bits {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 2.2;
  margin-top: 1.5rem;
}

.about-page-v2 .elsewhere-bits span {
  display: block;
}

.about-page-v2 .elsewhere-bits span::before {
  content: '~ ';
  color: var(--text-faint);
}

.about-page-v2 .terminal-end {
  text-align: center;
  padding: 2rem 0 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.about-page-v2 .terminal-end .prompt {
  color: var(--accent);
}

.about-page-v2 .about-footer {
  padding: 3rem 0 6rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.about-page-v2 .about-footer a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}

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

.about-page-v2 .about-footer a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.about-page-v2 .about-footer a:hover::after {
  width: 100%;
}

@keyframes about-v2-slide-up {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes about-v2-blink {
  50% {
    opacity: 0;
  }
}

.about-page-v2 .contact-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .about-page-v2 .about-v2-hero {
    height: auto;
    min-height: 64vh;
  }

  .about-page-v2 .hero-content {
    padding: 6rem 1.5rem 3rem;
  }

  .about-page-v2 .hero-title {
    font-size: 1.65rem;
  }

  .about-page-v2 .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-page-v2 .elsewhere-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .about-page-v2 .inline-photo-wrap {
    width: 100%;
    height: 250px;
  }

  .about-page-v2 section {
    padding: 3.5rem 0;
  }

  .about-page-v2 .timeline {
    padding-left: 2rem;
  }

  .about-page-v2 .timeline-entry {
    padding-left: 1rem;
  }

  .about-page-v2 .timeline-entry::before {
    left: -2.3rem;
  }

  .about-page-v2 .photo-break {
    height: 35vh;
    min-height: 200px;
  }

  .about-page-v2 .hero-melt-left,
  .about-page-v2 .hero-melt-right {
    width: 8%;
  }
}

/* Post navigation (prev/next) */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-nav-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
  max-width: 45%;
}

.post-nav-link:hover {
  color: var(--accent);
}

.post-nav-link.next {
  text-align: right;
  margin-left: auto;
}

/* List pages (/projects/, /posts/) */
.list-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.list-page .page-header {
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: none;
}

.list-page .page-title {
  font-size: 1.8rem;
}

.list-page .section {
  padding: 0;
}

.list-page .projects-section {
  margin-bottom: 0;
}

.list-page .writing-section {
  margin-bottom: 0;
}

/* ============================================
   RESUME PAGE
   ============================================ */
.resume-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.resume-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-header .page-title {
  margin-bottom: 0.25rem;
}

.resume-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.resume-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.resume-link-clean {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.3s;
}

.resume-link-clean svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

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

[data-theme="terminal"] .resume-link-clean:hover {
  text-shadow: 0 0 8px var(--accent-glow);
}

.resume-download {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: var(--card-radius);
  transition: all 0.3s;
}

.resume-download:hover {
  background: var(--accent);
  color: var(--bg);
}

[data-theme="terminal"] .resume-download:hover {
  box-shadow: 0 0 12px var(--accent-glow);
}

.resume-body h2 {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin: 2.5rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px var(--border-style) var(--border);
  transition: color 0.4s, border-color 0.4s;
}

[data-theme="terminal"] .resume-body h2::before {
  content: '> ';
  color: var(--accent);
}

.resume-body h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 0.15rem 0;
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

[data-theme="terminal"] .resume-body h3 {
  color: var(--accent);
}

.resume-body h3+p strong {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.resume-body>p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 640px;
  margin-bottom: 1.2em;
}

.resume-body ul {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0.5rem 0 1.5rem 1.25em;
  padding: 0;
}

.resume-body li {
  margin-bottom: 0.35em;
}

[data-theme="terminal"] .resume-body li::marker {
  color: var(--accent);
}

.resume-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

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

[data-theme="terminal"] .resume-body a:hover {
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .site-nav {
    padding: 1.5rem 1.25rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .site-nav .nav-right {
    gap: 1rem;
  }

  .site-nav .nav-links {
    gap: 1.25rem;
  }

  .hero {
    padding: 3rem 1.25rem 2.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .hero-sub {
    font-size: 1rem;
  }

  .hero .hero-meta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .separator-dot,
  .separator-pipe {
    display: none !important;
  }

  .section {
    padding: 0 1.25rem;
  }

  .project-card {
    padding: 1.25rem 1.5rem;
  }

  .project-card .card-top {
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-card .card-tag {
    margin-left: 0;
    align-self: flex-start;
  }

  .post-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-date {
    margin-left: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .theme-toggle {
    padding: 0.25rem 0.5rem;
  }

  .toggle-label {
    font-size: 0.62rem;
  }

  .single-page {
    padding: 2rem 1.25rem 3rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .list-page {
    padding: 2rem 1.25rem 3rem;
  }

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

  .post-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .post-nav-link {
    max-width: 100%;
  }

  .post-nav-link.next {
    text-align: left;
    margin-left: 0;
  }

  .resume-page {
    padding: 2rem 1.25rem 3rem;
  }

  .github-stats-images {
    flex-direction: column;
    align-items: center;
  }

  .resume-header-top {
    flex-direction: column;
    gap: 1rem;
  }

  .resume-actions {
    align-self: flex-start;
  }
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
.site-nav,
.hero,
.section,
.section-header,
.project-card,
.post-item,
.experience-strip,
.resume-page,
.site-footer,
.theme-toggle,
.toggle-track,
.github-stats {
  transition: background 0.5s ease, color 0.4s ease, border-color 0.4s ease,
    box-shadow 0.4s ease, order 0s;
}
