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

:root {
  --bg: #080b14;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --accent3: #f472b6;
  --glow: rgba(124, 58, 237, 0.3);
}

html {
  scroll-behavior: smooth;
}

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

/* ===== INTRO OVERLAY ===== */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #030509;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#intro-overlay.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 2;
}

.intro-hex-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.3);
  animation: intro-spin 6s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.intro-hex-ring::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent);
  transform: translateX(-50%);
}

.intro-hex-ring.ring2 {
  width: 320px;
  height: 320px;
  border-color: rgba(6, 182, 212, 0.2);
  animation: intro-spin 9s linear infinite reverse;
}

.intro-hex-ring.ring2::before {
  background: var(--accent2);
  box-shadow: 0 0 12px var(--accent2), 0 0 24px var(--accent2);
}

.intro-hex-ring.ring3 {
  width: 390px;
  height: 390px;
  border-color: rgba(244, 114, 182, 0.12);
  animation: intro-spin 14s linear infinite;
}

.intro-hex-ring.ring3::before {
  background: var(--accent3);
  box-shadow: 0 0 12px var(--accent3), 0 0 24px var(--accent3);
}

@keyframes intro-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.intro-logo-wrap {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.15));
  border: 1px solid rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.25), inset 0 0 30px rgba(124,58,237,0.05);
}

.intro-logo-text {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  animation: intro-pulse-logo 2s ease-in-out infinite;
}

@keyframes intro-pulse-logo {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

.intro-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.8), transparent);
  animation: intro-scan 1.8s ease-in-out infinite;
  top: 0;
}

@keyframes intro-scan {
  0% { top: 0%; }
  100% { top: 100%; }
}

.intro-lines {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.intro-line {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  animation: intro-blink 1.2s var(--d, 0s) ease-in-out infinite;
}

@keyframes intro-blink {
  0%, 100% { opacity: 0.2; transform: scaleX(0.5); }
  50% { opacity: 1; transform: scaleX(1); }
}

.intro-label {
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: rgba(124,58,237,0.7);
  font-weight: 600;
  text-transform: uppercase;
  animation: intro-fade-in 0.5s ease both;
}

.intro-bar-wrap {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.intro-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.05s linear;
}

.intro-percent {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

@keyframes intro-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CUSTOM CURSOR ===== */
.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 58, 237, 0.6);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.2s ease;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease;
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

body:hover .cursor-follower {
  opacity: 1;
}

/* ===== BG GLOWS ===== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: float-glow 8s ease-in-out infinite;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(124, 58, 237, 0.12);
  top: -100px;
  left: -150px;
  animation-delay: 0s;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: rgba(6, 182, 212, 0.1);
  bottom: 100px;
  right: -100px;
  animation-delay: 3s;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: rgba(244, 114, 182, 0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
}

@keyframes float-glow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  background: rgba(8, 11, 20, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.1);
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-photo-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 20px auto;
  animation: fade-up 0.8s 0.05s ease both;
}

.hero-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 3px var(--accent), 0 0 30px rgba(124, 58, 237, 0.4);
  display: block;
}

.hero-photo-placeholder {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.4);
}

.hero-photo-wrapper::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent2), var(--accent3), var(--accent));
  z-index: -1;
  animation: spin-border 4s linear infinite;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
  color: #a78bfa;
  letter-spacing: 1px;
  margin-bottom: 20px;
  animation: fade-up 0.8s ease both;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  animation: fade-up 0.8s 0.1s ease both;
  letter-spacing: -1px;
}

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

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 20px auto 40px;
  max-width: 500px;
  min-height: 32px;
  animation: fade-up 0.8s 0.2s ease both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  animation: fade-up 0.8s 0.3s ease both;
}

.hero-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-orb 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-orb {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-line {
  width: 1.5px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  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; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.08);
}

/* ===== ABOUT ===== */
.about-grid {
  display: flex;
  justify-content: center;
}

.about-card {
  max-width: 600px;
  width: 100%;
  padding: 40px;
  text-align: center;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.about-text {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skill-tag {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #a78bfa;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.skill-tag:hover {
  background: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

/* ===== SOCIAL ===== */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px;
  text-decoration: none;
  color: var(--text);
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.social-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--card-color, rgba(124,58,237,0.15)), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-card:hover::before {
  opacity: 1;
}

.social-card:hover {
  transform: translateY(-6px);
}

.social-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
  z-index: 1;
}

.social-name {
  font-weight: 700;
  font-size: 1rem;
  z-index: 1;
}

.social-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 1;
}

/* ===== EDUCATION / TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
}

.timeline-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timeline-date {
  font-size: 0.78rem;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 3px 10px;
  border-radius: 50px;
}

/* ===== CV ===== */
.cv-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 44px;
  gap: 20px;
}

.cv-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cv-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cv-left h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cv-left p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cv-buttons {
  display: flex;
  gap: 14px;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.12);
}

.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.project-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.2);
}

.project-body {
  padding: 24px;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tag {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.project-link.github {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.project-link.demo {
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
}

.project-link:hover {
  transform: translateY(-2px);
}

.project-link.github:hover {
  background: rgba(255,255,255,0.1);
}

/* ===== CONTACT ===== */
.contact-card {
  text-align: center;
  padding: 60px 40px;
  max-width: 600px;
  margin: 0 auto;
}

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

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GOOGLE TRANSLATE ===== */
#google_translate_element {
  display: flex;
  align-items: center;
}

#google_translate_element .goog-te-gadget-simple {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

#google_translate_element .goog-te-gadget-simple a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
}

.goog-te-banner-frame, .skiptranslate > font {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 24px;
  }
  .nav-links {
    display: none;
  }
  .cv-card {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }
  .cv-left {
    flex-direction: column;
    text-align: center;
  }
}
