/* ===== CSS Variables & Reset ===== */
:root {
  --bg-primary: #0b0d10;
  --bg-secondary: #0f1115;
  --bg-card: #141820;
  --bg-card-hover: #1a1f2b;
  --text-primary: #eaedf2;
  --text-secondary: #8b95a5;
  --text-muted: #5c6578;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 252, 0.1);
  --accent-glow-strong: rgba(124, 92, 252, 0.25);
  --gradient-1: linear-gradient(135deg, #7c5cfc, #a78bfa);
  --gradient-2: linear-gradient(135deg, #7c5cfc, #38bdf8);
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 92, 252, 0.06), transparent);
  background-attachment: fixed;
}

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

ul {
  list-style: none;
}

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

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 13, 16, 0.7);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 13, 16, 0.92);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.logo-bracket {
  color: var(--accent);
}

.nav-logo:hover {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

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

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

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

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(124, 92, 252, 0.04) 1px, transparent 0);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 10%, transparent 70%);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-light);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(124, 92, 252, 0.15));
}

.hero-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 24px;
}

.hero-title-prefix {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.typing-cursor {
  font-weight: 300;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124, 92, 252, 0.3), 0 2px 8px rgba(124, 92, 252, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(124, 92, 252, 0.5), 0 4px 16px rgba(124, 92, 252, 0.3);
  background: #8b6cfd;
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  box-shadow: inset 0 0 0 1.5px rgba(124, 92, 252, 0.4);
}

.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1.5px rgba(124, 92, 252, 0.6);
}

.btn-lg {
  padding: 13px 30px;
  font-size: 0.9rem;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.stat {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  margin-top: 4px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: float 3s ease-in-out infinite;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 3px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 18px; }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

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

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-light), transparent);
  max-width: 300px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-light);
}

/* ===== About Section ===== */
.about-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-image-frame {
  position: relative;
  width: 240px;
  height: 240px;
}

.about-image-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 18px;
  background: var(--gradient-1);
  opacity: 0.3;
  z-index: 0;
  filter: blur(1px);
}

.about-image-frame::after {
  content: '';
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  filter: blur(30px);
  z-index: 0;
}

.about-avatar {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-avatar i {
  font-size: 5rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Skills Section ===== */
.skills {
  background: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
}

.skill-category::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top right, rgba(124, 92, 252, 0.04), transparent 60%);
  pointer-events: none;
}

.skill-category:hover {
  border-color: rgba(124, 92, 252, 0.3);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 32px rgba(124, 92, 252, 0.08);
  transform: translateY(-3px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-category-header i {
  font-size: 1.1rem;
  color: var(--accent-light);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: var(--radius-sm);
}

.skill-category-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: rgba(124, 92, 252, 0.3);
  color: var(--accent-light);
  background: rgba(124, 92, 252, 0.08);
}

.skill-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.skill-icon-fa {
  font-size: 0.8rem;
  color: var(--accent-light);
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(124, 92, 252, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(124, 92, 252, 0.08);
}

.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--bg-secondary), var(--bg-card-hover));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.project-image-placeholder i {
  font-size: 2.2rem;
  color: var(--accent-light);
  opacity: 0.35;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 1.1rem;
  transition: var(--transition);
  transform: translateY(20px);
}

.project-card:hover .project-link {
  transform: translateY(0);
}

.project-link:hover {
  background: var(--accent);
  color: #fff;
}

.project-info {
  padding: 24px;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-light);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  background: rgba(124, 92, 252, 0.12);
  color: var(--accent-light);
  border-radius: 6px;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--bg-secondary);
}

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

.contact-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}

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

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover {
  color: var(--accent-light);
  border-color: rgba(124, 92, 252, 0.4);
  background: rgba(124, 92, 252, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.12);
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer strong {
  color: var(--accent-light);
  font-weight: 500;
}

.footer-year {
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ===== 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 {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-name {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-image-frame {
    width: 180px;
    height: 180px;
  }

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

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

  .section-title {
    font-size: 1.4rem;
  }

  .section {
    padding: 70px 0;
  }
}

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
}
