@import "variables.css";

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(238, 162, 31, 0.15) 0%, transparent 50%), #050505;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}

/* --- NAVIGATION --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 1px;
}
.nav-logo img {
  height: 32px;
}
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-link:hover,
.nav-link.active {
  color: var(--brand-gold);
}
.nav-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.lang-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* --- LAYOUT UTILITIES --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
}

/* This is the class that fixes your layout issue */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* Text Left (larger), Logo Right */
  align-items: center;
  gap: 50px;
}

.hero-text h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 24px;
}
.gold-text {
  color: var(--brand-gold);
}
.hero-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.cta-group {
  display: flex;
  gap: 20px;
}
.btn-primary {
  padding: 14px 32px;
  background: var(--brand-gold);
  color: #000;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-secondary {
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  border-radius: 8px;
}
.btn-secondary:hover {
  border-color: var(--brand-gold);
}

/* --- HERO VISUAL --- */
.hero-visual {
  position: relative;
  height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}
.nano-container {
  width: 650px;
  height: auto;
  animation: float-hero 8s ease-in-out infinite;
  transform-style: preserve-3d;
}
#nano-logo {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.nano-tile {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: crosshair;
  transform-origin: center;
}
.nano-tile.gold {
  fill: #eea21f;
  animation: tile-breathe 4s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(238, 162, 31, 0.2));
}
.nano-tile.dark-gold {
  fill: #c07a00;
  animation: tile-breathe 4s ease-in-out infinite;
  animation-delay: 1s;
}
.nano-tile.dark-brown {
  fill: #592c2c;
  animation: tile-breathe 4s ease-in-out infinite;
  animation-delay: 2s;
}
.nano-tile.deep-brown {
  fill: #3a1a1a;
  animation: void-breathe 6s ease-in-out infinite;
}
#logo-part-gold path:nth-child(1) {
  animation-delay: 0s;
}
#logo-part-gold path:nth-child(2) {
  animation-delay: 0.5s;
}
#logo-part-gold path:nth-child(3) {
  animation-delay: 1s;
}
#logo-part-gold path:nth-child(4) {
  animation-delay: 1.5s;
}
#logo-part-dark-gold path:nth-child(1) {
  animation-delay: 2s;
}
#logo-part-dark-gold path:nth-child(2) {
  animation-delay: 2.5s;
}
#logo-part-dark-gold path:nth-child(3) {
  animation-delay: 3s;
}
.nano-tile:hover {
  fill: #ffd700 !important;
  filter: drop-shadow(0 0 20px rgba(238, 162, 31, 1)) drop-shadow(0 0 40px rgba(238, 162, 31, 0.6));
  transform: scale(1.02) translateZ(10px);
  z-index: 10;
  animation: none;
}
.nano-tile.dark-brown:hover,
.nano-tile.deep-brown:hover {
  fill: #8b4513 !important;
  filter: drop-shadow(0 0 15px rgba(139, 69, 19, 0.8));
}
@keyframes tile-breathe {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(238, 162, 31, 0.1)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(238, 162, 31, 0.5)) brightness(1.2);
  }
}
@keyframes void-breathe {
  0%,
  100% {
    fill: #3a1a1a;
  }
  50% {
    fill: #4a2a2a;
  }
}
@keyframes float-hero {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* --- COMMON SECTIONS --- */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}
.section-title {
  font-size: 2rem;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 30px;
  background: var(--brand-gold);
  display: block;
}

/* --- STATS GRID --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 100px;
}
.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s;
}
.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand-gold);
  display: block;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- PROJECT CARDS --- */
.grid {
  display: grid;
  gap: 30px;
}
.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.card {
  background-color: rgba(10, 10, 10, 0.6);
  border-radius: 16px;
  position: relative;
  padding: 1px;
  overflow: hidden;
  transition: transform 0.4s;
  z-index: 1;
}
.card-content-inner {
  background: #050505;
  border-radius: 15px;
  padding: 40px;
  height: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(238, 162, 31, 1), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}
