:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #222;
  --bg-card-hover: #2a2a2a;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --accent: #6c63ff;
  --accent-hover: #5a52d5;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --border: #333;
  --gradient-1: #6c63ff;
  --gradient-2: #e040fb;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}
[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #e0e0e0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Navbar */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition), border var(--transition);
}
[data-theme="light"] nav { background: rgba(248,249,250,0.9); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.nav-logo {
  font-weight: 800; font-size: 1.2rem;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.88rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary); background: var(--bg-card);
}
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition); margin-left: 8px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.mobile-btn {
  display: none; background: none; border: none; color: var(--text-primary);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
}

/* Hero */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 64px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -30%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; width: 100%; }
.hero-inner {
  display: flex; align-items: center; gap: 60px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-photo { flex-shrink: 0; }
.hero-photo img {
  width: 340px; height: 340px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
  box-shadow: 0 0 40px var(--accent-glow);
}
.hero-badge {
  display: inline-block; padding: 6px 16px;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 8px;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400; color: var(--text-secondary); margin-bottom: 24px;
}
.hero p {
  max-width: 600px; color: var(--text-secondary);
  font-size: 1.05rem; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: #fff; box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--accent-glow); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-social { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-social a {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 1.2rem;
  transition: all var(--transition);
}
.hero-social a:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-3px); box-shadow: 0 4px 15px var(--accent-glow);
}

/* Sections */
section { padding: 100px 0; }
.page-section { padding-top: 100px; min-height: 100vh; }
.section-label {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700; margin-bottom: 12px;
}
.section-desc {
  color: var(--text-secondary); max-width: 600px;
  font-size: 1rem; margin-bottom: 48px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.skill-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  text-align: center; transition: all var(--transition);
}
.skill-item:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(108,99,255,0.1);
}
.skill-item i { font-size: 2rem; margin-bottom: 10px; color: var(--accent); }
.skill-item .skill-name { font-size: 0.85rem; font-weight: 600; }
.skill-item .skill-level { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* Projects */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.project-card p { flex: 1; }
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin: 0 auto 16px; color: var(--accent);
}
.project-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.project-card p {
  color: var(--text-secondary); font-size: 0.9rem;
  margin-bottom: 16px; line-height: 1.5;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; justify-content: center; }
.project-tags span {
  padding: 4px 10px; border-radius: 4px;
  background: var(--bg-primary); border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 500; color: var(--text-secondary);
}
.project-links { display: flex; gap: 12px; justify-content: center; }
.project-links a {
  font-size: 0.85rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Experience */
.exp-total {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 28px;
}
.exp-total-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}
.exp-total-number {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.exp-total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.timeline { position: relative; padding-left: 0; }
.timeline-item {
  position: relative;
  margin-bottom: 28px;
  padding-left: 28px;
  border-left: 2px solid var(--border);
  padding-bottom: 4px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -6px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.timeline-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.timeline-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.timeline-logo span {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.timeline-content { flex: 1; min-width: 0; }
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 2px; }
.timeline-item .timeline-meta {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 2px;
}
.timeline-sub {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px;
}
.timeline-item p {
  color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 8px;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.timeline-tags span {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Certs & Courses */
.certs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cert-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all var(--transition);
}
.cert-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cert-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.1); display: flex;
  align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.1rem; flex-shrink: 0;
}
.cert-card h4 { font-size: 0.95rem; margin-bottom: 2px; }
.cert-card .cert-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.cert-btn {
  background: none; border: 1px solid var(--border); color: var(--accent);
  font-size: 0.78rem; font-weight: 600; padding: 4px 12px; border-radius: 4px;
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.cert-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-content {
  position: relative; max-width: 700px; width: 100%;
  background: var(--bg-card); border-radius: var(--radius); padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: modalIn 0.25s ease;
}
.modal-content img { width: 100%; height: auto; display: block; border-radius: calc(var(--radius) - 4px); }
.modal-close {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  font-size: 1.1rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: rgba(0,0,0,0.8); }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* English Level */
.english-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}
.english-level-badge {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.5rem; color: #fff; flex-shrink: 0;
}
.english-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.english-info p { color: var(--text-secondary); font-size: 0.9rem; }
.english-bar {
  width: 100%; max-width: 300px; height: 8px;
  background: var(--bg-primary); border-radius: 4px; margin-top: 12px; overflow: hidden;
}
.english-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  transition: width 1s ease;
}

/* Stats / Summary */
.stats {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats .section-desc {
  margin-bottom: 28px;
}
.stats-heading {
  font-size: 0.82rem;
  margin-bottom: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stats-heading i {
  color: var(--accent);
  margin-right: 5px;
  font-size: 0.8rem;
}
.stats-row {
  margin-bottom: 20px;
}
.stats-row:last-child {
  margin-bottom: 0;
}
.stats-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stats-cards:has(.stat-card:only-child) {
  grid-template-columns: 1fr 1fr;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(108,99,255,0.08);
}
.stat-card .stat-number {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.stat-card .stat-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Contact / Profile Cards */
.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  text-align: center; transition: all var(--transition);
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-card i { font-size: 1.8rem; color: var(--accent); margin-bottom: 12px; }
.contact-card h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-card p { font-size: 0.85rem; color: var(--text-muted); }
.contact-card a { font-size: 0.85rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0; text-align: center;
  color: var(--text-muted); font-size: 0.85rem;
}

/* Animations */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-primary); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 4px;
  }
  .mobile-btn { display: block; }
  .hero-inner { flex-direction: column-reverse; gap: 32px; text-align: center; }
  .hero-photo img { width: 180px; height: 180px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-social { justify-content: center; }
  .stats-cards { gap: 8px; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .page-section { padding-top: 60px; }
  .english-card { flex-direction: column; text-align: center; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .contact-cards { grid-template-columns: 1fr; }
}
