@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  line-height: 1.7;
  background: #0f0f1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
a:hover { color: #93c5fd; }
img { max-width: 100%; height: auto; }

/* --- Navigation --- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-brand a {
  color: #f1f5f9;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #f1f5f9;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(160deg, #0a0a14 0%, #0f172a 30%, #1a1040 60%, #0f172a 100%);
  padding: 10rem 2rem 6rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
  box-shadow:
    0 0 40px rgba(99, 102, 241, 0.2),
    0 0 80px rgba(99, 102, 241, 0.1);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #94a3b8 0%, #a78bfa 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  max-width: 660px;
  margin: 0 auto 1.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.9;
}

.hero .location {
  color: #64748b;
  font-size: 0.875rem;
}

.hero .location a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.hero .location a:hover {
  color: #a78bfa;
}

.hero .location .fa {
  margin-right: 0.4rem;
  color: #a78bfa;
}

/* --- Sections --- */
.section {
  padding: 5rem 2rem;
  position: relative;
}

.section.alt {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #e2e8f0 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: #64748b;
  font-size: 1rem;
}

/* --- Skills --- */
.skills-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Featured Links --- */
.featured-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.featured-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  text-decoration: none;
  color: #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.featured-link::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.featured-link:hover {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.featured-link:hover::before {
  opacity: 1;
}

.featured-link:nth-child(1) { --accent: #f97316; }
.featured-link:nth-child(2) { --accent: #a78bfa; }
.featured-link:nth-child(3) { --accent: #34d399; }
.featured-link:nth-child(4) { --accent: #60a5fa; }

.featured-link .fl-icon {
  font-size: 1.25rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.featured-link:nth-child(1) .fl-icon { color: #f97316; background: rgba(249, 115, 22, 0.12); }
.featured-link:nth-child(2) .fl-icon { color: #a78bfa; background: rgba(167, 139, 250, 0.12); }
.featured-link:nth-child(3) .fl-icon { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.featured-link:nth-child(4) .fl-icon { color: #60a5fa; background: rgba(96, 165, 250, 0.12); }

.featured-link .fl-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.featured-link .fl-desc {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
}

/* --- Achievements --- */
.achievements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.achievement-card {
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s;
}

.achievement-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
}

.achievement-card .ac-icon {
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.achievement-card:nth-child(1) .ac-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.achievement-card:nth-child(2) .ac-icon { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.achievement-card:nth-child(3) .ac-icon { color: #f472b6; background: rgba(244, 114, 182, 0.12); }

.achievement-card .ac-text {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
}

.achievement-card .ac-text strong {
  color: #e2e8f0;
  font-weight: 600;
}

/* --- Career Timeline --- */
.timeline {
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-date {
  min-width: 110px;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.timeline-content {
  flex: 1;
}

.timeline-role {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.timeline-company {
  font-size: 0.85rem;
  color: #64748b;
}

/* --- Education --- */
.education {
  max-width: 700px;
  margin: 0 auto;
}

.edu-item {
  padding: 1rem 0;
}

.edu-item + .edu-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.edu-degree {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.edu-school {
  font-size: 0.85rem;
  color: #64748b;
}

.edu-detail {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* --- Contact --- */
.contact {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}

.contact-link:hover {
  border-color: rgba(167, 139, 250, 0.3);
  color: #f1f5f9;
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.1);
  transform: translateY(-2px);
}

.contact-link .fa {
  font-size: 1.1rem;
  color: #a78bfa;
}

/* --- Footer --- */
.site-footer {
  background: linear-gradient(180deg, #0a0a14, #050508);
  color: #94a3b8;
  padding: 3rem 2rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #a78bfa;
}

.footer-links a .fa {
  margin-right: 0.35rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-icons a {
  color: #475569;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  transition: all 0.3s;
}

.social-icons a:hover {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.1);
}

.footer-copy {
  font-size: 0.75rem;
  color: #334155;
}

.footer-copy a {
  color: #475569;
}

/* --- Page Header (Projects, etc.) --- */
.page-header {
  background: linear-gradient(160deg, #0a0a14 0%, #0f172a 30%, #1a1040 60%, #0f172a 100%);
  padding: 8rem 2rem 3rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
  background: linear-gradient(135deg, #e2e8f0, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: #64748b;
  font-size: 1rem;
  position: relative;
}

/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.project-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.project-card .pc-title {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: rgba(10, 10, 20, 0.95);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }

  .featured-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievements {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .timeline-date {
    min-width: auto;
  }

  .footer-links {
    gap: 0.75rem 1.25rem;
  }

  .skills-row {
    flex-wrap: wrap;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .featured-links {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .tagline {
    font-size: 0.9rem;
  }
}
