@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  --primary: #bb86fc;
  --secondary: #03dac6;
  --background: #050507;
  --surface: rgba(30, 30, 38, 0.4);
  --text: #ffffff;
  --text-dim: #a0a0a0;
  --accent: #ff00ff;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glow-primary: rgba(187, 134, 252, 0.35);
  --glow-secondary: rgba(3, 218, 198, 0.35);
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 10px;
    border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

body {
  font-family: 'Instrument Sans', sans-serif;
  background-color: var(--background);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-weight: 400;
}

h1,
h2,
h3,
.logo {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: 
    radial-gradient(circle at 10% 20%, rgba(187, 134, 252, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(3, 218, 198, 0.1) 0%, transparent 40%),
    #050507;
}

.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url("assets/hero-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  pointer-events: none;
  filter: blur(80px) saturate(2);
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--transition);
}

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

nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: transparent;
  transition: 0.4s var(--transition);
}

nav.scrolled {
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 10%;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(187, 134, 252, 0.2));
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 400;
  transition: 0.3s;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.social-sidebar {
  position: fixed;
  bottom: 0;
  left: 40px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 100;
  align-items: center;
}

.social-sidebar a {
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: 0.3s var(--transition);
}

.social-sidebar a:hover {
  color: var(--primary);
  transform: translateY(-5px);
}

.social-sidebar .line {
  width: 1px;
  height: 100px;
  background: var(--glass-border);
  margin-top: 0.5rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 16px;
  position: relative;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  transition: 0.3s var(--transition);
  left: 0;
}

.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-toggle span:nth-child(3) { bottom: 0; }

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px 10% 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
}

.hero-tagline {
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.hero h1 {
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1;
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero .description {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.4s var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 15px var(--glow-primary);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--glow-primary);
  filter: brightness(1.1);
}

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

.btn-outline:hover {
  background: var(--glass);
  border-color: var(--secondary);
  box-shadow: 0 0 15px var(--glow-secondary);
}

.hero-badges {
  display: flex;
  gap: 2rem;
  margin-top: 4rem;
}

.badge {
  text-align: left;
}

.badge-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary);
}

.badge-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

section {
  padding: 100px 10%;
}

.section-header {
  margin-bottom: 4rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  display: block;
}

.section-header h2 {
  font-size: 3rem;
  letter-spacing: -1px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.6s var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: 0.5s;
  z-index: -1;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.75rem;
  background: var(--surface);
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  color: var(--secondary);
}

.project-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  text-decoration: underline;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  height: 500px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.fun-fact-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 0, 255, 0.05);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
}

.fun-fact-box strong {
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.skill-item {
  background: var(--surface);
  padding: 1.2rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  font-weight: 500;
  transition: 0.3s;
}

.skill-item:hover {
  background: var(--primary);
  color: #000;
  transform: scale(1.05);
}

footer {
  padding: 30px 10%;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-dim);
  font-size: 1.5rem;
  transition: 0.3s;
}

.social-links a:hover {
  color: var(--primary);
}

@media (max-width: 1200px) {
  .hero h1 { font-size: 5rem; }
  section { padding: 80px 8%; }
}

@media (max-width: 1024px) {
  .social-sidebar { display: none; }
  .about-container { gap: 3rem; }
  .about-image { height: 450px; }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav { padding: 1rem 5%; }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 7, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transition: 0.6s var(--transition);
    z-index: 999;
    backdrop-filter: blur(20px);
  }

  .nav-links.active { right: 0; }
  .mobile-toggle { display: block; }
  .nav-cta { display: none; }

  .hero { align-items: center; text-align: center; padding: 100px 5% 60px; }
  .hero h1 { font-size: 3rem; }
  .hero .description { font-size: 1.1rem; margin: 0 auto 2.5rem; }
  .hero-badges { justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
  .badge { text-align: center; }
  
  .about-container { grid-template-columns: 1fr; gap: 2rem; }
  .about-image { height: 350px; }
  
  section { padding: 60px 5%; }
  .section-header { text-align: center; margin-bottom: 3rem; }
  .section-header h2 { font-size: 2.2rem; }

  .projects-grid { 
    grid-template-columns: 1fr; 
    gap: 1.5rem;
  }

  .project-card {
    text-align: center;
  }

  .project-tags {
    justify-content: center;
  }

  .project-link {
    justify-content: center;
  }

  .about-text {
    text-align: center;
  }
  
  .contact h2 { font-size: 2.5rem !important; }

  footer {
    justify-content: center;
    text-align: center;
    padding: 25px 5%;
  }
}

@media (max-width: 480px) {
  .logo { font-size: 1.2rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero-tagline { font-size: 0.75rem; }
  .section-header h2 { font-size: 1.8rem; }
  .contact h2 { font-size: 2rem !important; }

  .badge-num { font-size: 1.1rem; }
  .badge-label { font-size: 0.7rem; }
  .hero-badges { gap: 0.8rem; }
  .cta-group { flex-direction: column; width: 100%; }
  .btn { width: 100%; text-align: center; }
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .skill-item {
    width: 100%;
    text-align: center;
    padding: 0.8rem 0.5rem;
    font-size: 0.85rem;
  }
}
