/*===================================================================*/
/* 1. SCROLLBAR & BASE STYLES                                        */
/*===================================================================*/

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-thumb {
    background-color: var(--primary-color); /* Cyan */
    border-radius: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light); /* Dark background */
}

/* CSS Variables (Design Tokens) */
:root {
    --primary-color: #00bcd4; /* Cyan */
    --secondary-color: #3f51b5; /* Indigo*/
    --text-light: #f4f4f9;
    --text-dark: #1e1e2f;
    --bg-dark: #12121e;
    --bg-light: #1e1e2f;
    --card-bg: #1e1e2f;
    --transition-speed: 0.4s;
    --box-shadow-dark: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

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

section {
    padding: 80px 0;
    min-height: 60vh;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Button Component */
.button {
    background-color: var(--primary-color);
    color: var(--text-dark); 
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
    display: inline-block;
    text-decoration: none; /* Ensure buttons used as links are styled correctly */
}

.button:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(63, 81, 181, 0.6);
}

.button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}


/*===================================================================*/
/* 2. HEADER & NAVIGATION                                            */
/*===================================================================*/

header {
    background-color: var(--bg-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

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

header h1 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

header h1 span {
    display: block;
    font-size: 0.5em;
    font-weight: 300;
    color: var(--text-light);
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 400;
    transition: color var(--transition-speed), border-bottom var(--transition-speed);
}

nav a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}


/*===================================================================*/
/* 3. HERO SECTION (SUMMARY)                                         */
/*===================================================================*/

.hero-section {
    padding-top: 120px;
    padding-bottom: 120px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
}

.hero-section .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content h2 {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 600px;
    /* Styles for JS scroll animation */
    opacity: 0; 
    transition: opacity 1s ease-out;
}

.hero-content p[data-scroll-fade="in"].visible {
    opacity: 1;
}

.contact-info p {
    font-size: 0.9em;
    margin: 5px 0;
    color: #b0b0c0;
}

.hero-image {
    flex-shrink: 0;
    height: 250px;
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 200px;
    margin-bottom: 50px;
    border-radius: 50%;
    background-color: rgba(0, 188, 212, 0.1);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5); /* Subtle glow */
    transform: translateY(0);
}
img{
    height: 249px;
    width: 249px;
}
.hero-image:hover{
    color: var(--primary-color);
    transform: translatey(-10px);
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.7);
    animation: pulse 3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}


/*===================================================================*/
/* 4. SKILLS SECTION                                                 */
/*===================================================================*/

.skills-section {
    background-color: var(--bg-light);
}

.skill-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.skill-bubble {
    background-color: var(--card-bg);
    border: 2px solid var(--secondary-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: default;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow-dark);
    color: var(--text-light);
    /* Styles for JS animation */
    opacity: 0; 
    transform: scale(0.5); 
}

.skill-bubble:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.5);
    border-color: var(--primary-color); 
}


/*===================================================================*/
/* 5. EXPERIENCE & CERTIFICATIONS (TIMELINE)                         */
/*===================================================================*/

.timeline-section {
    padding-bottom: 120px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0; 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item[data-scroll-animate="fade-left"] {
    left: 0;
    transform: translateX(-100px);
}

.timeline-item[data-scroll-animate="fade-right"] {
    left: 50%;
    transform: translateX(100px);
}

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

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border-left: 5px solid var(--primary-color);
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-meta {
    font-style: italic;
    color: #999;
    margin-bottom: 10px;
}

.timeline-content ul {
    list-style-type: disc;
    margin-left: 20px;
    font-size: 0.95em;
}


/*===================================================================*/
/* 6. EDUCATION SECTION                                              */
/*===================================================================*/

.education-section {
    background-color: var(--bg-dark);
}

.education-cards {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.education-cards .card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    width: 30%;
    text-align: center;
    border-bottom: 5px solid var(--secondary-color);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
    /* Styles for JS scroll animation */
    opacity: 0; 
    transform: translateY(50px); 
}

.education-cards .card.visible {
    opacity: 1;
    transform: translateY(0);
}

.education-cards .card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.education-cards .card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.education-cards .card .date {
    font-style: italic;
    color: #aaa;
    margin-top: 10px;
}


/*===================================================================*/
/* 7. ACHIEVEMENTS SECTION                                           */
/*===================================================================*/

.achievements-section {
    background-color: var(--bg-light);
}

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

.achievement-item {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--box-shadow-dark);
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
    /* Styles for JS scroll animation */
    opacity: 0; 
    transform: scale(0.9); 
}

