/* EOS — professional dual theme (light studio / dark restrained) */

:root,
html[data-theme="light"] {
    --font-display: "Instrument Serif", "Times New Roman", serif;
    --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

    --bg: #eceff3;
    --bg-elevated: #f7f8fa;
    --bg-dark: #eceff3;
    --bg-darker: #e1e5eb;
    --bg-card: #f7f8fa;

    --ink: #12161a;
    --text-primary: #12161a;
    --text-secondary: #4d565f;
    --muted: #4d565f;

    --accent: #0f3d3e;
    --accent-hover: #0a2e2f;
    --accent-soft: rgba(15, 61, 62, 0.08);
    --warm: #0f3d3e;
    --border: rgba(18, 22, 26, 0.12);
    --border-strong: rgba(18, 22, 26, 0.2);

    /* Legacy aliases — no rainbow */
    --yellow: var(--warm);
    --pink: var(--warm);
    --purple: var(--accent);
    --blue: var(--accent);
    --cyan: var(--accent);
    --gradient-1: var(--accent);
    --gradient-2: var(--accent);
    --gradient-3: var(--accent);
    --gradient-4: var(--accent);
    --gradient-main: var(--accent);

    --shadow-sm: 0 1px 2px rgba(18, 21, 28, 0.06);
    --shadow-md: 0 8px 24px rgba(18, 21, 28, 0.08);
    --shadow-lg: 0 16px 40px rgba(18, 21, 28, 0.1);
    --glow-gradient: none;
    --hero-wash: linear-gradient(105deg, #eceff3 42%, #dfe6e6 100%);
    --header-bg: #eceff3;
    --link: var(--accent);
}

html[data-theme="dark"] {
    --bg: #0c0f14;
    --bg-elevated: #151a22;
    --bg-dark: #0c0f14;
    --bg-darker: #080a0e;
    --bg-card: #151a22;

    --ink: #eef0f3;
    --text-primary: #eef0f3;
    --text-secondary: #9aa3ad;
    --muted: #9aa3ad;

    --accent: #d4a574;
    --accent-hover: #e0b68a;
    --accent-soft: rgba(212, 165, 116, 0.12);
    --warm: #d4a574;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --yellow: var(--warm);
    --pink: var(--warm);
    --purple: var(--accent);
    --blue: var(--accent);
    --cyan: var(--accent);
    --gradient-1: var(--accent);
    --gradient-2: var(--accent);
    --gradient-3: var(--accent);
    --gradient-4: var(--accent);
    --gradient-main: var(--accent);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --glow-gradient: none;
    --hero-wash: linear-gradient(105deg, #0c0f14 38%, #171b22 100%);
    --header-bg: #0c0f14;
    --link: var(--accent);
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    display: none;
}

h1, h2, h3, h4, .logo-text, .card-title {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

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

/* Custom Scrollbar Styles */
/* WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 2px solid rgba(15, 20, 25, 0.5);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.4);
}

::-webkit-scrollbar-corner {
    background: rgba(15, 20, 25, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(15, 20, 25, 0.5);
}

/* Header */
.header {
    background: var(--header-bg);
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-bar,
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark,
.logo-icon-img {
    width: 34px;
    height: 34px;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.55rem;
    letter-spacing: 0.04em;
    line-height: 1;
}

.nav {
    display: flex;
    gap: 0.15rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: 0;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: transparent;
}

.nav-cta {
    margin-left: 0.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-cta:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.35rem;
    padding-left: 0.55rem;
    border-left: 1px solid var(--border);
}

.lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.28rem 0.4rem;
    border-radius: 3px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.lang-switch__btn:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.lang-switch__btn.is-active {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}

/* Mobile Menu Toggle */
.mobile-menu-checkbox {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-checkbox:checked + .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-checkbox:checked + .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-checkbox:checked + .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
}

.btn-gradient,
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

html[data-theme="dark"] .btn-gradient,
html[data-theme="dark"] .btn-primary {
    color: #12151c;
}

.btn-gradient:hover,
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-outline,
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-image: none;
}

.btn-outline:hover,
.btn-secondary:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.main-content:has(.home-hero) {
    padding: 0;
}

/* Hero Section */
.hero {
    text-align: left;
    padding: 0;
    position: relative;
}

.hero::before {
    display: none;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
    line-height: 1.1;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 34rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    display: none;
}

.service-icon {
    display: none;
}

.service-card {
    text-align: left;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    position: relative;
    overflow: hidden;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(26, 188, 156, 0.35));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.portfolio-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.portfolio-card-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portfolio-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #FFD700;
    font-weight: 600;
}

.portfolio-card-title {
    margin: 0;
}

.portfolio-card-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.portfolio-card-link::after {
    content: '↗';
    font-size: 1rem;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-card-link:hover {
    color: var(--cyan);
}

.portfolio-card-link:hover::after {
    opacity: 1;
    transform: translate(4px, -1px);
}

.portfolio-card-external {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.portfolio-card-external:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.portfolio-card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 60ch;
}

.portfolio-card-footer {
    margin-top: auto;
}

.portfolio-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portfolio-card-btn {
    min-width: 170px;
    text-align: center;
}

.portfolio-video-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.portfolio-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.portfolio-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* Forms */
.form {
    max-width: 500px;
    margin: 0 auto;
}

/* Форми редагування статей та створення - повна ширина */
.article-edit-form .form,
.card .form {
    max-width: 100%;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.85;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

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

/* Alerts */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-left: 4px solid;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-info {
    border-color: var(--cyan);
}

.alert-success {
    border-color: var(--cyan);
}

.alert-error {
    border-color: #E74C3C;
}

.alert-close {
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1rem;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
    font-size: 1rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(243, 156, 18, 0.2);
    color: #F39C12;
}

.badge-contact, .badge-contacted {
    background: rgba(155, 89, 182, 0.2);
    color: #9B59B6;
}

.badge-in-progress {
    background: rgba(52, 152, 219, 0.2);
    color: #3498DB;
}

.badge-completed {
    background: rgba(39, 174, 96, 0.2);
    color: #27AE60;
}

.badge-cancelled {
    background: rgba(231, 76, 60, 0.2);
    color: #E74C3C;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-bar,
    .header-content {
        flex-wrap: nowrap;
        gap: 1rem;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-shrink: 0;
        position: relative;
        z-index: 100;
        margin-left: auto;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        margin-top: 0;
        border: 1px solid var(--border);
        border-radius: 0;
        box-shadow: var(--shadow-md);
        transform: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, max-height 0.2s ease;
        max-height: 0;
        overflow: hidden;
    }
    
    .mobile-menu-checkbox:checked ~ .nav {
        transform: none;
        opacity: 1;
        pointer-events: all;
        max-height: 500px;
    }
    
    .nav-link,
    .nav-cta {
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
        margin-left: 0;
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-radius: 0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon-img {
        width: 35px;
        height: 35px;
    }
    
    .hero {
        padding: 2rem 0;
        overflow: hidden;
    }
    
    .hero::before {
        width: 300px;
        height: 300px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-card {
        padding: 1.75rem;
    }

    .portfolio-card-link {
        font-size: 1.5rem;
    }

    .portfolio-card-content p {
        max-width: 100%;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 215, 0, 0.3);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-icon {
    font-size: 2.5rem;
}

.order-card-body h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
}

.order-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.order-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    will-change: transform, opacity;
    transform: translateZ(0); 
    -webkit-overflow-scrolling: touch; 
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-item p {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

.glink span {
    display: none !important;
}

.gt_white_content .glink span {
    display: inline !important;
    color: var(--text-primary) !important;
    background: var(--bg-dark) !important;
}

.gt_white_content {
    background-color: var(--bg-dark) !important;
}


/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Scrollbar for modal-item p */
.modal-item p::-webkit-scrollbar {
    width: 6px;
}

.modal-item p::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-item p::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.modal-item p::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-display);
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-meta {
    color: var(--text-secondary);
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.profile-slug-link {
    color: var(--accent);
    text-decoration: none;
}

.profile-slug-link:hover {
    text-decoration: underline;
}

.profile-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0;
}

.profile-socials-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

.profile-socials-empty {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
}

.profile-badge-admin {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border-strong);
}

.profile-badge-manager {
    background: var(--accent-soft);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.social-settings-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 3px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.social-settings-trigger:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: none;
}

.social-settings-trigger:active {
    transform: none;
}

.social-settings-trigger-icon {
    font-size: 1.05rem;
    line-height: 1;
}

/* Profile social links — theme-aware chips with brand accent */
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 3px;
    font-weight: 550;
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-left-width: 3px;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.social-btn:hover {
    transform: none;
    box-shadow: none;
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text-primary);
}

.social-btn-telegram {
    border-left-color: #2aabee;
}

.social-btn-github {
    border-left-color: #24292f;
}

html[data-theme="dark"] .social-btn-github {
    border-left-color: #c9d1d9;
}

.social-btn-linkedin {
    border-left-color: #0a66c2;
}

html[data-theme="dark"] .social-btn-linkedin {
    border-left-color: #5b9bd5;
}

.social-btn-facebook {
    border-left-color: #1877f2;
}

html[data-theme="dark"] .social-btn-facebook {
    border-left-color: #6aa8ff;
}

.social-btn-website {
    border-left-color: var(--accent);
}

.social-btn-icon {
    display: none;
}

.profile-settings-card {
    margin-top: 2rem;
}

.profile-settings-card .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-orders-header h2 {
    font-size: 2rem;
    margin: 0;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-info h1 {
        font-size: 2rem;
    }

    .profile-orders-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.profile-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Blog */
.blog-page {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.blog-page__intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.blog-page__intro h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin: 0 0 0.5rem;
}

.blog-page__intro p {
    color: var(--text-secondary);
    margin: 0;
    max-width: 40ch;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.blog-filters__field {
    min-width: 200px;
}

.blog-filters__field--grow {
    flex: 1;
    min-width: 220px;
}

.blog-filters__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 3px;
}

.blog-chip:hover,
.blog-chip.is-active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-soft);
}

.blog-list {
    border-top: 1px solid var(--border);
}

.blog-list__row {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr;
    gap: 1.25rem;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.15s ease;
}

.blog-list__row:hover {
    padding-left: 0.35rem;
}

.blog-list__main h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.45rem;
    margin: 0 0 0.45rem;
    color: var(--text-primary);
}

.blog-list__main p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.blog-list__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-align: right;
}

.blog-list__cat {
    color: var(--accent);
    font-weight: 600;
}

.blog-empty {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

.blog-empty h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
}

.blog-empty p {
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.article-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    height: 100%;
}

.article-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--accent);
}

