:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #f5f7fa;
    --text-color: #2c3e50;
    --section-bg: #ffffff;
    --gradient-start: #2c3e50;
    --gradient-end: #3498db;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.header {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    margin-bottom: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.profile-image {
    width: 220px;
    height: 220px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    position: relative;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-image:hover img {
    transform: scale(1.1);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.header h1 {
    font-size: 2.8em;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.3em;
    margin: 15px 0 0;
    opacity: 0.95;
    font-weight: 300;
}

.section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 40px;
    background-color: var(--section-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.section h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 25px;
}

.section h3 {
    color: var(--secondary-color);
    font-size: 1.4em;
    margin-bottom: 15px;
}

.section p {
    margin: 15px 0;
    line-height: 1.8;
    color: #34495e;
    font-size: 1.1em;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
}

.social-icon {
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #ecf0f3);
    box-shadow: 5px 5px 15px #d1d9e6, -5px -5px 15px #ffffff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 8px 8px 20px #d1d9e6, -8px -8px 20px #ffffff;
}

.section:last-child p {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1em;
    justify-content: center;
}

.section:last-child i {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .section {
        margin: 0 20px 30px;
        padding: 25px;
    }
    
    .header {
        padding: 50px 15px;
    }
    
    .header h1 {
        font-size: 2.2em;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .social-links {
        gap: 20px;
    }
}

html {
    scroll-behavior: smooth;
}

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

.section {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

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

.skill-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.skill-name {
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background-color: #eef2f7;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.project-tags {
    margin-top: 20px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--background-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9em;
    margin: 5px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--secondary-color);
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 30px;
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: var(--secondary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.achievement-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.achievement-card i {
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .skills-container,
    .projects-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .section {
        max-width: 90%;
        padding: 30px;
        margin: 0 auto 30px;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 60px 20px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .header p {
        font-size: 1.1em;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .section {
        padding: 25px;
        margin: 0 20px 30px;
        border-radius: 15px;
    }

    .skills-container,
    .projects-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-links {
        gap: 15px;
    }

    .social-icon {
        padding: 12px;
        width: 20px;
        height: 20px;
        font-size: 20px;
    }
}

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

    .header h1 {
        font-size: 1.8em;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .section {
        padding: 20px;
        margin: 0 15px 25px;
    }

    .section h2 {
        font-size: 1.5em;
    }

    .timeline-item {
        padding-left: 20px;
    }

    .project-card,
    .achievement-card {
        padding: 20px;
    }

    .tag {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 1.6em;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .section {
        padding: 15px;
        margin: 0 10px 20px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 30px 20px;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin: 0 auto 15px;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .section {
        box-shadow: 0 5px 15px rgba(0,0,0,0.04);
    }
}

@media (hover: hover) {
    .social-icon:hover {
        transform: translateY(-5px);
    }

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

@media (hover: none) {
    .social-icon:active {
        transform: translateY(-2px);
    }

    .project-card:active {
        transform: translateY(-2px);
    }
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}