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

html {
    scroll-behavior: smooth;
}

:root {
  --primary: #2563eb;
  --bg: #f0f4ff;
  --text: #18181b;
}
body {
  background: var(--bg);
  color: var(--text);
}
.navbar, .footer {
  background: var(--bg);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.section-title, .nav-link, .project-title {
  color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #1d4ed8;
}

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

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

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

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #fbbf24;
    color: #1f2937;
}

.btn-primary:hover {
    background-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 4px 24px rgba(37,99,235,0.12);
  display: block;
}
@media (max-width: 768px) {
  .avatar {
    border-width: 4px;
  }
}

.avatar-placeholder {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

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

/* Section Styles */
section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background-color: #f8fafc;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-description {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #64748b;
    font-weight: 500;
}

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

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Projects Section */
.projects {
    background-color: #f8fafc;
}

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

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}
@media (max-width: 768px) {
  .project-img {
    max-width: 120px;
    max-height: 80px;
  }
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.project-link:hover {
    background-color: #2563eb;
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tech-tag {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: #64748b;
    font-size: 0.9rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

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

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 0;
}

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

.footer-text p {
    color: #9ca3af;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social .social-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-avatar {
        width: 250px;
        height: 250px;
    }

    .avatar-placeholder {
        width: 230px;
        height: 230px;
        font-size: 3rem;
    }

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

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

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

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

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

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
    }

    .avatar-placeholder {
        width: 180px;
        height: 180px;
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
  .hero-social {
    justify-content: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Smooth scrolling for all browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    .scroll-indicator {
        animation: bounce 2s infinite;
    }
    .nav-toggle {
        transition: transform 0.3s ease;
    }
    .nav-menu {
        transition: left 0.3s ease;
    }
    .hero::before {
        transition: opacity 0.3s ease;
    }
    .hero-content {
        transition: transform 0.3s ease;
    }
    .hero-title {
        transition: color 0.3s ease;
    }
    .hero-subtitle {
        transition: color 0.3s ease;
    }
    .hero-description {
        transition: color 0.3s ease;
    }
    .btn {
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    .btn-primary:hover {
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    .btn-secondary:hover {
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    .hero-avatar {
        transition: transform 0.3s ease;
    }
    .hero-avatar:hover {
        transition: transform 0.3s ease;
    }
    .project-card:hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .skill-card:hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .contact-item:hover {
        transition: transform 0.3s ease;
    }
    .footer-social .social-link:hover {
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    .footer-text p {
        transition: color 0.3s ease;
    }
    .section-title {
        transition: color 0.3s ease;
    }
    .section-subtitle {
        transition: color 0.3s ease;
    }
    .section-header {
        transition: margin-bottom 0.3s ease;
    }
    .hero-scroll {
        transition: opacity 0.3s ease;
    }
    .scroll-indicator {
        transition: color 0.3s ease, transform 0.3s ease;
    }
    
}

/* --- DARK MODE SUPPORT --- */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #18181b;
    color: #f3f4f6;
  }
  .container, .about, .projects, .contact-form, .skill-card, .stat, .project-card, .contact-item {
    background-color: #23232a !important;
    color: #f3f4f6 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
  }
  .navbar, .footer {
    background: rgba(24,24,27,0.95) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }
  .nav-link, .section-title, .section-subtitle, .footer-text p {
    color: #f3f4f6 !important;
  }
  .btn-primary {
    background-color: #fbbf24 !important;
    color: #18181b !important;
  }
  .btn-secondary {
    background-color: rgba(255,255,255,0.08) !important;
    color: #f3f4f6 !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
  }
  .btn-secondary:hover {
    background-color: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.3) !important;
  }
  .project-link, .social-link, .footer-social .social-link {
    background-color: rgba(255,255,255,0.08) !important;
    color: #f3f4f6 !important;
  }
  .project-link:hover, .social-link:hover, .footer-social .social-link:hover {
    background-color: #2563eb !important;
    color: #fff !important;
  }
  .tech-tag {
    background-color: #3730a3 !important;
    color: #e0e7ff !important;
  }
}

body.dark {
  background-color: #18181b;
  color: #f3f4f6;
}
body.dark .container, body.dark .about, body.dark .projects, body.dark .contact-form, body.dark .skill-card, body.dark .stat, body.dark .project-card, body.dark .contact-item {
  background-color: #23232a !important;
  color: #f3f4f6 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}
body.dark .navbar, body.dark .footer {
  background: rgba(24,24,27,0.95) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
body.dark .nav-link, body.dark .section-title, body.dark .section-subtitle, body.dark .footer-text p {
  color: #f3f4f6 !important;
}
body.dark .btn-primary {
  background-color: #fbbf24 !important;
  color: #18181b !important;
}
body.dark .btn-secondary {
  background-color: rgba(255,255,255,0.08) !important;
  color: #f3f4f6 !important;
  border: 2px solid rgba(255,255,255,0.2) !important;
}
body.dark .btn-secondary:hover {
  background-color: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.3) !important;
}
body.dark .project-link, body.dark .social-link, body.dark .footer-social .social-link {
  background-color: rgba(255,255,255,0.08) !important;
  color: #f3f4f6 !important;
}
body.dark .project-link:hover, body.dark .social-link:hover, body.dark .footer-social .social-link:hover {
  background-color: #2563eb !important;
  color: #fff !important;
}
body.dark .tech-tag {
  background-color: #3730a3 !important;
  color: #e0e7ff !important;
}

/* --- MODERN NAVIGATION --- */
.nav-toggle {
  z-index: 1100;
  background: none;
  border: none;
  outline: none;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-toggle:focus, .nav-toggle:hover {
  background: rgba(37,99,235,0.08);
}

.nav-menu {
  transition: left 0.3s cubic-bezier(.4,2,.6,1), background 0.3s;
}

.nav-menu.active {
  box-shadow: 0 10px 40px rgba(37,99,235,0.08);
}

/* --- BUTTONS & CARDS --- */
.btn, .skill-card, .stat, .project-card, .contact-item {
  box-shadow: 0 2px 8px rgba(37,99,235,0.06);
}
.btn-primary, .btn-secondary {
  letter-spacing: 0.03em;
}
.btn-primary {
  box-shadow: 0 4px 16px rgba(251,191,36,0.15);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-secondary:active {
  transform: scale(0.97);
}

/* --- GRID & FLEX REFINEMENTS --- */
.skills-grid, .projects-grid, .about-stats {
  gap: 2.5rem;
}
@media (max-width: 1024px) {
  .container {
    padding: 0 10px;
  }
  .skills-grid, .projects-grid, .about-stats {
    gap: 1.5rem;
  }
}

/* --- TYPOGRAPHY & SPACING --- */
body, .section-title, .section-subtitle, .hero-title, .hero-subtitle, .btn {
  letter-spacing: 0.01em;
}
.section-title {
  line-height: 1.1;
}
.section-subtitle {
  line-height: 1.5;
}

/* --- SMOOTHER TRANSITIONS --- */
* {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
}