.article-card-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.35rem;
    margin: 0;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.article-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.article-card-link {
    color: var(--accent);
    font-weight: 600;
}

.badge-draft {
    background: var(--accent-soft);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-published {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border);
}

.article-view {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3rem) 0 3rem;
}

.article-view.card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    transition: none;
}

.article-view.card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.article-view-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.article-view-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 0.5rem 0 0;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
}

.article-view-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.article-view-author {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.article-view-author:hover {
    color: var(--accent);
}

.article-view-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-draft-notice {
    background: var(--accent-soft);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.article-view-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-primary);
}

.article-view-content p {
    margin-bottom: 1.15rem;
}

.article-edit-form {
    margin-top: 2rem;
    width: 100%;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.article-edit-form .form-textarea {
    min-height: 260px;
}

.article-edit-form .form,
.article-edit-form .form-group {
    width: 100%;
}

.article-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.article-back {
    margin-bottom: 1.25rem;
}

.article-back a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.article-back a:hover {
    color: var(--accent);
}

.article-cat {
    display: inline-flex;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--accent-soft);
}

@media (max-width: 800px) {
    .blog-list__row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .blog-list__meta {
        align-items: flex-start;
        text-align: left;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 0.85rem;
    }
}

/* ——— Order form page ——— */
.order-page {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.order-page__layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(280px, 1.05fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: start;
}

.order-page__eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.order-page__aside h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.1rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 0.85rem;
}

