/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #111418;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   CANVAS CONTAINER (fixed background)
   ============================================ */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================
   ENERGY READOUT
   ============================================ */
#energy-readout {
  position: fixed;
  bottom: 16px;
  right: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Mono", "Menlo", monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

/* ============================================
   SIMULATION OVERLAY TOGGLE
   ============================================ */
#overlay-toggle {
  position: fixed;
  bottom: 16px;
  left: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

#overlay-toggle:hover {
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

#overlay-toggle.active {
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ============================================
   NAVIGATION
   ============================================ */
#main-nav {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 40px;
  padding: 8px 6px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 20px;
  border-radius: 30px;
  transition: all 0.35s ease;
  cursor: pointer;
  user-select: none;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.nav-link.active {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
#content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page {
  display: none;
  min-height: 100vh;
  padding: 0 40px;
}

.page.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-inner {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================
   HOME
   ============================================ */
.home-inner {
  text-align: center;
  padding-top: 60px;
}

.hero-name {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 300;
  font-size: clamp(72px, 12vw, 160px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
}

.hero-detail {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em;
}

/* ============================================
   SECTION SHARED STYLES
   ============================================ */
.section-header {
  margin-bottom: 56px;
}

.section-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 300;
  font-size: 48px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

.section-line {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   ABOUT
   ============================================ */
.about-inner {
  padding-top: 100px;
  padding-bottom: 80px;
}

.about-lead {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.about-text p {
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 20px;
  max-width: 640px;
}

.about-details {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-group {
  display: flex;
  gap: 24px;
  align-items: baseline;
}

.detail-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  min-width: 120px;
  flex-shrink: 0;
}

.detail-value {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio-inner {
  padding-top: 100px;
  padding-bottom: 80px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 36px 32px;
  transition: all 0.4s ease;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.project-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.project-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.project-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 4px 12px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-inner {
  padding-top: 100px;
  padding-bottom: 80px;
}

.contact-lead {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 48px;
  max-width: 500px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
}

.contact-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.contact-item:hover .contact-value {
  color: rgba(255, 255, 255, 0.7);
}

.contact-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  min-width: 80px;
}

.contact-value {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.3s ease;
}

/* Contact Form */
.contact-form {
  max-width: 560px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-input {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.form-textarea {
  margin-bottom: 20px;
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 32px;
  cursor: pointer;
  transition: all 0.35s ease;
}

.form-submit:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page.active {
  opacity: 1;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .page {
    padding: 0 24px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-group {
    flex-direction: column;
    gap: 4px;
  }

  .detail-label {
    min-width: unset;
  }

  #main-nav {
    top: 16px;
    padding: 6px 4px;
    gap: 2px;
  }

  .nav-link {
    font-size: 12px;
    padding: 5px 14px;
  }

  .hero-name {
    font-size: clamp(56px, 15vw, 120px);
  }

  .section-title {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* ============================================
   SIMULATION OVERLAY (when active)
   ============================================ */
.sim-overlay-info {
  position: fixed;
  bottom: 40px;
  left: 20px;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 10;
}
