/* Modern Portfolio Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: rgba(45, 55, 72, 0.9);
}

/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.05;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header Styles */
header {
    position: relative;
    text-align: center;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    overflow: hidden;
}

header::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.profile {
    position: relative;
    z-index: 2;
}

.profile img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
    margin-bottom: 20px;
}

.profile img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.profile h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile h3 {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    transition: var(--transition);
}

body.dark-mode .navbar {
    background: rgba(26, 32, 44, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a:hover::before {
    width: 80%;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-linkedin { background: linear-gradient(135deg, #0077b5, #005582); }
.btn-github { background: linear-gradient(135deg, #333, #24292e); }
.btn-xing { background: linear-gradient(135deg, #126567, #0d4a4c); }

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section.slide-in-left {
    transform: translateX(-100px);
}

.section.slide-in-right {
    transform: translateX(100px);
}

.section.slide-in-left.visible,
.section.slide-in-right.visible {
    transform: translateX(0);
}

.section.fade-in-up {
    transform: translateY(50px);
}

.section.fade-in-up.visible {
    transform: translateY(0);
}

.section.scale-in {
    transform: scale(0.9);
}

.section.scale-in.visible {
    transform: scale(1);
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    position: relative;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* About Section */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.skill-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-card h3 i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Education Section */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.education-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
}

/* Removed the small circle from education cards */

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.education-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.education-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.education-card p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-card {
    position: relative;
    margin-bottom: 50px;
    width: 45%;
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition);
}

.timeline-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-card:nth-child(even) {
    margin-left: 55%;
    transform: translateX(50px);
}

.timeline-card:nth-child(even).visible {
    transform: translateX(0);
}

.timeline-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-card:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: var(--bg-card);
}

.timeline-card:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: var(--bg-card);
}

.timeline-icon {
    position: absolute;
    top: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
}

.timeline-card:nth-child(odd) .timeline-icon {
    right: -75px;
}

.timeline-card:nth-child(even) .timeline-icon {
    left: -75px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.timeline-content h3::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timeline-content ul {
    margin-top: 15px;
    padding-left: 20px;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.company-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.company-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.company-link:hover::before {
    left: 100%;
}

.company-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.company-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.company-link:hover i {
    transform: translateX(3px);
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

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

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-buttons .btn {
    font-size: 0.85rem;
    padding: 8px 16px;
}

/* Documents Section */
.documents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.document-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    text-align: center;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.document-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.document-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.document-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-view, .btn-request {
    font-size: 0.85rem;
    padding: 8px 16px;
}

.btn-view {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.btn-request {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.contact-item a,
.contact-item span {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Loading Animation */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    margin-top: 80px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .profile h1 {
        font-size: 2.2rem;
    }
    
    .section h2 {
        font-size: 2.2rem;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .projects-container,
    .documents-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 100px 15px 50px;
    }
    
    .navbar-container {
        padding: 0 15px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        padding: 12px 20px;
        border-radius: 10px;
        font-size: 1.1rem;
    }
    
    .profile h1 {
        font-size: 2rem;
    }
    
    .profile h3 {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-card {
        padding: 20px;
    }
    
    .skill-card h3 {
        font-size: 1.2rem;
    }
    
    .education-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .education-card {
        padding: 25px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-card {
        width: calc(100% - 50px);
        margin-left: 50px;
        margin-bottom: 30px;
    }
    
    .timeline-card:nth-child(even) {
        margin-left: 50px;
    }
    
    .timeline-icon {
        left: -35px !important;
        right: auto !important;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .timeline-content::before {
        left: -20px !important;
        right: auto !important;
        border-right-color: var(--bg-card) !important;
        border-left-color: transparent !important;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    .timeline-content ul {
        margin-top: 15px;
    }
    
    .timeline-content li {
        margin-bottom: 8px;
        font-size: 0.95rem;
    }
    
    .projects-container,
    .documents-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card,
    .document-card {
        padding: 25px;
    }
    
    .project-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .document-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .document-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-item {
        padding: 20px;
        text-align: center;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 250px;
        justify-content: center;
        padding: 15px 24px;
        font-size: 1rem;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 80px 10px 40px;
    }
    
    .profile img {
        width: 140px;
        height: 140px;
        margin-bottom: 15px;
    }
    
    .profile h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .profile h3 {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .section {
        padding: 50px 15px;
    }
    
    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .about-text,
    .skill-card,
    .education-card,
    .timeline-content,
    .project-card,
    .document-card,
    .contact-item {
        padding: 20px;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .skill-card h3 {
        font-size: 1.1rem;
    }
    
    .skill-card p {
        font-size: 0.9rem;
    }
    
    .education-card h3 {
        font-size: 1.2rem;
    }
    
    .education-card p {
        font-size: 0.9rem;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    .timeline-content li {
        font-size: 0.9rem;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
    
    .project-card p {
        font-size: 0.9rem;
    }
    
    .document-card h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .nav-links {
        padding: 15px;
    }
    
    .nav-links a {
        padding: 10px 15px;
        font-size: 1rem;
    }
    
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    header {
        padding: 70px 8px 35px;
    }
    
    .profile img {
        width: 120px;
        height: 120px;
    }
    
    .profile h1 {
        font-size: 1.6rem;
    }
    
    .profile h3 {
        font-size: 0.9rem;
    }
    
    .section {
        padding: 40px 10px;
    }
    
    .section h2 {
        font-size: 1.6rem;
    }
    
    .about-text,
    .skill-card,
    .education-card,
    .timeline-content,
    .project-card,
    .document-card,
    .contact-item {
        padding: 15px;
    }
    
    .about-text p {
        font-size: 0.9rem;
    }
    
    .skill-card h3 {
        font-size: 1rem;
    }
    
    .skill-card p {
        font-size: 0.85rem;
    }
    
    .education-card h3 {
        font-size: 1.1rem;
    }
    
    .education-card p {
        font-size: 0.85rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-content p {
        font-size: 0.85rem;
    }
    
    .timeline-content li {
        font-size: 0.85rem;
    }
    
    .project-card h3 {
        font-size: 1.1rem;
    }
    
    .project-card p {
        font-size: 0.85rem;
    }
    
    .document-card h3 {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .scroll-to-top {
        bottom: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    header {
        padding: 60px 15px 30px;
    }
    
    .profile img {
        width: 100px;
        height: 100px;
    }
    
    .profile h1 {
        font-size: 1.8rem;
    }
    
    .profile h3 {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .nav-links {
        max-height: 60vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile img {
        border-width: 3px;
    }
    
    .timeline-icon {
        border-width: 2px;
    }
}