.order-page__lead {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 34ch;
}

.order-page__points {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    border-top: 1px solid var(--border);
}

.order-page__points li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.order-page__alt {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.order-page__alt a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.order-page__form-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: clamp(1.4rem, 3vw, 2rem);
}

.order-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.order-form {
    position: relative;
}

.order-form .form-input,
.order-form .form-textarea {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
}

html[data-theme="light"] .order-form .form-input,
html[data-theme="light"] .order-form .form-textarea {
    background: #ffffff;
    border-color: rgba(18, 22, 26, 0.28);
    box-shadow: inset 0 0 0 1px rgba(18, 22, 26, 0.04);
}

html[data-theme="dark"] .order-form .form-input,
html[data-theme="dark"] .order-form .form-textarea {
    background: #0c0f14;
    border-color: rgba(255, 255, 255, 0.22);
}

.order-form .form-input:focus,
.order-form .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.order-form .form-group {
    margin-bottom: 1.15rem;
}

.order-form__hint,
.order-form__note {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.order-form__submit {
    width: 100%;
    margin-top: 0.25rem;
}

.order-page__success h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2rem;
    margin-bottom: 0.65rem;
}

.order-page__success p {
    color: var(--text-secondary);
    margin-bottom: 1.35rem;
}

.order-page__success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

