:root {
    --color1: #FFF8D3; /* light background */
    --color2: #62939A; /* primary accent */
    --color3: #5B5756; /* secondary accent */
    --color4: #363435; /* dark text */
}

body.dark-mode {
    --color1: #363435; /* dark background */
    --color2: #5B5756;
    --color3: #62939A;
    --color4: #FFF8D3; /* light text */
}

/* GENERAL */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    background-color: var(--color1);
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('Other/my-durves-image.png') no-repeat center center;
    background-position: center;
    background-size: cover;
    z-index: -1;
    opacity: 0.8;
}


section {
    background-color: var(--color2);
    margin: 20px;
    border-radius: 10px;
    padding: 10px;
}

section h2 {
    text-align: center;
    margin-bottom: 20px;
    padding: 5px;
    color: var(--color4);
}

section p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color4);
}

section img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9;

    background-color: var(--color2);
    color: var(--color4);

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    box-sizing: border-box;
}

.logo {
    position: absolute;
    left: 40px; /* fixed distance from left */
}

.logo a {
    color: var(--color4);
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-links a {
    color: var(--color4);
    text-decoration: none;
    font-size: 16px;
    margin: 0 15px;
    transition: color 0.3s;
}

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

.social-links {
    position: absolute;
    right: 40px; /* fixed distance from right */
    display: flex;
    gap: 16px;
}

.social-links a {
    color: var(--color4);
    font-size: 20px;
    transition: color 0.3s;
}

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

.theme-toggle {
    background: transparent;
    border: 1px solid var(--color4);
    color: var(--color4);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font: inherit;
}

.theme-toggle:hover {
    color: var(--color3);
    border-color: var(--color3);
}

/* INTRO SECTION */

.intro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: none;
}

.intro-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color2);
}

.intro-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color2);
    text-align: center;
    padding: 60px 40px;
    border-radius: 12px;
}

.intro-name {
    font-size: 3.2rem;
    margin: 0;
    color: var(--color4);
}

.intro-text {
    font-size: 1.5rem;
    margin-top: 20px;
    color: var(--color4);
}


/* ABOUT */

.about {
    padding: 36px 30px;
}

.about-inner {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 16px;
}

.about-text p {
    margin: 0;
    line-height: 1.7;
}

.about-photos {
    flex: 0 0 320px;
    position: relative;
    width: 320px;
    height: 320px;
}

.about-photos img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.about-photos img.active {
    opacity: 1;
}

.photo-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.about-photos:hover .photo-btn {
    opacity: 1;
}

.photo-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.photo-prev { left: 10px; }
.photo-next { right: 10px; }

.photo-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.photo-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    padding: 0;
}

.photo-dots .dot.active {
    background: rgba(255, 255, 255, 0.95);
}
.projects > h2,
.contact > h2 {
    padding-bottom: 8px;
    margin-top: 0;
}

/* PROJECTS */

.projects {
    padding: 20px;
}

.projects h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color4);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 20px;
    background-color: var(--color1);
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 10px;
    max-width: 400px;
    position: relative;
    transition: transform 1s ease, opacity 1s ease, max-height 0.5s ease;
    will-change: transform, opacity, max-height;
}

.project-card:not(.expanded):hover {
    transform: scale(1.03);
}

.project-card.expanded {
    grid-column: 1 / -1;
    max-width: 100%;
    transform: none !important;
    z-index: 1;
    padding: 2rem;
    transition: transform 0.5s ease, opacity 0.5s ease, max-height 0.5s ease;
}


.project-info {
    padding: 10px;
    color: var(--color4);
    display: flex;
    flex-direction: column;
}


.project-info h3 {
    margin-top: 0;
    margin-bottom: 0px;
}

.project-card.expanded .project-info {
    max-height: 1000px;
}

.project-card .extra-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    color: var(--color4);
}

.project-card.expanded .extra-content {
    opacity: 1;
    max-height: 2000px;
    padding-top: 1rem;
}

.project-card::after {
    content: "Click to see more";
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
    color: var(--color3);
    font-style: italic;
    opacity: 0.8;
}

.project-card.expanded::after {
    content: "Click to collapse";
}

.project-links {
    margin-top: 15px; /* separate buttons from text */
    flex-shrink: 0;
}

/* BUTTONS */

.btn {
    display: inline-block;
    padding: 8px 15px;
    background: var(--color4);
    color: var(--color1);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--color2);
}

.resume-download {
    margin-top: 18px;
}

.project-card img,
.project-card .extra-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}


/* CONTACT */

.contact {
    padding: 10px 60px;
    text-align: center;
    background-color: var(--color2);
}

.contact-fallback {
    margin: 0 0 16px;
    color: var(--color4);
}

.contact-fallback a {
    color: var(--color4);
    text-decoration: underline;
}

/* HEADERS */

h1, h2, h3 {
    font-weight: normal;
}

h2 {
    color: var(--color4);
    text-align: center;
}

h3 {
    color: var(--color4);
    text-align: left;
}

@media (max-width: 768px) {
    .bar {
        position: sticky;
        height: auto;
        padding: 10px 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        top: 0;
    }

    .logo {
        position: static;
        left: auto;
    }

    .social-links {
        position: static;
        right: auto;
        gap: 12px;
        align-items: center;
    }

    .nav-links {
        flex-basis: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        order: 3;
    }

    .nav-links a {
        margin: 4px 10px;
    }

    .intro {
        flex-direction: column;
        padding: 40px 16px;
        gap: 18px;
    }

    .avatar {
        width: 180px;
        height: 180px;
    }

    .intro-right {
        width: 100%;
        padding: 28px 18px;
    }

    .intro-name {
        font-size: 2.2rem;
    }

    .intro-text {
        font-size: 1.1rem;
        margin-top: 14px;
    }

    section {
        margin: 12px;
        padding: 12px;
    }

    .about {
        padding: 20px 16px;
    }

    .about-inner {
        flex-direction: column;
    }

    .about-text {
        position: static;
        flex: none;
    }

    .about-text h2 {
        text-align: center;
    }

    .about-photos {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .about-photos img {
        width: 100%;
        height: 100%;
    }

    .project-grid {
        padding: 0;
        gap: 14px;
    }

    .project-card {
        max-width: 100%;
        margin: 0;
    }

    .contact {
        padding: 10px 16px;
    }

    .projects > h2,
    .contact > h2 {
        position: static;
    }

    .about-photos:hover .photo-btn,
    .photo-btn {
        opacity: 1;
    }
}
