/* Celestial Serene Theme — bold animations, improved light/dark */
:root{
  --bg:#08121f; --fg:#eaf4f7; --muted:#a9c6d1;
  --accent:#7bdfff; --accent2:#baffc9; --card:#0e1a2a;
  --glass:rgba(255,255,255,0.06); --shadow:0 24px 60px rgba(0,0,0,0.45);
  --radius:18px; --speed:900ms;
}
.light{
  --bg:#f7fbff; --fg:#0b1a2a; --muted:#466176;
  --accent:#0ea5a8; --accent2:#16e5a1; --card:#ffffff;
  --glass:rgba(0,0,0,0.04); --shadow:0 12px 30px rgba(0,0,0,0.15);
}

*{box-sizing:border-box} html,body{height:100%}
body{
  margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; color:var(--fg);
  background: radial-gradient(1200px 800px at 15% 10%, #0c1a2a 0%, var(--bg) 60%) fixed;
  overflow-x:hidden; accent-color: var(--accent);
  transition: background .6s ease, color .6s ease;
}
h1,h2,h3{font-family:Marcellus,Georgia,serif; letter-spacing:.3px}
a{color:inherit; text-decoration:none}
.lead{ color: var(--muted); }

/* Starfield canvas */
#stars{ position:fixed; inset:0; z-index:-1; pointer-events:none; }

/* Header */
.site-header{ position:fixed; inset:0 0 auto 0; z-index:20; backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent); }
.nav-wrap{ max-width:1200px; margin:auto; display:flex; align-items:center; justify-content:space-between; padding:16px; }
.brand{
  display:inline-grid; place-items:center; width:42px; height:42px; border-radius:999px;
  background: linear-gradient(145deg, var(--accent), #58c9d1);
  color:#001111; font-weight:800; box-shadow: 0 6px 18px rgba(86,220,220,.35);
}
.brand.glow{ animation: glow 4s ease-in-out infinite alternate; }
@keyframes glow{ from{ filter: drop-shadow(0 0 10px rgba(123,223,255,.2)); } to{ filter: drop-shadow(0 0 26px rgba(123,223,255,.6)); } }

.nav a{ margin:0 12px; opacity:.95; position:relative; }
.nav a::after{
  content:""; position:absolute; inset:auto 0 -6px 0; height:2px; transform: scaleX(0);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: transform .4s;
}
.nav a:hover::after{ transform: scaleX(1); }
#themeToggle{
  margin-left:14px; font-size:16px; padding:.35rem .7rem; border-radius:10px; border:1px solid transparent;
  background: var(--glass); color:var(--fg); cursor:pointer; transition: background .3s, transform .2s;
}
#themeToggle:hover{ background: rgba(255,255,255,.12); transform: translateY(-1px); }

