/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --color-primary: #1a1a1a;
    --color-secondary: #f5f5f5;
    --color-accent: #d4af37;
    --color-accent-light: #e8d4a0;
    --color-text: #2c2c2c;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --color-overlay: rgba(0, 0, 0, 0.7);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
}

.section-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: var(--spacing-sm) auto 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.project-subtitle {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    max-width: 900px;
}

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

section {
    padding: var(--spacing-xl) 0;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3f0;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding: var(--spacing-md);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    letter-spacing: -1px;
    color: var(--color-primary);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    background: #c29c2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.cta-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.cta-button:hover .cta-icon {
    transform: translateY(3px);
}

/* ===== NAVIGATION ===== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--color-primary);
}

/* ===== INTRO SECTION ===== */
.intro-section {
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-secondary) 100%);
    padding: var(--spacing-xl) 0;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    line-height: 2;
    color: var(--color-text);
}

/* ===== PROJECT BLOCKS ===== */
.project-block {
    margin-bottom: var(--spacing-xl);
    animation: fadeIn 0.8s ease-out;
}

.project-block.featured-project {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== IMAGE GRIDS ===== */
.image-grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.grid-1 {
    grid-template-columns: 1fr;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.image-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

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

.image-item.featured img {
    max-height: 600px;
    object-fit: contain;
    background: var(--color-white);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.image-item:hover .image-caption {
    transform: translateY(0);
}

/* Always show captions for design process */
.image-item[data-category="process"] .image-caption {
    transform: translateY(0);
    position: relative;
    background: none;
    color: var(--color-text);
    padding: var(--spacing-sm) 0;
    font-size: 1rem;
    margin-top: var(--spacing-xs);
}

/* ===== SECTIONS ===== */
.techniques-section {
    background: var(--color-white);
}

.illustrations-section {
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-white) 100%);
}

.cad-section {
    background: var(--color-white);
    padding-top: 0;
    margin-top: calc(-1 * var(--spacing-lg));
}

/* Limit width of single images in grids */
.grid-3 .image-item:only-child,
.grid-2 .image-item:only-child {
    max-width: 600px;
    margin: 10 auto;
}

/* Style CAD section images with curves without cropping */
.cad-section .image-item {
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.cad-section .image-item img {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Equal spacing for CAD section grid */
.cad-section .image-grid {
    gap: var(--spacing-lg);
    align-items: center;
}

/* ===== HORIZONTAL SLIDER ===== */
.slider-container {
    position: relative;
    margin-top: var(--spacing-md);
    overflow: hidden;
}

.image-slider {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-secondary);
}

.image-slider::-webkit-scrollbar {
    height: 8px;
}

.image-slider::-webkit-scrollbar-track {
    background: var(--color-secondary);
    border-radius: 4px;
}

.image-slider::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

.image-slider::-webkit-scrollbar-thumb:hover {
    background: #c29c2e;
}

.slider-item {
    flex: 0 0 320px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.slider-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.slider-item:hover img {
    transform: scale(1.05);
}

/* Slider Captions */
.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-white);
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.slider-item:hover .slider-caption {
    opacity: 1;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #8b6f47;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.slider-arrow:hover {
    background: #6d5537;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 30px rgba(139, 111, 71, 0.5);
}

.slider-arrow svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
    transition: transform var(--transition-fast);
}

.slider-arrow:hover svg {
    transform: scale(1.1);
}

.slider-arrow-left {
    left: 10px;
}

.slider-arrow-right {
    right: 10px;
}

/* ===== CLOSING SECTION ===== */
.closing-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
}

.closing-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.closing-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    letter-spacing: 2px;
}

.closing-text {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

/* ===== ABOUT ME SECTION ===== */
.about-section {
    background: #f5f3f0;
    padding: var(--spacing-xl) 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    margin-top: var(--spacing-lg);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-white) 100%);
    padding: var(--spacing-xl) 0;
}

.contact-main-description {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Form */
.contact-form-container {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: #fafafa;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: var(--spacing-sm);
}

.submit-btn:hover {
    background: #c29c2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Contact Info */
.contact-info-container {
    display: flex;
    flex-direction: column;
}

.contact-info-title {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.contact-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-white);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2);
    border-color: var(--color-accent);
}

.social-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff9e6;
    border-radius: 8px;
    flex-shrink: 0;
}

.social-icon {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
    transition: transform var(--transition-normal);
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

.social-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

.social-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.social-link:hover .social-label,
.social-link:hover .social-text {
    color: var(--color-primary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn var(--transition-normal);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.3);
    animation: zoomIn var(--transition-normal);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--color-white);
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-accent);
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-white);
    border: none;
    font-size: 2rem;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(212, 175, 55, 0.4);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .nav-menu {
        gap: var(--spacing-sm);
    }

    .nav-menu a {
        font-size: 0.85rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .project-block.featured-project {
        padding: var(--spacing-md);
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }

    .lightbox-nav {
        font-size: 1.5rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .contact-section {
        padding: var(--spacing-lg) 0;
        overflow-x: hidden;
    }

    .contact-form-container {
        padding: 12px;
        width: 85%;
        max-width: 400px;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .contact-info-container {
        width: 85%;
        max-width: 400px;
        box-sizing: border-box;
        padding: 0;
        margin: 0 auto;
    }

    .form-group {
        width: 100%;
        max-width: 100%;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px;
        font-size: 0.9rem;
    }

    .submit-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .social-links {
        width: 100%;
        max-width: 100%;
        gap: 10px;
    }

    .social-link {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px;
    }

    .social-icon-wrapper {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .social-icon {
        width: 18px;
        height: 18px;
    }

    .social-text-wrapper {
        text-align: left;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .social-label {
        font-size: 0.85rem;
    }

    .social-handle {
        font-size: 0.8rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .contact-main-description {
        padding: 0 7.5%;
        max-width: 100%;
        font-size: 0.95rem;
    }

    .contact-info-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 1px;
    }

    .hero-subtitle {
        letter-spacing: 1px;
    }

    .nav-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .section-heading {
        letter-spacing: 0;
    }
}

/* ===== LOADING ANIMATION ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.image-item img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.image-item img[loading="lazy"].loaded {
    animation: none;
    background: transparent;
}

/* ===== SMOOTH SCROLL ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .scroll-indicator,
    .lightbox {
        display: none;
    }

    .hero {
        height: auto;
        page-break-after: always;
    }

    section {
        page-break-inside: avoid;
    }
}