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

:root {
  --bg: #080810;
  --bg2: #0d0d1a;
  --surface: #12121f;
  --surface2: #1a1a2e;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8f0;
  --text-muted: #6b6b8a;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --accent-glow: rgba(99,102,241,0.3);
  --font: 'Inter', sans-serif;
  --font2: 'Space Grotesk', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease2: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: none; font-family: inherit; }

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

/* ===== CURSOR ===== */
.cursor {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s;
  mix-blend-mode: screen;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(99,102,241,0.5);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease), width 0.4s var(--ease), height 0.4s var(--ease), opacity 0.3s;
}
.cursor.hover { width: 20px; height: 20px; }
.cursor-follower.hover { width: 60px; height: 60px; opacity: 0.5; }

@media (hover: none) { .cursor, .cursor-follower { display: none; } body { cursor: auto; } button { cursor: pointer; } }

/* ===== LOADER ===== */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-count {
  font-family: var(--font2);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 1.5rem;
}
.loader-bar {
  width: 200px; height: 2px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%;
  transition: width 0.05s linear;
  border-radius: 2px;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: padding 0.4s var(--ease), background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  padding: 1rem 0;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font2);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex; list-style: none; gap: 2.5rem;
}
.nav-link {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:last-child { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-link {
  display: block;
  font-family: var(--font2);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.5rem 0;
  transition: color 0.3s, transform 0.3s;
}
.mobile-link:hover { color: var(--accent); transform: translateX(10px); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease);
  border: none; position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease);
}
.btn:hover::before { transform: translateX(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 50px var(--accent-glow), 0 8px 30px rgba(99,102,241,0.4); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; }

/* ===== SECTION BASE ===== */
.section { padding: 8rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-label {
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font2);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.section-title em { font-style: normal; color: var(--accent); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 8rem 2rem 4rem;
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.6;
}
.hero-content {
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
  width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.hero-title {
  font-family: var(--font2);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
  display: flex; flex-direction: column;
}
.hero-line { display: block; }
.accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeInUp 1s 1.5s both;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.hero-stats {
  position: absolute; right: 2rem; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2.5rem;
  z-index: 1;
}
.stat { text-align: right; }
.stat-num {
  font-family: var(--font2);
  font-size: 2.5rem; font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat span { color: var(--accent); font-size: 1.5rem; }
.stat p { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.05em; margin-top: 0.25rem; }

/* ===== ABOUT ===== */
.about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center;
}
.about-img-wrap {
  position: relative; aspect-ratio: 1;
  max-width: 420px;
}
.about-img-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 30px;
  opacity: 0.1;
}
.about-img-placeholder {
  width: 100%; height: 100%;
  border: 1px solid var(--border);
  border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  overflow: hidden;
}
.about-img-placeholder svg { width: 60%; height: 60%; }
.about-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 30px;
  display: block;
}
.about-tag {
  position: absolute;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.8rem; font-weight: 600;
  backdrop-filter: blur(10px);
}
.tag-1 { bottom: 2rem; left: -2rem; }
.tag-2 { top: 2rem; right: -2rem; }
.about-desc { color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.8; }

/* ===== SKILLS ===== */
.skills { background: var(--bg); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.skill-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px var(--accent-glow);
}
.skill-icon {
  width: 48px; height: 48px;
  background: rgba(99,102,241,0.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.skill-icon svg { width: 22px; height: 22px; }
.skill-card h3 { font-family: var(--font2); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.skill-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.skill-bar {
  height: 3px; background: var(--surface2);
  border-radius: 2px; overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  width: 0%;
  transition: width 1.2s var(--ease);
}

/* ===== WORK ===== */
.work { background: var(--bg2); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.work-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-8px); }
.work-card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.work-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease);
}
.work-card:hover .work-placeholder { transform: scale(1.05); }
.work-placeholder span {
  font-family: var(--font2);
  font-size: 4rem; font-weight: 700;
  color: rgba(255,255,255,0.15);
}
.work-overlay {
  position: absolute; inset: 0;
  background: rgba(8,8,16,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.work-card:hover .work-overlay { opacity: 1; }
.work-link {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 0.85rem; font-weight: 600;
  transform: translateY(10px);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.work-card:hover .work-link { transform: translateY(0); }
.work-link:hover { background: var(--accent2); }
.work-card-info { padding: 1.5rem; }
.work-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.work-tags span {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(99,102,241,0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(99,102,241,0.2);
}
.work-card-info h3 { font-family: var(--font2); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.work-card-info p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ===== CONTACT ===== */
.contact { background: var(--bg); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: start;
}
.contact-desc { color: var(--text-muted); margin-bottom: 2rem; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s, transform 0.3s;
}
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-link:hover { color: var(--accent); transform: translateX(6px); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; }
.form-group input, .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: none;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo { font-family: var(--font2); font-size: 1.2rem; font-weight: 700; }
.footer p { font-size: 0.8rem; color: var(--text-muted); }
.footer-top {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: border-color 0.3s, color 0.3s, transform 0.3s;
}
.footer-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-4px); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.revealed { opacity: 1 !important; transform: none !important; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .tag-1, .tag-2 { display: none; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .section { padding: 5rem 0; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}