/* Aurora hero */
.hero{ position:relative; min-height: 78svh; display:grid; place-items:center; overflow:hidden; }
.aurora{
  position:absolute; inset:-20% -10% -10% -10%; pointer-events:none; z-index:0;
  background:
    radial-gradient(50% 30% at 20% 20%, rgba(123,223,255,.12), transparent 60%),
    radial-gradient(40% 25% at 70% 30%, rgba(186,255,201,.10), transparent 60%),
    radial-gradient(60% 30% at 50% 80%, rgba(123,223,255,.08), transparent 60%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift{ from{ transform: translateY(-12px) } to{ transform: translateY(12px) } }

.hero-inner{ text-align:center; padding:0 16px; max-width:980px; position:relative; z-index:1; }
.title{ font-size: clamp(2.2rem, 1rem + 4.2vw, 4.6rem); display:grid; gap:.4rem; margin: 0; }
.gradient{ background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip:text; color:transparent; }
.subtitle{ margin:.7rem 0 1.2rem; color:var(--muted); }
.cta{
  display:inline-block; padding:.9rem 1.25rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #79d4e4);
  color:#001213; font-weight:800; letter-spacing:.3px; box-shadow: 0 14px 34px rgba(0, 186, 200, .35);
  transform: translateZ(0);
}
.cta.pulse{ animation: pulse 2.9s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ filter:saturate(1); } 50%{ filter:saturate(1.2) brightness(1.08); } }
.scroll-indicator{ position:absolute; bottom:16px; left:50%; transform: translateX(-50%); display:grid; justify-items:center; gap:6px; opacity:.8; }
.scroll-indicator .mouse{ width:20px; height:34px; border:2px solid var(--muted); border-radius:14px; position:relative; }
.scroll-indicator .mouse::after{ content:""; position:absolute; left:50%; top:6px; width:3px; height:7px; transform: translateX(-50%); background: var(--muted);
  border-radius:3px; animation: wheel 1.4s infinite; }
@keyframes wheel{ 0%{opacity:1; transform: translate(-50%, 0);} 100%{opacity:0; transform: translate(-50%, 10px);}}

/* Sections & reveal */
.section{ padding: clamp(68px, 9vh, 128px) 0; position:relative; }
.container{ width:min(1200px, 92%); margin:0 auto; }
.reveal{ opacity:0; transform: translateY(24px) scale(.98); transition: opacity .8s ease, transform .8s ease; }
.reveal.in{ opacity:1; transform: translateY(0) scale(1); }

/* Projects */
.grid{ display:grid; grid-template-columns: repeat( auto-fit, minmax(260px, 1fr) ); gap:18px; }
.r3d{ transform-style: preserve-3d; transition: transform .25s ease, outline .2s; }
.card, .project-card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  outline: 1px solid transparent;
}
.card:hover, .project-card:hover{ outline-color: rgba(123,223,255,.25); }

/* Timeline */
.timeline{ position:relative; }
.timeline .items{ display:flex; gap:22px; overflow-x:auto; padding:16px 2px; scrollbar-width:thin; }
.timeline .item{
  min-width: 320px; background:var(--card); border:1px solid rgba(255,255,255,.08);
  border-radius:14px; padding:16px; position:relative;
}
.timeline .item .dates{ color:var(--muted); font-size:.95rem; margin-bottom:6px; }
.timeline .item .dot{
  position:absolute; width:12px; height:12px; border-radius:999px; background: var(--accent); left: -6px; top: 50%; transform: translateY(-50%);
  box-shadow: 0 0 0 6px rgba(123,223,255,.15);
}
@media (max-width: 820px){
  .timeline .items{ flex-direction:column; }
  .timeline .item{ min-width: auto; }
  .timeline .item .dot{ left: 10px; top: 16px; transform:none; }
}
@media (min-width: 821px){
  .timeline .items{ position:relative; align-items:stretch; }
  .timeline .items::before{
    content:""; position:absolute; left:0; right:0; top:50%; height:2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }
}

/* Achievements with photos */
.achievements .lead{ margin-top:-6px; margin-bottom:14px; }
.ach-grid{ display:grid; grid-template-columns: repeat( auto-fit, minmax(260px, 1fr) ); gap:18px; }
.ach-card{ background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.1);
  border-radius: 16px; overflow:hidden; box-shadow: var(--shadow); }
.ach-card img{ width:100%; height:180px; object-fit:cover; display:block; }
.ach-card .ach-meta{ padding:14px; }
.ach-card h3{ margin:.2rem 0 .15rem; }
.ach-card p{ color: var(--muted); margin:0; }

/* Travel */
.travel-grid{ display:grid; grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) ); gap:12px }
.travel-grid img{ width:100%; height:220px; object-fit:cover; border-radius:14px; box-shadow: var(--shadow); transition: transform .3s; }
.travel-grid img:hover{ transform: translateY(-4px); }

/* Footer */
.site-footer{ text-align:center; padding:28px 0 60px; color: var(--muted); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
