/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: -2px;
}

.logo-text p {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: #000;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: #ffffff;
}

.hero h2 {
    font-size: 48px;
    font-weight: 300;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: #fafafa;
}

.portfolio h3 {
    font-size: 32px;
    font-weight: 300;
    color: #000;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 30px;
}

.project-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.02);
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 14px;
    color: #666;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: #ffffff;
}

.testimonials h3 {
    font-size: 32px;
    font-weight: 300;
    color: #000;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -0.02em;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 40px;
}

.testimonial {
    text-align: center;
    padding: 40px 20px;
}

.testimonial p {
    font-size: 16px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 12px;
    color: #666;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #fafafa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 32px;
    font-weight: 300;
    color: #000;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.contact-info > p {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item strong {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item span {
    font-size: 14px;
    color: #666;
}

/* Contact Form */
.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    color: #333;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

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

.contact-form button {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-form button:hover {
    background: #333;
}

/* Footer */
.footer {
    padding: 40px 0;
    background: #000;
    color: #ffffff;
    text-align: center;
}

.footer p {
    font-size: 12px;
    color: #999;
}

/* Enhanced Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 20px auto;
    border-radius: 12px;
    width: 95%;
    max-width: 1100px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #666;
    z-index: 1001;
    transition: all 0.2s ease;
    border: none;
}

.modal-close:hover {
    color: #000;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Modal Header */
.modal-header {
    padding: 40px 40px 30px 40px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title-section h4 {
    font-size: 28px;
    font-weight: 300;
    color: #000;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.modal-title-section p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.modal-badge {
    background: #000;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 40px;
}

/* Modal Body */
.modal-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    min-height: 0;
}

/* Image Gallery */
.modal-gallery {
    position: relative;
    padding: 20px 20px 0 20px;
}

.main-image-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.main-image-container img {
    width: 100%;
    height: clamp(250px, 40vw, 500px);
    object-fit: cover;
    display: block;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 40px 30px 20px 30px;
    font-size: 14px;
    line-height: 1.4;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

.image-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.modal-thumbnails {
    display: flex;
    gap: 8px;
    padding: 20px;
    overflow-x: auto;
    background: #f8f9fa;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border-color: #333;
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Details */
.modal-details {
    padding: 40px;
    background: #ffffff;
    overflow-y: auto;
    max-height: 500px;
}

.project-specs {
    margin-bottom: 40px;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.spec {
    text-align: left;
}

.spec label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.spec span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: block;
}

.project-description,
.project-concept,
.project-materials,
.project-highlights {
    margin-bottom: 30px;
}

.project-description h5,
.project-concept h5,
.project-materials h5,
.project-highlights h5 {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.project-description p,
.project-concept p,
.project-materials p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

.project-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-highlights li {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.project-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #000;
    font-weight: bold;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #000;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 0 0 8px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(80px); }
}

@media (max-width: 480px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Loading Skeletons */
.skeleton-card {
    background: #e0e0e0;
    border-radius: 8px;
    height: 320px;
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

.skeleton-testimonial {
    background: #e0e0e0;
    border-radius: 8px;
    height: 180px;
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.error-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 14px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 15px;
    grid-column: 1 / -1;
}

/* Responsive Design */

/* Tablet - modal goes to stacked layout */
@media (max-width: 900px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-details {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 20px 16px 16px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
        border-bottom: 1px solid #f0f0f0;
    }

    .modal-badge {
        margin-right: 0;
    }

    .modal-details {
        padding: 24px 16px;
        max-height: none;
    }

    .modal-gallery {
        padding: 12px 12px 0 12px;
    }

    .modal-thumbnails {
        padding: 12px;
    }

    .thumbnail {
        width: 64px;
        height: 48px;
    }

    .spec-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 16px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .prev-arrow {
        left: 10px;
    }

    .next-arrow {
        right: 10px;
    }

    .nav {
        gap: 20px;
    }

    .portfolio,
    .testimonials,
    .contact {
        padding: 60px 0;
    }

    .hero {
        padding: 60px 0;
    }

    .modal-title-section h4 {
        font-size: 20px;
    }

    .modal-title-section p {
        font-size: 14px;
    }

    .modal-close {
        position: fixed;
        right: 12px;
        top: 12px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        z-index: 1002;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .image-counter {
        top: 12px;
        right: 60px;
    }

    .image-caption {
        padding: 30px 16px 12px 16px;
        font-size: 13px;
    }

    .project-description h5,
    .project-concept h5,
    .project-materials h5,
    .project-highlights h5 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 16px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    .portfolio h3,
    .testimonials h3,
    .contact-info h3 {
        font-size: 26px;
    }

    .contact-form {
        padding: 25px 16px;
    }

    .spec-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .modal-header {
        padding: 16px 12px 12px 12px;
    }

    .modal-details {
        padding: 20px 12px;
    }

    .modal-gallery {
        padding: 8px 8px 0 8px;
    }

    .modal-thumbnails {
        padding: 8px;
        gap: 6px;
    }

    .thumbnail {
        width: 56px;
        height: 42px;
    }

    .modal-title-section h4 {
        font-size: 18px;
    }

    .nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .prev-arrow {
        left: 6px;
    }

    .next-arrow {
        right: 6px;
    }
}