:root {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-alt: rgba(15, 23, 42, 0.6);
  --surface: rgba(30, 41, 59, 0.45);
  --surface-hover: rgba(51, 65, 85, 0.55);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.35);
  --accent: #2dd4bf;
  --accent-glow: rgba(45, 212, 191, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);
  --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(45, 212, 191, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Mouse Glow Effect */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Container */
.container {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
}

/* Typography & Headings */
h1, h2, h3, h4 {
  color: #ffffff;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.35rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

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

/* Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition);
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
}

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

.logo:hover {
  transform: translateY(-1px);
  text-shadow: 0 0 12px var(--primary-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

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

.nav-link:hover {
  color: #ffffff;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0b1120;
  box-shadow: 0 10px 25px -5px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px var(--primary-glow);
  opacity: 0.95;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

/* Status Badge */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

/* Card System */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 100px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-actions .btn {
  white-space: nowrap;
}

/* Profile Card */
.hero-card {
  text-align: center;
  padding: 2.5rem 2rem;
  position: relative;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  box-shadow: 0 10px 25px var(--primary-glow);
  border: 2px solid rgba(255, 255, 255, 0.16);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-status {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid #0f172a;
}

.profile-name {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.profile-title {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.profile-location {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: #0b1120;
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* Scroll Down Indicator */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 3.5rem;
}

.section-heading h2 {
  margin-top: 0.5rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.highlights {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  font-weight: 500;
}

.highlight-item i {
  color: var(--accent);
  font-size: 1.1rem;
}

.stats-grid {
  display: grid;
  gap: 1.2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.skill-category {
  height: 100%;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-icon {
  font-size: 1.4rem;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.7rem;
  border-radius: var(--radius-sm);
}

.skill-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.skill-list i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-folder {
  font-size: 2rem;
  color: var(--primary);
}

.project-links {
  display: flex;
  gap: 0.8rem;
}

.project-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.project-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* Contact Box */
.contact-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  padding: 3.5rem;

  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-hover);
}

.contact-content {
  max-width: 600px;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 1rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 200px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: #0b1120;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

  .contact-box {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.8rem;
  }

  .contact-actions {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
