/* ========================================
   Design Tokens
   ======================================== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-muted: #55556a;
  --accent: #60a5fa;
  --accent-glow: rgba(96, 165, 250, 0.15);
  --gradient: linear-gradient(135deg, #60a5fa, #a78bfa);
  --gradient-text: linear-gradient(135deg, #60a5fa, #c084fc);
  --success: #34d399;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 72px;
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cv-btn {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  border-bottom: 1px solid var(--glass-border);
}

.mobile-menu.active {
  display: flex;
}

.mobile-link {
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 0 40px;
}

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

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.4;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: rgba(96, 165, 250, 0.15);
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  bottom: -50px;
  left: -100px;
  background: rgba(167, 139, 250, 0.1);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  margin-bottom: 32px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
}

.hero-greeting {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-name {
  display: block;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 5px;
}

.hero-title {
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent);
  margin-bottom: 16px;
  min-height: 1.5em;
}

.typed-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 24px rgba(96, 165, 250, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.hero-social {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-social a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.hero-social a svg {
  width: 20px;
  height: 20px;
}

.hero-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-indicator svg {
  width: 16px;
  height: 16px;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ========================================
   Sections Common
   ======================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--accent-glow);
  border: 1px solid rgba(96, 165, 250, 0.15);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

.about-photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--glass-border);
  padding: 4px;
  background: var(--glass-bg);
}

.about-photo {
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  background: #1a1a2e;
}

.about-photo-card {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(167, 139, 250, 0.1));
}

.hero-social a svg {
  fill: currentColor;
}

.about-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  justify-content: center;
}

.about-location svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.stat-card {
  text-align: center;
  padding: 20px 8px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

/* ========================================
   Experience / Timeline
   ======================================== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--glass-border));
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
  padding: 24px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-company {
  font-size: 1.15rem;
  font-weight: 700;
}

.timeline-role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-details {
  margin-bottom: 16px;
}

.timeline-details li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}

.timeline-details li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.timeline-details li strong {
  color: var(--text-primary);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(96, 165, 250, 0.15);
  font-weight: 500;
}

/* ========================================
   Portfolio Section
   ======================================== */
.portfolio-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.portfolio-card {
  overflow: hidden;
}

.portfolio-card.hidden {
  display: none;
}

.portfolio-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img-wrapper img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: var(--transition);
}

.portfolio-link svg {
  width: 20px;
  height: 20px;
}

.portfolio-card:hover .portfolio-link {
  transform: scale(1);
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portfolio-tags span {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

/* ========================================
   Skills Section
   ======================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-category {
  padding: 32px;
}

.skill-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(96, 165, 250, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.skill-icon svg {
  width: 24px;
  height: 24px;
}

.skill-category h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-card svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.contact-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-card span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-relocation {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-relocation svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 {
  animation-delay: 0.15s;
}

.delay-2 {
  animation-delay: 0.3s;
}

.delay-3 {
  animation-delay: 0.45s;
}

.delay-4 {
  animation-delay: 0.6s;
}

.delay-5 {
  animation-delay: 0.75s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-photo-wrapper {
    max-width: 220px;
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    padding-left: 44px;
  }

  .timeline-dot {
    left: 9px;
  }

  .hero-description br {
    display: none;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 64px 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}