/* ---------- Base ---------- */
:root {
  --bg: #0f172a;
  --bg-alt: #111c33;
  --card: #1a2540;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --nav-h: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(148, 163, 184, .15);
  z-index: 100;
  animation: slideDown .7s ease both;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; position: relative; transition: color .3s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--accent); transition: width .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle, .nav-icon { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; gap: 60px;
  padding: calc(var(--nav-h) + 40px) 5% 40px;
  background: radial-gradient(circle at 80% 20%, rgba(129, 140, 248, .18), transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(56, 189, 248, .12), transparent 50%);
}
.hero-text { max-width: 560px; animation: fadeUp 1s ease both; }
.hello { color: var(--accent); font-weight: 600; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin: 6px 0; }
.role {
  font-size: 1.3rem; font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { color: var(--muted); margin: 16px 0 28px; }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 600;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #0b1020; }
.btn.primary:hover { box-shadow: 0 8px 24px rgba(56, 189, 248, .35); }
.btn.outline { border: 2px solid var(--accent); color: var(--accent); }
.btn.outline:hover { background: rgba(56, 189, 248, .1); }

/* Photo: put photo.jpg beside index.html. Gradient + initials show if missing. */
.avatar {
  width: clamp(200px, 30vw, 320px); aspect-ratio: 1; border-radius: 50%;
  background: url("photo.jpg") center/cover no-repeat,
              linear-gradient(135deg, var(--accent), var(--accent2));
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 10px rgba(56, 189, 248, .12), 0 20px 50px rgba(0, 0, 0, .4);
  animation: float 5s ease-in-out infinite, fadeUp 1s .2s ease both;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section { padding: 90px 5%; max-width: 1100px; margin: 0 auto; }
.alt { max-width: none; background: var(--bg-alt); }
.alt > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: 2rem; margin-bottom: 36px; position: relative; display: inline-block; }
.section h2::after {
  content: ""; display: block; width: 60%; height: 4px; margin-top: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.center { text-align: center; }
.center p { color: var(--muted); margin-bottom: 24px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; color: var(--muted); }
.facts { list-style: none; display: grid; gap: 10px; }
.facts strong { color: var(--text); }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.skills span, .tags span {
  padding: 6px 16px; border-radius: 999px; font-size: .9rem;
  background: rgba(56, 189, 248, .1); border: 1px solid rgba(56, 189, 248, .3);
  transition: transform .25s, background .25s;
}
.skills span:hover { transform: translateY(-3px) scale(1.05); background: rgba(56, 189, 248, .25); }

/* Timeline */
.timeline { border-left: 3px solid var(--accent); padding-left: 28px; display: grid; gap: 32px; }
.item { position: relative; }
.item::before {
  content: ""; position: absolute; left: -38px; top: 6px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(56, 189, 248, .2);
}
.date { color: var(--accent); font-size: .85rem; font-weight: 600; }
.item h3 small { display: block; color: var(--muted); font-weight: 400; font-size: .95rem; }
.item p { color: var(--muted); margin-top: 6px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--card); padding: 26px; border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .12);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.card p { color: var(--muted); margin: 10px 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tags span { font-size: .78rem; padding: 3px 12px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 32px 5%; color: var(--muted); font-size: .9rem;
  border-top: 1px solid rgba(148, 163, 184, .15);
}
.social { margin-top: 10px; display: flex; justify-content: center; gap: 20px; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Scroll reveal, pure CSS (modern browsers; others simply show content) */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  .nav-icon { display: block; cursor: pointer; width: 28px; padding: 10px 0; }
  .nav-icon span, .nav-icon span::before, .nav-icon span::after {
    display: block; height: 3px; width: 28px; background: var(--text); border-radius: 3px;
    transition: transform .3s, background .3s;
  }
  .nav-icon span { position: relative; }
  .nav-icon span::before, .nav-icon span::after { content: ""; position: absolute; left: 0; }
  .nav-icon span::before { top: -8px; }
  .nav-icon span::after { top: 8px; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    max-height: 0; overflow: hidden; transition: max-height .4s ease;
  }
  .nav-links a { padding: 16px 5%; border-bottom: 1px solid rgba(148, 163, 184, .1); }
  .nav-toggle:checked ~ .nav-links { max-height: 400px; }
  .nav-toggle:checked ~ .nav-icon span { background: transparent; }
  .nav-toggle:checked ~ .nav-icon span::before { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-icon span::after { transform: translateY(-8px) rotate(-45deg); }

  .hero { flex-direction: column-reverse; text-align: center; gap: 30px; }
  .buttons { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 70px 5%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
