/* --- Global Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0d0d0d;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    /* Added padding equal to nav height to prevent content from hiding behind fixed header */
    padding-top: 80px; 
}

/* --- Navigation Bar (FIXED/STICKY) --- */
nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 80px;
    background-color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 0 10px; 
    
    /* KEY FIX: Fixed Position */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 400;
    transition: color 0.3s, font-size 0.3s;
}

nav ul li a:hover {
    color: #00bcd4;
    font-size: 1.05rem;
}

.left {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00bcd4;
    white-space: nowrap; 
}

/* --- Main Sections --- */
main hr {
    border: 0;
    background: #00bcd4;
    height: 1px;
    margin: 60px 8% 40px 8%;
    opacity: 0.5;
}

.firstSection {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 100px 8%;
    min-height: 80vh;
}

.firstSection div {
    width: 50%;
    max-width: 600px;
}

.leftSection {
    font-size: 2.5rem;
    line-height: 1.3;
}

.leftSection h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.leftSection p {
    font-size: 1.2rem;
    color: #ccc;
    margin-top: 15px;
}

.leftSection .buttons {
    margin-top: 30px;
    display: flex; 
    flex-wrap: wrap;
    gap: 15px;
}

.leftSection .btn {
    padding: 10px 20px;
    background: #00bcd4;
    color: #0d0d0d;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.leftSection .btn:hover {
    background-color: #0097a7;
}

/* --- Skills & About Section Styling (Second Section) --- */

/* Added class to replace inline style on About Me <p> */
.about-text {
    font-size: 1.1rem; 
    line-height: 1.6; 
    color: #ccc;
}

/* Added class to replace inline style on Skills <div> */
.skill-buttons-container {
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: 30px;
}

.secondSection .btn {
    padding: 10px 15px; 
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: default;
    background-color: #333;
    color: white;
    transition: background-color 0.3s;
}

.secondSection .btn:hover {
    background-color: #444;
}

.rightSection {
    display: flex;
    justify-content: center;
}

.rightSection img {
    width: 100%; 
    max-width: 400px;
    border-radius: 50%;
    border: 5px solid #00bcd4;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5);
    transition: transform 0.5s;
}

.rightSection img:hover {
    transform: scale(1.05);
}

.cyan {
    color: #00bcd4;
}

.text-gray {
    color: #aaaaaa;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

#element {
    color: #00bcd4;
    font-size: 2rem;
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

/* --- Second Section (Experience/Timeline) --- */
.secondSection {
    max-width: 84vw;
    margin: auto;
    padding-bottom: 100px;
}

.secondSection h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.secondSection .box {
    position: relative;
    background: none;
    width: 100%;
    height: auto;
    margin: 70px 0;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap; 
}

.secondSection .vertical {
    position: relative;
    height: auto;
    width: 30%; 
    min-width: 250px; 
    flex-grow: 1; 
    padding: 20px;
    border: 1px solid #333;
    border-top: 3px solid #00bcd4;
    border-radius: 5px;
    transition: transform 0.3s, border-color 0.3s;
}

.secondSection .vertical:hover {
    transform: translateY(-5px);
    border-color: #00bcd4;
}

.image-top {
    width: 32px;
    position: absolute;
    top: -15px;
    left: 20px;
    background-color: #0d0d0d;
    padding: 5px;
    border-radius: 50%;
    border: 2px solid #00bcd4;
}

.vertical-title {
    position: static;
    width: 100%;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00bcd4;
    margin-top: 15px;
}

.vertical-subtitle {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 5px;
    display: block;
    font-weight: 400;
}

.vertical-desc {
    position: static;
    margin-top: 10px;
    color: #ccc;
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Contact Section Styling --- */
.contact-section {
    padding-bottom: 100px;
}

.contact-detail {
    font-size: 1.1rem; 
    color: #ccc; 
    margin-bottom: 10px;
}

.contact-buttons {
    margin-top: 20px;
}

.linkedin-btn {
    background-color: #333 !important; 
    color: white !important;
}

/* --- Footer --- */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 40px 0 10px 0;
    width: 100%;
    margin-top: 50px;
}

.footer {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    padding: 0 5%;
    gap: 30px; 
}

.footer h3 {
    color: #00bcd4;
    margin-bottom: 15px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
    color: #ccc;
    cursor: pointer;
}

.footer ul li:hover {
    color: #00bcd4;
}

/* Added class to replace inline style on footer links */
.footer-link {
    color: inherit; 
    text-decoration: none;
}

.footer-rights {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #333;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #aaa;
}
    
/* ------------------------------------- */
/* --- Media Queries (Responsiveness) --- */
/* ------------------------------------- */

/* Extra small devices (less than 600px) */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 15px 10px;
    }

    nav ul {
        flex-direction: row; 
        text-align: center;
        margin-top: 10px;
        width: 100%;
        justify-content: space-evenly; 
    }

    nav ul li {
        margin: 5px 0;
    }
    
    .left {
        font-size: 1.5rem;
    }

    .firstSection {
        padding: 50px 5%;
    }

    .leftSection h1 {
        font-size: 2rem;
    }
    
    .leftSection p {
        font-size: 1rem;
    }

    #element {
        font-size: 1.5rem;
    }

    .leftSection .buttons {
        justify-content: center;
    }

    .secondSection {
        max-width: 90vw;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer div {
        margin-bottom: 20px;
    }
}

/* Small devices (up to 768px) */
@media (max-width: 768px) {
    /* --- FIX: Navigation Bar for Tablets (768px) --- */
    nav {
        justify-content: space-between; 
        padding: 0 15px;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 0 8px; /* Reduced margin to fit all links */
    }
    /* --- END FIX --- */

    .firstSection {
        flex-direction: column-reverse;
        text-align: center;
        padding: 50px 5%;
    }

    .firstSection div {
        width: 100%;
        max-width: none;
    }

    .rightSection {
        margin-bottom: 30px;
    }
    
    .rightSection img {
         width: 80%;
         max-width: 300px; 
    }
    
    .leftSection h1 {
        font-size: 2.5rem;
    }
    
    .leftSection p {
        font-size: 1rem;
    }

    /* Timeline Adjustments */
    .secondSection .box {
        flex-direction: column;
        gap: 30px;
    }

    .secondSection .vertical {
        width: 100%;
        padding: 20px;
        border-left: 3px solid #00bcd4;
        border-top: 1px solid #333; 
    }

    .image-top {
        top: 10px;
        left: -15px;
        right: auto;
        z-index: 10;
    }

    .vertical-title {
        margin-top: 5px;
    }
}

/* Medium devices (769px to 1024px) - Specifically targets wider tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .firstSection {
        padding: 80px 5%;
    }
    
    .leftSection h1 {
        font-size: 3rem;
    }

    .secondSection .box {
        gap: 20px;
    }

    .secondSection .vertical {
        width: calc(50% - 10px); 
        min-width: 350px;
    }
}