/* Modern Minimalistic Design with Creative Animations */
:root {
    --primary: #3b82f6;
    --secondary: #fef3c7;
    --accent: #60a5fa;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #94a3b8;
    --cream: #fef3c7;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.05;
    animation-duration: 20s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.circle {
    width: 300px;
    height: 300px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: 10%;
    left: 5%;
    animation-name: floatCircle;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 260px solid var(--cream);
    top: 60%;
    right: 5%;
    animation-name: floatTriangle;
}

.square {
    width: 200px;
    height: 200px;
    border: 2px solid var(--primary);
    top: 30%;
    right: 20%;
    animation-name: floatSquare;
    transform: rotate(45deg);
}

@keyframes floatCircle {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, 30px) rotate(90deg); }
    50% { transform: translate(0, 50px) rotate(180deg); }
    75% { transform: translate(-20px, 30px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatTriangle {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-30px, -20px) rotate(90deg); }
    50% { transform: translate(-50px, 0) rotate(180deg); }
    75% { transform: translate(-30px, 20px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatSquare {
    0% { transform: translate(0, 0) rotate(45deg); }
    25% { transform: translate(40px, -10px) rotate(135deg); }
    50% { transform: translate(0, -40px) rotate(225deg); }
    75% { transform: translate(-40px, -10px) rotate(315deg); }
    100% { transform: translate(0, 0) rotate(405deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--light);
}

.nav-link.active {
    color: var(--cream);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--cream);
    transform: translateX(-50%);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.language-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.language-link:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.language-link.active {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--cream);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.language-link span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
}

.language-link:hover span,
.language-link.active span {
    color: var(--light);
}

/* Main Content */
main {
    min-height: 100vh;
    padding: 100px 0;
}

.section {
    min-height: 100vh;
    padding: 100px 0;
    padding-top: 120px; /* Add extra top padding to ensure content is below header */
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(45deg, var(--cream), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

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

/* Home Section */
.hero {
    width: 100%;
    padding-top: 30px; /* Just slightly lower than original */
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.content {
    display: flex;
    align-items: center;
    gap: 4rem;
    animation: fadeInUp 1s ease-out;
    margin: auto;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Section */
.profile-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.profile-border {
    position: relative;
    padding: 8px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--cream), var(--accent));
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--dark);
    border: 5px solid var(--dark);
}

/* Text Section */
.text-section {
    flex: 1;
    animation: fadeInRight 1s ease-out 0.3s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.name {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--cream), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-top: 1rem;
}

.bio {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 140px;
    height: 60px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.7);
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    padding: 0 15px;
}

.social-link img {
    width: 30px;
    height: 30px;
    transition: var(--transition);
    margin-right: 10px;
}

.social-link span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Brand-specific hover effects */
.social-link.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.social-link.telegram:hover img,
.social-link.telegram:hover span {
    filter: brightness(0) invert(1);
}

.social-link.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-link.facebook:hover img,
.social-link.facebook:hover span {
    filter: brightness(0) invert(1);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}

.social-link.instagram:hover img,
.social-link.instagram:hover span {
    filter: brightness(0) invert(1);
}

.social-link.github:hover {
    background: #333;
    border-color: #333;
}

.social-link.github:hover img,
.social-link.github:hover span {
    filter: brightness(0) invert(1);
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.social-link.linkedin:hover img,
.social-link.linkedin:hover span {
    filter: brightness(0) invert(1);
}

.social-link.twitter:hover {
    background: #000;
    border-color: #000;
}

.social-link.twitter:hover img,
.social-link.twitter:hover span {
    filter: brightness(0) invert(1);
}

/* Contact */
.contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 50px;
    width: fit-content;
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    text-decoration: none;
}

.contact:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.email-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.email {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--light);
}

/* Certificates Section */
.certificates-section {
    background: rgba(15, 23, 42, 0.5);
}

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

.certificate-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.certificate-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
}

.certificate-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certificate-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-text {
    color: var(--gray);
    font-size: 1rem;
    text-align: center;
}

.certificate-info {
    padding: 1.5rem;
}

.certificate-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cream);
}

.certificate-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.view-certificate-btn {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.view-certificate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Awards Section */
.awards-section {
    background: rgba(15, 23, 42, 0.7);
}

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

.award-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.award-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--secondary);
}

.award-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
}

.award-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.award-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.award-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.award-placeholder .placeholder-text {
    color: var(--gray);
    font-size: 1rem;
    text-align: center;
}

.award-info {
    padding: 1.5rem;
}

.award-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cream);
}

.award-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.view-award-btn {
    background: linear-gradient(45deg, var(--secondary), var(--cream));
    color: var(--dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.view-award-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Volunteering Section */
.volunteering-section {
    background: rgba(15, 23, 42, 0.5);
}

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

.volunteering-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.volunteering-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.volunteering-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
}

.volunteering-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.volunteering-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.volunteering-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.volunteering-placeholder .placeholder-text {
    color: var(--gray);
    font-size: 1rem;
    text-align: center;
}

.volunteering-info {
    padding: 1.5rem;
}

.volunteering-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cream);
}

.volunteering-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.view-volunteering-btn {
    background: linear-gradient(45deg, var(--accent), var(--primary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.view-volunteering-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Modal for viewing certificates/awards */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 5% auto;
    background: var(--dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--light);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary);
}

#modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    z-index: 1000;
    display: none;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .text-section {
        align-items: center;
    }
    
    .bio {
        margin: 0 auto 2.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact {
        margin: 0 auto;
    }
    
    .name {
        font-size: 2.8rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .social-link {
        width: 130px;
        height: 55px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .certificates-grid,
    .awards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .language-selector {
        gap: 0.5rem;
    }
    
    .language-link {
        padding: 0.3rem 0.8rem;
    }
    
    .flag-icon {
        width: 20px;
        height: 20px;
    }
    
    .name {
        font-size: 2.3rem;
    }
    
    .bio {
        font-size: 1.1rem;
    }
    
    .social-link {
        width: 120px;
        height: 50px;
    }
    
    .social-link img {
        width: 25px;
        height: 25px;
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .certificate-info,
    .award-info,
    .volunteering-info {
        padding: 1rem;
    }
    
    .certificate-title,
    .award-title,
    .volunteering-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    
    .language-link span {
        font-size: 0.8rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .bio {
        font-size: 1rem;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 110px;
        height: 45px;
        padding: 0 10px;
    }
    
    .social-link span {
        font-size: 0.8rem;
    }
    
    .contact {
        padding: 0.8rem 1.2rem;
    }
    
    .email {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .certificates-grid,
    .awards-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }
}