/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-surface: #0f0f1a;
  --bg-card: #14142a;
  --bg-card-hover: #1a1a3e;
  --accent-cyan: #00d4ff;
  --accent-purple: #7b2ff7;
  --accent-green: #00ff88;
  --accent-pink: #ff0080;
  --text-primary: #e8e8f0;
  --text-muted: #8888a0;
  --glass-bg: rgba(20, 20, 42, 0.6);
  --glass-border: rgba(0, 212, 255, 0.1);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-purple: 0 0 20px rgba(123, 47, 247, 0.3);
}

/* ===== BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 3px;
}

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== CYBER GRID ===== */
.cyber-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.6rem 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--accent-cyan);
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu .nav-link { font-size: 1.3rem; }

/* ===== PROFILE IMAGE ===== */
.profile-img-wrapper {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-img-wrapper::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-cyan),
    var(--accent-purple),
    var(--accent-green),
    var(--accent-cyan)
  );
  animation: spin-border 3s linear infinite;
  z-index: 0;
}
.profile-img-wrapper::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-cyan),
    var(--accent-purple),
    var(--accent-green),
    var(--accent-cyan)
  );
  opacity: 0.15;
  filter: blur(18px);
  animation: spin-border 3s linear infinite;
  z-index: 0;
}
.profile-img-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--bg-primary);
  position: relative;
  z-index: 1;
}

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

/* ===== ABOUT PHOTO GALLERY ===== */
.about-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 440px;
}
.about-gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  border: 2px solid rgba(0, 212, 255, 0.12);
  transition: all 0.4s;
}
.about-gallery img:hover {
  border-color: var(--accent-cyan);
  transform: scale(1.03);
  box-shadow: var(--glow-cyan);
}
.about-gallery img:first-child {
  grid-row: 1 / 3;
  height: 100%;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TERMINAL BADGE ===== */
.terminal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 50px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-green);
}
.terminal-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: transparent;
  color: var(--accent-cyan);
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid var(--accent-cyan);
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  animation: bounce-scroll 2s ease-in-out infinite;
}
.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}
@keyframes bounce-scroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ===== SECTION STYLES ===== */
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  font-family: 'JetBrains Mono', monospace;
}
.section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}

/* ===== ABOUT PHOTOS (Overlapping Layout) ===== */
.about-photos {
  position: relative;
  max-width: 420px;
  padding-bottom: 60px;
  padding-right: 40px;
}
.about-photo-main {
  width: 100%;
  height: 440px;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  border: 2px solid rgba(0, 212, 255, 0.12);
  display: block;
  position: relative;
  z-index: 1;
  transition: all 0.4s;
}
.about-photo-main:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 40px rgba(0, 212, 255, 0.12);
}
.about-photo-secondary {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 180px;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.15);
  z-index: 2;
  transition: all 0.4s;
}
.about-photo-secondary:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 212, 255, 0.25);
}
.stat-card {
  text-align: center;
  padding: 1.5rem;
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'JetBrains Mono', monospace;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ===== TERMINAL BLOCK ===== */
.terminal-block {
  background: #0d0d1a;
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.terminal-header {
  padding: 0.7rem 1rem;
  background: rgba(0, 212, 255, 0.05);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }
.terminal-body {
  padding: 1rem 1.2rem;
  line-height: 1.8;
}
.terminal-line { color: var(--text-muted); }
.terminal-line .prompt { color: var(--accent-green); }
.terminal-line .command { color: var(--accent-cyan); }
.terminal-line .output { color: var(--text-primary); }

/* ===== SKILLS ===== */
.skill-category-card {
  padding: 1.5rem;
}
.skill-category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin: 0.25rem;
  transition: all 0.3s;
}
.skill-tag:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.15);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple), transparent);
}
.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.55rem;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3), var(--glow-cyan);
}
.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}
.timeline-company {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.timeline-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.timeline-list {
  list-style: none;
  padding: 0;
}
.timeline-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.timeline-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* ===== PROJECT CARDS ===== */
.project-card {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.project-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tag {
  padding: 0.2rem 0.6rem;
  background: rgba(123, 47, 247, 0.1);
  border: 1px solid rgba(123, 47, 247, 0.2);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--accent-purple);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== WEBSITE CARDS ===== */
.website-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.website-card .website-name {
  font-weight: 600;
  font-size: 1rem;
}
.website-card .website-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s;
}
.website-card .website-link:hover {
  color: var(--accent-green);
  gap: 0.7rem;
}

/* ===== RESEARCH CARDS ===== */
.research-card {
  padding: 1.5rem;
  border-left: 3px solid var(--accent-green);
}
.research-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.research-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.research-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--accent-green);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.8rem;
}

/* ===== CONTACT ===== */
.contact-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 47, 247, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.contact-value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===== SOCIAL LINKS ===== */
.social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s;
}
.social-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--glow-cyan);
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--glass-border);
}
.footer-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes glitch {
  0%, 100% { text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--accent-pink); }
  25% { text-shadow: -2px -1px var(--accent-cyan), 2px 1px var(--accent-pink); }
  50% { text-shadow: 1px 2px var(--accent-cyan), -1px -2px var(--accent-pink); }
  75% { text-shadow: -1px 1px var(--accent-cyan), 1px -1px var(--accent-pink); }
}
.glitch-hover:hover { animation: glitch 0.3s ease-in-out; }

/* ===== TYPED CURSOR ===== */
.typed-cursor {
  color: var(--accent-cyan);
  font-weight: 100;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links-desktop { display: none !important; }
  .section-title { font-size: 1.7rem; }
  .profile-img-wrapper { width: 140px; height: 140px; }
  .stat-number { font-size: 1.6rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-item { padding-left: 1.5rem; }
  .timeline-dot { left: -2.05rem; width: 12px; height: 12px; }
  .website-card { flex-direction: column; align-items: flex-start; }
  .about-photos { max-width: 320px; padding-bottom: 50px; padding-right: 30px; }
  .about-photo-main { height: 340px; }
  .about-photo-secondary { width: 140px; height: 160px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0.8rem 1rem; }
  .section-title { font-size: 1.4rem; }
}
