/* ------------- Variables ------------- */
:root {
    --mprimary-color: #1b213e;
    --msecondary-color: #f54f1b;
    --mtertiary-color: #e6d5b7;
}

/* ------------- General Body Style ------------- */

body {
    margin: 0; 
    font-family: 'Inter', sans-serif;
    color: #e6d5b7;
    background: linear-gradient(135deg, #1E223D, #000318);
}

.hero,
.education-section,
.projects-section {
    min-height: 100vh; 
    background-color: transparent;
}

html {
    scroll-behavior: smooth ;
    background: #000318;
}

body > footer {
    margin-top: auto;
}

.highlight-word {
    color: var(--msecondary-color);
}

.nav-logo a.highlight-word,
.nav-links a.highlight-word {
    color: var(--msecondary-color);
}

.arrow {
    border: solid var(--mtertiary-color);
    border-width: 0 8px 8px 0;
    display: inline-block;
    padding: 30px;
    border-radius: 5px;
  
}

/* ------------- Navigation Bar ------------- */

.navbar {
    display: flex;
    position: fixed;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2vw;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
    background-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.875rem;
    color: var(--mtertiary-color);
}

.nav-logo a,
.nav-links a {
    text-decoration: none;
    font-size: clamp(1.125rem, 1rem + 1vw, 1.875rem);
    color: var(--mtertiary-color);
    transition: color 0.3s ease-in-out;
}

/* ------------- Navigation Bar Mobile Support ------------- */
.hamburger-menu {
    display: none;
    height: 29px;
    width: 88px;
    position: relative;
    background: transparent;
    border: none;
}

.hamburger-menu span {
    height: 6px;
    width: 55px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    margin-top: auto;
    margin-bottom: auto;
    background: var(--mtertiary-color);
    transition: all 0.3s;
}

.hamburger-menu span::before,
.hamburger-menu span::after {
    content: "";
    height: 6px;
    width: 100%;
    background-color: var(--mtertiary-color);
    position: absolute;
    left: 0;
    transition:all 0.3s;
}

.hamburger-menu span::after {
    top: 15px;
}

.hamburger-menu span::before {
    top: -15px;
}

.navbar.active .hamburger-menu span::after {
    top: 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.navbar.active .hamburger-menu span {
    background: none;
}

.navbar.active .hamburger-menu span::before {
    top: 0;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 2vw;
        background-color: color-mix(in srgb, var(--mprimary-color) 40%, black);
        flex-direction: column;
        align-items: center;
        width: 240px;
        padding: 0.5rem 0;
        margin-top: 10px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1.5rem;
        color: var(--mtertiary-color);
        text-decoration: none;
        transition: background-color 0.2s ease-in-out, color 0.3s ease-in-out;;
    }

    .nav-links li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .navbar.active .nav-links {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }
}

/* ------------- Hero ------------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 2.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 11.75rem);
    margin-bottom: 0.5px;
    white-space: nowrap;
}

.hero p {
    font-size: clamp(1.125rem, 1rem + 1vw, 1.875rem);
}

.hero .arrow{
    left: 40%;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    -webkit-transform: translateX(-50%) rotate(45deg);
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.hero .arrow.hidden {
    opacity: 0;
    visibility: hidden;
}

.hero-content {
    transform:translateY(-20%);
}

/* ------------- Hero Mobile Support ------------- */

@media (max-width: 768px){
    .hero {
        align-items: center;
        padding-left: 0;
    }

    .hero p, .hero h1 {
        text-align: center;
    }
}

/* ------------- Education ------------- */

.education-section {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding-top: 60px;
    position: relative;
}

.education-section .timeline-content h2 {
    margin: 0;
}

.timeline-container {
    
    position: relative;
    top: auto;
    transform: none;
    max-width: 90vw;
    width: 100%;
    box-sizing: border-box;
    height: 80vh;

    --dot-size: clamp( 30px , 10.8vh, 100px);
    --dot-top-offset: 20%;
    --dot-vertical-center: calc(var(--dot-top-offset) + (var(--dot-size) / 2));
    --arrow-and-date-top: calc(var(--dot-vertical-center) - 10px);
    --horizontal-padding: calc(var(--dot-size) + 10px);
    --date-margin: var(--dot-size);

}
.timeline-container::before {
    content: '';
    position: absolute;
    width: 5px;
    background-color: var(--mtertiary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 20vh; /* Adjust gap between the dots */
}

.timeline-content {
    margin-top: 10px;
    padding: 20px;
    background-color: var(--msecondary-color);
    border-radius: 8px;
    position: relative;
    color: var(--mtertiary-color);
}

.timeline-dot {
    position: absolute;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    border: 8px solid var(--mtertiary-color);
    background-color: #fff;
    object-fit: cover;
    top: var(--dot-top-offset);
    z-index: 9;
}

.timeline-date {
    position: absolute;
    top: var(--arrow-and-date-top);
    font-weight: bold;
    color: var(--mtertiary-color);
    white-space: nowrap;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: var(--horizontal-padding);
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: 100%;
    transform: translateX(-50%);
}

.timeline-item:nth-child(odd) .timeline-date {
    left: 100%;
    margin-left: var(--date-margin);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    top: var(--arrow-and-date-top);
    right: -10px;

    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--msecondary-color);
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: var(--horizontal-padding);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: 0;
    transform: translateX(-50%);
}

.timeline-item:nth-child(even) .timeline-date {
    right: 100%;
    margin-right: var(--date-margin);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: var(--arrow-and-date-top);
    left: -10px;

    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent var(--msecondary-color) transparent transparent;
}

/* ------------- Education Mobile Support ------------- */

@media (max-width: 768px) {
    .timeline-container {
        --timeline-margin: 15%;
        --content-padding: calc(var(--timeline-margin) + 70px);
        --content-box: 60vw;

        --mobile-dot-top: 40px;
        --mobile-arrow-size: 8px;
        --mobile-arrow-height: calc(var(--mobile-arrow-size) * 2)
    }
    .timeline-content {
        width: var(--content-box);
        box-sizing: border-box;
        font-size: 12px;
        position: relative;
        top: var(--mobile-dot-top);
        margin-top: 0;
    }
    .timeline-container::before {
        left: var(--timeline-margin);
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: var(--content-padding);
        padding-right: 0;
        box-sizing:border-box;
    }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: var(--timeline-margin);
        transform: translateX(-50%);
        top: var(--mobile-dot-top);
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -10px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--msecondary-color) transparent transparent;
        top: var(--mobile-dot-top);
    }

    .timeline-item .timeline-date,
    .timeline-item:nth-child(even) .timeline-date, 
    .timeline-item:nth-child(odd) .timeline-date {
        position: relative;
        top: var(--mobile-dot-top);
        transform: none;
        left: auto;
        right: auto;
        width: var(--content-box);
        margin: 0;
        text-align: center;
        margin-bottom: 5px;
    }
    
}

