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

:root {
  --accent: #6e57e0;
  --accent-light: #9b8af4;
  --accent-dark: #4f3db5;
  --bg: #0a0b10;
  --bg-2: #10111a;
  --bg-3: #181927;
  --text: #e8eaf0;
  --text-muted: #8e90a8;
  --border: rgba(110, 87, 224, 0.18);
  --card-bg: rgba(24, 25, 39, 0.85);
  --radius: 14px;
  --radius-lg: 22px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

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

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

/* ==============================
   UTILITIES
================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

/* ==============================
   NAVBAR
================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(10,11,16,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-top: 0;
}

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

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.nav-links a.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.nav-links a.nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(110,87,224,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(110,87,224,0.08) 0%, transparent 70%);
}

#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.hero-avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px rgba(110,87,224,0.35);
  margin-bottom: 0.5rem;
  position: relative;
}

.hero-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: none;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.hero-greeting {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.role-tag {
  background: rgba(110,87,224,0.12);
  border: 1px solid rgba(110,87,224,0.3);
  color: var(--accent-light);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
}

.hero-motto {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
  font-family: 'Fira Code', monospace;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  padding: 12px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(110,87,224,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(110,87,224,0.5);
  background: var(--accent-light);
}

.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent-light);
}
.btn-outline:hover {
  background: rgba(110,87,224,0.1);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll span {
  display: block;
  width: 22px;
  height: 34px;
  border: 2px solid rgba(110,87,224,0.5);
  border-radius: 14px;
  position: relative;
}
.hero-scroll span::before {
  content: '';
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0.4; }
}

/* ==============================
   SECTIONS COMMON
================================ */
section { padding: 100px 0; }
section:nth-child(even) { background: var(--bg-2); }

/* ==============================
   ABOUT
================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.02rem;
}

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

.philosophy-quote {
  font-style: italic;
  color: var(--accent-light) !important;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-size: 1rem !important;
}

.about-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* CODE BLOCK */
.code-block {
  background: #0d0e16;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-filename {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.code-block pre {
  padding: 20px;
  line-height: 1.9;
  overflow-x: auto;
}

.code-block .key { color: #9b8af4; }
.code-block .str { color: #a3e635; }

/* ==============================
   SKILLS
================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.skill-category:hover {
  border-color: rgba(110,87,224,0.5);
  transform: translateY(-3px);
}

.skill-category h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon { font-size: 1.1rem; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid;
}

.tier-1 { background: rgba(110,87,224,0.15); border-color: rgba(110,87,224,0.4); color: #c4baff; }
.tier-2 { background: rgba(56,178,172,0.12); border-color: rgba(56,178,172,0.35); color: #5ee7df; }
.tier-3 { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); color: #86efac; }
.tier-4 { background: rgba(245,121,42,0.12); border-color: rgba(245,121,42,0.35); color: #fdba74; }
.tier-5 { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.35); color: #93c5fd; }

/* ==============================
   PROJECTS
================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: rgba(110,87,224,0.5);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(110,87,224,0.12);
}

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

.project-icon { font-size: 1.8rem; }

.project-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(110,87,224,0.1);
  padding: 3px 10px;
  border-radius: 100px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.77rem;
  background: rgba(110,87,224,0.12);
  border: 1px solid rgba(110,87,224,0.25);
  color: var(--accent-light);
  padding: 3px 10px;
  border-radius: 6px;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.project-link {
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(110,87,224,0.35);
  color: var(--accent-light);
  transition: var(--transition);
}
.project-link:hover {
  background: rgba(110,87,224,0.15);
  border-color: var(--accent);
}
.project-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.project-link.primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

/* ==============================
   FOCUS
================================ */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.focus-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}
.focus-card:hover {
  border-color: rgba(110,87,224,0.4);
  transform: translateY(-3px);
}

.focus-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.focus-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.focus-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.focus-card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.focus-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ==============================
   CONTACT
================================ */
#contact { text-align: center; }

.contact-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  text-align: left;
}
.contact-card:hover {
  border-color: rgba(110,87,224,0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(110,87,224,0.12);
}

.contact-icon {
  width: 44px; height: 44px;
  background: rgba(110,87,224,0.15);
  border: 1px solid rgba(110,87,224,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.contact-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 2px;
}

/* ==============================
   FOOTER
================================ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 24px;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
}

.footer-copy {
  margin-top: 0.5rem;
  font-size: 0.8rem !important;
  font-style: normal !important;
}

/* ==============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(10,11,16,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 28px;
    width: 100%;
  }
  .nav-links a.nav-cta {
    border-radius: 0;
    margin: 4px 28px;
    display: inline-block;
    width: auto;
    text-align: center;
  }
  .hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 70px 0; }
}

@media (max-width: 500px) {
  .hero-name { font-size: 2.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

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