/* ==========================================================================
   DESIGN SYSTEM — Graph-paper notebook aesthetic
   See claude/design_theme.md for full reference
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #e8e8e8;
  background-image:
    linear-gradient(rgba(0,0,0,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.028) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #111111;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.section {
  padding: 5rem 0;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-nav {
  background-color: #111111;
  border-bottom: 2.5px solid #111111;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  height: 60px;
}

.nav-brand {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: #ffffff;
}

.nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  color: #999999;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-list li a:hover {
  color: #ffffff;
  background-color: #222222;
}

.nav-cta {
  background-color: #ffffff !important;
  color: #111111 !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background-color: #e8e8e8 !important;
  color: #111111 !important;
}

/* Responsive nav */
@media (max-width: 767.98px) {
  .site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .site-nav-inner {
    height: auto;
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }
  .nav-list li {
    display: flex;
  }
  .nav-list li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Contact button - same style as others on mobile */
  .nav-list li:last-child a.nav-cta {
    background-color: transparent !important;
    color: #999999 !important;
    font-weight: 500 !important;
  }
  .nav-list li:last-child a.nav-cta:hover {
    background-color: #222222 !important;
    color: #ffffff !important;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  background-color: #111111;
  border-bottom: 2.5px solid #111111;
  padding: 3rem 0 2.75rem;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-label {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: #999999;
  background-color: #222222;
  border: 1px solid #333333;
  padding: 0.3rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #999999;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* About hero: circular portrait */
.hero-portrait-frame {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2.5px solid #333333;
  overflow: hidden;
  margin: 0 auto 1.5rem;
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-theme {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: #ffffff;
  background-color: #111111;
  border: 2.5px solid #111111;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.btn-theme:hover {
  background-color: #444444;
  border-color: #444444;
  color: #ffffff;
}

.btn-theme-outline {
  background-color: transparent;
  color: #111111;
  border-color: #111111;
}

.btn-theme-outline:hover {
  background-color: #111111;
  color: #ffffff;
  border-color: #111111;
}

/* Outline on dark backgrounds */
.hero-section .btn-theme-outline {
  border-color: #555555;
  color: #cccccc;
}

.hero-section .btn-theme-outline:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #111111;
}

.hero-section .btn-theme:not(.btn-theme-outline) {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #111111;
}

.hero-section .btn-theme:not(.btn-theme-outline):hover {
  background-color: #cccccc;
  border-color: #cccccc;
  color: #111111;
}

.btn-theme-sm {
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card-theme {
  display: flex;
  gap: 1.25rem;
  background-color: #ffffff;
  border: 2.5px solid #111111;
  border-radius: 4px;
  padding: 1.75rem;
  height: 100%;
  transition: all 0.2s ease;
}

.card-theme:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0px #111111;
}

.card-theme h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.card-theme p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #444444;
  margin-bottom: 0.4rem;
}

.card-theme h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 1rem;
}

/* Vertical card (projects) */
.card-theme-vertical {
  flex-direction: column;
  padding-top: 0;
  overflow: hidden;
  box-shadow: 6px 6px 0px #111111;
}

.card-theme-vertical:hover {
  transform: none;
  box-shadow: 6px 6px 0px #111111;
}

.card-theme-vertical .project-year-badge {
  background-color: #111111;
  color: #ffffff;
  border: none;
  border-radius: 0;
  margin: 0 -1.75rem 1.25rem;
  padding: 0.6rem 1.75rem;
  width: calc(100% + 3.5rem);
  font-size: 0.78rem;
  font-weight: 500;
}

.card-theme-vertical p {
  flex-grow: 1;
}

/* Wide card (about) */
.card-theme-wide {
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
}

/* Icon container */
.card-theme-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background-color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.card-theme-body {
  flex: 1;
}

/* Card actions row */
.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ==========================================================================
   MUTED TEXT
   ========================================================================== */
.text-muted-theme {
  font-size: 0.85rem !important;
  color: #777777 !important;
  line-height: 1.6;
}

/* ==========================================================================
   PILLS / BADGES
   ========================================================================== */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #444444;
  border: 1px solid #cccccc;
}

/* Year badge on project cards */
.project-year-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: #111111;
  background-color: #f0f0f0;
  border: 1px solid #cccccc;
  padding: 0.15rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

