/**
 * Home Page Styles
 *
 * Neo-brutalist three-panel layout with shelf and carousel.
 * Desktop: Left content panel, right shelf/controls
 * Mobile: Stacked layout with hamburger menu
 */

/* ==========================================================================
   BASE LAYOUT
   ========================================================================== */

body.home-page {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Desktop shows desktop-layout, hides mobile-layout */
.desktop-layout {
  display: flex;
  min-height: 100vh;
}

.mobile-layout {
  display: none;
  visibility: hidden;
}

/* ==========================================================================
   DESKTOP: CONTENT PANEL (LEFT)
   ========================================================================== */

.content-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.content-inner {
  display: flex;
  height: 100vh;
  padding: var(--space-md) var(--space-xl) var(--space-md) var(--space-xl);
}

/* Hero Section */
.hero-section {
  flex-shrink: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: var(--space-xl);
  position: relative;
  z-index: 2;
}

/* Background gradient for hero */
.hero-section::before {
  content: "";
  position: absolute;
  top: -100vh;
  left: -100vw;
  right: 0;
  bottom: -100vh;
  background: linear-gradient(
    to right,
    var(--color-bg) 0%,
    var(--color-bg) 85%,
    transparent 100%
  );
  z-index: -1;
}

/* Hero Name Typography */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--color-text);
}

.name-line {
  display: block;
}

/* Navigation Links */
.hero-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.hero-nav .nav-link {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero-nav .nav-link:hover {
  color: var(--color-primary);
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.social-links a {
  color: var(--color-text);
  opacity: 0.6;
  transition:
    opacity var(--transition-fast),
    color var(--transition-fast);
}

.social-links a:hover {
  opacity: 1;
  color: var(--color-primary);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

/* Copyright */
.hero-copyright {
  position: absolute;
  bottom: var(--space-xl);
  left: 0;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  margin: 0;
}

/* ==========================================================================
   DESKTOP: PROJECT DISPLAY
   ========================================================================== */

.project-display {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl) var(--space-md) var(--space-xl);
  box-sizing: border-box;
}

.project-frame {
  width: 90%;
  height: 90%;
  max-height: 100%;
}

/* Carousel */
.carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.carousel-slide.active {
  display: flex;
}

.slide-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  padding: var(--space-md);
  box-sizing: border-box;
  text-align: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.slide-placeholder span {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Project header inside carousel slide */
.project-header {
  flex-shrink: 0;
  text-align: left;
  width: 100%;
  margin-bottom: var(--space-md);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.project-desc {
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
}

/* Content piece carousel */
.piece-carousel {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.piece-viewport {
  width: 100%;
  height: 100%;
  position: relative;
}

.piece-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-medium);
  pointer-events: none;
}

.piece-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.piece-chevron {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text-muted);
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.piece-chevron:hover {
  opacity: 0.8;
}

.piece-chevron:focus-visible {
  opacity: 0.8;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.piece-chevron svg {
  width: 24px;
  height: 24px;
}

/* Piece navigation (chevrons + dots) */
.piece-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.piece-dots {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.piece-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  opacity: 0.35;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    opacity var(--transition-fast);
}

.piece-dot.active {
  background: var(--color-primary);
  opacity: 1;
}

.piece-dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Piece description */
.piece-description {
  flex-shrink: 0;
  text-align: center;
  line-height: 1.5;
  color: var(--color-text);
  min-height: 1.5em;
}

/* Image slide content */
.slide-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1;
  width: 100%;
  height: 100%;
}

.slide-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--color-primary);
}

.piece-slide iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--color-primary);
}

.carousel-slide iframe {
  border: 1px solid var(--color-primary);
}

.slide-caption {
  flex-shrink: 0;
  padding: var(--space-sm) 0 0 0;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   DESKTOP: RIGHT PANEL
   ========================================================================== */

.right-panel {
  width: var(--panel-right-width);
  display: flex;
  flex-direction: column;
  /* border-left: 1px solid var(--color-accent); */
}

/* Controls Panel */
.controls-panel {
  height: 120px;
  position: relative;
  background: var(--color-bg);
  cursor: pointer;
}

.theme-toggle-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.theme-toggle-scene:focus-visible {
  outline: 2px solid var(--color-primary, #0066ff);
  outline-offset: 2px;
}

.mobile-theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary, #0066ff);
  outline-offset: 2px;
}

/* Mountains SVG */
.mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.mountain {
  fill: var(--color-primary);
}

.mountain-snow {
  fill: var(--color-accent);
  transition: fill var(--transition-slow);
}

/* Celestial Bodies */
.celestial-body {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  transition:
    top var(--transition-slow),
    opacity var(--transition-medium);
}

.celestial-body.sun {
  background: #ff6b00;
  top: 25px;
  opacity: 1;
}

.celestial-body.moon {
  background: #0066ff;
  top: 120px;
  opacity: 0;
}

/* Dark mode: swap sun and moon */
[data-theme="dark"] .celestial-body.sun {
  top: 120px;
  opacity: 0;
}

[data-theme="dark"] .celestial-body.moon {
  top: 25px;
  opacity: 1;
}

/* Shelf Panel */
.shelf-panel {
  flex: 1;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  max-height: calc(100vh - 120px);
  overflow: scroll;
}

.shelf-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.shelf-item {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.shelf-item:hover {
  transform: scale(1.02);
}

.shelf-item.active .shelf-item-icon {
  border-color: var(--color-bg);
  background: color-mix(in srgb, var(--color-bg) 20%, transparent);
}

/* Shelf Item Icon */
.shelf-item-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-bg);
  background: transparent;
  position: relative;
}

