/* ==========================================
   PREFIX & RESET
   ========================================== */
:root {
  /* Colors - Dark Premium Palette */
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --secondary: #8b5cf6;
  --accent: #ec4899;

  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-highlight: rgba(255, 255, 255, 0.1);

  /* Gradients */
  --grad-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-text: linear-gradient(to right, #60a5fa, #c084fc, #f472b6);
  --grad-glow: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Transitions */
  --ease-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--ease-fast);
}

ul {
  list-style: none;
}

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

/* ==========================================
   UTILITIES & COMPONENTS
   ========================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--ease-smooth);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--grad-main);
  color: white;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  z-index: -1;
  transition: opacity var(--ease-smooth);
  opacity: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:hover::before {
  opacity: 1;
}

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

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ==========================================
   AMBIENT BACKGROUND
   ========================================== */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb-1 {
  width: 60vh;
  height: 60vh;
  background: var(--secondary);
  top: -10%;
  left: -10%;
  opacity: 0.15;
  animation: floatOrb 20s infinite ease-in-out;
}

.orb-2 {
  width: 50vh;
  height: 50vh;
  background: var(--primary);
  bottom: 10%;
  right: -5%;
  opacity: 0.15;
  animation: floatOrb 25s infinite ease-in-out reverse;
}

.orb-3 {
  width: 30vh;
  height: 30vh;
  background: var(--accent);
  top: 40%;
  left: 30%;
  opacity: 0.1;
  animation: floatOrb 18s infinite ease-in-out 2s;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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: 50px 50px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

@keyframes floatOrb {

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

  50% {
    transform: translate(30px, 50px);
  }
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--ease-smooth);
}

.nav-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-bracket {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

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

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

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

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

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 50px;
  color: #34d399;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.outline-text {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  color: transparent;
}

.hero-bio {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.highlight {
  color: var(--text-main);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

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

.social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--ease-bounce);
}

.social-icon:hover {
  background: var(--text-main);
  color: var(--bg-dark);
  transform: translateY(-4px) rotate(8deg);
  box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.2);
}

/* Visual Card Animation */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
  box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease;
}

.visual-card:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-snippet {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #a5b4fc;
}

.dots {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.dots span:nth-child(1) {
  background: #ef4444;
}

.dots span:nth-child(2) {
  background: #f59e0b;
}

.dots span:nth-child(3) {
  background: #10b981;
}

.float-animation {
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0) perspective(1000px) rotateY(-10deg) rotateX(5deg);
  }

  50% {
    transform: translateY(-20px) perspective(1000px) rotateY(-10deg) rotateX(5deg);
  }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
  padding: 8rem 0;
}

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

.section-header.center {
  text-align: center;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

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

.about-card {
  padding: 2.5rem;
  border-radius: var(--radius-md);
  transition: var(--ease-smooth);
}

.about-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #60a5fa;
  margin-bottom: 1.5rem;
}

.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-card p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects {
  padding: 5rem 0;
}

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

.project-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.project-media {
  position: relative;
  height: 240px;
  overflow: hidden;
}

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

.project-card:hover .project-media img {
  transform: scale(1.1);
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .media-overlay {
  opacity: 1;
}

.btn-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.project-card:hover .btn-icon {
  transform: translateY(0);
}

.btn-icon:hover {
  transform: scale(1.1) !important;
}

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-info h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-stack span {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills {
  padding: 8rem 0;
}

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  gap: 1rem;
  transition: var(--ease-bounce);
  cursor: default;
}

.skill-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-8px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.skill-item i {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.skill-item span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
  padding: 5rem 0 8rem 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  padding: 4rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.contact-content h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

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

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.method-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.method-item .icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transition: var(--ease-fast);
}

.method-item:hover .icon-circle {
  background: var(--primary);
  color: white;
}

.method-item label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.method-item span {
  font-size: 1.1rem;
  font-weight: 500;
}

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

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--ease-fast);
  outline: none;
}

.form-group textarea {
  resize: vertical;
}

.form-group label {
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  color: var(--text-dim);
  transition: var(--ease-fast);
  pointer-events: none;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
}

.form-group input:focus~label,
.form-group textarea:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:not(:placeholder-shown)~label {
  top: -0.6rem;
  left: 0.8rem;
  font-size: 0.8rem;
  background: var(--bg-dark);
  padding: 0 0.4rem;
  color: var(--primary);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-logo span {
  color: var(--primary);
}

.copyright {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ==========================================
   MEDIA QUERIES
   ========================================== */
@media (max-width: 968px) {
  :root {
    --container-width: 100%;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-bio {
    margin: 0 auto 2.5rem;
  }

  .social-links {
    justify-content: center;
  }

  .visual-card {
    max-width: 400px;
    margin: 0 auto;
  }

  .nav-links {
    display: none;
    /* Hide for now, mobile menu logic via JS */
  }

  .menu-btn {
    display: block;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }
}