/* GENERAL STYLING */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --color-bg-dark:    #1C3347;
    --color-bg-mid:     #2A4D6A;
    --color-accent:     #4A7090;
    --color-bg-light:   #E9EAEB;
    --color-text-light: #F0F4F8;
    --color-text-muted: #A8C0D0;
    --color-text-dark:  #1C3347;
    --radius-card:      1.25rem;
    --transition:       300ms ease;
}

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

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

html {
    scroll-behavior: smooth;
}

p {
    color: var(--color-text-dark);
}

/* ANIMATIONS AND TRANSITIONS */

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

@keyframes scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 112, 144, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 112, 144, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 112, 144, 0);
    }
}

a,
.btn,
.icon {
    transition: all var(--transition);
}

.nav-links a {
    position: relative;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.section__text__p1,
.title,
.section__text__p2,
.btn-container,
#socials-container {
    animation: fadeIn 1s ease forwards;
}

.section__pic-container {
    animation: float 3s ease-in-out infinite;
}

.title {
    animation-delay: 0.2s;
}

.section__text__p2 {
    animation-delay: 0.4s;
}

.btn-container {
    animation-delay: 0.6s;
}

#socials-container {
    animation-delay: 0.8s;
}

.icon:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.arrow {
    animation: pulse 2s infinite;
}

/* Scroll animation classes */
.animate-in {
    animation: fadeIn 0.6s ease forwards;
}

.details-container,
article,
.section__text,
.btn-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
    display: flex;
}

nav {
    justify-content: space-around;
    align-items: center;
    height: 70px;
    background-color: rgba(28, 51, 71, 0.92);
    border-radius: 15px;
    padding: 0 2rem;
    margin: 1rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

a {
    color: inherit;
    text-decoration: none;
    position: relative;
}

a:hover {
    color: var(--color-text-light);
    transform: translateY(-2px);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

.logo {
    font-size: 2rem;
    color: var(--color-text-light);
    font-weight: 600;
}

.logo:hover {
    cursor: default;
}

/* Particle js */

#particle-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-color: var(--color-bg-dark);
}

.main-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HAMBURGER MENU */

#hamburger-nav {
    display: none;
    background-color: rgba(28, 51, 71, 0.92);
    border-radius: 15px;
    padding: 0.5rem 2rem;
    margin: 1rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.hamburger-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span {
    height: 2px;
    width: 100%;
    background-color: var(--color-text-light);
    transition: all 0.3s ease-in-out;
    border-radius: 5px;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-bg-dark);
    width: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    border: 1px solid rgba(74, 112, 144, 0.3);
}

.menu-links a {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.menu-links a:hover {
    background-color: var(--color-bg-mid);
    color: var(--color-text-light);
}

.menu-links li {
    list-style: none;
}

.menu-links.open {
    max-height: 300px;
    width: 200px;
    padding: 10px;
    opacity: 1;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
    transform: none;
}

.hamburger-icon span:first-child {
    opacity: 1;
}

.hamburger-icon span:last-child {
    transform: none;
}

/* SECTIONS */

section {
    padding: 2rem 0;
    min-height: 80vh;
    margin: 0 auto;
    max-width: 1200px;
    box-sizing: border-box;
    animation: fadeIn 1s ease forwards;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-container {
    display: flex;
}

/* PROFILE SECTION */

#profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    min-height: 80vh;
    padding: 2rem 0;
    flex-direction: row;
}

#profile p,
#profile .section__text__p1,
#profile .section__text__p2 {
    color: var(--color-text-muted);
}

#profile .title {
    background: linear-gradient(to right, var(--color-text-light), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.5s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.profile-pic:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.section__pic-container {
    display: flex;
    height: 350px;
    width: 350px;
    margin-left: 2rem;
    border-radius: 50%;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 4px solid var(--color-accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section__pic-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(74, 112, 144, 0.4);
}

.section__text {
    align-self: center;
    max-width: 500px;
    flex: 1;
    text-align: center;
    padding-right: 2rem;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
}

.section__text__p2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--color-text-dark), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
    letter-spacing: 1px;
}

#socials-container {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    gap: 1rem;
}

/* ICONS */

.icon {
    cursor: pointer;
    height: 2rem;
    opacity: 0.8;
    transition: all var(--transition);
}

.icon:hover {
    opacity: 1;
}

/* BUTTON */

.btn-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    font-weight: 600;
    transition: all var(--transition);
    padding: 1rem;
    width: 8rem;
    border-radius: 2rem;
    border: 2px solid var(--color-accent);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(74, 112, 144, 0.25);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 112, 144, 0.4);
    color: var(--color-text-light);
}

.btn-color-1 {
    background-color: var(--color-accent);
    color: var(--color-text-light);
}

.btn-color-1:hover {
    background-color: var(--color-bg-mid);
    border-color: var(--color-bg-mid);
    color: var(--color-text-light);
}

.btn-color-2 {
    background: transparent;
    border-color: var(--color-text-light);
    color: var(--color-text-light);
}

