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

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

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Properties - Minimal Aesthetic Color Scheme */
:root {
    --primary-color: #334155;
    --secondary-color: #1e293b;
    --accent-color: #3b82f6;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

nav:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Sections */
section {
    padding: 8rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* About Section */
#about {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/background.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.03;
    z-index: -1;
}

.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
    border: 4px solid white;
    position: relative;
    overflow: hidden;
}

.profile-pic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.profile-pic:hover::before {
    transform: translateX(100%);
}

.profile-pic:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.profile-pic:hover {
    content: url('images/nerd.png');
}

.bio {
    max-width: 600px;
    text-align: left;
}

.bio h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.bio h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.bio p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.bio a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.bio a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.bio a:hover::after {
    width: 100%;
}

/* Projects Section */
#projects {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

#projects h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    z-index: 1;
    position: relative;
}

.project-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-item:hover::before {
    transform: scaleX(1);
}

.project-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(59, 130, 246, 0.2);
}

.project-item.has-modal {
    cursor: pointer;
}

.project-header {
    position: relative;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-header .location {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.language-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.project-item:hover .language-tag {
    transform: scale(1.1);
    background: #2563eb;
}

.project-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.project-item p b {
    color: var(--accent-color);
    font-weight: 600;
}

/* Classes Section */
#classes {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

#classes h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
}

.class-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

.class-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.class-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.class-item:hover::before {
    left: 100%;
}

.class-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Contact Section */
#contact {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

#contact h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

#contact p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

.contact-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-icon {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-icon:hover::before {
    transform: scaleX(1);
}

.contact-icon:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.2);
}

.contact-icon i {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
    box-shadow: var(--shadow-light);
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--accent-color);
    display: inline-block;
}

footer a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    nav ul {
        gap: 1rem;
        padding: 0 1rem;
    }
    
    nav ul li a {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .profile-pic {
        width: 200px;
        height: 200px;
    }
    
    .bio h2 {
        font-size: 2.5rem;
    }
    
    .project-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .class-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-icons {
        gap: 2rem;
    }
    
    .contact-icon {
        font-size: 2.5rem;
        padding: 1rem;
    }
    
    section {
        padding: 6rem 1rem;
    }
    
    #projects h2,
    #classes h2,
    #contact h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .about-container {
        padding: 1rem;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    .bio h2 {
        font-size: 2rem;
    }
    
    .project-item {
        padding: 1.5rem;
    }
    
    .contact-icons {
        gap: 1.5rem;
    }
    
    .contact-icon {
        font-size: 2rem;
        padding: 0.8rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Selection Styling */
::selection {
    background: var(--accent-color);
    color: white;
}

::-moz-selection {
    background: var(--accent-color);
    color: white;
}

/* Modal Styles - Updated to match new aesthetic */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.modal-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.modal-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.modal-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.modal-image:hover {
    transform: scale(1.02);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close:hover,
.close:focus {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}