/* --- Global Resets & Variables --- */
:root {
    --bg-color: #0d0d0e;
    --text-color: #f5f5f7;
    --text-muted: #8e8e93;
    --accent-color: #ffffff;
    --border-color: #2c2c2e;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
}

/* --- Layout Components --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }
}

.section {
    padding: 8rem 0;
    border-top: 1px solid var(--border-color);
}

.section-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(13, 13, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--accent-color);
}

/* --- Hero Section --- */
.hero {
    padding: 14rem 0 10rem 0;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 950px;
    margin-bottom: 3rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    max-width: 650px;
    font-weight: 300;
}

/* --- About Section --- */
.lead-text {
    font-size: 1.75rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* --- Project Showcase --- */
.project-header, .gallery-header {
    margin-bottom: 4rem;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 550px;
}

.project-list {
    margin-top: 2rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

@media (min-width: 768px) {
    .project-card {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }
}

.project-card:hover {
    border-color: var(--accent-color);
}

.project-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.project-summary {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 655px;
}

/* --- Optimized Image Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    filter: grayscale(100%) contrast(110%);
    transition: var(--transition-smooth);
    display: block;
}

.gallery-item:hover .gallery-img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.02);
}

.gallery-caption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Contact & Socials --- */
.contact-prompt {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.contact-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 500px;
}

.email-link {
    display: inline-block;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 4rem;
    transition: var(--transition-smooth);
}

.email-link:hover {
    border-color: var(--accent-color);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.social-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    padding-bottom: 0.25rem;
}

.social-item::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.social-item:hover {
    color: var(--accent-color);
}

.social-item:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Footer --- */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.Unique-footer-flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .Unique-footer-flex {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* --- Lightbox Functionality --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 9, 10, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox[aria-hidden="false"] {
    display: flex;
}

.lightbox-content {
    max-width: 85%;
    max-height: 75vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

#lightbox-caption {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--text-color);
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lightbox-close:hover {
    color: var(--text-muted);
}