/* Modern Design System for proj0.io */

:root {
  /* Colors - matching proj0 logo */
  --bg-primary: #050508;
  --bg-secondary: #0c0c10;
  --bg-tertiary: #141418;
  --bg-card: rgba(20, 20, 24, 0.8);

  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-glow: rgba(34, 211, 238, 0.12);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --gradient-1: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 50%, #67e8f9 100%);
  --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --container-max: 1200px;

  /* Effects */
  --blur: blur(20px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #4a4a52;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--bg-primary);
    transition: var(--transition);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 .gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: #2a2a30;
  color: #e4e4e7;
  border: 1px solid #3a3a42;
}

.btn-primary:hover {
  background: #3a3a42;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #71717a;
  border: 1px solid #2a2a30;
}

.btn-secondary:hover {
  background: #1a1a1e;
  border-color: #3a3a42;
  color: #a1a1aa;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ===== SERVICES ===== */
#services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.service-icon i {
  font-size: 1.5rem;
  color: var(--accent);
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== PORTFOLIO ===== */
#portfolio {
  background: var(--bg-primary);
  padding: clamp(5rem, 12vw, 10rem) 0;
}

.portfolio-content {
  max-width: 1100px;
  margin: 0 auto;
}

.portfolio-intro {
  text-align: center;
  margin-bottom: 6rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-intro .lead {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.8;
  color: var(--text-secondary);
}

.portfolio-intro strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Stats */
.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 6rem;
}

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

.stat-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: clamp(3.5rem, 6vw, 4.5rem);
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* Sectors */
.portfolio-sectors {
  margin-bottom: 6rem;
}

.portfolio-sectors h3 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  font-size: 1.5rem;
}

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

@media (max-width: 1024px) {
  .sectors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .sectors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: var(--transition);
}

.sector:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: var(--bg-tertiary);
}

.sector i {
  font-size: 2rem;
  color: var(--accent);
}

.sector span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* Capabilities */
.portfolio-capabilities {
  margin-bottom: 6rem;
}

.portfolio-capabilities h3 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
}

.capability {
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: var(--transition);
}

.capability:hover {
  border-color: var(--border-hover);
}

.capability h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.capability p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Trust statement */
.portfolio-trust {
  text-align: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.portfolio-trust p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

/* ===== PROJECT MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  font-size: 1.25rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-body {
  padding: 2rem;
}

.modal-body h2 {
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.modal-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.modal-meta-value {
  font-weight: 500;
  color: var(--text-primary);
}

.modal-meta-value a {
  color: var(--accent);
}

.modal-meta-value a:hover {
  text-decoration: underline;
}

/* ===== CONTACT ===== */
#contact {
  background: var(--bg-secondary);
}

.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  min-height: 150px;
}

.form-submit {
  margin-top: 0.5rem;
}

.form-submit .btn {
  width: 100%;
  justify-content: center;
}

/* Hidden honeypot */
.form-honey {
  display: none !important;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo img {
  height: 28px;
  width: auto;
}

.footer-logo-text {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #4a4a52;
  text-transform: uppercase;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }
}
