/* ============================
   1. CSS Variables & Reset
   ============================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #021208;
  --color-bg-alt: #0a1f14;
  --color-surface: rgba(13, 59, 30, 0.35);
  --color-cyan: #00ffd5;
  --color-cyan-dim: rgba(0, 255, 213, 0.12);
  --color-cyan-glow: rgba(0, 255, 213, 0.35);
  --color-text: #e8f5ee;
  --color-text-muted: #8dbda6;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-height: 80px;
  --radius: 14px;
  --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* ============================
   2. Base & Typography
   ============================ */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.section-header {
  max-width: 700px;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cyan);
  margin-bottom: 12px;
  border: 1px solid var(--color-cyan-dim);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-cyan-dim);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================
   3. Utilities & Reusable Components
   ============================ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.glass-panel {
  background: var(--color-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-cyan-dim);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), #00c9ff);
  color: var(--color-bg);
  box-shadow: 0 0 20px var(--color-cyan-glow), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--color-cyan-glow), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.link-arrow {
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.link-arrow:hover {
  gap: 10px;
  text-shadow: 0 0 12px var(--color-cyan-glow);
}

/* ============================
   4. Navigation
   ============================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(2, 18, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-icon {
  color: var(--color-cyan);
  font-size: 1.8rem;
  line-height: 1;
  text-shadow: 0 0 15px var(--color-cyan-glow);
}

.logo-main {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.logo-sub {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-cyan);
  transition: var(--transition);
  box-shadow: 0 0 10px var(--color-cyan-glow);
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================
   5. Hero Section
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at bottom, #0a2e1d 0%, #021208 70%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 18, 8, 0.3) 0%, rgba(2, 18, 8, 0) 50%, rgba(2, 18, 8, 0.9) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding-top: var(--nav-height);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan-dim);
  background: var(--color-cyan-dim);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-cyan {
  color: var(--color-cyan);
  text-shadow: 0 0 30px var(--color-cyan-glow);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.mouse {
  width: 22px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 2px;
  height: 6px;
  background: var(--color-cyan);
  border-radius: 1px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

/* ============================
   6. Systems (About) Section
   ============================ */
.systems {
  padding: 120px 0;
  background: linear-gradient(to bottom, #021208, #0a1f14);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.system-card {
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(13, 59, 30, 0.25), rgba(2, 18, 8, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0;
  transition: var(--transition);
}

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

.system-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 213, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-cyan-dim);
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--color-cyan-dim);
  color: var(--color-cyan);
  margin-bottom: 20px;
  border: 1px solid var(--color-cyan-dim);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.system-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.system-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================
   7. Programs Section
   ============================ */
.programs {
  padding: 120px 0;
  background: radial-gradient(circle at top right, rgba(0, 255, 213, 0.03), transparent 60%), #021208;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.program-card {
  background: linear-gradient(145deg, rgba(13, 59, 30, 0.25), rgba(2, 18, 8, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.program-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 213, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.program-card:hover::after {
  opacity: 1;
}

.program-card:hover {
  border-color: rgba(0, 255, 213, 0.2);
  transform: translateY(-4px);
}

.program-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-cyan);
  margin-bottom: 16px;
  opacity: 0.8;
}

.program-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.program-card > p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.program-features {
  list-style: none;
  margin-bottom: 24px;
}

.program-features li {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.program-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-cyan);
  font-family: var(--font-mono);
}

/* ============================
   8. AgTech Lab Section
   ============================ */
.lab {
  padding: 120px 0;
  background: linear-gradient(to bottom, #021208, #0a1f14 50%, #021208);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(2, 18, 8, 0.5);
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--color-cyan-dim);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 30px var(--color-cyan-dim);
}

.project-visual {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #0d3b1e, #021208);
  overflow: hidden;
}

.hologram-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 213, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 213, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: hologramMove 20s linear infinite;
}

.project-status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cyan);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--color-cyan-dim);
  padding: 4px 10px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.project-body {
  padding: 24px;
  background: rgba(2, 18, 8, 0.6);
  backdrop-filter: blur(12px);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.project-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-platform {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-cyan);
  background: var(--color-cyan-dim);
  padding: 3px 10px;
  border-radius: 4px;
}

.project-body h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.project-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================
   9. Contact Section
   ============================ */
.contact {
  padding: 120px 0;
  background: radial-gradient(circle at bottom left, rgba(0, 255, 213, 0.03), transparent 60%), #021208;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-info-block .section-header {
  margin-bottom: 48px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.detail-item a,
.detail-item address {
  color: var(--color-text);
  text-decoration: none;
  font-style: normal;
  font-size: 1.05rem;
  transition: var(--transition);
}

.detail-item a:hover {
  color: var(--color-cyan);
  text-shadow: 0 0 10px var(--color-cyan-glow);
}

.env-monitor {
  padding: 28px;
  animation: float 6s ease-in-out infinite;
}

.env-monitor h4 {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.env-monitor h4::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-cyan-glow);
  animation: pulseDot 2s infinite;
}

.env-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.env-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.env-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--color-cyan);
  text-shadow: 0 0 10px var(--color-cyan-glow);
}

/* Holographic Interface */
.contact-form-container {
  position: relative;
}

.holo-frame {
  position: relative;
  padding: 2px;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--color-cyan);
  border-style: solid;
  opacity: 0.8;
  pointer-events: none;
  z-index: 10;
}

.corner-tl {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.corner-tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.corner-br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.5;
  animation: scanMove 3.5s linear infinite;
  pointer-events: none;
  z-index: 5;
}

.contact-form {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px var(--color-cyan-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2300ffd5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select option {
  background: #0a1f14;
  color: var(--color-text);
}

.btn-full {
  width: 100%;
}

.form-status {
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.6em;
  font-family: var(--font-mono);
}

.form-status.success {
  color: var(--color-cyan);
  text-shadow: 0 0 10px var(--color-cyan-glow);
}

.form-status.error {
  color: #ff6b6b;
}

/* ============================
   10. Footer
   ============================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  background: #021208;
}

/* ============================
   11. Animations & Keyframes
   ============================ */
@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; }
  80% { top: 14px; opacity: 0; }
  100% { top: 6px; opacity: 0; }
}

@keyframes hologramMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(-24px); }
}

@keyframes scanMove {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--color-cyan-glow); }
  50% { opacity: 0.5; box-shadow: 0 0 20px var(--color-cyan-glow); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============================
   12. Responsive Media Queries
   ============================ */
@media (max-width: 1024px) {
  .systems-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - var(--nav-height));
    background: rgba(2, 18, 8, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding-top: 60px;
    gap: 32px;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(0, 255, 213, 0.1);
  }
  .nav-links.active {
    right: 0;
  }
  .hamburger {
    display: flex;
  }
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  body.nav-open {
    overflow: hidden;
  }

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

  .systems-grid,
  .programs-grid,
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .system-card,
  .program-card,
  .project-card {
    padding: 28px 22px;
  }

  .contact-form {
    padding: 28px 22px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 92%;
    padding: 0 14px;
  }
  .section-title {
    font-size: 2rem;
  }
  .lab-grid {
    grid-template-columns: 1fr;
  }
}