/* ============================================================
 *  style.css  –  Custom styles (Tailwind handles layout)
 * ============================================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
  --primary:        #7c3aed;
  --primary-light:  #9d5ffa;
  --secondary:      #06b6d4;
  --bg:             #030712;
  --surface:        #0f0a1e;
  --border:         rgba(255, 255, 255, 0.08);
  --text:           #e5e7eb;
  --text-muted:     #6b7280;
}

/* ==================== BASE ==================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ==================== SELECTION ==================== */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}

/* ==================== NAVBAR ==================== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

#navbar.scrolled {
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.mobile-nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }

/* Hamburger */
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #9ca3af;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
.hamburger-line.short { width: 14px; margin-left: auto; }

#mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
#mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
  width: 20px;
}

/* Language toggle */
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}

/* ==================== HERO ==================== */
.hero-section {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(124, 58, 237, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 55%),
    #030712;
}

/* Animated blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
  will-change: transform;
}

.blob-purple {
  width: clamp(300px, 50vw, 640px);
  height: clamp(300px, 50vw, 640px);
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -180px;
  right: -120px;
  animation: floatBlob 14s ease-in-out infinite;
}

.blob-cyan {
  width: clamp(260px, 42vw, 520px);
  height: clamp(260px, 42vw, 520px);
  background: radial-gradient(circle, #0891b2, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation: floatBlob 18s ease-in-out infinite reverse;
}

/* Grid overlay */
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* Gradient name text */
.hero-name-gradient {
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 40%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Tech badges in hero */
.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tech-badge:hover {
  color: var(--secondary);
  border-color: rgba(6,182,212,0.3);
  background: rgba(6,182,212,0.05);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::after  { transform: translateX(100%); }
.btn-primary:hover         { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,0.4); }
.btn-primary:active        { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}

/* ==================== SECTION COMMONS ==================== */
.section-tag {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin-bottom: 0.625rem;
}

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 9999px;
  margin: 0 auto;
}

/* ==================== GLASS CARD ==================== */
.glass-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ==================== ABOUT ==================== */
/* Rotating ring avatar */
.avatar-container {
  position: relative;
  width: 150px;
  height: 150px;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--primary));
  animation: spin-slow 10s linear infinite;
}

.avatar-inner {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1535 0%, #0f0a1e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stats */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
  text-align: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: rgba(124,58,237,0.35);
  background: rgba(124,58,237,0.05);
  transform: translateY(-3px);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Education timeline */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  opacity: 0.3;
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.82rem;
  top: 1.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 2px solid var(--bg);
  box-shadow: 0 0 10px rgba(124,58,237,0.6);
}

.edu-year-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(124,58,237,0.12);
  color: var(--primary-light);
  border: 1px solid rgba(124,58,237,0.2);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

/* Social icon buttons */
.social-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #9ca3af;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.22s ease;
}

.social-icon-btn:hover {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.35);
  color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(124,58,237,0.2);
}

/* ==================== SKILLS ==================== */
.skill-category-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.skill-category-card:hover {
  border-color: rgba(124,58,237,0.22);
  background: rgba(124,58,237,0.03);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.25);
}

.skill-cat-header { display: flex; align-items: center; gap: 0.75rem; }

.skill-cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: #d1d5db;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  font-family: 'JetBrains Mono', monospace;
}

.skill-tag:hover {
  color: var(--secondary);
  border-color: rgba(6,182,212,0.3);
  background: rgba(6,182,212,0.06);
}

/* ==================== PROJECTS ==================== */
.project-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s cubic-bezier(.2,.8,.4,1), box-shadow 0.35s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35), 0 0 0 1px rgba(124,58,237,0.12);
}

/* Browser mockup header */
.project-mockup-header {
  padding: 12px 14px 16px;
  min-height: 155px;
  position: relative;
  flex-shrink: 0;
}

.browser-dots { display: flex; gap: 5px; margin-bottom: 8px; }

.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.browser-url-bar {
  background: rgba(0,0,0,0.22);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}

.browser-content { padding: 0 2px; }

.mock-line { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.2); }

.mock-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.mock-card { height: 42px; border-radius: 6px; background: rgba(255,255,255,0.15); }

.mock-chart {
  height: 54px;
  border-radius: 6px;
  background: linear-gradient(to top, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 100%);
}

.mock-kanban { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.mock-kanban-col { background: rgba(0,0,0,0.2); border-radius: 4px; padding: 5px; }
.mock-kanban-item { height: 22px; border-radius: 3px; background: rgba(255,255,255,0.2); }

/* Project card body */
.project-card > div:last-child { flex: 1; display: flex; flex-direction: column; }

.project-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #374151;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tag-pill {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(124,58,237,0.12);
  color: var(--primary-light);
  border: 1px solid rgba(124,58,237,0.2);
  font-family: 'JetBrains Mono', monospace;
}

.project-link-btn,
.project-demo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.project-link-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: #9ca3af;
}
.project-link-btn:hover { background: rgba(255,255,255,0.09); color: #fff; }

.project-demo-btn {
  background: rgba(124,58,237,0.14);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--primary-light);
}
.project-demo-btn:hover { background: rgba(124,58,237,0.28); color: #fff; }

/* ==================== CONTACT ==================== */
.contact-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: border-color 0.3s, background 0.3s;
}

.contact-info-card:hover {
  border-color: rgba(124,58,237,0.22);
  background: rgba(124,58,237,0.03);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Form */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9375rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input::placeholder { color: #374151; }

.form-input:focus {
  border-color: rgba(124,58,237,0.55);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.13);
}

.form-input.error { border-color: rgba(239,68,68,0.55); }

/* ==================== BACK TO TOP ==================== */
.back-to-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary), #4338ca);
  border: none;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.25s ease;
  z-index: 40;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(124,58,237,0.45);
}

/* ==================== ANIMATIONS ==================== */
@keyframes floatBlob {
  0%,  100% { transform: translate(0,    0) scale(1); }
  33%        { transform: translate(30px, -25px) scale(1.04); }
  66%        { transform: translate(-20px, 15px) scale(0.97); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

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

/* ==================== UTILITIES ==================== */
.animate-fade-in { animation: fadeIn 0.6s ease 0.3s both; }

/* AOS pointer-events fix */
[data-aos]            { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  .avatar-container { width: 120px; height: 120px; }
  .section-title    { font-size: 1.875rem; }
}
