/* ============================================
   INTERACTIVE PROJECT CARTOGRAPHY
   Dark + Orange Accent Theme
   ============================================ */

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../../images/hero.jpg') center / cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    transparent 30%,
    transparent 60%,
    var(--color-bg) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Hero Text */
.hero-text {
  position: relative;
  z-index: 20;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-white);
  animation: heroFadeIn 0.8s ease-out;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  animation: heroFadeIn 0.8s ease-out 0.2s both;
  line-height: 1.6;
}

.hero-cta {
  margin-top: 3rem;
}

.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.scroll-indicator:hover {
  color: var(--color-accent-hover);
}

.scroll-indicator svg {
  width: 20px;
  height: 30px;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cartography Container */
#cartography-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 3rem 0;
  background: var(--color-bg);
}

.cartography-frame {
  position: relative;
  width: 90%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

#cartography-svg {
  width: 100%;
  height: 90vh;
  min-height: 700px;
  display: block;
  border-radius: 8px;
  background: transparent;
}

/* Grid and Axes */
.grid-lines line {
  transition: opacity 0.3s ease;
}

.axis path,
.axis line {
  stroke: rgba(255, 255, 255, 0.1);
}

.axis text {
  fill: var(--color-text-dim);
  font-size: 12px;
  font-family: var(--font-family-sans);
}

/* Axis Labels */
.axis-label {
  position: absolute;
  color: var(--color-text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 1rem;
}

.axis-x {
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
}

.axis-y {
  top: 50%;
  left: 2rem;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

/* Project Nodes */
.project-node {
  transition: opacity 0.2s ease;
}

.project-node:hover {
  filter: brightness(1.15);
}

.node-border {
  transition: all 0.2s ease;
}

.node-circle {
  transition: all 0.2s ease;
}

.type-indicator {
  transition: all 0.2s ease;
}

/* Tooltip */
#project-tooltip {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0;
  max-width: 280px;
  width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.tooltip-cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.tooltip-body {
  padding: 1rem;
}

.tooltip-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.tooltip-author {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.tooltip-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tooltip-hint {
  font-size: 0.7rem;
  color: var(--color-accent);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Legend */
.cartography-legend {
  position: absolute;
  top: 4rem;
  right: 4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem;
  min-width: 180px;
}

.cartography-legend h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

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

.legend-item:hover {
  color: var(--color-text);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.75rem;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* Sector Tags */
.sector-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.sector-tag:hover {
  color: var(--color-text);
}

/* ============================================
   SECTION SHARED
   ============================================ */

.section-inner {
  width: 90%;
  max-width: 1800px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-family-mono);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 2.5rem;
}

/* ============================================
   STATS BAR
   ============================================ */

.stats-bar {
  padding: 3rem 0;
  background: var(--color-bg);
}

.stats-inner {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem 3rem;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

.stat-number {
  font-family: var(--font-family-mono);
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-family-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}

/* ============================================
   PROJECTS GRID
   ============================================ */

.projects-section {
  padding: 6rem 0;
  background: var(--color-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: block;
}

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

.card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  margin: 0.75rem;
  border-radius: 8px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.project-card:hover .card-cover img {
  opacity: 0.9;
}

.card-body {
  padding: 0 1.25rem 1.25rem;
}

.card-type {
  font-family: var(--font-family-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0.375rem 0 0.25rem;
  line-height: 1.3;
}

.card-author {
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.card-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.card-sector-tag {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-text-dim);
  text-transform: lowercase;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  padding: 6rem 0;
  background: var(--color-bg);
}

.about-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
}

.about-label .section-label {
  margin-bottom: 0;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 640px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: 4rem 0;
  background: var(--color-bg);
}

.site-footer .section-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.footer-text {
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  color: var(--color-text-dim);
  letter-spacing: 0.05em;
}

.footer-sep {
  color: var(--color-accent);
  font-size: 0.75rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 768px) {
  .hero-section {
    min-height: 60vh;
  }

  .hero-content {
    padding: 2rem 1.5rem;
  }

  #cartography-container {
    padding: 2rem 0;
  }

  .cartography-frame {
    width: 100%;
    padding: 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  #cartography-svg {
    height: 60vh;
    min-height: 400px;
  }

  .cartography-legend {
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    min-width: 140px;
  }

  .cartography-legend h3 {
    font-size: 0.75rem;
  }

  .legend-item {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .axis-label {
    font-size: 0.625rem;
    padding: 0.375rem 0.75rem;
  }

  .axis-x {
    bottom: 3rem;
  }

  .axis-y {
    left: 1rem;
  }

  #project-tooltip {
    max-width: 280px;
  }

  .stats-inner {
    gap: 3rem;
    padding: 1.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .projects-section {
    padding: 4rem 0;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-section {
    padding: 4rem 0;
  }

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

@media screen and (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
