/* ==========================================================================
   MaetherIT – design "D" (dark, technical, mountains)
   ========================================================================== */

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/space-grotesk-latin-wght-normal-Dr-cltI.woff2") format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url("../fonts/jetbrains-mono-latin-wght-normal-qI6BF9f.woff2") format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #0B1220;
    --color-surface: #111A2C;
    --color-surface-raised: #16223A;
    --color-border: #1E2A40;
    --color-border-strong: #2A3B5C;
    --color-text: #E8EEF8;
    --color-text-muted: #B4C0D3;
    --color-text-subtle: #8695AD;
    --color-accent: #A8C7FA;
    --color-accent-hover: #D3E3FD;
    --color-logo: #4189FF;
    --color-logo-light: #A8C7FA;
    --color-online: #7EE0A8;

    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-s: 8px;
    --radius-m: 10px;
    --radius-l: 18px;
    --radius-xl: 24px;

    --container: 1160px;
    --gutter: 24px;
    --section-space: clamp(64px, 9vw, 96px);
}

/* Base
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

a {
    color: var(--color-accent);
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

address {
    font-style: normal;
}

/* Components set their own display; the hidden attribute must still win */
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 10;
    padding: 12px 16px;
    border-radius: var(--radius-s);
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: 780px;
}

/* Typography helpers
   ========================================================================== */

.section-label,
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-accent);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 560px;
}

.meta-line {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-weight: 700;
    text-decoration: none;
}

/* Buttons
   ========================================================================== */

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-m);
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.button:hover {
    background: var(--color-accent-hover);
    color: var(--color-bg);
}

.button--outline {
    background: transparent;
    border-color: #33456A;
    color: var(--color-text);
}

.button--outline:hover {
    background: var(--color-surface-raised);
    color: var(--color-text);
}

.button--small {
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-s);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Header & footer
   ========================================================================== */

.site-header {
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
}

.site-header__logo img {
    width: auto;
    height: 40px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.site-nav__item,
.site-nav__lang {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #9AA8BF;
    text-decoration: none;
}

.site-nav__lang {
    text-transform: uppercase;
}

.site-footer {
    margin-top: var(--section-space);
}

.site-footer__bar {
    background: #0E1729;
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-block: 20px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.site-footer__links a {
    color: #9AA8BF;
}

/* Mountains (elevation profile)
   ========================================================================== */

.mountains {
    position: relative;
}

.mountains svg {
    width: 100%;
}

/* Full height of the viewBox on wide screens (no cropping), a minimum height
   on narrow screens where the sides get cropped instead of squashing the peaks. */
.mountains--hero svg {
    height: max(150px, calc(100vw * 280 / 1440));
}

.mountains--footer svg {
    height: max(100px, calc(100vw * 200 / 1440));
}

.mountains__grid {
    stroke: var(--color-border);
    stroke-width: 1;
    stroke-dasharray: 4 8;
}

.mountains__back {
    fill: var(--color-logo-light);
    opacity: 0.18;
}

.mountains--footer .mountains__back {
    opacity: 0.14;
}

.mountains__front {
    fill: #5B95F9;
    opacity: 0.32;
}

.mountains--footer .mountains__front {
    opacity: 0.26;
}

.mountains__line {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2;
    stroke-linejoin: round;
}

.mountains__peak {
    fill: var(--color-bg);
    stroke: var(--color-accent);
    stroke-width: 2;
}

.mountains__ground {
    fill: var(--color-bg);
}

.mountains__label {
    font-family: var(--font-mono);
    font-size: 14px;
    fill: var(--color-accent);
    text-anchor: middle;
}

/* Decorative logo shapes
   ========================================================================== */

.shape {
    position: absolute;
    pointer-events: none;
}

.shape--quarter-tl {
    left: -36px;
    top: -28px;
    width: 200px;
    height: 200px;
    border-radius: 200px 0 0 0;
    background: #5B95F9;
    opacity: 0.5;
}

.shape--quarter-tr {
    right: -24px;
    top: -24px;
    width: 160px;
    height: 160px;
    border-radius: 0 160px 0 0;
    background: var(--color-logo-light);
    opacity: 0.3;
}

.shape--drop {
    right: -28px;
    bottom: 40px;
    width: 160px;
    height: 220px;
    border-radius: 0 0 80px 80px;
    background: var(--color-logo-light);
    opacity: 0.35;
}

/* Portrait
   ========================================================================== */

.portrait {
    position: relative;
}

.portrait img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid var(--color-border-strong);
    border-radius: 220px 220px 20px 20px;
}

/* Hero
   ========================================================================== */

.hero {
    overflow: hidden;
}

.hero__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
    padding-top: clamp(48px, 8vw, 88px);
    padding-bottom: 24px;
}

.hero__text {
    flex: 999 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero__title {
    font-size: clamp(3rem, 7vw, 5.25rem);
    line-height: 0.98;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.portrait--hero {
    flex: 1 1 280px;
    min-width: 0;
}

.hero .mountains {
    margin-top: 8px;
}

/* Sections & cards
   ========================================================================== */

.section {
    padding-top: var(--section-space);
}

.section > .container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section-intro {
    max-width: 640px;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 16px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    background: var(--color-surface);
}

.card__icon {
    color: var(--color-accent);
}

.card__title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.25;
}

.card__text {
    color: #A9B6CA;
}

.card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    border-color: var(--color-border-strong);
    background: var(--color-surface-raised);
}

