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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Styles */
nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Section Styles */
section {
    margin-bottom: 4rem;
    background: var(--background);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

section:nth-child(even) {
    background: var(--background-alt);
}

section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Typography */
p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: var(--text-primary);
}

p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Lists */
ul {
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    position: relative;
}

section ul li {
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.75rem 1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* Contact Section Styling */
#contact ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
}

#contact ul li {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#contact ul li:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

#contact ul li strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#contact ul li a {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Image Container Improvements */
.image123 {
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: hidden;
}

.imgContainer img {
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.imgContainer img:hover {
    transform: scale(1.02);
}

.imgContainer p {
    margin-top: 1rem;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Project and Experience Cards */
.project-card, .experience-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.project-card:hover, .experience-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Skills Section */
#skills p {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

#skills p strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    nav ul {
        justify-content: center;
        gap: 0.25rem;
    }
    
    nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    main {
        padding: 1rem;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .image123 {
        gap: 1rem !important;
    }
    
    .imgContainer {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    #contact ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    nav ul li a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .image123 {
        flex-direction: column;
        align-items: center;
    }
    
    .imgContainer img {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
        box-shadow: none;
        border-bottom: 2px solid var(--primary-color);
    }
    
    nav {
        display: none;
    }
    
    section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    .image123 {
        display: none;
    }
}
