/* ================= VARIABLES ================= */
:root {
  --bg: #050810;
  --bg2: #0a0f1e;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --accent: #00d4ff;
  --accent2: #7c3aed;
  --accent3: #22c55e;
  --text: #e2e8f0;
  --muted: #64748b;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ================= CURSOR ================= */
.cursor {
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease, opacity 0.3s;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s;
}

header.scrolled {
  padding: 14px 8%;
  background: rgba(5, 8, 16, 0.95);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}
.logo span { color: var(--accent); }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 30px;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
nav a:hover { color: var(--white); }
nav a:hover::after { width: 100%; }

#menuBtn {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  padding: 5px;
}

/* ================= MOBILE NAV ================= */
#mobileNav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.98);
  backdrop-filter: blur(20px);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
#mobileNav.open { display: flex; }
#mobileNav nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
#mobileNav nav a {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin: 0;
  transition: color 0.2s;
}
#mobileNav nav a:hover { color: var(--accent); }
#closeBtn {
  position: absolute;
  top: 28px;
  right: 8%;
  font-size: 36px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

/* ================= HERO ================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 8% 80px;
  position: relative;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(29,78,216,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(124,58,237,0.15) 0%, transparent 50%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 80px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* BADGE */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: var(--accent3);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.dot {
  width: 8px;
  height: 8px;
  background: var(--accent3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* HERO TEXT */
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.amp { color: var(--accent); }

.hero-desc {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 520px;
  font-size: 16px;
}

/* BUTTONS */
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: none;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0,212,255,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(0,212,255,0.1);
  transform: translateY(-3px);
}
.full-width { width: 100%; justify-content: center; }

/* STATS */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* PHOTO */
.hero-right { display: flex; justify-content: center; }

.photo-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.2), transparent 70%);
  animation: breathe 4s ease-in-out infinite;
}

.photo-box {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 5s ease-in-out infinite;
}

.photo-box img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0,212,255,0.3);
  position: relative;
  z-index: 2;
}

.ring {
  position: absolute;
  border-radius: 50%;
}
.one {
  width: 290px;
  height: 290px;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent2);
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  animation: spin 8s linear infinite;
}
.two {
  width: 340px;
  height: 340px;
  border-left: 2px solid var(--accent3);
  border-right: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  animation: spinReverse 12s linear infinite;
}

/* FLOATING TAGS */
.floating-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(5,8,16,0.9);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  z-index: 10;
}
.floating-tag img { width: 18px; height: 18px; }
.tag-python { top: 10%; left: -10%; animation: floatTag 4s ease-in-out infinite; }
.tag-ml { bottom: 15%; left: -15%; animation: floatTag 5s ease-in-out infinite 0.5s; color: var(--accent2); }
.tag-django { top: 20%; right: -8%; animation: floatTag 4.5s ease-in-out infinite 1s; color: var(--accent3); }

/* SCROLL HINT */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
}
.scroll-hint span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.wheel {
  width: 3px;
  height: 8px;
  background: var(--muted);
  border-radius: 3px;
  animation: scrollWheel 1.5s infinite;
}

/* ================= SECTIONS ================= */
.section {
  padding: 100px 8%;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 0px;
  margin-bottom: 50px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover {
  border-color: rgba(0,212,255,0.2);
}

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.about-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
  margin-bottom: 16px;
}

.about-details { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.detail-item i {
  color: var(--accent);
  font-size: 16px;
  margin-top: 3px;
  width: 20px;
  text-align: center;
}
.detail-item strong {
  display: block;
  font-size: 14px;
  color: var(--white);
  margin-bottom: 2px;
}
.detail-item span {
  font-size: 13px;
  color: var(--muted);
}

/* TIMELINE */
.education-timeline h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  margin-bottom: 28px;
  color: var(--white);
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex;
  gap: 18px;
  padding-bottom: 28px;
  position: relative;
}
.tl-item:not(:last-child) .tl-dot::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: -12px;
  width: 2px;
  background: var(--border);
}
.tl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,212,255,0.4);
}
.tl-year {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.tl-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.tl-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ================= SKILLS ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

@media (max-width: 992px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

.skill-box {
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;

  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);

  transition: 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.skill-box::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  background: linear-gradient(120deg, transparent, rgba(0,212,255,0.18), transparent);
  top: -10%;
  left: -10%;
  opacity: 0;
}

.skill-box:hover::before {
  opacity: 1;
  animation: neonMove 1.8s linear infinite;
}

.skill-box img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}

.skill-box h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.skill-box:hover {
  transform: translateY(-10px) scale(1.04);
  border-color: rgba(0,212,255,0.4);
  box-shadow:
    0 0 12px rgba(0,212,255,0.2),
    0 0 30px rgba(0,212,255,0.15),
    0 0 50px rgba(0,212,255,0.08);
}

.skill-box:hover h4 { color: var(--white); }

@keyframes neonMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ================= PROJECTS ================= */
.featured-project {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(0,212,255,0.03), rgba(124,58,237,0.03));
}

.fp-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.fp-left h3 {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.2;
}
.fp-left p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 20px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tech-tags span {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--accent);
}

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

.github-btn, .demo-btn {
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.github-btn {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.github-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}
.demo-btn {
  background: var(--accent);
  color: #000;
}
.demo-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
}

.fp-img-box {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.fp-img-box img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.fp-accuracy {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
}
.fp-accuracy .big {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent3);
}
.fp-accuracy .small {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-icon { font-size: 32px; }
.project-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}
.project-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
}

/* MINI PROJECTS */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
}

.mini-card {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  transition: all 0.3s;
}
.mini-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}
.mini-info h4 {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.mini-info span {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.mini-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* ================= CONTACT ================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}
.contact-item:last-child { border-bottom: none; }
.contact-item:not(.no-link):hover .c-val { color: var(--accent); }

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}
.c-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 2px;
}
.c-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(124,58,237,0.05));
}
.contact-cta h3 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}
.contact-cta p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/* ================= FOOTER ================= */
footer {
  padding: 36px 8%;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.footer-logo span { color: var(--accent); }
footer p {
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 14px;
}
.footer-links a {
  color: var(--muted);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ================= TOP BUTTON ================= */
#topBtn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: none;
  display: none;
  transition: all 0.3s;
  z-index: 999;
}
#topBtn:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,212,255,0.35); }

/* ================= REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ================= ANIMATIONS ================= */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spinReverse { 100% { transform: rotate(-360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes floatTag { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 0.8; } }
@keyframes scrollWheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc { margin-inline: auto; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-right { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .featured-project { grid-template-columns: 1fr; }
  .fp-right { display: none; }
  .project-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  #menuBtn { display: block; }
  .cursor, .cursor-dot { display: none; }
  body { cursor: auto; }
  .btn { cursor: pointer; }
  #topBtn { cursor: pointer; }
}

@media (max-width: 600px) {
  .section { padding: 70px 6%; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .mini-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}