.shelf-item-icon svg {
  width: 40%;
  height: 40%;
  color: var(--color-bg);
}

.shelf-item-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

/* Shelf Loading/Empty States */
.shelf-loading,
.shelf-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-md);
  color: var(--color-bg);
  font-family: var(--font-mono);
  opacity: 0.7;
  margin: 0;
}

/* Shelf Item Legend */
.shelf-item-legend {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background: var(--color-primary);
  padding: 2px 6px;
  font-family: var(--font-mono);
  color: var(--color-bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--color-bg);
}

/* ==========================================================================
   MOBILE LAYOUT
   ========================================================================== */

@media (max-width: 900px) {
  .desktop-layout {
    display: none !important;
    visibility: hidden;
  }

  .mobile-layout {
    display: flex !important;
    visibility: visible;
    flex-direction: column;
    min-height: 100vh;
  }

  /* Mobile Header */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: var(--z-sticky);
  }

  .hero-name {
    display: none;
  }

  .mobile-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    text-decoration: none;
  }

  /* Hamburger Button */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--color-border);
    cursor: pointer;
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition:
      transform var(--transition-fast),
      opacity var(--transition-fast);
  }

  .mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Mobile Menu - covers all content behind it when open */
  .mobile-menu {
    display: none;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: calc(
      2 * var(--space-md) + 44px + 1px
    ); /* header padding + button height + border */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    overflow-y: auto;
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-nav-link {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--color-text);
    text-decoration: none;
    padding: var(--space-sm) 0;
  }

  .mobile-nav-link:hover {
    color: var(--color-primary);
  }

  /* Mobile Theme Toggle */
  .mobile-theme-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    cursor: pointer;
  }

  .theme-label {
    font-family: var(--font-mono);
    color: var(--color-text-muted);
  }

  .mini-mountains {
    position: relative;
    width: 60px;
    height: 30px;
    overflow: hidden;
  }

  .mini-mountains svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
  }

  .mini-mountains polygon {
    fill: var(--color-primary);
  }

  .mini-celestial {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    transition:
      top var(--transition-medium),
      opacity var(--transition-medium);
  }

  .mini-celestial.sun {
    background: #ff6b00;
    top: 2px;
    opacity: 1;
  }

  .mini-celestial.moon {
    background: #0066ff;
    top: 30px;
    opacity: 0;
  }

  [data-theme="dark"] .mini-celestial.sun {
    top: 30px;
    opacity: 0;
  }

  [data-theme="dark"] .mini-celestial.moon {
    top: 2px;
    opacity: 1;
  }

  /* Mobile SPA Content */
  .mobile-spa-content {
    flex: 1;
    position: relative;
  }

  .mobile-spa-content .spa-section {
    position: relative;
    transform: none;
    opacity: 0;
    visibility: hidden;
    display: none;
    pointer-events: none;
    transition: none;
  }

  .mobile-spa-content .spa-section.active {
    transform: none;
    opacity: 1;
    visibility: visible;
    display: block;
    pointer-events: auto;
  }

  /* Disable transitions on initial page load (mobile) */
  .no-transition .spa-section,
  .no-transition .spa-section.active {
    transition: none !important;
  }

  .mobile-hero-name {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-xl);
  }

  .mobile-hero-name span {
    display: block;
  }

  /* Mobile Projects Section */
  .mobile-projects-section {
    padding: var(--space-lg) var(--space-md);
  }

  /* Mobile Projects */
  .mobile-projects {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
  }

  .mobile-project-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
  }

  .mobile-project-card .project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
    overflow: hidden;
  }

  .mobile-project-card .project-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-text);
  }

  .mobile-project-card .project-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .mobile-project-card .project-info {
    flex: 1;
    min-width: 0;
  }

  .mobile-project-card .project-info h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
  }

  .mobile-project-card .project-info p {
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.4;
  }

  /* Description hidden by default, shown on expand */
  .mobile-project-card .project-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      margin 0.3s ease;
    margin-top: 0;
  }

  .mobile-project-card.expanded .project-description {
    max-height: 1000px;
    overflow: visible;
    opacity: 1;
    margin-top: var(--space-xs);
  }

  /* Content pieces hidden by default, shown on expand */
  .mobile-project-card .project-content-pieces {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      margin 0.3s ease;
    margin-top: 0;
    pointer-events: none;
  }

  .mobile-project-card.expanded .project-content-pieces {
    max-height: 400px;
    opacity: 1;
    margin-top: var(--space-sm);
    pointer-events: auto;
    overflow-y: auto;
  }

  .mobile-project-card .content-piece-container {
    position: relative;
    width: 100%;
    max-height: 200px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xs);
  }

  .mobile-project-card .content-piece-container:last-child {
    margin-bottom: 0;
  }

  .mobile-project-card .content-piece-container img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
  }

  .mobile-project-card .content-piece-container iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: none;
    pointer-events: none;
  }

  /* Visual feedback for interactive cards */
  .mobile-project-card {
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .mobile-project-card:active {
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  }

  .mobile-project-card.expanded {
    background: color-mix(in srgb, var(--color-primary) 3%, var(--color-bg));
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .mobile-project-card.expanded .project-info {
    flex-basis: 0;
  }

  .mobile-project-card .open-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    flex-shrink: 0;
    transition:
      background var(--transition-fast),
      color var(--transition-fast);
  }

  .mobile-project-card .open-link:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    border-color: var(--color-primary);
  }

  .mobile-project-card .open-link svg {
    width: 18px;
    height: 18px;
  }

  /* Mobile Footer */
  .mobile-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md) var(--space-md);
    border-top: var(--border-thin) solid var(--color-border);
  }

  .mobile-footer-social {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
  }

  .mobile-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--color-text);
    opacity: 0.6;
    transition: opacity var(--transition-fast);
  }

  .mobile-footer-social a:hover {
    opacity: 1;
  }

  .mobile-footer-social svg {
    width: 24px;
    height: 24px;
  }

  .mobile-footer-copyright {
    color: var(--color-text-muted);
    font-family: var(--font-sans);
  }

  /* Mobile Photography - tight 3-column grid */
  .photography-section {
    padding: var(--space-xs);
  }

  .photography-section .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
}

