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

:root {
  --navy:   #0D1B2A;
  --navy2:  #16293D;
  --blue:   #1565C0;
  --blue2:  #1976D2;
  --sky:    #42A5F5;
  --teal:   #00897B;
  --coral:  #E53935;
  --amber:  #F57C00;
  --white:  #FFFFFF;
  --offwhite: #F8FAFC;
  --light:  #EEF2F7;
  --muted:  #64748B;
  --text:   #1E293B;
  --border: #E2E8F0;
  --card-shadow: 0 4px 24px rgba(13,27,42,0.10);
  --card-shadow-hover: 0 12px 40px rgba(21,101,192,0.20);
  --radius: 14px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { font-size: 1.05rem; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
section    { padding: 96px 0; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(21,101,192,0.08);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--sky); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.10);
}

.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--blue2) !important; }

.nav-hamburger { display: none; }

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(66,165,245,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66,165,245,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21,101,192,0.25) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.hero-glow2 {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,137,123,0.15) 0%, transparent 70%);
  bottom: 0; left: 20%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(66,165,245,0.12);
  border: 1px solid rgba(66,165,245,0.25);
  color: var(--sky);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sky);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  color: var(--white);
  margin-bottom: 10px;
}
.hero-title .accent { color: var(--sky); }

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin-bottom: 44px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.hero-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-stat-num span { color: var(--sky); }
.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(21,101,192,0.35); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.22);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); transform: translateY(-2px); }

/* ── About ──────────────────────────────────────────────── */
#about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.about-text h2 { margin-bottom: 20px; color: var(--navy); }
.about-text p  { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; line-height: 1.8; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-card {
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: all var(--transition);
}
.about-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(21,101,192,0.10);
  transform: translateX(4px);
}
.about-card-icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.about-card-title { font-weight: 700; font-size: 0.95rem; color: var(--navy); margin-bottom: 4px; }
.about-card-sub   { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* ── Projects ───────────────────────────────────────────── */
#projects { background: var(--offwhite); }

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 20px;
}
.projects-header h2 { color: var(--navy); }
.projects-count {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
}

.project-image-wrap {
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--navy);
}
.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-image-wrap img { transform: scale(1.04); }

.project-category {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(13,27,42,0.72);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-finding {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(21,101,192,0.07);
  border-left: 3px solid var(--blue);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--light);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-links {
  display: flex;
  gap: 10px;
}
.project-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}
.project-link-github {
  background: var(--navy);
  color: var(--white);
}
.project-link-github:hover { background: var(--navy2); }

.project-link-colab {
  background: var(--offwhite);
  color: var(--text);
  border: 1px solid var(--border);
}
.project-link-colab:hover { background: var(--light); }

/* ── Skills ─────────────────────────────────────────────── */
#skills { background: var(--white); }

.skills-header { margin-bottom: 56px; }
.skills-header h2 { color: var(--navy); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}
.skill-card:hover {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 4px 20px rgba(21,101,192,0.10);
  transform: translateY(-3px);
}
.skill-icon { font-size: 2.2rem; margin-bottom: 12px; }
.skill-name { font-weight: 700; font-size: 0.95rem; color: var(--navy); margin-bottom: 4px; }
.skill-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* ── Guide CTA ──────────────────────────────────────────── */
#guide {
  background: linear-gradient(135deg, var(--navy) 0%, #0a2540 100%);
  padding: 80px 24px;
}
.guide-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.guide-inner h2 { color: var(--white); margin-bottom: 16px; }
.guide-inner p  { color: rgba(255,255,255,0.62); font-size: 1.05rem; margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Contact ─────────────────────────────────────────────── */
#contact { background: var(--offwhite); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-left h2  { color: var(--navy); margin-bottom: 16px; }
.contact-left p   { color: var(--muted); line-height: 1.75; margin-bottom: 32px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.contact-link-item:hover {
  border-color: var(--blue);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(21,101,192,0.10);
}
.contact-link-icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-link-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-link-value { font-size: 0.95rem; font-weight: 600; color: var(--navy); }

.contact-right {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-right h3 { color: var(--navy); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-input, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,192,0.10); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  padding: 13px;
  border: none;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.form-submit:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(21,101,192,0.30); }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--navy);
  padding: 40px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { font-size: 1rem; font-weight: 800; color: var(--white); }
.footer-logo span { color: var(--sky); }
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.38); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.45); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 680px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--navy);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 4px;
  }
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
  }
  .nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
  }
  .hero-stats { gap: 24px; }
  .projects-header { flex-direction: column; align-items: flex-start; }
}

/* ── API Demo Section ─────────────────────────────────────────── */
#api-demo { background: var(--navy); padding: 96px 0; }

.api-demo-header { text-align: center; margin-bottom: 48px; }
.api-demo-header p {
  color: var(--muted);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.7;
}

.api-demo-card {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}

.api-search-row {
  display: flex;
  gap: 12px;
}

.api-search-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.api-search-input::placeholder { color: var(--muted); }
.api-search-input:focus { border-color: var(--sky); }

.api-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.api-search-btn:hover { background: #1976D2; }
.api-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.api-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.api-chip {
  background: rgba(66,165,245,0.10);
  color: var(--sky);
  border: 1px solid rgba(66,165,245,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.api-chip:hover { background: rgba(66,165,245,0.22); border-color: var(--sky); }

.api-result {
  margin-top: 24px;
  min-height: 40px;
}

.api-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.api-metric {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.api-metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sky);
  line-height: 1;
}
.api-metric-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.api-equity-bar-wrap {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.api-equity-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.api-equity-name { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.api-equity-grade {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 6px;
  background: rgba(66,165,245,0.12);
  color: var(--sky);
}
.api-equity-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.api-equity-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.api-equity-score-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.api-city-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.api-error {
  color: var(--red);
  font-size: 0.9rem;
  padding: 14px;
  background: rgba(229,57,53,0.08);
  border: 1px solid rgba(229,57,53,0.2);
  border-radius: 10px;
}

.api-loading {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.api-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(66,165,245,0.2);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.api-endpoint-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  gap: 8px;
}
.api-endpoint-label code {
  font-size: 0.78rem;
  color: var(--sky);
  background: rgba(66,165,245,0.08);
  padding: 4px 10px;
  border-radius: 6px;
}
.api-powered {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 680px) {
  .api-search-row { flex-direction: column; }
  .api-demo-card { padding: 24px 18px; }
}
