:root {
    --bg-color: #0d0d0d;
    --text-color: #f4f4f4;
    --accent-color: #4a4a4a;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --spacing-xl: 8rem;
    --spacing-lg: 4rem;
    --spacing-md: 2rem;
    --spacing-sm: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .headline {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.1;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.nav-links a:hover, .nav-links a.active {
    color: #888;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-md);
    overflow: hidden;
}

#hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.6;
}

#hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13,13,13,0.3) 0%, #0d0d0d 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #aaa;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-sm);
    display: inline-block;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text p {
    font-size: 1.25rem;
    font-weight: 300;
    color: #ccc;
    margin-bottom: var(--spacing-md);
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-lg);
}

.timeline {
    border-left: 2px solid var(--accent-color);
    padding-left: var(--spacing-md);
}

.timeline-item {
    margin-bottom: var(--spacing-lg);
}

.timeline-year {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.timeline-content {
    font-size: 1.2rem;
    font-weight: 400;
}

.education-images {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: #aaa;
}

.skill-list {
    list-style: none;
    font-size: 1.1rem;
    color: #ccc;
}

.skill-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.skill-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Portfolio Projects */
.project {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.project-header {
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
}

.project-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
}

.project-desc {
    font-size: 1.25rem;
    color: #aaa;
    font-weight: 300;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-flow: dense;
    gap: var(--spacing-md);
}

.project-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    background: #1a1a1a; /* placeholder color while loading */
}

/* Masonry / Grid configurations based on number of images */
/* Single Image */
.img-full { grid-column: span 12; }
/* Two Images */
.img-half { grid-column: span 6; }
/* Three Images */
.img-third { grid-column: span 4; }
/* Complex Grids */
.img-span-8 { grid-column: span 8; }
.img-span-4 { grid-column: span 4; }
.img-tall { grid-row: span 2; }

/* Custom gallery layouts targeting specific projects if needed */
#3d-modeling .project-gallery img:first-child { grid-column: span 12; }
#3d-modeling .project-gallery img { grid-column: span 4; }

/* Footer */
footer {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    text-align: center;
    position: relative;
}

.footer-img {
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
    display: block;
}

.footer-text {
    font-size: clamp(2rem, 5vw, 4rem);
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    color: #333;
}

.copyright {
    margin-top: var(--spacing-lg);
    font-size: 0.9rem;
    color: #666;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid, .education-grid {
        grid-template-columns: 1fr;
    }
    
    .img-third, .img-half, .img-span-8, .img-span-4 {
        grid-column: span 12 !important;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 13, 13, 0.95);
        padding: var(--spacing-md);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }
}