/* ==========================================================================
   MEDIUM SCREENS
   ========================================================================== */

@media (min-width: 901px) and (max-width: 1200px) {
  .hero-name {
    font-size: 3.5rem;
  }

  .hero-section {
    width: 240px;
  }

  .shelf-item-icon svg {
    width: 35%;
    height: 35%;
  }
}

/* ==========================================================================
   SPA MODE STYLES
   ========================================================================== */

/* SPA Content Container */
.spa-content {
  flex: 1.5;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual section styling */
.spa-section {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease,
    visibility 0.4s;
  pointer-events: none;
  overflow-y: auto;
}

/* Disable transitions on initial page load so the first section appears instantly */
.no-transition .spa-section,
.no-transition .spa-section.active {
  transition: none !important;
}

.spa-section.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Section exiting to the left (going forward) */
.spa-section.exit-left {
  transform: translateX(-100%);
  opacity: 0;
  visibility: visible;
}

/* Section exiting to the right (going backward) */
.spa-section.exit-right {
  transform: translateX(100%);
  opacity: 0;
  visibility: visible;
}

/* Section entering from the right (going forward) */
.spa-section.enter-right {
  transform: translateX(100%);
}

/* Section entering from the left (going backward) */
.spa-section.enter-left {
  transform: translateX(-100%);
}

/* Pre-SPA shelf collapse: hide shelf immediately on non-projects routes
   before the SPA router initializes, preventing flash of "Loading projects..." */
[data-initial-section="non-projects"] .shelf-panel {
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  height: 0;
  pointer-events: none;
}

/* Right Panel Animation for shelf collapse */
.right-panel {
  position: relative;
}

.right-panel.collapsed {
  justify-content: flex-end;
}

.right-panel.collapsed .shelf-panel {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  height: 0;
}

.right-panel.collapsed .controls-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
}

.shelf-panel {
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.controls-panel {
  transition:
    top 0.3s ease,
    bottom 0.3s ease;
}

/* Nav Active State */
.hero-nav .nav-link {
  position: relative;
}

.hero-nav .nav-link.active {
  color: var(--color-primary);
}

.hero-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

/* ==========================================================================
   SPA SECTION SPECIFIC STYLES
   ========================================================================== */

/* Blog Section */
.blog-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-xl);
}