@media (max-width: 800px) {
    .order-page__layout {
        grid-template-columns: 1fr;
    }
}

/* ——— Services catalog & cards ——— */
.svc-page {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.svc-page__intro {
    max-width: 36rem;
    margin-bottom: 2.5rem;
}

.svc-page__intro h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 0.65rem;
}

.svc-page__intro p {
    color: var(--text-secondary);
}

.svc-back {
    margin-bottom: 1.25rem;
}

.svc-back a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.svc-back a:hover {
    color: var(--accent);
}

.svc-catalog {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
}

.svc-catalog__row {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: stretch;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.svc-catalog__row--right .svc-catalog__media {
    order: 2;
}

.svc-catalog__row--right .svc-catalog__body {
    order: 1;
}

.svc-catalog__media {
    min-height: 200px;
    background: var(--bg-darker);
    overflow: hidden;
}

.svc-catalog__media img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.svc-catalog__row:hover .svc-catalog__media img {
    transform: scale(1.03);
}

.svc-catalog__media--empty {
    background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--bg-darker);
}

.svc-catalog__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0;
}

.svc-catalog__body h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    margin-bottom: 0.55rem;
}

.svc-catalog__body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    max-width: 38ch;
}

.svc-catalog__more {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.95rem;
}

.svc-cat-hero {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.25rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.svc-cat-hero--has-media {
    grid-template-columns: minmax(180px, 0.9fr) 1.3fr;
    align-items: center;
}

.svc-cat-hero__media {
    overflow: hidden;
    min-height: 180px;
    background: var(--bg-darker);
}

.svc-cat-hero__media img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.svc-cat-hero__copy h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    margin-bottom: 0.65rem;
}

.svc-cat-hero__copy p {
    color: var(--text-secondary);
    max-width: 40ch;
}

.svc-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.svc-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.svc-card__visual {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-darker);
}

.svc-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.svc-card__visual--empty {
    background:
        linear-gradient(160deg, var(--accent-soft), transparent 60%),
        var(--bg-darker);
}

.svc-card__veil {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.7rem;
    padding: 1rem 1.05rem 1.1rem;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.05) 20%, rgba(10, 12, 16, 0.88) 72%);
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #f3f5f7;
}

.svc-card__veil p {
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    max-height: 4.2em;
}

.svc-card__veil .btn {
    align-self: flex-start;
}

.svc-card:hover .svc-card__veil,
.svc-card:focus-within .svc-card__veil {
    opacity: 1;
}

.svc-card:hover .svc-card__visual img {
    transform: scale(1.04);
}

.svc-card__meta {
    padding: 1rem 1.05rem 1.15rem;
}