/* ==========================================================================
   PROJECT CARDS (full-width, projects page)
   ========================================================================== */
.project-card-full {
  background-color: #ffffff;
  border: 2.5px solid #111111;
  border-radius: 4px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.project-card-full-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-card-full-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
}

.project-card-full-desc {
  font-size: 0.92rem;
  color: #444444;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.project-card-full .pill-group {
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #111111;
  border-top: 2.5px solid #111111;
  padding: 1.75rem 0;
  margin-top: 0;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
}

.footer-copy {
  font-size: 0.8rem;
  color: #666666;
}

.footer-right {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.footer-right a + a::before {
  content: "\00B7";
  margin-right: 0.75rem;
  color: #666666;
}

.footer-right a {
  color: #999999;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: #ffffff;
}

/* ==========================================================================
   PAGE-SPECIFIC HERO VARIANTS (About, Blog, Projects, Contact)
   These keep the dark hero style but match the new sharp aesthetic.
   ========================================================================== */
.about-hero-section,
.blog-hero-section,
.projects-hero-section,
.contact-hero-section {
  background-color: #111111;
  border-bottom: 2.5px solid #111111;
  border-radius: 0;
  padding: 4rem 0;
  text-align: center;
  color: #ffffff;
  width: 100%;
  overflow: hidden;
}

.about-hero-section:hover,
.blog-hero-section:hover,
.projects-hero-section:hover,
.contact-hero-section:hover {
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   TIMELINE (About page)
   ========================================================================== */
.timeline {
  position: relative;
  padding-left: 30px;
  margin-left: 10px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2.5px;
  background: #111111;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111111;
  border: 3px solid #e8e8e8;
  box-shadow: 0 0 0 2.5px #111111;
}

.timeline-date {
  margin-bottom: 10px;
}

.timeline-date .badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  background-color: #111111 !important;
  border-radius: 4px;
  font-weight: 500;
}

.timeline-content {
  background: #ffffff;
  color: #111111;
  padding: 1.5rem;
  border-radius: 4px;
  border: 2.5px solid #111111;
  box-shadow: none;
  transition: all 0.2s ease;
}

.timeline-content:hover {
  box-shadow: none;
  transform: none;
}

.timeline-content h3 {
  color: #111111;
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-content h4 {
  color: #777777;
  font-size: 0.95rem;
}

.timeline-content p {
  color: #444444;
  font-size: 0.9rem;
}

/* Timeline list styling */
.timeline-content ul {
  padding-left: 1.2rem;
  margin: 0;
}

.timeline-content li {
  font-size: 0.9rem;
  color: #444444;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.timeline-content li:last-child {
  margin-bottom: 0;
}

/* Timeline tags (right-bottom of card) */
.timeline-tags {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.timeline-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #111111;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.timeline-tag:hover {
  background-color: #444444;
  color: #ffffff;
}

/* ==========================================================================
   COLLAPSIBLE TIMELINE SECTIONS
   ========================================================================== */
.section:has(.section-title-toggle) {
  padding: 0.75rem 0;
}

.section:has(.timeline-collapsible.expanded) {
  padding: 0.75rem 0 5rem;
}

.timeline-collapsible {
  display: none;
}

.timeline-collapsible.expanded {
  display: block;
  margin-top: 2.5rem;
}

.section-title-toggle {
  cursor: pointer;
  user-select: none;
  background-color: #111111;
  color: #ffffff;
  margin: 0 -2rem 0;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
}

.section-title-toggle:hover {
  background-color: #333333;
}

.toggle-arrow {
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  font-weight: 400;
  flex-shrink: 0;
}

/* ==========================================================================
   SKILLS DASHBOARD (About page)
   ========================================================================== */
.skills-dashboard-wrapper {
  position: relative;
}

.sketch-arrow-hint {
  position: absolute;
  left: -180px;
  top: 70px;
}

.sketch-arrow-img {
  width: 208px;
  height: auto;
}

@media (max-width: 1100px) {
  .sketch-arrow-hint {
    display: none;
  }
}

.skills-dashboard {
  border: 2.5px solid #111111;
  border-radius: 4px;
  background-color: #ffffff;
  overflow: hidden;
}

.dashboard-titlebar {
  background-color: #111111;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-dots {
  display: flex;
  gap: 6px;
}

.dashboard-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #444444;
}

.dashboard-dots span:first-child { background-color: #ff5f57; }
.dashboard-dots span:nth-child(2) { background-color: #febc2e; }
.dashboard-dots span:last-child { background-color: #28c840; }

.dashboard-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: #999999;
  letter-spacing: 0.03em;
}

.dashboard-body {
  display: flex;
  min-height: 300px;
}

.dashboard-sidebar {
  width: 180px;
  flex-shrink: 0;
  border-right: 1.5px solid #e0e0e0;
  padding: 1.25rem;
  background-color: #fafafa;
}

.sidebar-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: #999999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.sidebar-item {
  font-size: 0.85rem;
  color: #666666;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.15rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-item:hover {
  color: #111111;
  background-color: #eeeeee;
}

.sidebar-item.active {
  background-color: #111111;
  color: #ffffff;
  font-weight: 600;
}

.sidebar-item.active:hover {
  background-color: #111111;
  color: #ffffff;
}

.dashboard-main {
  flex: 1;
  padding: 1.5rem;
}

.dashboard-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.dashboard-cell {
  padding: 0.75rem 1rem;
  border: 1px solid #eeeeee;
}

.cell-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: #999999;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.cell-value {
  font-size: 0.85rem;
  color: #333333;
  line-height: 1.5;
}

.dashboard-divider {
  height: 1.5px;
  background-color: #e0e0e0;
  margin: 1.25rem 0;
}

/* Dashboard tab switching */
.dashboard-tab {
  display: none;
}

.dashboard-tab.active {
  display: block;
}

@media (max-width: 767.98px) {
  .dashboard-body {
    flex-direction: column;
  }
  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1.5px solid #e0e0e0;
    padding: 0.75rem 1rem;
  }
  .sidebar-section {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-label {
    display: none;
  }
  .sidebar-item {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-bottom: 0;
  }
  .sidebar-item.active {
    border-color: #111111;
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-main {
    padding: 1rem;
  }
  .dashboard-section-title {
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
  }
  .cell-label {
    font-size: 0.62rem;
  }
  .cell-value {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-cell {
    padding: 0.6rem 0.75rem;
  }
}

/* ==========================================================================
   BLOG CARDS (v2 — matches project card style)
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.blog-card-v2 {
  background-color: #ffffff;
  border: 2.5px solid #111111;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 6px 6px 0px #111111;
}

.blog-card-v2:hover {
  transform: translateY(-4px);
}

.blog-card-v2-date {
  background-color: #111111;
  color: #ffffff;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-tag {
  background-color: rgba(255, 255, 255, 0.12);
  color: #cccccc;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.blog-card-v2-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-v2-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.blog-card-v2-excerpt {
  font-size: 0.95rem;
  color: #444444;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  flex: 1;
}

.blog-card-v2-body .btn-theme-sm {
  align-self: flex-start;
}

@media (max-width: 767.98px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Legacy blog-card kept for blog_detail if needed */
.blog-card {
  background-color: #ffffff;
  border: 2.5px solid #111111;
  border-radius: 4px;
  padding: 1.75rem;
  transition: all 0.2s ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0px #111111;
}

.blog-card h3,
.blog-card h5 {
  color: #111111;
}

.blog-card p {
  color: #444444;
}

/* ==========================================================================
   BLOG DETAIL — READING SURFACE
   ========================================================================== */
.reading-surface {
  border: 2.5px solid #111111;
  border-radius: 4px;
  background-color: #ffffff;
  overflow: hidden;
}

.reading-titlebar {
  background-color: #111111;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reading-dots {
  display: flex;
  gap: 6px;
}

.reading-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #444444;
}

.reading-dots span:first-child { background-color: #ff5f57; }
.reading-dots span:nth-child(2) { background-color: #febc2e; }
.reading-dots span:last-child { background-color: #28c840; }

.reading-titlebar-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: #999999;
  letter-spacing: 0.03em;
}

.reading-body {
  padding: 3rem 3.5rem;
}

.reading-tag {
  display: inline-block;
  background-color: #111111;
  color: #ffffff;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.reading-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #222222;
}

.reading-content p {
  margin-bottom: 1.5rem;
}

.reading-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .reading-body {
    padding: 2rem 1.5rem;
  }

  .reading-content {
    font-size: 1rem;
  }
}

/* ==========================================================================
   PROJECT CARDS (Projects page)
   ========================================================================== */
.project-card {
  background-color: #ffffff;
  border: 2.5px solid #111111;
  border-radius: 4px;
  padding: 1.75rem;
  transition: all 0.2s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0px #111111;
}

.project-card h3,
.project-card h5 {
  color: #111111;
}

.project-card p {
  color: #444444;
}

/* ==========================================================================
   CONTACT BUTTONS (Contact page)
   ========================================================================== */
.btn-contact {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #111111;
  border: 2.5px solid #111111;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-contact:hover {
  background-color: #444444;
  border-color: #444444;
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 767.98px) {
  .hero-portrait-frame {
    width: 100px;
    height: 100px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-label {
    font-size: 0.72rem;
    padding: 0.25rem 0.75rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .hero-actions .btn-theme {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .card-theme {
    flex-direction: column;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-inner {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    justify-content: center;
  }
}

/* ==========================================================================
   UTILITY OVERRIDES (Bootstrap cleanup)
   ========================================================================== */

/* Prevent Bootstrap dark classes from interfering */
.bg-dark {
  background-color: #111111 !important;
}

/* Override Bootstrap .container max-width where we use section-inner */
.section-inner .container {
  max-width: 100%;
  padding: 0;
}

/* Keep old .wide-container for backwards compat but match theme */
.wide-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   DEEP DIVE — Project detail page card system
   Alternating Narrative (white) / Technical (dark) cards
   ========================================================================== */

/* --- Meta row under hero --- */
.dd-meta {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dd-meta-item {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: #777777;
  letter-spacing: 0.02em;
}

.dd-meta-item span {
  color: #cccccc;
  font-weight: 500;
}

/* --- Card container --- */
.dd-stream {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* --- Base card --- */
.dd-card {
  position: relative;
  border-radius: 4px;
  padding: 2rem 2rem 2rem 2.25rem;
  border-left: 3px solid transparent;
}

/* --- Narrative card — flows as plain content, no box --- */
.dd-narrative {
  background: transparent;
  border: none;
  border-left: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 0 0;
}

.dd-narrative h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.dd-narrative p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #444444;
  margin: 0 0 0.75rem;
}

.dd-narrative p:last-child {
  margin-bottom: 0;
}

.dd-narrative ul {
  padding-left: 1.2rem;
  margin: 0;
}

.dd-narrative li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #444444;
  margin-bottom: 0.6rem;
}

.dd-narrative li:last-child {
  margin-bottom: 0;
}

/* --- Technical card --- */
.dd-technical {
  background-color: #0b0f14;
  border: 2px solid #ffffff;
  border-radius: 16px;
}

.dd-technical h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.dd-technical h4 {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.6rem;
}

.dd-technical h4:first-of-type {
  margin-top: 0;
}

.dd-technical p {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 0.5rem;
}

.dd-technical p:last-child {
  margin-bottom: 0;
}

.dd-technical ul {
  padding-left: 1.2rem;
  margin: 0;
  list-style: none;
}

.dd-technical ul li {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  position: relative;
  padding-left: 0.75rem;
}

.dd-technical ul li::before {
  content: '\203A';
  position: absolute;
  left: -0.5rem;
  color: #6366f1;
  font-weight: 600;
}

.dd-technical ul li:last-child {
  margin-bottom: 0;
}

/* --- Code block inside technical card --- */
.dd-code-wrap {
  position: relative;
  margin: 0.75rem 0;
}

.dd-code-wrap pre {
  background-color: #060a10;
  border: 1px solid #1a1f2e;
  border-radius: 4px;
  padding: 1.25rem;
  margin: 0;
  overflow-x: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #c9d1d9;
}

.dd-code-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: #4b5563;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 1.25rem;
  background-color: #060a10;
  border: 1px solid #1a1f2e;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dd-code-label + pre {
  border-radius: 0 0 4px 4px;
}

.dd-copy-btn {
  background: none;
  border: 1px solid #2a3040;
  border-radius: 3px;
  color: #4b5563;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dd-copy-btn:hover {
  color: #818cf8;
  border-color: #6366f1;
}

.dd-copy-btn.copied {
  color: #34d399;
  border-color: #34d399;
}

/* --- System loop / flow diagram text --- */
.dd-flow {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #6366f1;
  background-color: #060a10;
  border: 1px solid #1a1f2e;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  white-space: pre-wrap;
}

/* --- Design note inside technical card --- */
.dd-note {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid #1a1f2e;
  margin-top: 1rem;
  padding-top: 0.75rem;
  font-style: italic;
}

/* --- Fix / iteration item --- */
.dd-fix {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dd-fix:last-child {
  margin-bottom: 0;
}

.dd-fix-problem {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: #f87171;
  line-height: 1.55;
}

.dd-fix-solution {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: #34d399;
  line-height: 1.55;
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.dd-fix-solution:last-child {
  margin-bottom: 0;
}

/* JSON syntax colors inside code blocks */
.dd-code-wrap .json-key { color: #818cf8; }
.dd-code-wrap .json-string { color: #34d399; }
.dd-code-wrap .json-number { color: #f59e0b; }
.dd-code-wrap .json-bool { color: #f87171; }
.dd-code-wrap .json-null { color: #64748b; }

/* ==========================================================================
   JOURNEY & PEOPLE — Editorial white-background section
   Visually distinct from technical deep dive (reflection mode)
   ========================================================================== */

.journey-section {
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 5rem 0;
}

.journey-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section header */
.journey-header {
  margin-bottom: 3.5rem;
}

.journey-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.journey-subtitle {
  font-size: 0.9rem;
  color: #999999;
  line-height: 1.6;
  margin: 0;
}

/* Block A — Context text */
.journey-context {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #444444;
  max-width: 620px;
  margin-bottom: 3.5rem;
}

.journey-context p {
  margin: 0;
}

/* Subsection */
.journey-subsection {
  margin-bottom: 3rem;
}

.journey-subsection:last-child {
  margin-bottom: 3.5rem;
}

.journey-sub-number {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: #bbbbbb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.journey-sub-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.journey-sub-desc {
  font-size: 0.88rem;
  color: #888888;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 540px;
}

/* Block B — Visual story grid */
.journey-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 0;
}

.journey-gallery-item {
  /* no break-inside needed for grid */
}

.journey-gallery-item img {
  width: 100%;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.journey-gallery-item .journey-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: #bbbbbb;
  letter-spacing: 0.03em;
}

.journey-caption {
  font-size: 0.78rem;
  color: #999999;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Block C — Reflection text */
.journey-reflection {
  max-width: 580px;
  border-top: 1px solid #e8e8e8;
  padding-top: 2.5rem;
}

.journey-reflection p {
  font-size: 1rem;
  line-height: 1.75;
  color: #555555;
  margin: 0 0 0.75rem;
}

.journey-reflection p:last-child {
  margin-bottom: 0;
}

/* Team grid */
.journey-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.journey-team-member {
  text-align: center;
}

.journey-team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: #bbbbbb;
  overflow: hidden;
}

.journey-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journey-team-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111111;
  margin: 0 0 0.15rem;
}

.journey-team-role {
  font-size: 0.78rem;
  color: #999999;
  line-height: 1.4;
}

/* Journey responsive */
@media (max-width: 767.98px) {
  .journey-section {
    padding: 3.5rem 0;
  }

  .journey-inner {
    padding: 0 1.25rem;
  }

  .journey-gallery {
    grid-template-columns: 1fr;
  }

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

  .journey-context {
    font-size: 0.95rem;
  }
}

/* tablet: already 2-col grid, no change needed */

/* --- Deep dive responsive --- */
@media (max-width: 767.98px) {
  .dd-card {
    padding: 1.5rem 1.25rem 1.5rem 1.5rem;
  }

  .dd-stream {
    gap: 1.5rem;
  }

  .dd-meta {
    gap: 1rem;
  }

  .dd-narrative h3 {
    font-size: 1.15rem;
  }

  .dd-code-wrap pre {
    font-size: 0.72rem;
    padding: 1rem;
  }

  .dd-gallery {
    grid-template-columns: 1fr;
  }
}
