@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --surface: rgba(30, 25, 45, 0.5);
  --surface-hover: rgba(40, 35, 60, 0.6);
  --primary: #a855f7;
  --primary-light: #c084fc;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --gradient-1: #a855f7;
  --gradient-2: #6366f1;
  --gradient-3: #3b82f6;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --border: rgba(100, 90, 140, 0.25);
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: rgba(168, 85, 247, 0.4);
}

/* Gradient mesh background */
.bg-mesh {
  position: relative;
}

.bg-mesh::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(at 80% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
}

/* Glow blobs */
.glow-blob {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.1;
}

.glow-blob-1 {
  top: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--gradient-1);
  animation: pulse 4s ease-in-out infinite;
}

.glow-blob-2 {
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: var(--gradient-2);
  animation: pulse 4s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.08; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.05); }
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card */
.glass {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.glass:hover {
  background: var(--surface-hover);
  border-color: rgba(168, 85, 247, 0.3);
}

/* Gradient button */
.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: #fff;
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2);
  transition: all 0.25s;
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  backdrop-filter: blur(8px);
  transition: all 0.25s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(100, 90, 140, 0.2);
  z-index: 100;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  padding: 0.5rem 1.25rem !important;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2)) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2) !important;
}

.nav-cta:hover {
  opacity: 0.9 !important;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2)) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

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

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

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-logo {
  max-width: min(90vw, 480px);
  height: auto;
  position: relative;
  filter: drop-shadow(0 0 80px rgba(168, 85, 247, 0.25));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary-light);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.mouse {
  width: 22px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { top: 6px; opacity: 1; }
  50% { top: 12px; opacity: 0.3; }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--primary-light);
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.back-to-top a:hover {
  background: var(--surface-hover);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Sections */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Work / Projects - Bento Grid */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.work-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.03), rgba(99, 102, 241, 0.03));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.work-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.05);
}

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

@media (min-width: 768px) {
  .work-card.span-7 { grid-column: span 7; }
  .work-card.span-5 { grid-column: span 5; }
  .work-card.span-12 { grid-column: span 12; }
}

.work-icon {
  width: 48px;
  height: 48px;
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.work-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.work-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-tech {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.work-tech span {
  padding: 0.25rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

.work-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

.work-card:hover .work-arrow {
  opacity: 1;
  transform: translateX(0);
}

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

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill-item {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-item:hover {
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.05);
}

.skill-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.2), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-item:hover::before {
  opacity: 1;
}

.skill-name {
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.skill-level {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.skill-bar {
  height: 6px;
  background: rgba(10, 10, 15, 0.3);
  border-radius: 3px;
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  transition: width 0.7s;
}

/* Contact */
.contact-section {
  padding-bottom: 4rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .contact-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(99, 102, 241, 0.15));
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-detail .icon svg {
  width: 16px;
  height: 16px;
  color: var(--primary-light);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.5em;
}

/* Footer */
footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer .forge-mark {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.5s ease-out;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Project pages */
.project-nav {
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(100, 90, 140, 0.2);
}

.project-nav a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

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

.project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.project-header-section {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.project-icon-large {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.project-header-section h1 {
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.project-section h2 {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.project-section p,
.project-section ul {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-section ul {
  margin-left: 1.5rem;
}

.project-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tech-tag {
  padding: 0.25rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.feature {
  margin-bottom: 2rem;
}

.feature h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.feature pre {
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.feature code {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 0 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
  }

  .hero-logo {
    height: 120px;
  }

  .scroll-indicator {
    display: none;
  }

  section {
    padding: 4rem 1.5rem;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 1rem 4rem;
  }

  .hero-logo {
    height: 90px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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