/* ============================================================
   AgroLens AI — Portfolio | Tim Sonic
   ============================================================ */

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

:root {
  --dark:    #0d1b2a;
  --dark2:   #112240;
  --dark3:   #1B2A6B;
  --green:   #1D9E75;
  --green2:  #0F6E56;
  --blue:    #378ADD;
  --blue2:   #185FA5;
  --purple:  #534AB7;
  --amber:   #f59e0b;
  --text:    #e2e8f0;
  --muted:   #94a3b8;
  --border:  rgba(255,255,255,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 10px; }

/* ── SELECTION ── */
::selection { background: var(--green); color: #fff; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,27,42,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-leaf { font-size: 1.5rem; }
.logo-name {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1;
}
.logo-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--green2) !important; }
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  gap: 1rem;
  border-top: 1px solid var(--border);
}
.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.mobile-menu.open { display: flex; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 8rem 4rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.hero-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: var(--green); top: -100px; right: -100px; animation-delay: 0s; }
.orb2 { width: 400px; height: 400px; background: var(--blue); bottom: -100px; left: -100px; animation-delay: 3s; }
.orb3 { width: 300px; height: 300px; background: var(--purple); top: 50%; left: 30%; animation-delay: 6s; }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease both;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(29,158,117,0.1);
  border: 1px solid rgba(29,158,117,0.3);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}
.hero-title .line1 {
  display: block;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title .line2 {
  display: block;
  font-size: clamp(4rem, 9vw, 7rem);
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 1.5rem;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  transition: all 0.2s;
}
.btn-primary:hover { background: var(--green2); transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.stat-item { text-align: center; }
.stat-val {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--green);
}
.stat-lbl { font-size: 0.7rem; color: var(--muted); }
.stat-div { width: 1px; height: 40px; background: var(--border); }

/* Hero visual */
.hero-visual {
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease 0.2s both;
}
.mockup-frame {
  width: 100%;
  aspect-ratio: 16/10;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.mockup-frame img { width: 100%; height: 100%; object-fit: cover; }
.mockup-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(29,158,117,0.1), rgba(55,138,221,0.1));
}
.mf-inner { text-align: center; }
.mf-inner p { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800; margin: 0.5rem 0 0.25rem; }
.mf-inner span { font-size: 0.8rem; color: var(--muted); }

/* Floating cards */
.float-card {
  position: absolute;
  background: rgba(13,27,42,0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: floatCard 4s ease-in-out infinite;
}
.fc1 { bottom: -20px; left: -20px; animation-delay: 0s; }
.fc2 { top: 20px; right: -20px; animation-delay: 1.5s; }
.fc3 { bottom: 60px; right: -30px; animation-delay: 3s; }
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.fc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.fc-title { font-size: 0.7rem; color: var(--muted); margin-bottom: 2px; }
.fc-val { font-size: 0.85rem; font-weight: 700; }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 6rem 2rem 3rem; gap: 3rem; }
  .hero-visual { display: none; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 6rem 2rem; }
.dark-section { background: var(--dark2); }
.container { max-width: 1200px; margin: 0 auto; }
.section-badge {
  display: inline-block;
  background: rgba(55,138,221,0.1);
  border: 1px solid rgba(55,138,221,0.2);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-badge.green {
  background: rgba(29,158,117,0.1);
  border-color: rgba(29,158,117,0.2);
  color: var(--green);
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--dark3);
  margin-bottom: 0.75rem;
}
.section-title.light { color: #fff; }
.section-sub {
  color: #64748b;
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 3rem;
  line-height: 1.7;
}
.section-sub.light { color: var(--muted); }

/* ── PROBLEM ── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.problem-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}
.problem-card.visible { opacity: 1; transform: translateY(0); }
.problem-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.prob-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.problem-card h3 { font-weight: 700; color: var(--dark3); margin-bottom: 0.75rem; font-size: 1.05rem; }
.problem-card p { color: #64748b; font-size: 0.9rem; line-height: 1.7; margin-bottom: 1rem; }
.prob-stat {
  display: inline-block;
  background: rgba(29,158,117,0.08);
  border: 1px solid rgba(29,158,117,0.2);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
}

/* ── FEATURES ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.feat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  position: relative;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}
.feat-card.visible { opacity: 1; transform: translateY(0); }
.feat-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-4px); }
.feat-num {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
}
.feat-icon { font-size: 2rem; margin-bottom: 1rem; }
.feat-card h3 { color: #fff; font-weight: 700; margin-bottom: 0.6rem; }
.feat-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.7; margin-bottom: 1rem; }
.feat-tag {
  display: inline-block;
  background: rgba(29,158,117,0.1);
  border: 1px solid rgba(29,158,117,0.2);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

/* ── STACK ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.stack-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
}
.stack-group.visible { opacity: 1; transform: translateY(0); }
.stack-group h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 1rem;
}
.stack-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  background: rgba(55,138,221,0.08);
  border: 1px solid rgba(55,138,221,0.15);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

/* ── TEAM ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s;
  opacity: 0;
  transform: translateY(20px);
}
.team-card.visible { opacity: 1; transform: translateY(0); }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.team-photo-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.team-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s;
}
.team-card:hover .team-photo-wrap img { transform: scale(1.08); }
.team-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
}
.team-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,42,0.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.team-card:hover .team-overlay { opacity: 1; }
.team-overlay-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.team-overlay-role span { font-size: 1.2rem; }
.team-overlay-role p { font-size: 0.8rem; font-weight: 600; }
.team-info { padding: 1.25rem; }
.team-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}
.team-info h3 { font-weight: 700; color: #fff; font-size: 1.05rem; }
.team-prodi { font-size: 0.72rem; color: var(--muted); }
.team-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.team-badge.ketua { background: rgba(29,158,117,0.15); color: var(--green); border: 1px solid rgba(29,158,117,0.3); }
.team-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.6; margin-bottom: 0.75rem; }
.team-skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.team-skills span {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* ── SPONSORS ── */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
}
.sponsor-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(10px);
}
.sponsor-card.visible { opacity: 1; transform: translateY(0); }
.sponsor-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.sponsor-card img { max-height: 45px; max-width: 120px; object-fit: contain; }
.sponsor-fallback {
  display: none;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark3);
}

/* ── LINKS ── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(10px);
}
.link-card.visible { opacity: 1; transform: translateY(0); }
.link-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); border-color: rgba(29,158,117,0.3); }
.lc-icon {
  width: 52px; height: 52px;
  background: rgba(29,158,117,0.1);
  color: var(--green);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-info { flex: 1; min-width: 0; }
.lc-info h4 { font-weight: 700; color: #fff; font-size: 0.95rem; margin-bottom: 0.2rem; }
.lc-info p { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.2rem; }
.lc-url { font-size: 0.7rem; color: var(--green); font-weight: 600; }
.lc-arrow { color: var(--muted); font-size: 1.2rem; transition: transform 0.2s; }
.link-card:hover .lc-arrow { transform: translateX(4px); color: var(--green); }

/* ── FOOTER ── */
.footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
  padding: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-name { font-family: 'Syne', sans-serif; font-weight: 800; color: #fff; }
.footer-sub { font-size: 0.72rem; color: var(--green); }
.footer-copy { font-size: 0.78rem; color: var(--muted); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .section { padding: 4rem 1.25rem; }
  .hero { padding: 5rem 1.25rem 3rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-div { display: none; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-secondary { justify-content: center; }
  .float-card { display: none; }
}