:root {
    --brand-dark: #0f172a;
    --brand-primary: #173b73;
    --brand-accent: #d4a373;
    --brand-light: #f8fafc;
    --brand-muted: #64748b;
    --brand-success: #0f766e;
    --site-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --button-radius: 0.5rem;
    --section-spacing: 5rem;
}

@font-face {
    font-family: "Serathine Demo";
    src: url("../fonts/serathine-demo.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: var(--site-font-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif);
    color: var(--site-text-color, #1e293b);
    background: var(--site-body-bg, #ffffff);
}

section {
    padding-top: var(--section-spacing, 5rem);
    padding-bottom: var(--section-spacing, 5rem);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    color: var(--site-link-hover, #0b2550);
}

.top-strip,
.bg-brand,
.admin-sidebar {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
}

body.navbar-style-gradient .top-strip,
body.navbar-style-gradient .bg-brand {
    background: linear-gradient(135deg, var(--navbar-bg, var(--brand-dark)), var(--navbar-bg-end, var(--brand-primary)));
}

body.navbar-style-solid .top-strip,
body.navbar-style-solid .bg-brand {
    background: var(--navbar-bg, var(--brand-primary));
}

body.navbar-style-light .top-strip,
body.navbar-style-light .bg-brand {
    background: var(--navbar-bg, #ffffff);
}

body.navbar-style-light .navbar-brand,
body.navbar-style-light .brand-text,
body.navbar-style-light .nav-link,
body.navbar-style-light .top-strip-text,
body.navbar-style-outline .navbar-brand,
body.navbar-style-outline .brand-text,
body.navbar-style-outline .nav-link,
body.navbar-style-outline .top-strip-text {
    color: var(--navbar-text, var(--brand-dark)) !important;
}

body.navbar-style-outline .top-strip,
body.navbar-style-outline .bg-brand {
    background: transparent;
    border-bottom: 1px solid var(--navbar-border, rgba(23, 59, 115, 0.15));
}

body.navbar-style-solid .navbar-brand,
body.navbar-style-solid .brand-text,
body.navbar-style-solid .nav-link,
body.navbar-style-solid .top-strip-text,
body.navbar-style-gradient .navbar-brand,
body.navbar-style-gradient .brand-text,
body.navbar-style-gradient .nav-link,
body.navbar-style-gradient .top-strip-text {
    color: var(--navbar-text, #111111) !important;
}

.btn-accent {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #1f2937;
    border-radius: var(--button-radius, 0.5rem);
}

.btn-accent:hover,
.btn-accent:focus {
    background: #c68e59;
    border-color: #c68e59;
    color: #111827;
}

.content-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #173b73, #b8860b);
    border: 0;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.2;
    font-size: 0.95rem;
    text-transform: capitalize;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: none;
}

.content-link-button:hover,
.content-link-button:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #0f2d58, #9a7208);
    transform: translateY(-1px);
    opacity: 0.98;
}

.post-share-label {
    display: inline-block;
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.share-link-button {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    min-height: 38px;
}

.share-link-button i {
    font-size: 0.95rem;
}

.post-signature-block {
    text-align: center;
}

.post-signature-name {
    display: inline-block;
    font-family: "Serathine Demo", "Brush Script MT", cursive;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    line-height: 1.05;
    color: #111827;
    letter-spacing: 0.01em;
    padding: 0.2rem 0.4rem;
}

.home-snapshot-title {
    font-family: "Serathine Demo", "Brush Script MT", cursive;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    line-height: 1.05;
    color: var(--brand-dark);
}

.btn,
.form-control,
.form-select,
.card,
.newsletter-band,
.comment-card,
.table-card,
.form-card {
    border-radius: var(--button-radius, 0.5rem);
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
}

.site-logo {
    max-height: 35px;
    max-width: 180px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-text {
    color: var(--navbar-text, #111111);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.top-strip-text,
.top-strip-text:hover,
.top-strip-text:focus {
    color: var(--navbar-text, #111111) !important;
}

.navbar-toggler {
    border-color: rgba(15, 23, 42, 0.35);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.navbar-light .navbar-toggler-icon {
    filter: brightness(0);
}

body.navbar-style-solid .navbar-toggler-icon,
body.navbar-style-gradient .navbar-toggler-icon {
    filter: brightness(0);
}

body.navbar-style-light .navbar-toggler-icon,
body.navbar-style-outline .navbar-toggler-icon {
    filter: brightness(0);
}

.hero-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, var(--hero-accent-glow, rgba(212, 163, 115, 0.2)), transparent 35%),
        linear-gradient(135deg, var(--hero-bg-start, #eff6ff), #ffffff 45%, var(--hero-bg-end, #f8fafc));
    padding-top: calc(var(--section-spacing, 5rem) + 1rem);
    padding-bottom: var(--section-spacing, 5rem);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.92),
        rgba(255, 255, 255, 0.88) 42%,
        rgba(248, 250, 252, 0.94)
    );
    pointer-events: none;
    z-index: 0;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.75;
    filter: saturate(0.85) blur(0.5px);
    transform: scale(1.03);
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-card,
.feature-card,
.admin-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--card-shadow, 0 18px 45px rgba(15, 23, 42, 0.08));
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--brand-muted);
    max-width: 640px;
}

.about-skills-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-skills-col .card {
    margin-top: 0;
}

.service-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(23, 59, 115, 0.1);
    color: var(--brand-primary);
    font-size: 1.25rem;
}

.stat-card {
    background: linear-gradient(135deg, #0f172a, #173b73);
    color: #ffffff;
}

.stat-card small {
    color: rgba(255, 255, 255, 0.82);
}

.stat-card:hover,
.stat-card:focus {
    color: var(--brand-accent);
}

.stat-card:hover small,
.stat-card:focus small,
.stat-card:hover .h4,
.stat-card:focus .h4 {
    color: var(--brand-accent);
}

.project-card img,
.post-card img,
.about-image {
    border-radius: 1rem;
    object-fit: cover;
}

.about-image {
    width: 100%;
    max-width: 420px;
    max-height: 520px;
    display: block;
    margin: 0 auto;
}

.about-profile-name-wrap {
    text-align: center;
    margin-top: 1rem;
}

.about-profile-name {
    display: inline-block;
    font-family: "Serathine Demo", "Brush Script MT", cursive;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    color: var(--brand-dark);
}

.language-progress-bar {
    background: var(--brand-accent, #d4a373);
}

.about-language-actions .btn {
    width: auto;
}

.timeline-item {
    border-left: 3px solid rgba(23, 59, 115, 0.15);
    padding-left: 1.25rem;
    margin-left: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-item::before {
    content: "";
    width: 0.9rem;
    height: 0.9rem;
    background: var(--brand-accent);
    border-radius: 50%;
    position: absolute;
    left: -0.57rem;
    top: 0.3rem;
}

.footer-section {
    color: var(--footer-text, #111111);
    margin-top: var(--section-spacing, 5rem);
    padding-top: calc(var(--section-spacing, 5rem) - 1rem);
    padding-bottom: 1rem;
}

.footer-main {
    align-items: start;
}

.footer-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.footer-brand-name {
    font-family: "Serathine Demo", "Brush Script MT", cursive;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
    color: inherit;
}

.footer-lead {
    color: var(--footer-muted, rgba(17, 17, 17, 0.78));
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-contact-item {
    color: inherit;
}

.footer-bottom {
    color: var(--footer-muted, rgba(17, 17, 17, 0.78));
}

.footer-legal-links a {
    color: inherit;
    white-space: nowrap;
}

.legal-page-content h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    color: var(--brand-dark);
}

.legal-page-content h2:first-child {
    margin-top: 0;
}

.legal-page-content p {
    color: var(--site-text-color, #1e293b);
    margin-bottom: 1rem;
}

.footer-section .text-muted {
    color: var(--footer-muted, rgba(17, 17, 17, 0.78)) !important;
}

body.footer-style-solid .footer-section {
    background: var(--footer-bg, var(--brand-dark));
}

body.footer-style-light .footer-section {
    background: var(--footer-bg, var(--brand-light));
    color: var(--footer-text, var(--site-text-color, #1e293b));
}

body.footer-style-light .footer-lead,
body.footer-style-light .footer-bottom,
body.footer-style-light .footer-section .text-muted {
    color: var(--footer-muted, var(--brand-muted));
}

body.footer-style-light .footer-section a,
body.footer-style-light .footer-icon,
body.footer-style-minimal .footer-section a,
body.footer-style-minimal .footer-icon {
    color: var(--footer-link, var(--brand-primary));
}

body.footer-style-minimal .footer-section {
    background: transparent;
    color: var(--footer-text, var(--site-text-color, #1e293b));
    border-top: 1px solid rgba(100, 116, 139, 0.2);
}

body.footer-style-minimal .footer-lead,
body.footer-style-minimal .footer-bottom,
body.footer-style-minimal .footer-section .text-muted {
    color: var(--footer-muted, var(--brand-muted));
}

body.theme-dark .legal-page-content h2,
body.theme-dark-auto .legal-page-content h2 {
    color: var(--dark-text, #e2e8f0);
}

.footer-section a,
.footer-icon {
    color: var(--footer-link, #111111);
}

body.footer-style-gradient .footer-section {
    background: linear-gradient(135deg, var(--footer-bg, var(--brand-dark)), var(--footer-bg-end, var(--brand-primary)));
}

.newsletter-band {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: #fff;
    border-radius: 1.25rem;
}

.blog-sidebar .card,
.comment-card {
    border-radius: 1rem;
}

.ad-slot img {
    max-height: 220px;
    object-fit: cover;
}

.map-placeholder {
    min-height: 320px;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(23, 59, 115, 0.12), rgba(212, 163, 115, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 600;
}

.map-embed-card {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
}

.map-embed-header {
    background: rgba(23, 59, 115, 0.06);
}

.map-frame {
    line-height: 0;
}

.map-frame iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

.client-strip-section {
    padding-top: 0;
}

.logo-marquee {
    overflow: hidden;
    position: relative;
    padding: 0.75rem 0;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: max-content;
    animation: logo-scroll 22s linear infinite;
    will-change: transform;
}

.logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 64px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
}

.logo-item img {
    max-width: 96px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.logo-pill {
    font-weight: 700;
    color: var(--brand-primary);
    white-space: nowrap;
    font-size: 0.92rem;
    text-align: center;
}

@keyframes logo-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 0.5rem));
    }
}

.admin-body {
    background: var(--admin-bg, #f1f5f9);
}

body.theme-dark {
    --site-body-bg: var(--dark-bg, #0b1120);
    --site-text-color: var(--dark-text, #e2e8f0);
    --brand-light: var(--dark-surface, #111827);
    --brand-muted: var(--dark-muted, #94a3b8);
    --brand-primary: var(--dark-primary, #60a5fa);
    --brand-accent: var(--dark-accent, #f4c27a);
    --hero-bg-start: var(--dark-surface, #111827);
    --hero-bg-end: var(--dark-bg, #0b1120);
}

body.theme-dark .bg-light,
body.theme-dark .card,
body.theme-dark .hero-card,
body.theme-dark .feature-card,
body.theme-dark .table-card,
body.theme-dark .form-card,
body.theme-dark .comment-card,
body.theme-dark .admin-topbar {
    background: var(--dark-surface, #111827) !important;
    color: var(--dark-text, #e2e8f0);
}

body.theme-dark .text-muted,
body.theme-dark .section-subtitle {
    color: var(--dark-muted, #94a3b8) !important;
}

@media (prefers-color-scheme: dark) {
    body.theme-dark-auto {
        --site-body-bg: var(--dark-bg, #0b1120);
        --site-text-color: var(--dark-text, #e2e8f0);
        --brand-light: var(--dark-surface, #111827);
        --brand-muted: var(--dark-muted, #94a3b8);
        --brand-primary: var(--dark-primary, #60a5fa);
        --brand-accent: var(--dark-accent, #f4c27a);
        --hero-bg-start: var(--dark-surface, #111827);
        --hero-bg-end: var(--dark-bg, #0b1120);
    }

    body.theme-dark-auto .bg-light,
    body.theme-dark-auto .card,
    body.theme-dark-auto .hero-card,
    body.theme-dark-auto .feature-card,
    body.theme-dark-auto .table-card,
    body.theme-dark-auto .form-card,
    body.theme-dark-auto .comment-card,
    body.theme-dark-auto .admin-topbar {
        background: var(--dark-surface, #111827) !important;
        color: var(--dark-text, #e2e8f0);
    }

    body.theme-dark-auto .text-muted,
    body.theme-dark-auto .section-subtitle {
        color: var(--dark-muted, #94a3b8) !important;
    }
}

body.theme-dark .border-top,
body.theme-dark .border-bottom {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-shell.admin-collapsed {
    grid-template-columns: 96px 1fr;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.08);
}

.admin-sidebar-backdrop {
    display: none;
}

.admin-sidebar-top {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 2;
    background: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar-nav-wrap {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.admin-sidebar-nav {
    padding-right: 0.35rem;
}

.admin-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.admin-brand-logo {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
}

.admin-brand img {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-sidebar .nav-link i {
    font-size: 1.05rem;
    width: 1.35rem;
    text-align: center;
    flex: 0 0 1.35rem;
}

.admin-collapse-toggle {
    flex: 0 0 auto;
}

.admin-topbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
}

.admin-menu-label {
    white-space: nowrap;
}

.admin-shell.admin-collapsed .admin-menu-label {
    display: none;
}

.admin-shell.admin-collapsed .admin-brand {
    justify-content: center;
    gap: 0;
}

.admin-shell.admin-collapsed .admin-sidebar .nav-link {
    justify-content: center;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.admin-shell.admin-collapsed .admin-collapse-toggle {
    margin-left: auto;
    margin-right: auto;
}

.admin-shell.admin-collapsed .admin-sidebar-top {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.admin-shell.admin-collapsed .admin-brand-row {
    flex-direction: column;
}

.admin-shell.admin-collapsed .admin-brand-logo {
    width: 40px;
    height: 40px;
}

.admin-shell.admin-collapsed .admin-sidebar-nav-wrap {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    transform: translateX(2px);
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.admin-shell.admin-collapsed .admin-sidebar .nav-link:hover {
    transform: none;
}

.admin-sidebar-nav-wrap::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar-nav-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.table-card,
.form-card {
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #173b73);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: 1.25rem;
}

@media (max-width: 991px) {
    .top-strip {
        display: none;
    }

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

    .admin-shell.admin-collapsed {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(88vw, 300px);
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        overflow: hidden;
        box-shadow: 18px 0 40px rgba(15, 23, 42, 0.18);
    }

    .admin-sidebar-top {
        position: sticky;
    }

    .admin-sidebar-nav-wrap {
        overflow-y: auto;
    }

    .admin-mobile-toggle {
        display: inline-flex;
    }

    .admin-topbar-toggle {
        display: none;
    }

    body.admin-mobile-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    body.admin-mobile-open .admin-sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .site-footer {
        padding-top: 3rem;
    }
}

@media (max-width: 767px) {
    .about-skills-grid {
        row-gap: 1.5rem;
    }

    .about-skills-col {
        width: 100%;
        gap: 0.6rem;
    }

    .about-language-col {
        margin-top: 0;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }

    .about-skills-grid .card {
        padding: 1.25rem !important;
    }

    .about-skills-title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 0;
    }

    .about-language-actions .btn {
        width: 100%;
    }

    .site-footer {
        margin-top: 3rem;
        padding-top: 2.5rem;
    }

    .footer-main {
        row-gap: 2rem;
    }

    .footer-bottom {
        text-align: left;
    }

    .footer-legal-links {
        width: 100%;
        justify-content: flex-start;
    }

    .logo-item {
        min-width: 104px;
        min-height: 58px;
        padding: 0.65rem 0.85rem;
    }

    .logo-item img {
        max-width: 82px;
        max-height: 24px;
    }
}