.btn-color-2:hover {
    background-color: rgba(240, 244, 248, 0.12);
    border-color: var(--color-text-light);
}

.btn-container {
    gap: 1rem;
}

/* ABOUT SECTION */

#about {
    position: relative;
}

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
}

.about-containers,
.about-details-container {
    display: flex;
}

.about-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: var(--color-bg-mid);
    border-radius: 2rem;
    border: 1px solid rgba(74, 112, 144, 0.3);
    text-align: center;
    transition: all 0.3s ease;
    transform: translateY(0);
    color: var(--color-text-light);
}

.details-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(28, 51, 71, 0.2);
    border-color: var(--color-accent);
}

.details-container p,
.details-container h2,
.details-container h3 {
    color: var(--color-text-light);
}

.section-container {
    gap: 4rem;
    height: 80%;
}

.text-container p {
    max-width: 65ch;
}

#about .section__pic-container {
    height: 350px;
    margin: 0.5rem;
    padding: 0;
    box-shadow: 0 8px 30px rgba(28, 51, 71, 0.25);
}

.contact-info-container p {
    font-size: larger;
    color: var(--color-text-dark);
}

.contact-icon {
    cursor: default;
}

.icon.contact-icon:hover {
    transform: scale(1.1);
}

.contact-info-lower-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    border-radius: 2rem;
    border: 1px solid rgba(74, 112, 144, 0.3);
    background: var(--color-bg-mid);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-info-lower-container p {
    color: var(--color-text-muted);
}

/* ---- About Stats (about.html) ---- */

.about-stats {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
    background: rgba(28, 51, 71, 0.06);
    border: 1px solid rgba(74, 112, 144, 0.2);
    border-radius: var(--radius-card);
    padding: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-bg-mid);
    border: 1px solid rgba(74, 112, 144, 0.3);
    border-radius: var(--radius-card);
    padding: 1rem 1.5rem;
    min-width: 90px;
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ---- Tech Stack Filter (tech-stack.html) ---- */

.filter-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 2rem;
    border: 2px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-text-light);
    box-shadow: 0 4px 12px rgba(74, 112, 144, 0.3);
}

.details-container.hidden {
    display: none;
}

/* Active nav link */
.active-link {
    color: var(--color-text-light) !important;
}

.active-link::after {
    width: 100% !important;
    background-color: var(--color-text-light) !important;
}

/* =============================================
   PAGE TRANSITION
   ============================================= */

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

body {
    animation: pageEnter 0.35s ease forwards;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

body.page-exit {
    opacity: 0;
    transform: translateY(-8px);
}

/* =============================================
   BACK TO TOP
   ============================================= */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--color-accent);
    color: var(--color-text-light);
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 16px rgba(74, 112, 144, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-bg-mid);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(74, 112, 144, 0.55);
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: var(--color-bg-dark);
    border-top: 1px solid rgba(74, 112, 144, 0.25);
    margin-top: auto;
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.5px;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
}

.footer-nav a:hover {
    color: var(--color-text-light);
}

.footer-nav a::after {
    display: none;
}

.footer-socials {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
}

.footer-socials a {
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity var(--transition), transform var(--transition);
}

.footer-socials a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-socials a::after {
    display: none;
}

.footer-socials img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.footer-bottom {
    border-top: 1px solid rgba(74, 112, 144, 0.15);
    padding: 1rem 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* =============================================
   PREFERS REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    .section__pic-container {
        animation: none;
    }

    body {
        animation: none;
    }

    .section__text__p1,
    .title,
    .section__text__p2,
    .btn-container,
    #socials-container {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .details-container,
    article,
    .section__text,
    .btn-container {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =============================================
   TIMELINE (About page)
   ============================================= */

.timeline-section {
    margin: 1.5rem 0;
}

.timeline-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 1.25rem;
    padding-left: 2.5rem;
}

.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), rgba(74, 112, 144, 0.2));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.25rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.35rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--color-accent);
    border-radius: 50%;
    border: 2px solid var(--color-bg-mid);
    box-shadow: 0 0 0 3px rgba(74, 112, 144, 0.25);
}

.timeline-content {
    background: var(--color-bg-mid);
    border: 1px solid rgba(74, 112, 144, 0.25);
    border-radius: 0.75rem;
    padding: 0.85rem 1.1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-item:hover .timeline-content {
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(28, 51, 71, 0.15);
}

.timeline-year {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
    background: rgba(74, 112, 144, 0.15);
    padding: 0.1rem 0.5rem;
    border-radius: 2rem;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0.2rem 0 0.25rem;
}

.timeline-content p {
    font-size: 0.82rem;
    color: var(--color-text-muted) !important;
    margin: 0;
    line-height: 1.6;
}

/* =============================================
   RESPONSIVE — Footer & Back-to-top
   ============================================= */

@media screen and (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.6rem;
        height: 2.6rem;
        font-size: 1.2rem;
    }
}