.svc-card__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.svc-card__price {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .svc-catalog__row,
    .svc-catalog__row--right {
        grid-template-columns: 1fr;
    }

    .svc-catalog__row--right .svc-catalog__media,
    .svc-catalog__row--right .svc-catalog__body {
        order: initial;
    }

    .svc-cat-hero--has-media {
        grid-template-columns: 1fr;
    }

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

    .svc-card__veil {
        opacity: 1;
        background: linear-gradient(180deg, transparent 25%, rgba(10, 12, 16, 0.88) 85%);
    }
}

/* ——— Homepage ——— */
.home-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: var(--hero-wash);
    border-bottom: 1px solid var(--border);
}

.home-hero__media {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-hero__media img {
    position: absolute;
    right: max(1%, calc(38% - 240px));
    top: 50%;
    transform: translateY(-50%);
    width: min(46vw, 520px);
    height: auto;
    opacity: 0.22;
    object-fit: contain;
    animation: home-fade-in 1.1s ease forwards;
}

html[data-theme="dark"] .home-hero__media img {
    opacity: 0.28;
}

.home-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    width: 100%;
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.home-hero__copy {
    max-width: 34rem;
}

.home-hero__brand {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 0.9;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    animation: home-fade-up 0.65s ease forwards;
}

.home-hero__title {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 28ch;
    animation: home-fade-up 0.65s ease 0.08s both;
}

.home-hero__lead {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 38ch;
    margin-bottom: 1.75rem;
    animation: home-fade-up 0.65s ease 0.14s both;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    animation: home-fade-up 0.65s ease 0.2s both;
}

.home-section {
    padding: clamp(3.25rem, 6vw, 5rem) 0;
    border-bottom: 1px solid var(--border);
}

.home-section--rail {
    background: var(--bg-darker);
}

.home-split {
    display: grid;
    grid-template-columns: minmax(180px, 0.85fr) 1.55fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.home-split__aside h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.home-split__aside p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-bottom: 1rem;
}

.home-text-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.home-text-link:hover {
    opacity: 0.8;
}

.home-list {
    list-style: none;
    border-top: 1px solid var(--border);
}

.home-list__row {
    display: grid;
    grid-template-columns: minmax(140px, 0.9fr) 1.4fr auto;
    gap: 1rem;
    align-items: baseline;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.2s ease;
}

.home-list__row:hover {
    padding-left: 0.35rem;
}

.home-list__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
}

.home-list__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.home-list__go {
    color: var(--accent);
    font-size: 1.1rem;
}

.home-rail {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--border-strong);
}

.home-rail__step {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1rem;
    padding: 0 0 1.75rem 1.35rem;
    position: relative;
}

.home-rail__step:last-child {
    padding-bottom: 0;
}

.home-rail__step::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 0.45rem;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

.home-rail__num {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding-top: 0.2rem;
}

.home-rail__step h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.home-rail__step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 40ch;
}

.home-people {
    list-style: none;
    border-top: 1px solid var(--border);
}

.home-people__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.home-people__row:hover .home-people__name {
    color: var(--accent);
}

.home-people__name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    transition: color 0.15s ease;
}

.home-people__role {
    color: var(--text-secondary);
    font-size: 0.95rem;
    align-self: center;
}

.home-closing {
    text-align: left;
    background: var(--bg);
}

.home-closing h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.home-closing p {
    color: var(--text-secondary);
    max-width: 34ch;
    margin-bottom: 1.5rem;
}

.home-empty {
    color: var(--text-secondary);
    padding: 1.5rem 0;
}

/* keep services.php cards usable */
.home-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.home-service {
    display: block;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    background: transparent;
    border-radius: 0;
}

.home-service:hover {
    transform: none;
    border-color: var(--border);
}

.home-service__name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
}

.home-service__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
}

.home-service__more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.home-section__head h1,
.home-section__head h2 {
    font-family: var(--font-display);
    font-weight: 400;
}

.home-cta {
    text-align: left;
    padding: 0;
}

.home-cta h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    margin-bottom: 0.65rem;
}

.home-cta p {
    color: var(--text-secondary);
    max-width: 34ch;
    margin: 0 0 1.25rem;
}

