/* ============================================================
   Mohamed Shahin — Portfolio
   Refined dark-premium design system (teal single-accent)
   Colours/tokens come from dark.css / light.css (:root vars)
   ============================================================ */

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    --maxw: 1160px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Reserve room on the right for the fixed dot-rail (desktop only) */
@media (min-width: 901px) {
    body { padding-right: 54px; }
}

/* Ambient background layers */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 620px at 82% -5%, var(--accent-glow), transparent 60%),
        radial-gradient(720px 520px at 6% 8%, var(--accent-glow), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 72%);
    opacity: 0.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* Shared eyebrow label */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow .live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* ============================================================
   Navigation — right-side dot-rail + minimal top corners
   ============================================================ */
.top-brand,
.top-cluster {
    position: fixed;
    top: 20px;
    z-index: 1000;
}

.top-brand { left: 26px; }

.top-cluster {
    right: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--ink-on-accent);
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    box-shadow: 0 6px 20px var(--accent-glow);
    transition: transform 0.25s ease;
}

.top-brand:hover .brand-mark { transform: translateY(-2px); }

.corner-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.corner-btn:hover {
    border-color: var(--accent);
    transform: rotate(-12deg);
}

.menu-btn { display: none; }

/* Right dot-rail */
.rail {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rail-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    height: 14px;
}

.rail-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--muted);
    background: transparent;
    flex: none;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.rail-link:hover .rail-dot {
    border-color: var(--accent);
    transform: scale(1.2);
}

.rail-link.active .rail-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.rail-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.rail:hover .rail-label,
.rail-link.active .rail-label {
    opacity: 1;
    transform: none;
}

.rail-link.active .rail-label {
    color: var(--text);
    border-color: var(--accent);
}

/* Mobile dropdown menu */
.mobile-nav {
    position: fixed;
    top: 74px;
    right: 26px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 3px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--nav-shadow);
    min-width: 190px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--ink-on-accent);
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
}

/* ============================================================
   Section scaffolding
   ============================================================ */
.section {
    padding: 88px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    text-wrap: balance;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-head {
    text-align: center;
    margin-bottom: 52px;
}

.section-head .eyebrow {
    justify-content: center;
    margin-bottom: 14px;
}

.section-sub {
    text-align: center;
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 48px;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(26px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
                    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    }
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    padding: 150px 0 92px;
}

.hero-content {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 56px;
    align-items: center;
}

/* Prevent grid children from forcing horizontal overflow on narrow screens */
.hero-content > * { min-width: 0; }

.hero-text h1,
.hero-text h2 { overflow-wrap: break-word; }

.weaviate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    margin-bottom: 24px;
}

