:root{
  --bg: #060a12;
  --bg-alt: #0a1120;
  --surface: #0d1526;
  --surface-hover: #131f38;
  --border: #ffffff17;
  --border-soft: #ffffff0c;
  --text: #f2f4f8;
  --text-dim: #9aa4b8;
  --text-faint: #626d82;
  --accent: #4d8fd9;
  --accent-2: #4d8fd9;
  --accent-grad: linear-gradient(135deg, #123a6b 0%, #3f7fce 100%);
  --ink: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 10px 26px -20px rgba(0,0,0,0.8);
  --shadow-md: 0 26px 50px -22px rgba(0,0,0,0.85), 0 0 0 1px rgba(77,143,217,0.14);
  --max-width: 1160px;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .logo{
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
}

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }

.bg-glow{
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(800px circle at 12% 0%, rgba(77,143,217,0.13), transparent 55%),
    radial-gradient(650px circle at 92% 25%, rgba(63,127,206,0.09), transparent 55%);
  pointer-events: none;
}

/* ---------- Scroll reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navbar ---------- */
.navbar{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(6,10,18,0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo{
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.logo span{ color: var(--accent-2); }

.nav-links{
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a{
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.nav-links a:hover{ color: var(--text); }

.nav-cta{
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: var(--ink) !important;
  font-weight: 600 !important;
}

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--accent-grad);
  color: var(--ink);
  box-shadow: 0 10px 28px -8px rgba(63,127,206,0.45);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before{
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::before{ left: 130%; }

.btn-ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ background: var(--surface-hover); }

.btn-text{
  background: none;
  border: none;
  color: var(--accent-2);
  padding: 8px 0;
  font-weight: 600;
}
.btn-text:hover{ transform: none; text-decoration: underline; }

/* ---------- Hero ---------- */
.hero{
  padding: 120px 0 90px;
  text-align: center;
}

@keyframes heroIn{
  from{ opacity: 0; transform: translateY(24px); }
  to{ opacity: 1; transform: translateY(0); }
}

.eyebrow{
  color: var(--accent-2);
  font-family: 'Geist Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 18px;
  animation: heroIn 0.7s cubic-bezier(.2,.7,.2,1) both;
}

.hero h1{
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 20px;
  animation: heroIn 0.7s cubic-bezier(.2,.7,.2,1) 0.1s both;
}

.gradient-text{
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub{
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.08rem;
  animation: heroIn 0.7s cubic-bezier(.2,.7,.2,1) 0.2s both;
}

.hero-actions{
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  animation: heroIn 0.7s cubic-bezier(.2,.7,.2,1) 0.3s both;
}

.hero-stats{
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  animation: heroIn 0.7s cubic-bezier(.2,.7,.2,1) 0.4s both;
}

.stat{
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-num{
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label{
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Marquee ---------- */
.marquee{
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 18px 0;
}

.marquee-track{
  display: flex;
  width: max-content;
  gap: 28px;
  animation: marqueeScroll 26s linear infinite;
}

.marquee-track span{
  font-family: 'Geist Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  white-space: nowrap;
}

@keyframes marqueeScroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .marquee-track{ animation: none; }
  .reveal{ transition: none; }
}

/* ---------- Section shared ---------- */
section{ padding: 90px 0; }

.section-tag{
  color: var(--accent-2);
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.section-title{
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 18px;
}
.section-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: var(--accent-grad);
}
.contact-inner .section-title::after,
.join-inner .section-title::after{
  left: 50%;
  transform: translateX(-50%);
}

.section-desc{
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 48px;
}

/* ---------- Skills ---------- */
.skills-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.skill-card:hover{
  transform: translateY(-4px);
  border-color: rgba(77,143,217,0.4);
  box-shadow: var(--shadow-md);
}

.skill-icon{
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--text);
}
.skill-icon svg{
  width: 100%;
  height: 100%;
}

.skill-card h3{
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.skill-card p{
  color: var(--text-dim);
  font-size: 0.92rem;
}

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

.team-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover{
  transform: translateY(-4px);
  border-color: rgba(77,143,217,0.35);
  box-shadow: var(--shadow-md);
}
.team-card:hover .avatar{
  box-shadow: 0 0 0 5px rgba(77,143,217,0.18);
}

.avatar{
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  transition: box-shadow 0.3s ease;
}
.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3{ font-size: 1.15rem; margin-bottom: 4px; }

.role{
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.bio{
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.edu{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-bottom: 18px;
}
.edu svg{
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.socials{
  display: flex;
  justify-content: center;
  gap: 18px;
}
.socials a{
  font-size: 0.85rem;
  color: var(--text-faint);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover{
  color: var(--text);
  border-color: var(--text);
}

/* ---------- Projects ---------- */
.projects-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.project-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.project-card.featured{
  border-color: rgba(77,143,217,0.4);
  background: linear-gradient(180deg, rgba(77,143,217,0.09), var(--surface) 40%);
}

.project-badge{
  display: inline-block;
  align-self: flex-start;
  background: var(--accent-grad);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.project-badge.muted{
  background: var(--surface-hover);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.project-card h3{
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.project-desc{
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.feature-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.feature-list li{
  position: relative;
  padding-left: 24px;
  font-size: 0.93rem;
  color: var(--text);
}
.feature-list li::before{
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}

.feature-list .extra-feature{
  display: none;
}
.feature-list.expanded .extra-feature{
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: translateY(0); }
}

.project-actions{
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.coming-soon{
  align-items: center;
  text-align: center;
  justify-content: center;
}
.coming-soon .project-desc{ margin-bottom: 20px; }

.soon-visual{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-faint);
  margin: 0 auto;
}

/* ---------- Join ---------- */
.join{
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.join-inner{ text-align: center; }
.join-text{
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.join-text strong{ color: var(--text); }

/* ---------- Contact ---------- */
.contact-inner{ text-align: center; }
.contact .section-desc{ margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.footer{
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .team-grid{ grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .nav-links{
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{ display: flex; }
  .skills-grid{ grid-template-columns: 1fr; }
  .hero-stats{ gap: 32px; }
}
