/* ============================================================
   GLOBAL RESET & TOKENS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #050810;
  --surface:   #0d1220;
  --surface2:  #121929;
  --border:    rgba(100,200,255,0.15);
  --glow-c:    #6ec6ff;
  --glow-m:    #a96dff;
  --glow-g:    #3dffa8;
  --text:      #dce8ff;
  --text-muted:#6b84a8;
  --accent:    #6ec6ff;
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --tile-size: 130px;
  --tile-gap:  12px;
  --modal-bg:  rgba(5, 8, 16, 0.97);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

/* ============================================================
   STARFIELD
   ============================================================ */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--glow-c); border-radius: 3px; }

/* ============================================================
   NAV
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}
.nav-logo span { color: var(--glow-c); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--glow-c);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--glow-c); }
.nav-links a:hover::after { width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110,198,255,0.18) 0%, rgba(169,109,255,0.10) 45%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes pulseGlow {
  from { transform: scale(1); opacity: 0.7; }
  to   { transform: scale(1.15); opacity: 1; }
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 6px;
  color: var(--glow-c);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff 30%, var(--glow-c) 70%, var(--glow-m) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-muted);
  letter-spacing: 2px;
  max-width: 600px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  border: 1px solid var(--glow-c);
  border-radius: 40px;
  color: var(--glow-c);
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-decoration: none;
  background: rgba(110,198,255,0.06);
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}
.hero-cta:hover {
  background: rgba(110,198,255,0.15);
  box-shadow: 0 0 24px rgba(110,198,255,0.3);
  transform: translateY(-2px);
}
.hero-cta span { font-size: 1.1rem; animation: bounce 1.5s infinite; }

@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  font-size: 0.65rem;
  letter-spacing: 5px;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0.5;
}

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

/* ============================================================
   SECTION COMMON
   ============================================================ */
section {
  position: relative;
  z-index: 1;
  padding: 100px 5vw;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 6px;
  color: #fff;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  margin: 10px auto 0;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--glow-c), var(--glow-m));
}
.section-sub {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

/* ============================================================
   SKILLS GRID
   ============================================================ */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tile-gap);
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-tile {
  width: var(--tile-size);
  height: var(--tile-size);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: tileIn 0.5s both;
  user-select: none;
}

.skill-tile:nth-child(1)  { animation-delay: 0.05s; }
.skill-tile:nth-child(2)  { animation-delay: 0.10s; }
.skill-tile:nth-child(3)  { animation-delay: 0.15s; }
.skill-tile:nth-child(4)  { animation-delay: 0.20s; }
.skill-tile:nth-child(5)  { animation-delay: 0.25s; }
.skill-tile:nth-child(6)  { animation-delay: 0.30s; }
.skill-tile:nth-child(7)  { animation-delay: 0.35s; }
.skill-tile:nth-child(8)  { animation-delay: 0.40s; }
.skill-tile:nth-child(9)  { animation-delay: 0.45s; }
.skill-tile:nth-child(10) { animation-delay: 0.50s; }
.skill-tile:nth-child(11) { animation-delay: 0.55s; }
.skill-tile:nth-child(12) { animation-delay: 0.60s; }
.skill-tile:nth-child(13) { animation-delay: 0.65s; }
.skill-tile:nth-child(14) { animation-delay: 0.70s; }
.skill-tile:nth-child(15) { animation-delay: 0.75s; }
.skill-tile:nth-child(16) { animation-delay: 0.80s; }
.skill-tile:nth-child(17) { animation-delay: 0.85s; }
.skill-tile:nth-child(18) { animation-delay: 0.90s; }
.skill-tile:nth-child(19) { animation-delay: 0.95s; }
.skill-tile:nth-child(20) { animation-delay: 1.00s; }
.skill-tile:nth-child(21) { animation-delay: 1.05s; }
.skill-tile:nth-child(22) { animation-delay: 1.10s; }
.skill-tile:nth-child(23) { animation-delay: 1.15s; }
.skill-tile:nth-child(24) { animation-delay: 1.20s; }
.skill-tile:nth-child(25) { animation-delay: 1.25s; }
.skill-tile:nth-child(26) { animation-delay: 1.30s; }
.skill-tile:nth-child(27) { animation-delay: 1.35s; }
.skill-tile:nth-child(28) { animation-delay: 1.40s; }

