:root {
    --primary-color: #FFA800;
    /* Default Orange */
    --secondary-color: #C55E00;
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

/* Ambient Background Glow */
.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, rgba(0, 0, 0, 0) 70%);
    /* Uses var */
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    transition: background 0.5s ease;
}

.orb-1 {
    top: -200px;
    left: -200px;
}

.orb-2 {
    bottom: -200px;
    right: -200px;
    opacity: 0.1;
}

/* --- MENU BAR STYLES --- */
.menu {
    z-index: 100;
    position: absolute;
    width: 90%;
    max-width: 812px;
    aspect-ratio: 812 / 80;
    left: 50%;
    top: 3rem;
    transform: translateX(-50%);
}

/* Interactive Menu Item Styles */
.menu>div {
    opacity: 0;
    transform: translateY(-50px);
    transition:
        transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.6s ease-out;
    cursor: pointer;
}

/* Loaded state (applied via JS) */
.menu>div.loaded {
    transform: translateY(0);
    opacity: 0.3;
    /* Default dimmed state */
}

/* Hover and Active States */
.menu>div.loaded:hover,
.menu>div.loaded.active {
    opacity: 1;
    transform: scale(1.05);
    /* Subtle scale on active/hover */
}

/* Menu Item Positioning & Staggering */
div#pzg {
    position: absolute;
    left: 0%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.1s;
}

div#txrch {
    position: absolute;
    left: 15.02%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.2s;
}

div#artex {
    position: absolute;
    left: 30.05%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.3s;
}

div#tusa {
    position: absolute;
    left: 45.07%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.4s;
}

div#osta {
    position: absolute;
    left: 60.1%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.5s;
}

div#nz {
    position: absolute;
    left: 75.12%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.6s;
}

div#musen {
    position: absolute;
    left: 90.15%;
    top: 0%;
    bottom: 0%;
    width: 9.85%;
    height: 100%;
    transition-delay: 0.7s;
}

.menu>div.loaded:hover {
    transition-delay: 0s !important;
}

/* Common Ellipse Styles */
.ellipse1 {
    box-sizing: border-box;
    border-radius: 50%;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 4.37%, #FFFFFF 100%);
    background-blend-mode: screen;
    mix-blend-mode: screen;
    opacity: 0.25;
}

.ellipse2 {
    box-sizing: border-box;
    border-radius: 50%;
    position: absolute;
    width: 75%;
    height: 75%;
    left: 12.5%;
    top: 12.5%;
    border: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.35);
}

.ellipse3 {
    box-sizing: border-box;
    border-radius: 50%;
    position: absolute;
    width: 55%;
    height: 41.25%;
    left: 22.5%;
    top: 17.5%;
    background: radial-gradient(100% 100% at 50% 100%, #000000 0%, #494949 33.33%, #757575 54.55%, #ACACAC 75%, #D2D2D2 88%, #FFFFFF 100%);
    mix-blend-mode: screen;
    opacity: 0.65;
}

/* Specific Colors */
#pzg .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #FF0000 0%, #990000 100%);
    box-shadow: 0px -2px 4.9px rgba(255, 0, 0, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#txrch .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #FFA800 0%, #C55E00 100%);
    box-shadow: 0px -2px 4.9px rgba(255, 153, 0, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#artex .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #FFE500 0%, #CF9500 100%);
    box-shadow: 0px -2px 4.9px rgba(255, 214, 0, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#tusa .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #B0EE00 0%, #298000 100%);
    box-shadow: 0px -2px 4.9px rgba(36, 255, 0, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#osta .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #2CCCFF 0%, #0078AB 100%);
    box-shadow: 0px -2px 4.9px rgba(0, 163, 255, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#nz .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #C86FFF 0%, #5C1AAF 100%);
    box-shadow: 0px -2px 4.9px rgba(158, 0, 255, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

#musen .ellipse2 {
    background: radial-gradient(40.83% 40.83% at 50% 70.83%, #FFFFFF 0%, #93A2B9 100%);
    box-shadow: 0px -2px 4.9px rgba(255, 255, 255, 0.25), 0px 2px 4px rgba(0, 0, 0, 0.35);
}

/* --- LAYOUT --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10rem 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 900px) {
    .container {
        grid-template-columns: 350px 1fr;
        padding-top: 12rem;
    }
}

/* Profile Sidebar */
.profile-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: fit-content;
    transition: border-color 0.3s ease;
}

.profile-pic {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #333, #111);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.profile-role {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: block;
    transition: color 0.3s ease;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    cursor: pointer;
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.section-title {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex-grow: 1;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    display: block;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    display: flex;
    flex-direction: column;
    /* Changed to allow vertical flow for gallery */
    padding: 1.5rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    border-left: 2px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease, padding-left 0.3s ease;
    cursor: pointer;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.project-item:hover {
    border-left-color: var(--primary-color);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    padding-left: 2rem;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

.project-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chevron {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
    color: rgba(255, 255, 255, 0.4);
}

.project-item.expanded .chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.project-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-item.expanded .project-content-wrapper {
    grid-template-rows: 1fr;
}

.project-content {
    overflow: hidden;
}

.project-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.project-meta {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Project Gallery Styles */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    width: 100%;
    padding-top: 1.5rem;
    /* Changed from margin-top for smooth collapse animation */
}

.gallery-rect {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    aspect-ratio: 4/3;
    /* Standard rectangle aspect ratio */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Add a subtle highlight line at the top to simulate glass */
.gallery-rect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Interactive hover state for the rectangles */
.project-item:hover .gallery-rect {
    border-color: rgba(255, 255, 255, 0.15);
}

.gallery-rect:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
    /* Pop above siblings */
}

/* Before/After Toggle Styles */
.before-after-item {
    background: #050505;
    /* Dark bg for better neon visibility */
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Prevents cropping the signs */
    padding: 12px;
    /* Breathing room */
    box-sizing: border-box;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.before-after-item .before-img {
    opacity: 0;
    z-index: 2;
}

.before-after-item .after-img {
    opacity: 1;
    z-index: 2;
}

.before-after-item.show-before .before-img {
    opacity: 1;
}

.before-after-item.show-before .after-img {
    opacity: 0;
}

.ba-toggle-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.ba-toggle-btn:hover {
    background: var(--primary-color);
    color: black;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Image Modal (Lightbox) Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-img-container {
    position: relative;
    display: flex;
    max-width: 90%;
    max-height: 85vh;
    /* Leave room for bottom controls */
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-ba-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    z-index: 1001;
}

.modal-caption {
    position: absolute;
    bottom: 40px;
    left: 40px;
    margin-top: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-align: left;
    line-height: 1.5;
    max-width: calc(100% - 150px);
    /* Prevent overlapping the button */
    display: none;
    /* Hidden by default */
    z-index: 1001;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Make gallery items indicate they can be clicked to preview */
.gallery-rect {
    cursor: zoom-in;
}