@media (max-height: 877px) {

    .timeline-container {
        position: relative;
        top: auto;
        transform: none;
    }

}

/* ------------- Projects ------------- */

.projects-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 90%;
    padding: 10px 4.2vw;
}

.project__container{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}
.project__panel {
    border-radius: 10px;
    height: clamp(645px, 65vh, 700px);
    width: clamp(300px, 18vw, 355px);
    background: var(--msecondary-color);
    padding: 1rem;
    color: var(--mtertiary-color);
    display: flex;
    flex-direction: column;
}

.project__panel-content {
    flex-grow: 1;
}

.projects-section img {
    width: 100%;
    height: 33%;
    border-radius: 10px;
}

.projects-section .social-icons a {
    color: var(--mtertiary-color);
    text-decoration: none;
    font-size: 1.8rem;
    transition: color 0.3s ease-in-out;
}

.projects-section .social-icons a:hover {
    color: var(--mprimary-color);
}

/* ------------- Footer ------------- */
.contact-section {
    padding: 30px 0;
    text-align: center;
    font-size: 25px;
    justify-content: center;
    align-items: center;
}

.contact-section p{
    margin: 0;
}

.contact-section a{
    text-decoration: none;
    color: white; 
}

.copy-email {
 padding: 18px   
}

.contact-section .social-icons {
    margin-bottom: 20px;
}

.contact-section .social-icons a {
    color: var(--msecondary-color);
    text-decoration: none;
    font-size: 1.8rem;
    margin: 0 15px;
    transition: color 0.3s ease-in-out;
}

.contact-section .social-icons a:hover {
    color: var(--mtertiary-color);
}