/* ============================================================
   Nexmind — styles.css
   Sober, minimalist portfolio. Light + Dark theme.
   Brand gradient: #C33200 → #A92700 → #451005
   ============================================================ */

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Offset for the sticky header so anchor links don't land
       under the navbar. Both the header height and the breathing gap
       are exposed as variables so the offset always tracks the navbar. */
    --header-height: 84px;
    --header-gap: 0px;
    scroll-padding-top: calc(var(--header-height) + var(--header-gap));
}

@media (max-width: 520px) {
    html {
        --header-height: 72px;
        --header-gap: -20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

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

h1, h2, h3, h4, p {
    margin: 0;
}

/* ---------- Theme tokens ---------- */
:root {
    --brand-1: #C33200;
    --brand-2: #A92700;
    --brand-3: #451005;
    --brand-gradient: linear-gradient(135deg, #C33200 0%, #A92700 55%, #451005 100%);

    --container-max: 1280px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04), 0 1px 3px rgba(15, 15, 15, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 15, 15, 0.06), 0 8px 24px rgba(15, 15, 15, 0.06);
}

[data-theme="light"] {
    --color-bg: #ffffff;
    --color-bg-alt: #f7f6f4;
    --color-surface: #ffffff;
    --color-text: #161616;
    --color-text-muted: #5a5a5a;
    --color-border: #e7e5e2;
    --color-border-strong: #d6d3cf;
    --color-accent: var(--brand-1);
    --color-accent-deep: var(--brand-2);
    --color-on-accent: #ffffff;
    --logo-light: block;
    --logo-dark: none;
    --photo-bg: #f0eeea;
}

[data-theme="dark"] {
    --color-bg: #0c0c0d;
    --color-bg-alt: #131314;
    --color-surface: #161617;
    --color-text: #f4f3f1;
    --color-text-muted: #a4a09a;
    --color-border: #25252a;
    --color-border-strong: #34343a;
    --color-accent: #E04A1A;
    --color-accent-deep: #C33200;
    --color-on-accent: #ffffff;
    --logo-light: none;
    --logo-dark: block;
    --photo-bg: #1d1d1f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 56px);
}

.section {
    padding: clamp(64px, 10vw, 128px) 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-eyebrow,
.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-weight: 600;
    margin-bottom: 48px;
    max-width: 720px;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-accent);
    color: var(--color-on-accent);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    z-index: 100;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 84px;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 52px;
    width: 140px;
    flex-shrink: 0;
}

.brand-mark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.brand-mark--x {
    opacity: 1;
}

.brand-mark--full {
    opacity: 0;
}

.brand[data-state="full"] .brand-mark--x {
    opacity: 0;
}

.brand[data-state="full"] .brand-mark--full {
    opacity: 1;
}

.brand-x {
    height: 44px;
    width: auto;
    color: #2D2D2E;
    transition: color 0.25s ease;
}

[data-theme="dark"] .brand-x {
    color: #ffffff;
}

.brand-logo {
    height: 44px;
    width: auto;
}

.brand-logo--light {
    display: var(--logo-light);
}

.brand-logo--dark {
    display: var(--logo-dark);
}

/* ---------- Primary navigation (desktop) ---------- */
.primary-nav .nav-list {
    display: flex;
    gap: 28px;
    align-items: center;
}

.primary-nav .nav-list a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
    position: relative;
}

.primary-nav .nav-list a:hover,
.primary-nav .nav-list a:focus-visible {
    color: var(--color-text);
}

.primary-nav .nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--brand-gradient);
    transition: width 0.25s ease;
}

.primary-nav .nav-list a:hover::after,
.primary-nav .nav-list a:focus-visible::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-toggle,
.theme-toggle,
.menu-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    background-color: var(--color-surface);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-toggle {
    width: auto;
    padding: 0 14px;
}

.lang-toggle:hover,
.theme-toggle:hover,
.menu-toggle:hover {
    border-color: var(--color-border-strong);
    background-color: var(--color-bg-alt);
}

