/* Root variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4a4a4a;
    --accent-color: #800080;
    --text-color: #2d2d2d;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-color: #ffffff;
    --bg-subtle: #f9fafb;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.roboto-regular {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.ubuntu-regular {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Header */
#header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 4rem;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1002;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

#logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

#logo a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
}

#logo a:hover {
    opacity: 1;
}

#logo img {
    width: 40px;
    height: 40px;
}

#logo span {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
}

/* Hamburger Menu */
#hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

#hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transform-origin: center;
}

#hamburger span:nth-child(1) {
    top: 3px;
}

#hamburger span:nth-child(2) {
    top: 13.5px;
}

#hamburger span:nth-child(3) {
    bottom: 3px;
}

/* active (cross) state */
#hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
}

#hamburger.active span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Sidebar Overlay */
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#pages {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

#pages a {
    font-size: 1.2rem;
    font-weight: 500;
    color: #800080;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: -0.2px;
}

#pages a:hover {
    color: var(--accent-color);
}

#current {
    color: #ff69b4 !important;
    font-weight: 600;
}

/* Main Content */
#main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 4rem;
}

/* h2 styling has been centralized in `styles.css` */

/* Projects Grid */
#projs {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 3rem;
}

.proj {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.proj:last-child {
    border-bottom: none;
}

.proj_img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.proj_img:hover {
    transform: scale(1.02);
}

/* .proj_img--logo {
    width: 220px;
    height: 150px;
    object-fit: contain;
    padding: 1rem;
    background-color: var(--bg-color);
}

.proj_img--logo:hover {
    transform: scale(1.02);
} */

.proj_desc {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.proj_desc h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.proj_desc h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.proj_desc h3 a:hover {
    color: var(--accent-color);
}

.proj_desc > div {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Links */
a:link,
a:visited {
    text-decoration: none;
    color: var(--accent-color);
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Footer */
#footer {
    background-color: var(--bg-subtle);
    padding: 1.5rem 4rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0rem;
}

#footer > div {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

#footer img {
    width: 40px;
    height: 40px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    filter: grayscale(100%);
}

#footer a:hover img {
    opacity: 1;
    filter: grayscale(0%);
}

/* Responsive Design */
@media (max-width: 768px) {
    #header {
        padding: 1rem 2rem;
    }

    #hamburger {
        display: flex;
    }

    #sidebar-overlay {
        display: block;
    }

    #pages {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        gap: 0;
        padding: 5rem 2rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    #pages.active {
        right: 0;
    }

    #pages > div {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    #pages > div:last-child {
        border-bottom: none;
    }

    #pages a {
        font-size: 1.1rem;
        display: block;
    }

    #logo {
        font-size: 1.25rem;
        margin-left: -0.75rem;
    }

    #logo img {
        width: 40px;
        height: 40px;
    }

    #main {
        padding: 2rem 1.5rem;
    }

    .proj {
        flex-direction: column;
    }

    .proj_img {
        width: 140px;
        height: 140px;
        display: block;
        margin: 0 auto;
        object-fit: cover;
    }

    .proj_img--logo {
        width: 140px;
        height: 140px;
        max-width: 180px;
        display: block;
        margin: 0 auto;
        object-fit: contain;
    }
}