@keyframes tileIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.skill-tile:hover {
  transform: translateY(-5px) scale(1.04);
  border-color: var(--glow-c);
  box-shadow: 0 0 20px rgba(110,198,255,0.25), 0 8px 28px rgba(0,0,0,0.5);
  z-index: 2;
}

.tile-glow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(110,198,255,0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.skill-tile:hover .tile-glow { opacity: 1; }

.tile-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(110,198,255,0.4));
}

.tile-label {
  font-family: var(--font-head);
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  text-align: center;
  color: var(--text-muted);
  padding: 0 6px;
  transition: color 0.25s;
  text-transform: uppercase;
}
.skill-tile:hover .tile-label { color: var(--glow-c); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--glow-c), var(--glow-m), var(--glow-g));
  transform: translateX(-50%);
}

.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}
.tl-item.left  { justify-content: flex-end; padding-right: calc(50% + 30px); }
.tl-item.right { justify-content: flex-start; padding-left: calc(50% + 30px); }

.tl-dot {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 14px; height: 14px;
  background: var(--glow-c);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--glow-c);
  z-index: 1;
}

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 340px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.tl-card:hover {
  border-color: var(--glow-c);
  box-shadow: 0 0 20px rgba(110,198,255,0.12);
}
.tl-age {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 3px;
  color: var(--glow-c);
  margin-bottom: 8px;
}
.tl-card h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #fff;
}
.tl-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
.about-text .section-title { text-align: left; }
.about-text .section-title::after { margin-left: 0; }
.about-text p {
  margin-top: 20px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 560px;
}
.about-text em { color: var(--glow-c); font-style: normal; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--glow-c);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Orb */
.about-orb-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-orb {
  position: relative;
  width: 220px; height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: spinRing 6s linear infinite;
}
.r1 { width: 100%; height: 100%; border-color: rgba(110,198,255,0.3); animation-duration: 8s; }
.r2 { width: 75%; height: 75%; border-color: rgba(169,109,255,0.3); animation-duration: 5s; animation-direction: reverse; }
.r3 { width: 50%; height: 50%; border-color: rgba(61,255,168,0.3); animation-duration: 3s; }
@keyframes spinRing { to { transform: rotate(360deg); } }

.orb-core {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-c), var(--glow-m));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 40px rgba(110,198,255,0.4);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 2px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--glow-c);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  padding: 48px 40px 40px;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s;
  box-shadow: 0 0 60px rgba(110,198,255,0.12);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--glow-c); border-color: var(--glow-c); }

.modal-icon { font-size: 3rem; margin-bottom: 16px; }
.modal-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  margin-bottom: 20px;
}
.modal-body {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.92rem;
}
.modal-body strong { color: var(--glow-c); }
.modal-body ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}
.modal-body ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.modal-body ul li::before {
  content: '▹';
  color: var(--glow-c);
  flex-shrink: 0;
  margin-top: 1px;
}
.modal-body .badge {
  display: inline-block;
  background: rgba(110,198,255,0.1);
  border: 1px solid var(--glow-c);
  color: var(--glow-c);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-family: var(--font-head);
  letter-spacing: 1px;
  margin: 4px 4px 4px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --tile-size: 95px; --tile-gap: 8px; }
  .tile-icon { font-size: 1.7rem; }
  .tile-label { font-size: 0.48rem; }
  #navbar { padding: 14px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.75rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-orb-wrapper { display: none; }
  .timeline::before { left: 16px; }
  .tl-item.left, .tl-item.right {
    padding-left: 48px; padding-right: 0;
    justify-content: flex-start;
  }
  .tl-dot { left: 16px; }
  .modal-box { padding: 32px 22px 28px; }
}