.lang-toggle:active,
.theme-toggle:active,
.menu-toggle:active {
    transform: scale(0.96);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* ---------- Hamburger button (mobile) ---------- */
.menu-toggle {
    display: none;
}

.menu-toggle-bars {
    position: relative;
    width: 18px;
    height: 14px;
    display: inline-block;
}

.menu-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.menu-toggle-bars span:nth-child(1) { top: 0; }
.menu-toggle-bars span:nth-child(2) { top: 6px; }
.menu-toggle-bars span:nth-child(3) { top: 12px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

/* ---------- Mobile menu panel ----------
   IMPORTANT: must NOT be nested inside the .site-header element.
   The header uses backdrop-filter, which creates a containing block
   for any descendant `position: fixed` element — that would clip the
   menu to the navbar's height and hide the close (X) button. The menu
   lives directly in <body>, with z-index 40 (below the header at 50)
   so the hamburger/X button stays visible and clickable on top.
   ---------- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: var(--color-bg);
    padding: calc(72px + 40px) clamp(24px, 6vw, 48px) 48px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    display: block;
}

@media (min-width: 861px) {
    .mobile-menu {
        display: none;
    }
}

.mobile-menu[data-state="open"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 40px;
}

.mobile-menu-list a {
    display: block;
    padding: 16px 0;
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list a:focus-visible {
    color: var(--color-accent);
}

.mobile-menu-email {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-email:hover,
.mobile-menu-email:focus-visible {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--brand-gradient);
    color: var(--color-on-accent);
    box-shadow: 0 8px 22px -10px rgba(195, 50, 0, 0.6);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(195, 50, 0, 0.7);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background-color: var(--color-bg-alt);
    border-color: var(--color-text);
}

/* ---------- Hero ---------- */
.hero {
    padding: clamp(80px, 14vw, 160px) 0 clamp(48px, 8vw, 96px);
    position: relative;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse 80vw 70vh at 100% 0%, rgba(195, 50, 0, 0.09), transparent 60%),
        radial-gradient(ellipse 60vw 50vh at 0% 100%, rgba(195, 50, 0, 0.04), transparent 65%);
}

[data-theme="dark"] .hero {
    background-image:
        radial-gradient(ellipse 80vw 70vh at 100% 0%, rgba(224, 74, 26, 0.16), transparent 60%),
        radial-gradient(ellipse 60vw 50vh at 0% 100%, rgba(224, 74, 26, 0.06), transparent 65%);
}

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

.hero-inner .hero-title,
.hero-inner .hero-description {
    max-width: 880px;
}

.hero-logo {
    margin-bottom: 40px;
}

.hero-logo-img {
    height: clamp(72px, 9vw, 120px);
    width: auto;
}

.hero-logo-img--light {
    display: var(--logo-light);
}

.hero-logo-img--dark {
    display: var(--logo-dark);
}

.hero-title {
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 600;
    margin: 16px 0 24px;
}

.hero-title .accent {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: clamp(16px, 1.6vw, 19px);
    color: var(--color-text-muted);
    max-width: 640px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- About ---------- */
.about-inner {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: clamp(32px, 6vw, 72px);
    align-items: start;
}

.about-photo {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--photo-bg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

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

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, transparent 49.5%, var(--color-border) 49.5%, var(--color-border) 50.5%, transparent 50.5%),
        linear-gradient(45deg, transparent 49.5%, var(--color-border) 49.5%, var(--color-border) 50.5%, transparent 50.5%),
        var(--photo-bg);
}

.photo-placeholder-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background-color: var(--color-bg);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
}

.about-content {
    padding-top: 8px;
}

.about-content .section-title {
    margin-bottom: 8px;
}

.about-role {
    font-size: 16px;
    color: var(--color-text-muted);
    margin: 0 0 24px;
}

.about-bio {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--color-text-muted);
    max-width: 60ch;
}

/* ---------- Services ---------- */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 980px;
    margin: 0 auto;
}

.service-item {
    width: 78%;
    max-width: 720px;
    position: relative;
    display: flex;
}

.service-item--left {
    align-self: flex-start;
}

.service-item--right {
    align-self: flex-end;
    justify-content: flex-end;
}

.service-item-inner {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 36px 36px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

.service-item-inner::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    width: 3px;
    border-radius: 2px;
    background: var(--brand-gradient);
    opacity: 0.85;
}

.service-item--left .service-item-inner::before {
    left: 0;
}