.card--featured .card__title {
    font-size: 1.75rem;
}

.card--featured .card__text {
    max-width: 760px;
    font-size: 1.0625rem;
}

.card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(126, 224, 168, 0.15);
    color: var(--color-online);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Values */

.values-grid {
    display: grid;
    /* 2 x 2 on wide screens, one column on phones */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 40px 56px;
}

.value {
    max-width: 560px;
}

.value {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border-strong);
    border-radius: 12px;
    color: var(--color-accent);
}

.value__title {
    font-size: 1.25rem;
    font-weight: 700;
}

.value__text {
    color: #A9B6CA;
}

/* Process steps */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px 40px;
}

.steps__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-strong);
}

.steps__number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-accent);
}

.steps__title {
    font-size: 1.375rem;
    font-weight: 700;
}

.steps__text {
    color: #A9B6CA;
}

/* Client status list */

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
}

/* Fixed columns, so names line up no matter how long the domain is */
.status-list__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 16px;
    padding: 16px 24px;
}

.status-list__row + .status-list__row {
    border-top: 1px solid var(--color-border);
}

.status-list__domain {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--color-text);
}

.status-list__name {
    color: var(--color-text-subtle);
}

.status-list__status {
    grid-column: 3;
    color: var(--color-online);
}

/* Narrow screens: domain and status on top, name below the domain */
@media (max-width: 760px) {
    .status-list__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .status-list__status {
        grid-column: 2;
        grid-row: 1;
    }

    .status-list__name {
        grid-column: 1 / -1;
    }
}

.status-list__status::before {
    content: '● ';
}

/* About */

.about {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px !important;
}

.about__visual {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
}

.about__mountain {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--color-border-strong);
    border-radius: 20px 20px 200px 20px;
    background: var(--color-surface-raised);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.about__mountain img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__mountain-label {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(11, 18, 32, 0.75);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-accent);
}

.about__text {
    flex: 999 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 1.1875rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.facts__item {
    padding: 6px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-accent);
}

.about__title {
    font-size: clamp(2.25rem, 4.5vw, 3rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

/* Contact box */

.contact-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(40px, 6vw, 64px) clamp(24px, 4vw, 48px);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-xl);
    background: var(--color-surface-raised);
}

.contact-box__text {
    flex: 1 1 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.contact-box__title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.contact-box__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
}

.contact-box__links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* CV page
   ========================================================================== */

.cv-head__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
    padding-top: clamp(48px, 8vw, 80px);
}

.portrait--cv {
    flex: 0 1 280px;
    min-width: 0;
}

.portrait--cv .shape--quarter-tl {
    width: 150px;
    height: 150px;
    left: -28px;
    top: -20px;
}

.portrait--cv img {
    border-radius: 180px 180px 20px 20px;
}

.cv-head__text {
    flex: 999 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cv-head__title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.cv-head__role {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-accent);
}

.tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    background: var(--color-surface-raised);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: #C9D6EA;
}

.tags--small {
    gap: 6px;
}

.parallel-card {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 24px 28px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-l);
    background: var(--color-surface);
    color: #A9B6CA;
}

.parallel-card__text {
    flex: 1 1 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.parallel-card__status {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-online);
}

.parallel-card__status::before {
    content: '● ';
}

.parallel-card__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 8px 0 0 40px;
    border-left: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -48px;
    top: 4px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-bg);
    border-radius: 50%;
    background: #5B95F9;
}

.timeline__item--current::before {
    background: var(--color-accent);
}

.timeline__item--education::before {
    border-color: #5B95F9;
    background: var(--color-bg);
}

.timeline__period {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-subtle);
}

.timeline__item--current .timeline__period {
    color: var(--color-accent);
}

.timeline__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #A9B6CA;
}

.timeline__title {
    font-size: 1.3125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.info-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 16px !important;
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #C9D6EA;
}

/* Legal & error pages
   ========================================================================== */

.legal h1,
.error-page h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.legal h2 {
    margin-top: 16px;
    font-size: 1.25rem;
}

.legal p,
.legal address {
    color: var(--color-text-muted);
}

.legal__highlight {
    padding-top: 16px;
    border-top: 1px solid var(--color-border-strong);
}

.legal__note {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-text-subtle) !important;
}

.error-page .container {
    gap: 20px;
}

/* Small screens
   ========================================================================== */

@media (max-width: 760px) {
    .site-nav {
        gap: 16px;
    }

    .site-nav__item {
        display: none;
    }

    .site-header__logo img {
        height: 34px;
    }

    .hero__inner {
        gap: 40px;
    }

    .portrait--hero {
        max-width: 300px;
        margin-inline: auto;
    }

    .portrait--cv {
        max-width: 220px;
    }

    .mountains__label {
        display: none;
    }

    .card--featured {
        flex-direction: column;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .timeline__item::before {
        left: -31px;
    }
}
