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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    user-select: none;
    -webkit-user-select: none;
}

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

/* Navigation Bar */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 36px 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-text-container {
    text-align: left;
}

.hero-text-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    white-space: nowrap;
}

.hero-text-container p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.hero-location {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #f2f4ff;
}

.hero-location i {
    color: #ffd166;
}

.profile-image-wrapper {
    margin-bottom: 0;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #f5f7ff;
    font-size: 0.92rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.social-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f0f2ff;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Features Section */
.features {
    padding: 60px 0;
    background-color: white;
}

.features h2 {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: left;
}

.feature-card p {
    text-align: left;
}

/* Page Content */
.page-content {
    padding: 60px 0;
    background-color: white;
    margin: 20px 0;
    border-radius: 8px;
}

.page-content h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.about-section h2,
.contact-section h2 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-section p,
.contact-info p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.skills-list {
    list-style-position: inside;
    margin-left: 1rem;
}

.skills-list li {
    margin: 0.5rem 0;
}

/* Single Page Sections */
.about-section-full {
    padding: 80px 0;
    background-color: white;
    scroll-margin-top: 80px;
}

.about-section-full h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.about-content h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: left;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

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

.skill-category {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    text-align: left;
}

.skill-category h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: left;
}

.skill-category p {
    color: #555;
    font-size: 0.95rem;
    margin-left: 0;
    text-align: left;
}

.contact-section-full {
    padding: 80px 0;
    background-color: #f9f9f9;
    scroll-margin-top: 80px;
}

.contact-section-full h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-quote {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}

.contact-quote p {
    font-size: 1.05rem;
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.contact-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: #764ba2;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.contact-email-inline {
    margin: 0.9rem 0 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.contact-email-text {
    display: inline-block;
    color: #1e3a8a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    border-right: 2px solid #2563eb;
    animation: typingEmail 3.2s steps(27, end) forwards, blinkCaret 0.85s step-end infinite;
}

@keyframes typingEmail {
    from {
        width: 0;
    }
    to {
        width: 31ch;
    }
}

@keyframes blinkCaret {
    50% {
        border-color: transparent;
    }
}

/* Experience Section */
.experience-section-full {
    padding: 80px 0;
    background-color: white;
    scroll-margin-top: 80px;
}

.experience-section-full h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 3rem;
    text-align: center;
}

.experience-item {
    background-color: #f9f9f9;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.experience-header {
    margin-bottom: 0;
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
}

.experience-header::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1rem;
    color: #3498db;
    transition: transform 0.25s ease;
}

.experience-item.open .experience-header::after {
    transform: rotate(180deg);
}

.experience-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.company {
    color: #3498db;
    font-weight: 600;
    margin: 0.5rem 0 0 0 !important;
}

.date {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0.3rem 0 0 0 !important;
}

.experience-details {
    margin: 0;
    max-height: 0;
    overflow: hidden;
    list-style-position: inside;
    transition: max-height 0.35s ease, margin-top 0.35s ease;
}

.experience-item.open .experience-details {
    margin-top: 1rem;
    max-height: 700px;
}

.experience-details li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

.experience-item p {
    text-align: justify;
}

/* Education Section */
.education-section-full {
    padding: 80px 0;
    background-color: #f9f9f9;
    scroll-margin-top: 80px;
}

.education-section-full h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 3rem;
    text-align: center;
}

.education-section-full h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.education-item {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.education-item h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.institution {
    color: #27ae60;
    font-weight: 600;
    margin: 0.3rem 0 !important;
}

.education-item .date {
    color: #7f8c8d;
    font-style: italic;
    margin: 0.3rem 0 1rem 0 !important;
}

.description {
    line-height: 1.6;
    color: #555;
}

.certifications-grid,
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cert-card,
.language-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 3px solid #3498db;
    text-align: center;
}

.cert-card,
.language-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 3px solid #3498db;
    text-align: center;
}

.language-card h4 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.language-card p {
    color: #7f8c8d;
    margin: 0;
}

/* Certificate Accordion */
.cert-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.cert-accordion-item {
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cert-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cert-accordion-header:hover {
    background-color: #f0f4f8;
}

.cert-accordion-item.open .cert-accordion-header {
    background-color: #eaf2fb;
    border-bottom: 1px solid #d0e8f7;
}

.cert-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cert-icon {
    font-size: 1.8rem;
    color: #3498db;
    flex-shrink: 0;
}

.cert-accordion-header h4 {
    color: #2c3e50;
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.cert-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin: 0;
}

.cert-toggle-icon {
    color: #3498db;
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.cert-accordion-item.open .cert-toggle-icon {
    transform: rotate(180deg);
}

.cert-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.cert-accordion-item.open .cert-accordion-body {
    max-height: 400px;
    overflow-y: auto;
}

.cert-inline-img {
    width: 100%;
    display: block;
    padding: 1rem;
    box-sizing: border-box;
    max-height: 380px;
    object-fit: contain;
}

.research-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.research-content p {
    color: #555;
    line-height: 1.6;
}

.research-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.research-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-section-full .contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-info {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 8px;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.contact-form {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-meta {
    display: block;
    margin-top: 0.45rem;
    color: #6b7280;
    font-size: 0.82rem;
}

.form-meta.limit-exceeded {
    color: #b42318;
    font-weight: 600;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#formMessage {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
}

#formMessage.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

#formMessage.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

.form-loader {
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 0.6rem;
    color: #334155;
    font-size: 0.92rem;
}

.form-loader.active {
    display: inline-flex;
}

.form-loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Privacy Policy Modal */
.privacy-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 1rem;
}

.privacy-modal.active {
    display: flex;
}

.privacy-modal-content {
    background: white;
    width: min(700px, 100%);
    max-height: 85vh;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.privacy-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.privacy-modal-close {
    border: none;
    background: transparent;
    color: white;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.privacy-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    line-height: 1.7;
    color: #333;
}

.privacy-modal-body p {
    margin: 0 0 0.85rem 0;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #2980b9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-menu a {
        font-size: 0.9rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text-container {
        text-align: center;
    }

    .hero-text-container h1 {
        font-size: 2rem;
        white-space: normal;
        line-height: 1.25;
    }

    .hero-text-container p {
        font-size: 1rem;
    }

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

    .features h2 {
        font-size: 2rem;
    }

    .contact-section,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .page-content h1,
    .about-section-full h1,
    .experience-section-full h1,
    .education-section-full h1,
    .contact-section-full h1 {
        font-size: 1.8rem;
    }

    .about-content h2,
    .education-section-full h2 {
        font-size: 1.5rem;
    }

    .skills-section {
        grid-template-columns: 1fr;
    }

    .certifications-grid,
    .languages-grid {
        grid-template-columns: 1fr;
    }

    .experience-item {
        padding: 1.5rem;
    }

    .education-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text-container h1 {
        font-size: 1.5rem;
        white-space: normal;
        line-height: 1.25;
    }

    .hero-text-container p {
        font-size: 0.95rem;
    }

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

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .about-section-full h1,
    .experience-section-full h1,
    .education-section-full h1,
    .contact-section-full h1 {
        font-size: 1.5rem;
    }

    .about-content h2,
    .education-section-full h2 {
        font-size: 1.3rem;
    }

    .skills-section {
        grid-template-columns: 1fr;
    }

    .experience-item {
        padding: 1.2rem;
        border-left-width: 3px;
    }

    .education-item {
        padding: 1.2rem;
    }

    .certifications-grid,
    .languages-grid {
        grid-template-columns: 1fr;
    }
}
