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

:root {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --surface: #334155;
  --border: #475569;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1120px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #a5b4fc;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  transition: width var(--transition);
}

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

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  transition: opacity var(--transition), transform var(--transition);
}

.navbar__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.08), transparent);
  pointer-events: none;
}

.hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 80px 0;
}

.hero__text {
  flex: 1;
  max-width: 640px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 24px;
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

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

.hero__name {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__photo {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 60px var(--accent-glow);
  position: relative;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font);
}

.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

.btn--large {
  font-size: 1.1rem;
  padding: 16px 36px;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about__text .btn {
  margin-top: 8px;
}

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-card__number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card__label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

/* ===== Experience / Timeline ===== */
.timeline__card {
  background: var(--bg-card);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  transition: border-color var(--transition);
}

.timeline__card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
  border-radius: 0 2px 2px 0;
}

.timeline__card:hover {
  border-color: var(--accent);
}

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

.timeline__role {
  font-size: 1.35rem;
  font-weight: 700;
}

.timeline__company {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 500;
}

.timeline__date {
  font-size: 0.9rem;
  color: var(--text-dim);
  background: var(--surface);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.timeline__context {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.timeline__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline__list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

/* ===== Education ===== */
.edu__list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.edu__entry {
  background: var(--bg-card);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition);
}

.edu__entry:hover {
  border-color: var(--accent);
}

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

.edu__school {
  font-size: 1.15rem;
  font-weight: 700;
}

.edu__date {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
}

.edu__degree {
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 4px;
}

.edu__detail {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.edu__gpa {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Copy Button ===== */
.copy-btn {
  cursor: pointer;
  font-family: var(--font);
  position: relative;
}

.copy-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  animation: fadeUp 1.5s forwards;
}

@keyframes fadeUp {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

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

.skill-group {
  background: var(--bg-card);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition);
}

.skill-group:hover {
  border-color: var(--accent);
}

.skill-group__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

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

.chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.1);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  color: var(--text);
  text-decoration: none;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.project-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--accent-light);
}

.project-card__icon svg {
  width: 24px;
  height: 24px;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.project-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-light);
  transition: color var(--transition);
}

.project-card:hover .project-card__link {
  color: #a5b4fc;
}

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

.contact__text {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: -24px auto 36px;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid rgba(71, 85, 105, 0.4);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  padding: 32px 0;
}

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

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

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__socials a {
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer__socials a:hover {
  color: var(--accent-light);
}

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

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }

  .hero__badge::before {
    animation: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .navbar__nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero__content {
    flex-direction: column-reverse;
    text-align: center;
    padding: 48px 0;
  }

  .hero__photo {
    width: 200px;
    height: 200px;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

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

  .about__stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 140px;
  }

  .timeline__header {
    flex-direction: column;
  }

  .section {
    padding: 64px 0;
  }

  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .about__stats {
    flex-direction: column;
  }
}
