/* ===== RESET & VARIABLES ===== */
:root {
  --bg-dark: #07070a;
  --bg-card: rgba(20, 20, 30, 0.4);
  --bg-nav: rgba(7, 7, 10, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #0ea5e9;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.5);
  --primary-glow: rgba(14, 165, 233, 0.5);
  --border-light: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

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

.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { 
  background: rgba(255,255,255,0.1); 
  border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== UTILITIES & TYPOGRAPHY ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 60px;
  line-height: 1.2;
}

.section-header { margin-bottom: 60px; }

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.section { padding: 120px 0; position: relative; z-index: 2; }

/* ===== BACKGROUND GLOWS ===== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}
.bg-glow-1 {
  top: -10%; left: -10%;
  width: 50vw; height: 50vw;
  background: var(--primary-glow);
  animation: drift 20s ease-in-out infinite alternate;
}
.bg-glow-2 {
  bottom: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: var(--accent-glow);
  animation: drift 25s ease-in-out infinite alternate-reverse;
}
.bg-glow-3 {
  top: 40%; left: 60%;
  width: 30vw; height: 30vw;
  background: rgba(139, 92, 246, 0.3); /* Purple */
  animation: pulseGlow 15s ease-in-out infinite alternate;
}
.noise-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 1;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 10%) scale(1.1); }
}
@keyframes pulseGlow {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 0.5; transform: scale(1.2); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(14px, 1.5vw, 20px) clamp(32px, 3vw, 48px);
  border-radius: 50px;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-transform: capitalize;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-dark);
  border: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255,255,255,0.15);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(10px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-main);
}

.btn-glow {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.btn-glow:hover {
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  padding: 16px 0;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo .dot { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
}
.nav-link.active::after, .nav-link:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 28px; height: 2px;
  background: var(--text-main);
  transition: 0.3s ease;
  transform-origin: right;
}
.hamburger.active span:nth-child(1) { transform: rotate(-45deg) translate(-2px, 2px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(45deg) translate(-2px, -2px); }


/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 120px;
  position: relative;
  z-index: 2;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-eyebrow-wrap { margin-bottom: 24px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
}

.hero-name {
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.hero-role {
  font-size: clamp(1.5rem, 3vw, 3.5rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-desc {
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  color: var(--text-muted);
  max-width: clamp(540px, 40vw, 800px);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-card {
  width: clamp(280px, 25vw, 450px);
  padding: clamp(20px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: rotate(3deg);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.profile-card:hover {
  transform: rotate(0deg) scale(1.05);
  border-color: var(--border-hover);
}

.profile-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #1e1e2e;
}
.profile-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) contrast(1.1); }

.profile-info h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.6rem);
  font-weight: 600;
}
.profile-info p {
  font-size: clamp(0.85rem, 1vw, 1.15rem);
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.floating-badge {
  position: absolute;
  padding: clamp(12px, 1vw, 16px) clamp(20px, 1.5vw, 28px);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-size: clamp(0.85rem, 1vw, 1.15rem);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: float 6s ease-in-out infinite;
}
.floating-badge i { color: var(--primary); }

.badge-1 { top: 10%; right: -5%; animation-delay: 0s; }
.badge-2 { bottom: 35%; left: -18%; animation-delay: -3s; }

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

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity 0.3s;
}
.scroll-indicator:hover { opacity: 1; }
.mouse {
  width: 24px; height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.mouse::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 6px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 15px); opacity: 0; }
}


/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.about-text strong { color: var(--text-main); font-weight: 500; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.glass-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Code Window */
.code-window {
  width: 100%;
  overflow: hidden;
}
.window-header {
  background: rgba(0,0,0,0.3);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
}
.dot-red, .dot-yellow, .dot-green {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-content {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  overflow-x: auto;
}
.code-content .keyword { color: var(--accent); }
.code-content .string { color: #a3e635; }


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

.skill-category {
  padding: 40px 30px;
}
.skill-category:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
}

.skill-icon-wrap {
  width: 56px; height: 56px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 24px;
}

.skill-cat-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.tag {
  padding: 6px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.tag:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  border-color: var(--text-main);
}


/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.project-card {
  padding: 32px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.project-icon-box {
  font-size: 2rem;
  color: var(--primary);
}

.project-links {
  display: flex;
  gap: 16px;
}
.project-links a {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.project-links a:hover {
  color: var(--text-main);
  transform: scale(1.1);
}

.project-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}


/* ===== CONTACT ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  padding: 60px;
}

.contact-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: var(--transition);
}
.contact-method:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hover);
}

.icon-wrap {
  width: 48px; height: 48px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}

.method-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.method-val {
  font-size: 1.1rem;
  font-weight: 500;
}

.social-links-grid {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.social-btn {
  width: 48px; height: 48px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-btn:hover {
  background: var(--text-main);
  color: var(--bg-dark);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.input-wrap {
  position: relative;
}
.input-wrap input,
.input-wrap textarea {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}
.input-wrap textarea {
  resize: vertical;
  min-height: 150px;
}
.input-wrap input:focus,
.input-wrap textarea:focus {
  border-color: var(--primary);
  background: rgba(0,0,0,0.4);
}
.input-wrap label {
  position: absolute;
  top: 16px; left: 20px;
  color: var(--text-muted);
  transition: 0.3s ease;
  pointer-events: none;
}
.input-wrap input:focus ~ label,
.input-wrap textarea:focus ~ label,
.input-wrap input:not(:placeholder-shown) ~ label,
.input-wrap textarea:not(:placeholder-shown) ~ label {
  top: -10px; left: 16px;
  font-size: 0.8rem;
  background: var(--bg-dark);
  padding: 0 8px;
  color: var(--primary);
  border-radius: 4px;
}
.w-full { width: 100%; }

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 80px;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-socials a:hover { color: var(--text-main); }


/* ===== ANIMATIONS (Intersection Observer) ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-fade {
  opacity: 0;
  transition: opacity 1s ease;
}
.reveal-up.visible, .reveal-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }


/* ===== RESPONSIVE ===== */
@media (max-height: 750px) {
  .scroll-indicator { display: none; }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 400px; margin: 0 auto; order: -1; }
  
  .badge-1 { right: 0; }
  .badge-2 { left: -5%; }
  
  .about-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; padding: 40px; }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .section-title { margin-bottom: 40px; }
  .scroll-indicator { display: none; }
  
  .badge-1 { right: 0; }
  .badge-2 { left: -2%; }
  
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; height: 100vh;
    background: rgba(7, 7, 10, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links.open { right: 0; }
  .nav-link { font-size: 1.5rem; }
  .hamburger { display: flex; }
  
  .form-group { grid-template-columns: 1fr; }
  .contact-wrap { padding: 24px; }
  
  .about-stats { grid-template-columns: 1fr; }
}