.achievement-item.visible {
    opacity: 1; 
    transform: scale(1); 
}

.achievement-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-color); 
}

.achievement-item i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease; 
}

.achievement-item:hover i {
    transform: rotateY(180deg);
}

.achievement-item h4 {
    margin-bottom: 10px;
    color: var(--text-light);
}


/*===================================================================*/
/* 8. CONTACT SECTION                                                */
/*===================================================================*/

.contact-section {
    background-color: var(--bg-dark);
}

.contact-section .subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: #b0b0c0;
    font-size: 1.1em;
}

.contact-card-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text-light);
    /* Styles for JS scroll animation */
    opacity: 0; 
    transform: translateY(20px); 
}
.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.3);
}

.contact-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-card h3 {
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-card p {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
}

.contact-card span {
    display: block;
    font-size: 0.8em;
    margin-top: 10px;
    color: #999;
}


/*===================================================================*/
/* 9. FOOTER                                                         */
/*===================================================================*/

footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--text-light);
}


/*===================================================================*/
/* 10. RESPONSIVE DESIGN (Media Queries)                             */
/*===================================================================*/

/* --- Tablet (Max-width 768px) --- */
@media (max-width: 768px) {
    /* Base Adjustments */
    section {
        padding: 60px 0;
        min-height: auto;
    }

    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    /* Header */
    header .container {
        flex-direction: column;
        text-align: center;
    }
    nav {
        margin-top: 10px;
    }
    nav a {
        margin: 0 10px;
    }

    /* Hero */
    .hero-section {
        padding-top: 80px;
        padding-bottom: 200px;
    }
    .hero-section .container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .hero-content h2 {
        font-size: 2.5em;
    }
    .hero-image {
        margin-left: 0; /* Center image */
        margin-bottom: 0;
        height: 199px;

    }
    img{
        height: 198px;
        width: 198px;
    }

    /* Timeline */
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        left: 0 !important;
        transform: translateX(0) !important;
    }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 10px;
        right: auto;
    }

    /* Education */
    .education-cards {
        flex-direction: column;
        gap: 20px;
    }
    .education-cards .card {
        width: 100%;
    }
    
    /* Achievements */
    .achievements-list {
        grid-template-columns: 1fr 1fr; 
    }

    /* Contact */
    .contact-card {
        width: 45%; 
    }
}

/* --- Mobile Phone (Max-width 480px) --- */
@media (max-width: 480px) {
    /* Base Adjustments */
    body {
        font-size: 15px;
    }
    .container {
        padding: 0 10px;
    }
    section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.8em;
    }

    /* Navigation */
    nav {
        flex-wrap: wrap;
    }
    nav a {
        margin: 5px 8px;
        font-size: 0.9em;
    }

    /* Hero */
    .hero-content h2 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .hero-image {
        width: 200px;
        height: 200px;
    }
    img{
        height: 199px;
        width: 199px;
    }
    /* Skills */
    .skill-bubble {
        font-size: 1em;
        padding: 8px 15px;
    }
    
    /* Timeline */
    .timeline-content {
        padding: 15px 20px;
    }
    
    /* Achievements */
    .achievements-list {
        grid-template-columns: 1fr; /* Single column */
    }
    
    /* Contact */
    .contact-card {
        width: 100%; /* Full width */
    }
}


/*===================================================================*/
/* 11. UTILITY CLASSES (Animation)                                   */
/*===================================================================*/

/* Scroll Animation Styles */
[data-scroll-animate] {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Delay Utility for staggered animation (applied via JS) */
[data-scroll-delay="200"] { transition-delay: 0.2s; }
[data-scroll-delay="400"] { transition-delay: 0.4s; }
[data-scroll-delay="600"] { transition-delay: 0.6s; }