/* ====================== Reset & Variables ====================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #06070d;
  --bg-alt: #0b0d18;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f8;
  --text-dim: #9296ab;
  --text-dimmer: #666a80;
  --accent: #7c5cff;
  --accent-2: #00d9c0;
  --accent-3: #ff5cb3;
  --gradient: linear-gradient(120deg, var(--accent), var(--accent-3) 55%, var(--accent-2));
  --font-head: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 18px;
  --shadow-glow: 0 0 60px rgba(124, 92, 255, 0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ====================== Background Decor ====================== */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}

.blob-1 {
  width: 480px; height: 480px;
  background: var(--accent);
  top: -120px; left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 420px; height: 420px;
  background: var(--accent-3);
  top: 30%; right: -140px;
  animation-delay: -6s;
}

.blob-3 {
  width: 400px; height: 400px;
  background: var(--accent-2);
  bottom: -160px; left: 30%;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black, transparent);
}

/* ====================== Progress Bar ====================== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ====================== Navbar ====================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 18px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(6, 7, 13, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--gradient);
  transition: width 0.25s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ====================== Buttons ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  background-size: 200% auto;
  color: #06070d;
  box-shadow: 0 8px 30px -8px rgba(124, 92, 255, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-position: right center;
  box-shadow: 0 12px 40px -6px rgba(124, 92, 255, 0.75);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--surface); }

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }

.arrow { transition: transform 0.25s ease; display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }

/* ====================== Hero ====================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-2);
  background: rgba(0, 217, 192, 0.08);
  border: 1px solid rgba(0, 217, 192, 0.25);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.text-gradient {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 560px;
  margin-bottom: 16px;
  line-height: 1.55;
}

.hero-subtitle .hl {
  color: var(--text);
  font-weight: 600;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-dimmer);
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 18px;
}

.hero-socials a {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface);
  transition: all 0.25s ease;
}

.hero-socials a:hover {
  color: var(--bg);
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.photo-ring {
  position: relative;
  width: min(340px, 80vw);
  aspect-ratio: 1;
}

.photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: var(--gradient);
  filter: blur(40px);
  opacity: 0.5;
  animation: rotate-glow 8s linear infinite;
}

@keyframes rotate-glow {
  0% { filter: blur(40px) hue-rotate(0deg); }
  100% { filter: blur(40px) hue-rotate(360deg); }
}

.photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.6);
}

.badge-float {
  position: absolute;
  background: rgba(16, 18, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,0.5);
  animation: bob 5s ease-in-out infinite;
}

.badge-1 { top: 6%; left: -14%; animation-delay: 0s; }
.badge-2 { bottom: 12%; right: -18%; animation-delay: -1.5s; }
.badge-3 { bottom: -4%; left: 2%; animation-delay: -3s; }

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

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dimmer);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-dimmer);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 3px; height: 8px;
  background: var(--accent-2);
  border-radius: 2px;
  animation: scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ====================== Sections ====================== */
.section {
  position: relative;
  z-index: 1;
  padding: 130px 0;
}

.section-tag {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

/* ====================== About ====================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text {
  font-size: 1.12rem;
  color: var(--text-dim);
  line-height: 1.85;
}

.about-text strong { color: var(--text); font-weight: 600; }

.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact {
  background: var(--bg-alt);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
}

.fact-value {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

.fact-value a:hover { color: var(--accent-2); }

/* ====================== Timeline ====================== */
.timeline {
  position: relative;
  padding-left: 40px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -49px;
  top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
  box-shadow: 0 0 0 4px rgba(0, 217, 192, 0.12);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.timeline-card:hover {
  transform: translateX(6px);
  border-color: rgba(124, 92, 255, 0.35);
  background: var(--surface-strong);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.timeline-head h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  white-space: nowrap;
}

.timeline-org {
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.timeline-card ul { display: flex; flex-direction: column; gap: 10px; }

.timeline-card li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.timeline-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-3);
}

/* ====================== Projects ====================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  border-radius: var(--radius);
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.02);
  box-shadow: 0 20px 50px -20px rgba(124, 92, 255, 0.4);
}

.project-card:hover::before { opacity: 1; }

.project-icon {
  font-size: 2rem;
  margin-bottom: 18px;
}

.project-card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.project-card p:last-child {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  color: #b9a9ff;
  border: 1px solid rgba(124, 92, 255, 0.25);
}

/* ====================== Skills ====================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.skill-group h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 20px;
  color: var(--accent-2);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  cursor: default;
}

.tag:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
  transform: translateY(-2px);
}

/* ====================== Achievements ====================== */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.achieve-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.achieve-card:hover {
  transform: translateY(-4px);
  background: var(--surface-strong);
}

.achieve-icon { font-size: 1.8rem; }

.achieve-card p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.55; }
.achieve-card strong { color: var(--text); }

/* ====================== Education ====================== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  border-top: 3px solid transparent;
  border-image: var(--gradient) 1;
  transition: transform 0.3s ease;
}

.edu-card:hover { transform: translateY(-4px); }

.edu-year {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.edu-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.edu-card p { color: var(--text-dim); font-size: 0.95rem; }
.edu-card strong { color: var(--text); }

/* ====================== Contact ====================== */
.contact-section { padding-bottom: 80px; }

.contact-box {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.contact-box .section-tag,
.contact-box .section-title { justify-content: center; }
.contact-box .section-tag { display: block; }

.contact-desc {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 auto 44px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 44px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  word-break: break-all;
}

.contact-link:hover {
  border-color: var(--accent-2);
  background: var(--surface-strong);
  transform: translateY(-3px);
}

.contact-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ====================== Footer ====================== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p { color: var(--text-dimmer); font-size: 0.85rem; }

.to-top {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.to-top:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
  transform: translateY(-3px);
}

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

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ====================== Responsive ====================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 20px; }
  .photo-ring { width: 230px; margin: 0 auto; }
  .badge-float { font-size: 0.72rem; padding: 7px 12px; }
  .about-grid { grid-template-columns: 1fr; }
  .badge-1 { left: -8%; }
  .badge-2 { right: -8%; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(6,7,13,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .container { padding: 0 22px; }
  .section { padding: 90px 0; }
  .hero { padding-top: 120px; }
  .contact-links { grid-template-columns: 1fr; }
  .timeline { padding-left: 28px; }
  .timeline-dot { left: -36px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
