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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --accent-color: #000;
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

.lang-btn:hover {
    color: var(--text-color);
}

.lang-btn.active {
    color: var(--text-color);
    border-bottom: 1px solid var(--accent-color);
}

/* Main Screen (Hero + Services + Contacts) */
.main-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    border-bottom: 1px solid var(--border-color);
}

.main-content {
    text-align: center;
    max-width: 850px;
    padding: 0 20px;
}

/* Hero Block */
.hero-block {
    margin-bottom: 25px;
}

.hero-block h1 {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: clamp(12px, 2vw, 14px);
    color: var(--secondary-color);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Description Block */
.description-block {
    margin-bottom: 40px;
}

.description-block p {
    font-size: 15px;
    color: var(--secondary-color);
    font-weight: 300;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    border: 1px solid var(--border-color);
    padding: 25px 30px;
}

/* Services Block (compact) */
.services-block {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-name {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-color);
}

.service-desc {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 300;
    max-width: 200px;
}

/* Contacts Block (icons only) */
.contacts-block {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.contact-icon:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

/* Portfolio Link */
.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    padding: 12px 28px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.portfolio-link::after {
    content: '→';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.portfolio-link:hover::after {
    transform: translateX(4px);
}

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

/* Sections */
.section {
    padding: 100px 20px;
    border-bottom: 1px solid var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 2px;
}

/* Portfolio Categories (Collapsible) */
.portfolio-category {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.category-header {
    width: 100%;
    padding: 22px 30px;
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.category-header:hover {
    background: #f9f9f9;
}

.category-header[aria-expanded="true"] {
    border-bottom: 1px solid var(--border-color);
}

.toggle-icon {
    font-size: 20px;
    font-weight: 300;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.category-header[aria-expanded="true"] .toggle-icon {
    transform: rotate(45deg);
}

.category-content {
    display: none;
    padding: 30px;
}

.category-content.open {
    display: block;
}

/* Work Items */
.work-item {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.work-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.work-item:first-child {
    padding-top: 0;
}

.work-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.work-image-placeholder {
    aspect-ratio: 3/4;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 16px;
    transition: background 0.3s ease;
}

.work-image-placeholder:hover {
    background: #e8e8e8;
}

.work-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.work-description {
    margin-top: 15px;
}

.work-description p {
    color: var(--secondary-color);
    font-size: 16px;
    line-height: 1.8;
}

/* Certificates Section */
.certificates-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.certificate-item {
    width: 280px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.certificate-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.certificate-placeholder:hover {
    background: #e8e8e8;
}

.certificate-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color);
    background: white;
    padding: 5px;
}

/* Modal for viewing images */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.modal-close:hover {
    color: #ccc;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */

/* Tablet landscape and small desktop (992px - 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .main-screen {
        padding: 50px 20px;
    }

    .hero-block {
        margin-bottom: 25px;
    }

    .description-block {
        margin-bottom: 35px;
    }

    .services-block {
        gap: 35px;
        margin-bottom: 35px;
    }

    .contacts-block {
        margin-bottom: 40px;
    }

    .section {
        padding: 80px 20px;
    }

    .section h2 {
        margin-bottom: 40px;
    }

    .work-images {
        gap: 15px;
    }
}

/* Mobile (480px - 768px) */
@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
    }

    .lang-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .main-screen {
        padding: 40px 20px;
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 50px;
    }

    .hero-block {
        margin-bottom: 20px;
    }

    .hero-block h1 {
        margin-bottom: 10px;
    }

    .subtitle {
        letter-spacing: 3px;
    }

    .description-block {
        margin-bottom: 35px;
    }

    .description-block p {
        font-size: 14px;
        max-width: 100%;
    }

    .services-block {
        gap: 30px;
        margin-bottom: 35px;
    }

    .service-name {
        font-size: 18px;
    }

    .service-desc {
        font-size: 11px;
    }

    .contacts-block {
        gap: 15px;
        margin-bottom: 40px;
    }

    .contact-icon {
        width: 42px;
        height: 42px;
    }

    .contact-icon svg {
        width: 18px;
        height: 18px;
    }

    .portfolio-link {
        font-size: 10px;
        padding: 12px 26px;
    }

    .section {
        padding: 60px 15px;
    }

    .section h2 {
        margin-bottom: 35px;
    }

    .category-header {
        padding: 18px 20px;
        font-size: 11px;
        letter-spacing: 2px;
    }

    .category-content {
        padding: 20px;
    }

    .work-images {
        gap: 12px;
    }

    .work-item {
        padding: 25px 0;
    }
}

/* Small mobile (< 480px) */
@media (max-width: 480px) {
    .language-switcher {
        top: 12px;
        right: 12px;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 9px;
    }

    .main-screen {
        padding: 55px 15px 45px;
    }

    .hero-block {
        margin-bottom: 18px;
    }

    .subtitle {
        letter-spacing: 2px;
    }

    .description-block {
        margin-bottom: 30px;
    }

    .description-block p {
        font-size: 13px;
        max-width: 100%;
    }

    .services-block {
        flex-direction: column;
        gap: 18px;
        margin-bottom: 30px;
    }

    .service-item {
        gap: 4px;
    }

    .service-desc {
        max-width: none;
    }

    .contacts-block {
        gap: 12px;
        margin-bottom: 35px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon svg {
        width: 16px;
        height: 16px;
    }

    .portfolio-link {
        font-size: 9px;
        padding: 11px 22px;
        letter-spacing: 1.5px;
    }

    .section {
        padding: 50px 10px;
    }

    .section h2 {
        margin-bottom: 30px;
    }

    .container {
        padding: 0 10px;
    }

    .category-header {
        padding: 15px;
        font-size: 10px;
    }

    .toggle-icon {
        font-size: 18px;
    }

    .category-content {
        padding: 15px;
    }

    .work-images {
        gap: 10px;
    }

    .work-image-placeholder {
        font-size: 13px;
    }

    .work-item {
        padding: 20px 0;
    }

    .work-description p {
        font-size: 14px;
    }
}
