:root {
  /* Backend Themed Color System */
  --primary-color: #0d6efd; /* A strong, professional blue */
  --primary-dark: #0a58ca;
  --primary-light: #3d8bfd;
  --secondary-color: #6c757d; /* Neutral gray for text and secondary elements */
  --accent-color: #198754; /* Green for success states, stability */
  --accent-secondary: #fd7e14; /* Orange for attention-grabbing elements */

  /* Text Colors */
  --text-primary: #212529; /* High contrast black for readability */
  --text-secondary: #495057;
  --text-light: #6c757d;
  --text-muted: #adb5bd;

  /* Background Colors */
  --background: #f8f9fa; /* Very light gray for a clean, modern look */
  --background-alt: #ffffff;
  --background-dark: #212529; /* Dark background for footer */
  --background-card: #ffffff;
  --background-overlay: rgba(33, 37, 41, 0.8);

  /* Borders & Shadows */
  --border-color: #dee2e6;
  --border-light: #f1f3f5;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --shadow-xl: 0 2rem 5rem rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px rgba(13, 110, 253, 0.3);

  /* Layout */
  --border-radius: 8px; /* Slightly more squared corners for a professional feel */
  --border-radius-sm: 6px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;

  /* Transitions & Animations */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-mono: 'JetBrains Mono', monospace;

  /* Z-index */
  --z-header: 1000;
  --z-loading: 9999;
  --z-modal: 1500;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loading);
  transition: var(--transition-slow);
}

.loading-content p {
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-header);
  transition: var(--transition);
  transform: translateY(0);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  border-bottom-color: var(--border-color);
}

.header.hidden {
  transform: translateY(-100%);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.nav-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: -0.25rem;
}

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

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

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

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

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

.nav-social {
  display: flex;
  gap: 0.5rem;
  border-left: 1px solid var(--border-color);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}

.social-icon {
  font-size: 1.1rem;
}

.nav-cta {
  background: var(--primary-color);
  color: white !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white !important;
}

.nav-cta:hover::after {
    width: 0; /* No underline for button */
}

.nav-progress {
    height: 2px;
    background: var(--primary-color);
    width: 0;
    position: absolute;
    bottom: -1px;
    left: 0;
    transition: width 0.1s linear;
}

/* Mobile Nav */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    z-index: calc(var(--z-header) + 1);
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--background-alt);
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
}

.hero-greeting-container {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.25rem;
  background-color: var(--secondary-color);
  margin-left: 4px;
  animation: blink 1s steps(1) infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  color: var(--primary-color);
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}
.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--background-alt);
  color: var(--primary-color);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--primary-color);
}

.hero-social {
  display: flex;
  gap: 1.5rem;
}
.social-link {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: var(--transition-fast);
}
.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-image .image-container {
  position: relative;
}

.hero-image .profile-img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--background);
  box-shadow: var(--shadow-xl);
}

.image-glow {
  position: absolute;
  inset: -10px;
  background: conic-gradient(from 90deg at 50% 50%, var(--primary-light), var(--accent-color), var(--primary-light));
  filter: blur(20px);
  z-index: -1;
  border-radius: 50%;
  animation: spin 10s linear infinite;
  opacity: 0.5;
}

.image-overlay {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow);
}
.status-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.status-text {
    font-weight: 600;
    font-size: 0.875rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}
.scroll-arrow {
    margin-top: 0.5rem;
}

/* Sections */
section {
    padding: 6rem 0;
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
#about {
    background: var(--background-alt);
}
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
.about-text .about-main {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.about-highlights {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}
.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}
.highlight-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Experience & Education (Timeline) */
.timeline {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
    padding: 1rem 0;
    border-left: 3px solid var(--border-color);
}
.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    padding-left: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--background-alt);
    border: 4px solid var(--primary-color);
}
.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.timeline-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: .5rem;
}
.timeline-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.timeline-content p {
    margin-bottom: 0.5rem;
}


/* Skills Section */
#skills {
    background: var(--background-alt);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}
.skill-card {
    background: var(--background-card);
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}
.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}
.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.skill-name {
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}
.project-card {
    background: var(--background-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}
.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.project-content {
    padding: 2rem;
}
.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.tech-tag {
    background: var(--background);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    padding: .25rem .75rem;
    border-radius: var(--border-radius-full);
    font-size: .8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}
.project-links {
    display: flex;
    gap: 1rem;
}
.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact Section */
#contact {
    background: var(--background-alt);
}
.contact-content {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}
.contact-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.contact-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--background-dark);
    color: var(--text-muted);
    padding: 4rem 0 2rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #343a40;
}
.footer-text h3 {
    color: white;
    font-size: 1.5rem;
}
.footer-text p {
    color: var(--text-light);
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-link {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}
.footer-link:hover {
    color: white;
}
.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Utility & Animations */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary-dark);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    50% { opacity: 0.5; }
}

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

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

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
    .hero-actions, .hero-social, .about-highlights {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-xl);
        transition: var(--transition-slow);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-social {
        padding-left: 0;
        margin-left: 0;
        border-left: none;
        flex-direction: column;
        align-items: flex-start;
    }
    .mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 30px;
        height: 24px;
    }
    .mobile-nav-toggle span {
        width: 100%;
        height: 3px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: var(--transition);
    }
    .mobile-nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}