.card:hover::before {
  opacity: 1;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

/* Wide Card for Home Page */
.card-wide .card-content-inner {
  padding: 50px;
  align-items: flex-start;
}
.card-wide h3 {
  font-size: 2rem;
  margin-bottom: 15px;
}
.card-wide p {
  max-width: 600px;
  font-size: 1.1rem;
}
.card h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.5rem;
}
.card p {
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.6;
}
.card-icon {
  font-size: 2.5rem;
  color: var(--brand-gold);
  margin-bottom: 20px;
  display: inline-block;
  filter: drop-shadow(0 0 10px rgba(238, 162, 31, 0.3));
}
.card-link {
  color: var(--brand-gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* --- BLOG GRID --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.article-card {
  background: transparent;
  border-left: 1px solid var(--border-subtle);
  padding-left: 30px;
  transition: 0.3s;
  cursor: pointer;
  display: block;
}
.article-card:hover {
  border-left-color: var(--brand-gold);
  transform: translateX(10px);
}
.article-date {
  font-family: var(--font-display);
  color: var(--brand-gold);
  font-size: 0.8rem;
  margin-bottom: 10px;
  display: block;
}
.article-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.4;
}
.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 15px;
}

/* --- FILTER BUTTONS --- */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.3s ease;
}
.filter-btn:hover {
  border-color: var(--brand-gold);
  color: var(--text-main);
}
.filter-btn.active {
  background: var(--brand-gold);
  color: #000;
  border-color: var(--brand-gold);
  font-weight: 600;
}

/* --- FOOTER --- */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- MOBILE MENU & RESPONSIVE --- */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001; /* Above overlay */
}

@media (max-width: 900px) {
  /* 1. HERO adjustments */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 20px;
  }
  .hero-visual {
    display: none; /* Hide heavy animation on mobile */
  }
  .hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Smaller fonts */
  }
  .cta-group {
    justify-content: center;
  }
  
  /* 2. NAVIGATION */
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.5rem; /* Larger touch targets */
    margin: 15px 0;
  }
}


/* --- CONTACT PAGE: BENTO GRID --- */
.bento-section {
  padding-top: 150px; /* Clear fixed nav */
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* Left side wider */
  grid-template-rows: auto auto;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

/* 1. HERO BOX (Left, Tall) */
.bento-hero {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
}

.bento-hero h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 2. INFO BOXES (Right) */
.bento-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.info-row i {
  color: var(--brand-gold);
  font-size: 1.2rem;
}

/* 3. STATUS DOT */
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Success Green */
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* 4. SOCIAL LINKS */
.social-list {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-main);
  transition: 0.3s;
}

.social-btn:hover {
  background: var(--brand-gold);
  color: #000;
  border-color: var(--brand-gold);
  transform: translateY(-3px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr; /* Stack vertically on mobile */
  }
  .bento-hero {
    min-height: auto;
    padding: 60px 40px;
    text-align: center;
    align-items: center;
  }
}

/* --- PHILOSOPHY PAGE STYLES --- */

/* 1. THE ARSENAL (Tech Stack Marquee) */
.marquee-section {
  padding: 60px 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden; /* Hide scrollbars */
  position: relative;
}

/* Fades on the edges */
.marquee-section::before,
.marquee-section::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.marquee-section::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-body), transparent);
}
.marquee-section::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-body), transparent);
}

.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: scroll 30s linear infinite; /* Infinite Loop */
}

.tech-item {
  font-size: 2.5rem;
  color: #444; /* Dark Grey by default */
  transition: 0.3s;
  cursor: help;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-item span {
  font-size: 1rem;
  font-family: var(--font-display);
  opacity: 0;
  transition: 0.3s;
}

/* Interaction */
.tech-item:hover {
  color: var(--brand-gold);
  transform: scale(1.1);
}
.tech-item:hover span {
  opacity: 1;
  color: #fff;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* Move half way (since we duplicate content) */
}
@-webkit-keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 2. THE PROTOCOL (Process Grid) */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.protocol-card {
  background: transparent;
  border-left: 2px solid var(--border-subtle);
  padding-left: 30px;
  position: relative;
  transition: 0.3s;
}

.protocol-card:hover {
  border-left-color: var(--brand-gold);
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: -20px;
  left: 20px;
  z-index: 0;
  transition: 0.3s;
}

.protocol-card:hover .step-number {
  color: rgba(238, 162, 31, 0.2);
  transform: translateX(10px);
}

.protocol-content {
  position: relative;
  z-index: 1;
}
.protocol-content h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.protocol-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
