/* ==========================================
   GLOBAL STYLES & RESET
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color palette */
    --color-primary: #6366f1;      /* Indigo */
    --color-primary-dark: #4f46e5;
    --color-secondary: #ec4899;    /* Pink */
    --color-accent: #14b8a6;       /* Teal */
    
    --color-text: #1f2937;         /* Dark gray */
    --color-text-light: #6b7280;   /* Medium gray */
    --color-bg-light: #f9fafb;     /* Very light gray */
    --color-white: #ffffff;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   NAVIGATION BAR
   ========================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nav-brand a:hover {
    color: var(--color-primary-dark);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ==========================================
   HERO SECTION WITH ANIMATED BACKGROUND
   ========================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    
    /* Animated gradient background */
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #00f2fe 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Background image layer */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/AI.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
}

/* Dark overlay for better text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Keyframes for gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--color-white);
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary,
.btn-secondary,
.btn-github {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-github {
    background: #24292e;
    color: var(--color-white);
}

.btn-github:hover {
    background: #1a1e21;
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */

.about-section {
    background: var(--color-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */

.projects-section {
    background: var(--color-bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.project-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.project-description {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--color-bg-light);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.project-link:hover {
    color: var(--color-primary-dark);
}

.inline-link {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.inline-link:hover {
    color: var(--color-primary-dark);
}

/* ==========================================
   RESUME SECTION
   ========================================== */

.resume-section {
    background: var(--color-white);
    text-align: center;
}

.resume-text {
    max-width: 600px;
    margin: 0 auto var(--spacing-md) auto;
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact-section {
    background: var(--color-bg-light);
    text-align: center;
}

.contact-text {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg) auto;
    font-size: 1.125rem;
    color: var(--color-text-light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-normal);
    padding: 1rem;
}

.social-link:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.social-icon {
    width: 48px;
    height: 48px;
    transition: transform var(--transition-normal);
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

.social-link span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--color-text);
    color: var(--color-white);
    text-align: center;
    padding: 2rem;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    margin-bottom: 0;
}

.footer-links {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 0 0.25rem;
}

.footer-links a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-links a:focus {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (max-width: 480px) {
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-links {
        font-size: 0.8rem;
    }
}

/* ==========================================
   BREADCRUMBS
   ========================================== */

.breadcrumbs {
    background: var(--color-bg-light);
    padding: 1rem 0;
    margin-top: 70px;
}

.breadcrumbs ol {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.breadcrumbs a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .breadcrumbs {
        padding: 0.75rem 0;
    }
    
    .breadcrumbs ol {
        padding: 0 1rem;
    }
    
    .breadcrumbs li {
        font-size: 0.85rem;
    }
}

/* ==========================================
   PROJECTS PAGE SPECIFIC STYLES
   ========================================== */

.projects-page {
    padding-top: 5rem;
}

.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.project-detail {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--spacing-md);
}

.project-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.project-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-bg-light);
}

.meta-item {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.project-detail-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.project-detail-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.project-detail-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.project-detail-content li {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tech-item {
    padding: 0.5rem 1rem;
    background: var(--color-bg-light);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.project-links {
    margin-top: 2rem;
}

.project-divider {
    border: none;
    height: 1px;
    background: var(--color-bg-light);
    margin: var(--spacing-lg) 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet and below */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-detail {
        padding: var(--spacing-md);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
