/* ============================================= */
/* --- VARIABLES & GLOBAL STYLES --- */
/* ============================================= */
:root {
    --font-primary: "Poppins", sans-serif;
    --color-bg: #121212;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.75);
    --color-accent: #b3b3ff;
    --color-border: #2a2a2a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ============================================= */
/* --- NAVBAR --- */
/* ============================================= */
.nav-wrapper {
    padding: 2rem 1.5rem;
}

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

.logo-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: rotate(5deg) scale(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
    display: inline-block;
    perspective: 600px;
}

.text-layer {
    display: block;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
    font-weight: 400;
    white-space: nowrap;
}

.front {
    transform: translateY(0);
    opacity: 1;
}

.back {
    transform: translateY(20px);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.nav-item:hover .front {
    transform: translateY(-20px);
    opacity: 0;
}

.nav-item:hover .back {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================= */
/* --- HERO SECTION --- */
/* ============================================= */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    gap: 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1100px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}

.hero-title .line1 {
    font-weight: 300;
    color: var(--color-text-muted);
}

.hero-title .line2 {
    font-weight: 700;
    background: linear-gradient(90deg, var(--color-text), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 750px;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 300;
    line-height: 1.6;
}

.myself-btn {
    display: inline-flex;
    align-items: center;
    min-width: 135px;
    height: 40px;
    padding-left: 0.4rem;
    padding-right: 1rem;
    background-color: var(--color-text);
    color: var(--color-bg);
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.6px;
    border-radius: 999px;
    transition: transform 0.3s ease;
    border: none;
    gap: 0.8rem;
}

.myself-btn .circle {
    width: 34px;
    height: 34px;
    background-color: var(--color-bg);
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.myself-btn .arrow {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.myself-btn:hover {
    transform: scale(1.05);
}

.myself-btn:hover .circle {
    transform: translate(6px, -6px);
}

.myself-btn:hover .arrow {
    transform: translate(2px, -2px);
}

/* ============================================= */
/* --- SELECTED WORKS SECTION --- */
/* ============================================= */
.works-section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.works-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 4rem;
}

.works-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.toggle-container {
    position: relative;
    display: flex;
    background-color: #1a1a1a;
    border-radius: 999px;
    padding: 4px;
    border: 1px solid var(--color-border);
}

.toggle-background {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background-color: var(--color-text);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.toggle-button {
    background-color: transparent;
    color: var(--color-text-muted);
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
    position: relative;
}

.toggle-button.active {
    color: var(--color-bg);
}

/* ============================================= */
/* --- PROJECT LAYOUTS --- */
/* ============================================= */
.project-list {
    display: none;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.project-list.active {
    display: grid;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-link:hover,
.project-link:visited,
.project-link:focus {
    text-decoration: none;
    color: inherit;
}

.project-link:hover .project-row {
    cursor: pointer;
}

.project-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.project-image-card {
    background-color: #111;
    border-radius: 14px;
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    aspect-ratio: 16 / 10;
}

.project-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.2);
}

.project-image-card:hover img {
    transform: scale(1.05);
}

.project-info-card {
    background-color: transparent;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.project-category {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.project-description {
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ============================================= */
/* --- FOOTER --- */
/* ============================================= */
.site-footer {
    padding: 4rem 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-divider {
    border: none;
    height: 1px;
    background-color: var(--color-border);
    margin-bottom: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

.copyright {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.social-links .nav-item {
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.social-links .nav-item:hover {
    color: var(--color-accent);
}

/* ============================================= */
/* --- MEDIA QUERIES --- */
/* ============================================= */
@media (min-width: 768px) {
    .nav-wrapper {
        padding: 3rem 4rem;
    }

    .nav-links {
        gap: 3rem;
    }

    .hero-section,
    .works-section,
    .site-footer {
        padding-left: 4rem;
        padding-right: 4rem;
    }

    .works-header {
        margin-bottom: 6rem;
    }

    .project-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .project-info-card {
        padding: 2rem;
    }

    #design-projects .project-row .project-image-card {
        order: 1;
    }
    #design-projects .project-row .project-info-card {
        order: 2;
    }

    #build-projects .project-row .project-image-card {
        order: 2;
    }
    #build-projects .project-row .project-info-card {
        order: 1;
    }

    .footer-content {
        flex-direction: row;
        gap: 2rem;
    }

    .social-links {
        gap: 40px;
    }
    .social-links .nav-item {
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .nav-wrapper {
        padding: 4rem 6rem;
    }

    .nav-links {
        gap: 5rem;
    }
}