/* Theme comparison switcher */
.theme-switcher {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.45rem 0.4rem 0.85rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    font-size: 0.82rem;
}

.theme-switcher__label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.theme-switcher__btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 3px;
    cursor: pointer;
}

.theme-switcher__btn.is-active {
    background: var(--accent);
    color: #fff;
}

html[data-theme="dark"] .theme-switcher__btn.is-active {
    color: #12151c;
}

@keyframes home-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 900px) {
    .home-hero__media img {
        width: min(58vw, 300px);
        right: 8%;
        opacity: 0.14;
    }

    .home-split {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .home-list__row {
        grid-template-columns: 1fr auto;
    }

    .home-list__desc {
        grid-column: 1 / -1;
        order: 3;
    }

    .theme-switcher {
        left: 1rem;
        right: 1rem;
        transform: none;
        width: auto;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__brand,
    .home-hero__title,
    .home-hero__lead,
    .home-hero__actions,
    .home-hero__media img {
        animation: none;
        opacity: 1;
    }
}


/* ===== Portfolio list (alternating rows) ===== */
.pf-page {
    padding: clamp(2rem, 4vw, 3.5rem) 0 1rem;
}

.pf-page__intro {
    max-width: 40rem;
    margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.pf-page__intro h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.85rem);
    margin-bottom: 0.65rem;
}

.pf-page__intro p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.55;
}

.pf-page__note {
    max-width: 40rem;
    margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.78;
}

.pf-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.pf-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(1.25rem, 3vw, 2.75rem);
    align-items: stretch;
    padding: clamp(1.75rem, 3vw, 2.5rem) 0;
    border-bottom: 1px solid var(--border);
}

.pf-row--right .pf-row__media {
    order: 2;
}

.pf-row--right .pf-row__body {
    order: 1;
}

.pf-row__media {
    min-height: 240px;
    background: var(--bg-darker);
    overflow: hidden;
}

.pf-row__media--empty {
    background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--bg-darker);
}

.pf-gallery {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pf-gallery__stage {
    position: relative;
    flex: 1;
    min-height: 240px;
    background: var(--bg-darker);
}

.pf-gallery__main {
    width: 100%;
    height: 100%;
    min-height: 240px;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.pf-gallery__play {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    border: 0;
    cursor: pointer;
    padding: 0.55rem 1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bg-darker, #0d1117);
    background: var(--accent, #1abc9c);
    letter-spacing: 0.01em;
}

.pf-gallery__play:hover {
    filter: brightness(1.05);
}

.pf-gallery__video {
    position: absolute;
    inset: 0;
    background: #000;
}

.pf-gallery__video iframe,
.pf-video-only iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pf-video-only {
    position: relative;
    width: 100%;
    min-height: 240px;
    padding-bottom: 56.25%;
    background: #000;
}

.pf-gallery__thumbs {
    display: flex;
    gap: 0.45rem;
    padding: 0.55rem 0 0;
    overflow-x: auto;
}

.pf-gallery__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 48px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    opacity: 0.65;
}

.pf-gallery__thumb.is-active,
.pf-gallery__thumb:hover {
    opacity: 1;
    border-color: var(--accent);
}

.pf-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-row__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0;
}

.pf-row__index {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 0.55rem;
}

.pf-row__body h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.55rem, 2.5vw, 2.05rem);
    margin-bottom: 0.65rem;
    line-height: 1.2;
}

.pf-row__teaser {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    max-width: 42ch;
    line-height: 1.55;
}

.pf-row__more {
    color: var(--text-secondary);
    opacity: 0.9;
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
    max-width: 46ch;
    line-height: 1.55;
}

.pf-row__live {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.pf-row__live:hover {
    border-bottom-color: var(--accent);
}

@media (max-width: 900px) {
    .pf-row,
    .pf-row--right {
        grid-template-columns: 1fr;
    }

    .pf-row--right .pf-row__media,
    .pf-row--right .pf-row__body {
        order: initial;
    }

    .pf-gallery__main {
        max-height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-gallery__play {
        transition: none;
    }
}