.blog-section-content {
  width: 100%;
  max-width: var(--max-width-full);
  margin: 0 auto;
}

.blog-section .posts {
  display: flex;
  flex-direction: column;
  border: var(--border-thin) solid var(--color-border);
}

.blog-section .loading,
.blog-section .empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
}

.blog-section .post-card {
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--border-thin) solid var(--color-border);
  transition: background var(--transition-fast);
}

.blog-section .post-card:last-child {
  border-bottom: none;
}

.blog-section .post-card:hover {
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
}

.blog-section .post-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.blog-section .post-card h2 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-section .post-card h2 a:hover {
  color: var(--color-primary);
}

.blog-section .post-excerpt {
  margin-bottom: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.blog-section .post-excerpt .post-date {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* About Section */
.about-section-spa {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-xl);
}

.about-section-spa .about-content {
  width: 100%;
  max-width: var(--max-width-prose);
  margin: 0 auto;
}

.about-section-spa .about-hero {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: start;
}

.about-section-spa .profile-frame {
  position: relative;
  flex-shrink: 0;
  height: 200px;
  max-width: 35%;
}

.about-section-spa .profile-image {
  height: 100%;
  border: var(--border-thin) solid var(--color-border);
  z-index: 1;
}

.about-section-spa .profile-image img {
  height: 100%;
  object-fit: contain;
}

.about-section-spa .frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--color-accent);
  border-style: solid;
  border-width: 0;
}

.about-section-spa .frame-corner--tl {
  top: -8px;
  left: -8px;
  border-top-width: var(--border-thin);
  border-left-width: var(--border-thin);
}

.about-section-spa .frame-corner--tr {
  top: -8px;
  right: -8px;
  border-top-width: var(--border-thin);
  border-right-width: var(--border-thin);
}

.about-section-spa .frame-corner--bl {
  bottom: -8px;
  left: -8px;
  border-bottom-width: var(--border-thin);
  border-left-width: var(--border-thin);
}

.about-section-spa .frame-corner--br {
  bottom: -8px;
  right: -8px;
  border-bottom-width: var(--border-thin);
  border-right-width: var(--border-thin);
}

.about-section-spa .about-intro {
  flex: 1 1 300px;
  padding-top: var(--space-md);
}

.about-section-spa .intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 0;
}

.about-section-spa .about-section-block {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  border: var(--border-thin) solid var(--color-border);
}

.about-section-spa .about-section-block h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.about-section-spa .about-section-block p {
  line-height: 1.7;
  margin-bottom: 0;
}

.about-section-spa .linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: var(--border-thin) solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.about-section-spa .linkedin-link:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  text-decoration: none;
}

.about-section-spa .linkedin-link svg {
  flex-shrink: 0;
}

/* Photography Section */
.photography-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-lg);
  overflow-y: auto;
}

.photography-section .photo-content {
  width: 100%;
  max-width: var(--max-width-full);
  margin: 0 auto;
}

.photography-section .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
}

.photography-section .photo-grid:empty {
  display: none;
}

.photography-section .photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg);
}

.photography-section .photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.photography-section .photo-item:hover img {
  transform: scale(1.05);
}

.photography-section .photo-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition-fast);
}

.photography-section .photo-item:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   MOBILE NAV ACTIVE STATE
   ========================================================================== */

.mobile-nav-link.active {
  color: var(--color-primary);
}

/* ==========================================================================
   BLOG POST SECTION (mobile inline post view)
   ========================================================================== */

.blog-post-section {
  padding: var(--space-lg) var(--space-md);
}

.blog-post-content {
  max-width: var(--max-width-prose);
  margin: 0 auto;
}

.blog-post-section .back-link {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.blog-post-section .back-link:hover {
  color: var(--color-primary);
}

.blog-post-section .post-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.blog-post-section .post-meta {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   DRAFT PREVIEW SECTION
   ========================================================================== */

.draft-preview-section {
  padding: var(--space-lg) var(--space-md);
}

.draft-preview-content {
  max-width: var(--max-width-prose);
  margin: 0 auto;
}

.draft-banner {
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.draft-preview-section .post-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.draft-preview-section .post-meta {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   404 NOT FOUND SECTION
   ========================================================================== */

.not-found-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  margin: 0;
}

.not-found-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 600;
  margin: var(--space-sm) 0 var(--space-md);
}

.not-found-path {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  background: var(--color-bg-secondary);
  border: var(--border-thin) solid var(--color-border);
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-lg);
  word-break: break-all;
}

.not-found-message {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 36ch;
}