.service-item--right .service-item-inner::before {
    right: 0;
    background: linear-gradient(315deg, #C33200 0%, #A92700 55%, #451005 100%);
}

.service-item--left .service-item-inner {
    padding-left: 40px;
}

.service-item--right .service-item-inner {
    padding-right: 40px;
    text-align: right;
}

.service-item-inner:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.service-description {
    color: var(--color-text-muted);
    font-size: 15.5px;
    line-height: 1.6;
    max-width: 56ch;
}

.service-item--right .service-description {
    margin-left: auto;
}

/* ---------- Projects ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-logo {
    height: 140px;
    background-color: var(--logo-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border-bottom: 1px solid var(--color-border);
}

.project-logo--bg-black {
    --logo-bg: #000000;
}

.project-logo--bg-deep {
    --logo-bg: #0D0D0F;
}

.project-logo img {
    max-height: 100%;
    max-width: 80%;
    width: auto;
    object-fit: contain;
}

.project-body {
    padding: 24px 24px 28px;
    flex-grow: 1;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 4px;
}

.project-role {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-accent);
    margin-bottom: 12px;
}

[data-theme="dark"] .project-role {
    color: var(--color-accent);
}

.project-description {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ---------- Tech stack sub-section (inside Services) ---------- */
.tech-stack {
    margin-top: clamp(56px, 8vw, 88px);
}

.tech-stack-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tech-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px 22px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tech-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(195, 50, 0, 0.10);
    color: var(--color-accent);
    margin-bottom: 18px;
}

[data-theme="dark"] .tech-icon {
    background: rgba(224, 74, 26, 0.18);
}

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

.tech-card-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
}

.tech-card-description {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* ---------- AI card (inside Services section) ---------- */
.ai-card {
    margin-top: clamp(48px, 7vw, 80px);
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    padding: clamp(32px, 5vw, 56px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(217, 119, 87, 0.25);
    background:
        radial-gradient(circle at 100% 0%, rgba(217, 119, 87, 0.55), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(195, 50, 0, 0.30), transparent 60%),
        linear-gradient(135deg, #050505 0%, #0c0807 50%, #1a0d05 100%);
    color: #f4f3f1;
    box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.ai-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    background-color: rgba(255, 138, 92, 0.12);
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(255, 138, 92, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.ai-logo {
    width: 100%;
    height: auto;
    max-width: 100px;
}

.ai-content {
    min-width: 0;
}

.ai-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #FF8A5C;
    margin-bottom: 14px;
}

.ai-title {
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-weight: 600;
    margin-bottom: 16px;
    max-width: 36ch;
    color: #ffffff;
}

.ai-description {
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.6;
    color: rgba(244, 243, 241, 0.82);
    margin-bottom: 14px;
    max-width: 64ch;
}

.ai-meta {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(244, 243, 241, 0.55);
    max-width: 64ch;
}

/* ---------- Contact ---------- */
.section-contact {
    text-align: center;
}

.contact-inner {
    max-width: 720px;
    margin: 0 auto;
}

.section-contact .section-title {
    margin-left: auto;
    margin-right: auto;
}

.contact-description {
    color: var(--color-text-muted);
    font-size: clamp(15px, 1.4vw, 17px);
    margin-bottom: 36px;
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
}

.contact-email {
    display: inline-block;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 600;
    letter-spacing: -0.01em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
    border-bottom-color: var(--color-accent);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
    background-color: var(--color-bg);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy,
.footer-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

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

/* ---------- Focus styles ---------- */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

button:focus-visible,
.btn:focus-visible {
    outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .primary-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

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

    .about-photo {
        max-width: 280px;
    }

    .service-item,
    .service-item--left,
    .service-item--right {
        width: 100%;
        align-self: stretch;
        justify-content: flex-start;
    }

    .service-item--right .service-item-inner {
        text-align: left;
        padding-right: 36px;
        padding-left: 40px;
    }

    .service-item--right .service-item-inner::before {
        right: auto;
        left: 0;
        background: var(--brand-gradient);
    }

    .service-item--right .service-description {
        margin-left: 0;
    }

    .tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-card {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 28px;
    }

    .ai-mark {
        max-width: 96px;
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .ai-card {
        padding: 28px 22px;
        border-radius: var(--radius-md);
    }

    .ai-mark {
        max-width: 80px;
        padding: 16px;
    }

    .ai-logo {
        max-width: 80px;
    }
}

@media (max-width: 520px) {
    .header-inner {
        height: 72px;
    }

    .brand {
        width: 160px;
        height: 44px;
    }

    .brand-x,
    .brand-logo {
        height: 36px;
    }

    .hero-logo {
        margin-bottom: 28px;
    }

    .lang-toggle {
        padding: 0 10px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
