/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-alt: #0f0f18;
  --surface: #13131e;
  --surface-2: #1a1a28;
  --border: #1e1e30;
  --accent: #6c63ff;
  --accent-dim: rgba(108, 99, 255, 0.12);
  --accent-glow: rgba(108, 99, 255, 0.3);
  --text: #e8e8f0;
  --text-muted: #8888a8;
  --text-faint: #44445a;
  --radius: 12px;
  --radius-lg: 20px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#navbar.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text); }

.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-muted);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
  z-index: 99;
  transform: translateY(-110%);
  transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateY(0); }

.mobile-link {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--text); }

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1100px;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 72px;
}

.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), transparent 60%);
  z-index: 0;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg);
  filter: grayscale(10%);
}

.hero-text { flex: 1; }

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 40%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-bottom: 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: #7b74ff;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

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

.social-link {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
  line-height: 1.2;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent); }

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.education-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.education-card:hover { border-color: var(--accent); }

.edu-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.edu-icon svg { width: 24px; height: 24px; }

.edu-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.edu-degree {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.edu-date { color: var(--text-faint); font-size: 0.85rem; }
.edu-course {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.edu-course strong { color: var(--text); }

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--accent); }

.skill-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: 'JetBrains Mono', monospace;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.tag-lang {
  font-family: 'Inter', sans-serif;
  display: flex;
  gap: 6px;
}
.tag-lang em {
  font-style: normal;
  color: var(--text-faint);
  font-size: 0.75rem;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}

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

.timeline-marker {
  position: absolute;
  left: -29px;
  top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background 0.2s;
}
.timeline-item:hover .timeline-marker { background: var(--accent); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color 0.2s;
}
.timeline-item:hover .timeline-content { border-color: var(--accent); }

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tl-company {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tl-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.tl-dept {
  color: var(--text-faint);
}

.tl-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  padding: 4px 10px;
  background: var(--accent-dim);
  border-radius: 4px;
  flex-shrink: 0;
}

.tl-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-bullets li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}
.tl-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 1px;
}
.tl-bullets li strong { color: var(--text); font-weight: 600; }

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface) 80%, rgba(108,99,255,0.06));
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--accent-glow);
  letter-spacing: 0.05em;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.project-icon svg { width: 22px; height: 22px; }

.project-links a {
  color: var(--text-faint);
  transition: color 0.2s;
  display: inline-flex;
}
.project-links a:hover { color: var(--accent); }
.project-links svg { width: 20px; height: 20px; }

.project-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.project-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(108,99,255,0.2);
}

/* ===== Contact ===== */
.contact-container { text-align: center; }

.contact-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: -32px auto 48px;
  line-height: 1.7;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: all 0.2s;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.cc-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.cc-icon svg { width: 20px; height: 20px; }

.cc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.cc-label {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.cc-value {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; gap: 40px; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .tl-header { flex-direction: column; gap: 8px; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .hero-photo { width: 160px; height: 160px; }
  .section { padding: 72px 0; }
  .timeline { padding-left: 24px; }
  .timeline-content { padding: 20px; }
  .education-card { flex-direction: column; }
}

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