/* Nikita — portfolio. The original navy, cyan and purple palette is retained. */
:root {
    color-scheme: dark;
    --bg-darker: #060914;
    --bg-dark: #0a0e27;
    --bg-card: #10162a;
    --accent-blue: #00d4ff;
    --accent-purple: #a855f7;
    --text-primary: #f7f8ff;
    --text-secondary: #dce1ee;
    --text-muted: #a9b3ca;
    --border: #283149;
    --gradient-primary: linear-gradient(115deg, #67e5ff 8%, #bd95ff 95%);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body {
    margin: 0;
    min-width: 280px;
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--text-primary); line-height: 1.16; text-wrap: balance; }
[hidden] { display: none !important; }
section[id], article[id] { scroll-margin-top: 0; }
::selection { background: #524689; color: #fff; }
:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 5px; }
.container { width: min(100% - 4rem, 1160px); margin-inline: auto; }
.skip-link {
    position: fixed;
    z-index: 100;
    top: 1rem;
    left: 1rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent-blue);
    color: var(--bg-darker);
    font-weight: 700;
    transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* Navigation */
.site-header {
    position: sticky;
    z-index: 30;
    top: 0;
    border-bottom: 1px solid rgba(169, 179, 202, 0.14);
    background: rgba(6, 9, 20, 0.94);
    backdrop-filter: blur(18px);
}
.header-inner { min-height: 84px; display: flex; align-items: center; gap: 2rem; }
.brand { flex-shrink: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.06em; color: var(--text-primary); text-decoration: none; }
.brand span { color: #76dfff; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 1.65rem; margin-left: auto; }
.site-nav a { padding-block: 0.7rem; font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: #76dfff; }
.header-controls { display: flex; align-items: center; gap: 0.8rem; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; gap: 2px; }
.language-switch button {
    min-width: 40px;
    min-height: 36px;
    padding: 0.35rem 0.55rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}
.language-switch button:hover { color: var(--text-primary); background: #172039; }
.language-switch button[aria-pressed='true'] { background: #26344e; color: #fff; }
.menu-toggle { display: none; min-height: 44px; min-width: 44px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); background: var(--bg-card); padding: 0.45rem 0.75rem; }

/* Intro */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(5rem, 10vw, 8.5rem) clamp(5.5rem, 10vw, 8rem);
    border-bottom: 1px solid rgba(169, 179, 202, 0.12);
    background: radial-gradient(ellipse at 86% 13%, rgba(100, 56, 171, 0.15), transparent 52%), radial-gradient(ellipse at 5% 90%, rgba(0, 145, 180, 0.08), transparent 52%);
}
.hero::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0.16;
    background-image: linear-gradient(rgba(115, 139, 175, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(115, 139, 175, 0.12) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(to right, transparent 15%, #000);
}
.hero-content { max-width: 960px; }
.eyebrow, .hero-eyebrow { margin-bottom: 1.5rem; color: #76dfff; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.hero h1 { max-width: 1000px; font-size: clamp(2.9rem, 6.5vw, 5.25rem); font-weight: 750; letter-spacing: -0.055em; line-height: 1.08; }
.gradient-text { background: var(--gradient-primary); background-clip: text; -webkit-background-clip: text; color: transparent; }
.hero-lead { max-width: 710px; margin-top: 1.7rem; color: #bfc9de; font-size: clamp(1.075rem, 2vw, 1.25rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-top: 2.15rem; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 50px;
    padding: 0.8rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.button-primary { background: #8bdeff; color: #071426; }
.button-primary:hover { background: #b0e9ff; box-shadow: 0 0 28px rgba(0, 212, 255, 0.12); }
.button-secondary { border-color: #394761; background: rgba(16, 22, 42, 0.7); color: var(--text-primary); }
.button-secondary:hover { border-color: #8bdeff; background: #18223a; }
.hero-note { max-width: 720px; margin-top: 1.2rem; color: var(--text-muted); font-size: 0.8rem; }

/* Shared section headings */
.section { padding-block: clamp(4.5rem, 8vw, 6.5rem); }
.section-heading { max-width: 740px; margin-bottom: 2.5rem; }
.section-number { display: block; margin-bottom: 0.7rem; color: #79daed; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.section-heading h2, .contact-panel h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.045em; }
.section-heading p { max-width: 660px; margin-top: 1rem; color: var(--text-muted); font-size: 1.025rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service { min-width: 0; padding: 1.7rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: linear-gradient(135deg, #11182b, #0b1122); }
.service-number { display: inline-block; margin-bottom: 1.6rem; color: #94aed3; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.service h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
.service p { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; }

/* Case studies: screenshots remain fully visible, never cropped. */
#projects { background: #090e20; border-block: 1px solid rgba(169, 179, 202, 0.12); }
.project-list { display: grid; gap: 2rem; }
.project { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: start; gap: 2.5rem; padding: var(--spacing-md); border: 1px solid var(--border); border-radius: var(--radius-lg); background: #0e1529; }
.project:nth-child(even) .project-media { order: 2; }
.project:nth-child(even) .project-content { order: 1; }
.project-media, .project-content { min-width: 0; }
.project-media { margin: 0; }
.media-link { display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 250px; border: 1px solid #303b52; border-radius: 10px; background: #080c18; text-decoration: none; }
.media-link img { width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.media-link:hover { border-color: #76dfff; }
.media-caption { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.76rem; line-height: 1.6; }
.report-preview { margin: 0; padding: 1.5rem; border: 1px solid #303b52; border-radius: 10px; background: #080c18; color: #b8e6d4; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.85rem/1.8 Consolas, monospace; }
.menu-toggle { gap: 0.5rem; }
.project-type { display: inline-flex; align-items: center; width: fit-content; gap: 0.4rem; margin-bottom: 0.9rem; padding: 0.25rem 0.65rem; border: 1px solid #435071; border-radius: 5px; background: #18233b; color: #cfdbf4; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.025em; }
.project h3 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); font-weight: 700; letter-spacing: -0.03em; }
.project-summary { margin-top: 0.8rem; color: #b5c2da; font-size: 0.93rem; }
.project-facts { display: grid; gap: 0.85rem; margin-top: 1.5rem; }
.project-facts > div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 0.7rem; }
.project-facts dt { padding-top: 0.1rem; color: #89d9ef; font-size: 0.7rem; font-weight: 650; line-height: 1.75; }
.project-facts dd { color: #c0cadd; font-size: 0.85rem; line-height: 1.75; }
.tech-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.45rem; padding: 0; list-style: none; }
.tech-list li { padding: 0.23rem 0.55rem; border: 1px solid #29354b; border-radius: 4px; background: #0b1222; color: #b4c2da; font-size: 0.7rem; line-height: 1.5; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.35rem; margin-top: 1.25rem; }
.text-link { display: inline-flex; align-items: center; min-height: 40px; color: #8de1f5; font-size: 0.82rem; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.text-link:hover { color: #d1f5ff; }

/* Delivery process */
.process-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: process; gap: 1.75rem; padding: 0; list-style: none; }
.process-list li { min-width: 0; padding-top: 1.2rem; border-top: 1px solid #384763; counter-increment: process; }
.process-list li::before { display: block; margin-bottom: 1.4rem; content: '0' counter(process); color: #83dcf1; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.process-list h3 { font-size: 1.075rem; letter-spacing: -0.02em; }
.process-list p { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.88rem; line-height: 1.75; }

/* Contact: all Telegram links use the shared public configuration. */
#contact { padding-top: 1rem; }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 3rem; border: 1px solid #38445e; border-radius: var(--radius-lg); background: radial-gradient(ellipse at 95% 0%, rgba(127, 76, 190, 0.16), transparent 65%), #10172c; }
.contact-panel p { max-width: 590px; margin-top: 1rem; color: #b9c4d9; font-size: 0.95rem; }
.contact-details { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding-left: 2rem; border-left: 1px solid #38445e; }
.contact-status { color: #d2def3; font-size: 0.9rem; }
.contact-username { display: inline-flex; align-items: center; min-height: 44px; color: #8de1f5; font-size: 1.1rem; font-weight: 600; text-underline-offset: 5px; }
.contact-details .button { max-width: 100%; text-align: center; }
.contact-details p { margin: 0; }
.site-footer { padding-block: 2rem; color: var(--text-muted); font-size: 0.76rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.site-footer a { text-underline-offset: 4px; }
.site-footer a:hover { color: var(--text-primary); }

/* Visible by default, including without JavaScript or IntersectionObserver. */
.reveal { opacity: 1; }

@media (max-width: 1020px) {
    .header-inner { gap: 1.2rem; }
    .site-nav { gap: 1rem; }
    .site-nav a { font-size: 0.8rem; }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project { gap: 1.75rem; padding: 1.5rem; }
    .project-facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
    .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
    .contact-panel { padding: 2rem; gap: 2rem; }
}

@media (max-width: 760px) {
    html { scroll-padding-top: 6rem; }
    .container { width: min(100% - 2.5rem, 620px); }
    .header-inner { flex-wrap: wrap; justify-content: space-between; min-height: 74px; gap: 0.75rem 1rem; padding-block: 0.75rem; }
    .header-controls { margin-left: auto; }
    .brand { font-size: 1.3rem; }
    .site-nav { order: 3; width: 100%; margin: 0; justify-content: flex-start; gap: 0.35rem 1.25rem; flex-wrap: wrap; }
    .site-nav a { min-height: 44px; font-size: 0.88rem; }
    .js .site-nav { display: none; }
    .js .site-nav.is-open { display: flex; padding-top: 0.45rem; padding-bottom: 0.5rem; border-top: 1px solid var(--border); }
    .js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; }
    .hero { padding-block: 4.5rem 5rem; }
    .hero h1 { font-size: clamp(2.6rem, 8.8vw, 4rem); }
    .hero-lead { margin-top: 1.4rem; font-size: 1.05rem; }
    .hero-actions { margin-top: 1.8rem; }
    .section { padding-block: 4rem; }
    .section-heading { margin-bottom: 2rem; }
    .section-heading p { font-size: 0.95rem; }
    .project { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.5rem; border-radius: var(--radius-md); }
    .project:nth-child(even) .project-media, .project:nth-child(even) .project-content { order: initial; }
    .media-link { min-height: 0; }
    .media-link img { max-height: 440px; }
    .project-facts > div { grid-template-columns: 4.15rem minmax(0, 1fr); gap: 0.6rem; }
    .project h3 { font-size: 1.65rem; }
    .contact-panel { grid-template-columns: 1fr; gap: 1.75rem; padding: 2rem; }
    .contact-details { padding-top: 1.4rem; padding-left: 0; border-top: 1px solid #38445e; border-left: 0; }
    .site-footer { padding-block: 1.5rem; }
}

@media (max-width: 440px) {
    .container { width: calc(100% - 2rem); }
    .header-inner { gap: 0.65rem; }
    .header-controls { gap: 0.55rem; }
    .language-switch button { min-width: 34px; }
    .menu-toggle { padding-inline: 0.6rem; }
    .hero { padding-block: 3.5rem 4rem; }
    .hero h1 { font-size: clamp(2.2rem, 9.5vw, 2.65rem); }
    .hero-actions { align-items: stretch; }
    .hero-actions .button { width: 100%; }
    .services-grid { grid-template-columns: 1fr; }
    .service { padding: 1.5rem; }
    .service-number { margin-bottom: 1rem; }
    .project { padding: 1.15rem; gap: 1.5rem; }
    .project-facts > div { grid-template-columns: 1fr; gap: 0.1rem; }
    .process-list { grid-template-columns: 1fr; gap: 1.75rem; }
    .process-list li::before { margin-bottom: 0.8rem; }
    .contact-panel { padding: 1.5rem; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .gradient-text { background: none; color: CanvasText; }
    .button, .language-switch button[aria-pressed='true'] { border: 1px solid ButtonText; }
    .hero::after { display: none; }
}
