/* ===== VARIABLES ===== */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --card: #16161f;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --text2: #9090a8;
  --text3: #6060788;
  --accent: #00d4ff;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
  --radius: 16px;
  --header-h: 70px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}
[data-theme="light"] {
  --bg: #f5f5fa;
  --bg2: #ffffff;
  --bg3: #eeeef5;
  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --text: #0a0a1a;
  --text2: #50507a;
  --shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== HEADER ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="light"] #header { background: rgba(245,245,250,0.9); }
.header-inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; display: flex; align-items: center;
  padding: 0 24px; gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  white-space: nowrap;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #fff;
  flex-shrink: 0;
}
#nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 16px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text2); transition: all 0.2s; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: rgba(0,212,255,0.08); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn, .theme-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 7px 12px;
  cursor: pointer; font-size: 0.85rem; font-family: var(--font-body);
  transition: all 0.2s;
}
.lang-btn:hover, .theme-btn:hover { background: var(--bg2); color: var(--accent); border-color: var(--accent); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== PAGES ===== */
.page {
  display: none; min-height: 100vh;
  padding-top: var(--header-h);
}
.page.active { display: block; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px; margin: 0 auto;
  padding: 60px 24px;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  background: rgba(0,212,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 50px; padding: 6px 18px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; line-height: 1.1;
}

/* ===== HERO ===== */
#home { padding-top: 0; }
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}
.blob1 { width: 500px; height: 500px; background: var(--accent); top: -100px; right: -100px; }
.blob2 { width: 400px; height: 400px; background: var(--accent2); bottom: -100px; left: -100px; animation-delay: -4s; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
@keyframes float { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-30px) scale(1.05)} }
.hero-content {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: var(--header-h) 24px 60px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center; width: 100%;
}
.hero-greeting { color: var(--accent); font-weight: 500; letter-spacing: 0.05em; margin-bottom: 8px; }
.hero-name {
  font-family: var(--font-head); font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800; line-height: 1; margin-bottom: 24px;
}
.hero-name span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-roles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.role-tag {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 50px; padding: 6px 16px; font-size: 0.85rem; color: var(--text2);
}
.hero-desc { color: var(--text2); line-height: 1.7; margin-bottom: 32px; max-width: 480px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.btn-primary {
  background: var(--gradient); color: #fff;
  padding: 12px 28px; border-radius: 10px; font-weight: 600;
  border: none; cursor: pointer; font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s; display: inline-block;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-outline {
  border: 1.5px solid var(--border); color: var(--text);
  padding: 12px 28px; border-radius: 10px; font-weight: 600;
  font-size: 0.95rem; transition: all 0.2s; display: inline-block;
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.full-width { width: 100%; text-align: center; }
.hero-socials { display: flex; gap: 16px; }
.hero-socials a {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all 0.2s; font-size: 1rem;
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.hero-image { display: flex; justify-content: center; }
.image-frame {
  position: relative; width: 360px; height: 440px;
}
.image-glow {
  position: absolute; inset: -20px; border-radius: 50%;
  background: var(--gradient); filter: blur(60px); opacity: 0.3;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.3} 50%{opacity:0.5} }
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 24px; position: relative; z-index: 1;
  border: 2px solid var(--border);
}
.image-badge {
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 50px; padding: 10px 20px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  z-index: 2; backdrop-filter: blur(10px);
}
.image-badge i { color: var(--accent3); }
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 1;
}
.scroll-dot {
  width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%; animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce { 0%,100%{transform:translateY(0);opacity:1} 50%{transform:translateY(10px);opacity:0.4} }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: start; }
.about-img-wrap { position: relative; }
.about-img-wrap img {
  width: 100%; border-radius: 20px; aspect-ratio: 3/4;
  object-fit: cover; object-position: top;
  border: 2px solid var(--border);
}
.about-card-float {
  position: absolute; bottom: -20px; right: -20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(10px);
}
.about-card-float i { font-size: 1.5rem; color: var(--accent); }
.about-card-float strong { display: block; font-size: 0.75rem; color: var(--text2); }
.about-card-float span { font-size: 0.9rem; font-weight: 600; }
.about-text-col h3 { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 16px; }
.about-text-col p { color: var(--text2); line-height: 1.8; margin-bottom: 16px; }
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 28px 0; }
.skill-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500;
}
.skill-item i { color: var(--accent); font-size: 1rem; }
.personal-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item {
  background: var(--bg3); border-radius: 10px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.info-label { font-size: 0.75rem; color: var(--text2); font-weight: 500; }
.info-item span:last-child { font-weight: 600; font-size: 0.9rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute; left: -40px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff; border: 3px solid var(--bg);
}
.timeline-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.timeline-card:hover { border-color: rgba(0,212,255,0.3); transform: translateX(4px); }
.tc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tc-year { font-size: 0.8rem; color: var(--text2); }
.tc-badge {
  font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.tc-badge.running { background: rgba(0,212,255,0.15); color: var(--accent); }
.tc-badge.gpa { background: rgba(245,158,11,0.15); color: var(--accent3); }
.timeline-card h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 8px; }
.tc-inst { color: var(--text2); font-size: 0.88rem; margin-bottom: 6px; }
.tc-inst i, .tc-detail i { margin-right: 6px; color: var(--accent); font-size: 0.8rem; }
.tc-detail { font-size: 0.83rem; color: var(--text2); }

/* ===== EXPERIENCE ===== */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.exp-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: all 0.2s;
}
.exp-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); box-shadow: var(--shadow); }
.exp-card.featured { grid-column: 1 / -1; border-color: rgba(0,212,255,0.2); background: var(--bg3); }
.exp-card.teaching { border-color: rgba(124,58,237,0.2); }
.exp-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; flex-shrink: 0;
}
.exp-info h3 { font-family: var(--font-head); font-size: 1rem; margin-bottom: 6px; }
.exp-company, .exp-loc, .exp-date { font-size: 0.83rem; color: var(--text2); margin-bottom: 4px; }
.exp-company i, .exp-loc i { margin-right: 5px; color: var(--accent); font-size: 0.75rem; }
.exp-duration {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px; margin-bottom: 8px;
}
.exp-duration.current { background: rgba(0,212,255,0.15); color: var(--accent); }
.teach-list { list-style: none; margin-top: 8px; }
.teach-list li { font-size: 0.83rem; color: var(--text2); padding: 3px 0; }
.teach-list li::before { content: '→ '; color: var(--accent); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: border-color 0.2s;
}
.contact-card:hover { border-color: rgba(0,212,255,0.3); }
.contact-card > i { color: var(--accent); font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }
.contact-card h4 { font-size: 0.85rem; color: var(--text2); margin-bottom: 4px; }
.contact-card p { font-size: 0.9rem; line-height: 1.6; }
.contact-card a { color: var(--text); transition: color 0.2s; }
.contact-card a:hover { color: var(--accent); }
.contact-form-wrap {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.contact-form h3 { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text2); }

/* ===== FOOTER ===== */
#footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 40px 24px 20px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.footer-left { flex: 1; }
.footer-left p { color: var(--text2); font-size: 0.85rem; margin-top: 8px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text2); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all 0.2s; font-size: 0.9rem;
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom { max-width: 1100px; margin: 16px auto 0; text-align: center; }
.footer-bottom p { color: var(--text2); font-size: 0.82rem; }

/* ===== MOBILE MENU ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  #nav {
    display: none; position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 16px 24px; gap: 4px;
    z-index: 999;
  }
  #nav.open { display: flex; }
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-image { order: -1; }
  .image-frame { width: 260px; height: 320px; }
  .hero-roles, .hero-btns, .hero-socials { justify-content: center; }
  .hero-desc { margin: 0 auto 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card-float { right: 0; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .personal-info { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .timeline { padding-left: 32px; }
  .timeline-dot { left: -32px; }
  .exp-card.featured { grid-column: auto; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}