.hero-text h1 {
    font-size: clamp(2.9rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 800;
    margin-bottom: 16px;
    text-wrap: balance;
}

.hero-text h1 .last {
    background: linear-gradient(120deg, var(--accent-bright), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-text h2 {
    font-size: 1.28rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 18px;
}

.hero-text h2 span { color: var(--accent); }

.hero-text > p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 32px;
}

/* Impact stats */
.hero-stats {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.stat .num {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat .lbl {
    font-size: 0.76rem;
    color: var(--dim);
    margin-top: 8px;
    letter-spacing: 0.03em;
    max-width: 15ch;
}

.cta-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--ink-on-accent);
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    box-shadow: 0 12px 30px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px var(--accent-glow);
}

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

.btn-ghost:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Keyword chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chip::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.75;
    flex: none;
}

.chip:hover {
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Profile card */
.hero-image { position: relative; }

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px 26px;
    text-align: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 1px;
    background: linear-gradient(160deg, var(--accent-glow), transparent 42%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.profile-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    box-shadow: 0 10px 30px var(--accent-glow);
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
}

.profile-card h3 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.profile-title {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 32ch;
    margin: 0 auto 18px;
}

.socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.social-ico {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface-2);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-ico:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.profile-loc {
    font-size: 0.8rem;
    color: var(--dim);
    margin-top: 6px;
}

.profile-bio {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.65;
    margin-top: 14px;
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* ============================================================
   Work history — timeline
   ============================================================ */
.timeline {
    list-style: none;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.tl-item {
    position: relative;
    padding: 0 0 30px 52px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
    position: absolute;
    left: 7px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.tl-item.now .tl-dot { background: var(--accent); }

.tl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.tl-card:hover {
    border-color: var(--border-strong);
    transform: translateX(4px);
}

.tl-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.tl-role {
    font-size: 1.12rem;
    font-weight: 700;
}

.tl-when {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--dim);
    white-space: nowrap;
}

.tl-co {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.92rem;
    margin: 3px 0 9px;
}

.tl-desc {
    color: var(--muted);
    font-size: 0.92rem;
}

.now-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-on-accent);
    background: var(--accent);
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============================================================
   Generic card grids (awards, projects, education, skills)
   ============================================================ */
.card-grid {
    display: grid;
    gap: 20px;
    max-width: var(--maxw);
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-emoji {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 1.4rem;
    opacity: 0.45;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    padding-right: 28px;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--accent);
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* inline link with arrow */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 16px;
    transition: gap 0.25s ease;
}

.arrow-link:hover { gap: 12px; }

/* Project tech tags */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0 4px;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface-2);
}

/* Education icon */
.education-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.subhead {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 56px 0 28px;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============================================================
   Testimonials & endorsements
   ============================================================ */
.testimonials-grid {
    display: grid;
    gap: 20px;
    max-width: var(--maxw);
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.testimonial-card::before {
    content: "\201C";
    position: absolute;
    top: 4px;
    right: 20px;
    font-size: 3.4rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.18;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.testimonial-text {
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex: none;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
    display: grid;
    place-items: center;
    color: var(--ink-on-accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.author-info h4 {
    color: var(--text);
    font-size: 0.98rem;
    margin-bottom: 2px;
}

.author-info p {
    color: var(--muted);
    font-size: 0.84rem;
}

.testimonial-card .arrow-link { margin-top: 16px; }

/* ============================================================
   Contact
   ============================================================ */
.contact-band {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 52px 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.contact-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 240px at 50% -20%, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.contact-text {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 54ch;
    margin: 0 auto 30px;
    position: relative;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.phone-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-2);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
    color: var(--text);
    pointer-events: none;
}

.contact-link:hover .phone-tooltip { display: block; }

/* ============================================================
   About
   ============================================================ */
.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    color: var(--muted);
    font-size: 1.02rem;
    margin-bottom: 16px;
}

.about-text a {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.about-text a:hover {
    border-bottom-color: var(--accent);
}

.interests {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.interest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.interest:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    border-top: 1px solid var(--border);
    padding: 44px 24px 52px;
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.footer-copy {
    color: var(--dim);
    font-size: 0.85rem;
}

/* ============================================================
   Entrance animation (hero)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    .hero .fade {
        opacity: 0;
        animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    }
    .hero .fade.d1 { animation-delay: 0.05s; }
    .hero .fade.d2 { animation-delay: 0.15s; }
    .hero .fade.d3 { animation-delay: 0.25s; }
    .hero .fade.d4 { animation-delay: 0.35s; }
    .hero .fade.d5 { animation-delay: 0.45s; }
    .hero .fade.d6 { animation-delay: 0.55s; }

    @keyframes rise {
        to { opacity: 1; transform: none; }
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    /* Text (name, role, CTAs incl. Download CV) comes first on phones/tablets; profile card follows */
    .hero-text { text-align: center; }
    .hero-text .eyebrow,
    .hero-text .weaviate-badge { justify-content: center; }
    .hero-text > p { margin-left: auto; margin-right: auto; }
    .hero-stats,
    .cta-buttons,
    .chips { justify-content: center; }
    .stat .lbl { margin-left: auto; margin-right: auto; }
}

@media (max-width: 900px) {
    .rail { display: none; }
    .menu-btn { display: grid; }
}

@media (max-width: 560px) {
    .section { padding: 64px 0; }
    .hero { padding: 128px 0 60px; }
    .hero-text h1 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
    .hero-text h2 { font-size: 1.15rem; }
    .hero-stats { gap: 20px; }
    .stat { flex: 1 1 0; min-width: 0; }
    .stat .num { font-size: 1.7rem; }
    .wrap, .hero-content { padding: 0 18px; }
}
