/* ============ Base ============ */
:root {
  --bg: #0b1020;
  --bg-alt: #0f1530;
  --card: #151c3a;
  --card-border: rgba(255, 255, 255, 0.07);
  --text: #e8ecf8;
  --muted: #9aa3c0;
  --accent: #6c8cff;
  --accent-2: #a76cff;
  --gradient: linear-gradient(120deg, #6c8cff, #a76cff);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, .logo { font-family: "Sora", sans-serif; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

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

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(108, 140, 255, 0.35); }
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.btn-outline:hover { border-color: var(--accent); box-shadow: none; }
.btn-sm { padding: 9px 20px; font-size: 0.85rem; }

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-size: 1.5rem; font-weight: 800; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108, 140, 255, 0.18), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(167, 108, 255, 0.13), transparent 65%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-kicker { font-size: 1.05rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; }
.hero-role {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  margin: 10px 0 18px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  min-height: 1.6em;
}
.cursor { animation: blink 1s step-end infinite; -webkit-text-fill-color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: var(--muted); max-width: 540px; margin-bottom: 28px; }
.hero-desc strong { color: var(--text); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-meta { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta strong { font-size: 1.5rem; font-family: "Sora", sans-serif; color: var(--accent); }
.hero-meta span { font-size: 0.82rem; color: var(--muted); }

/* Hero photo */
.hero-photo { position: relative; display: flex; justify-content: center; }
.photo-ring {
  width: 320px; height: 320px;
  border-radius: 50%;
  padding: 6px;
  background: var(--gradient);
  position: relative;
  animation: float 6s ease-in-out infinite;
}
.photo-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 6px solid var(--bg);
}
.photo-fallback {
  display: none;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 6px solid var(--bg);
  background: var(--card);
  font-family: "Sora", sans-serif;
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  align-items: center;
  justify-content: center;
}
.photo-ring.no-photo img { display: none; }
.photo-ring.no-photo .photo-fallback { display: flex; }

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

.floating-chip {
  position: absolute;
  background: rgba(21, 28, 58, 0.9);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: float 5s ease-in-out infinite;
}
.chip-1 { top: 8%; left: 0; animation-delay: 0.5s; }
.chip-2 { bottom: 18%; right: 0; animation-delay: 1.2s; }
.chip-3 { bottom: 0; left: 12%; animation-delay: 2s; }

/* ============ Sections ============ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-kicker {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 8px 0 48px;
}

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 18px; }
.about-text strong { color: var(--text); }
.about-cards { display: flex; flex-direction: column; gap: 20px; }
.about-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.about-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.about-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.about-card strong { color: var(--text); }

/* ============ Skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.skill-card:hover { transform: translateY(-6px); border-color: rgba(108, 140, 255, 0.45); }
.skill-icon { font-size: 1.8rem; margin-bottom: 12px; }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.skill-card li {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 4px 0 4px 18px;
  position: relative;
}
.skill-card li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============ Timeline ============ */
.timeline { max-width: 720px; margin: 0 auto; position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -32px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 5px rgba(108, 140, 255, 0.18);
}
.timeline-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(108, 140, 255, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.timeline-card h3 { font-size: 1.15rem; }
.timeline-company { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; margin: 4px 0 10px; }
.timeline-card p:last-child { color: var(--muted); font-size: 0.93rem; }

/* ============ Projects ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 108, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.project-emoji { font-size: 1.9rem; margin-bottom: 14px; }
.project-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.project-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(108, 140, 255, 0.12);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ============ Contact ============ */
.contact-wrap { text-align: center; }
.contact-lead { color: var(--muted); max-width: 520px; margin: -24px auto 40px; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover { transform: translateY(-5px); border-color: rgba(108, 140, 255, 0.45); }
.contact-icon { font-size: 1.7rem; }
.contact-label { font-weight: 700; font-family: "Sora", sans-serif; }
.contact-value { color: var(--muted); font-size: 0.88rem; word-break: break-word; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { order: -1; }
  .photo-ring { width: 240px; height: 240px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid, .projects-grid, .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .nav-cta { display: none; }
}

@media (max-width: 640px) {
  .skills-grid, .projects-grid, .contact-cards { grid-template-columns: 1fr; }
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(11, 16, 32, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 28px 0;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
  .nav-links.open { transform: translateY(0); }
  .floating-chip { display: none; }
}
