
/* ========================================
   SITE HEADER
======================================== */

.site-header {
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
    background:
        radial-gradient(
            ellipse at 80% 45%,
            rgba(var(--primary-rgb), 0.09),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            var(--bg),
            var(--bg-deep)
        );

    color: var(--text-strong);
}

/* Background grid */

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(var(--primary-rgb), 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(var(--primary-rgb), 0.035) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    mask-image: linear-gradient(
        to right,
        transparent,
        black
    );
}


/* ========================================
   HERO CONTENT AREA
======================================== */

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

    display: flex;
    align-items: center;

    min-height: min(780px, calc(100vh - var(--nav-height)));
    padding: 4rem var(--gutter) 7rem;

    background: transparent;
    color: var(--text-strong);
}


/* ========================================
   HERO CONTAINER
======================================== */

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

    width: min(100%, var(--container-width));
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
}


/* ========================================
   HERO CONTENT
======================================== */

.hero-content {
    max-width: 760px;
}

.hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;

    margin-bottom: 1.75rem;

    color: var(--text-muted);
    text-transform: uppercase;
    font-family: var(--font-tech);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.hero-indicator {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;

    background: var(--secondary-fill);
    box-shadow: 0 0 8px rgba(var(--secondary-rgb), 0.45);
}

/* Name: brand identity (Orbitron), kept visible but secondary to the headline */
.hero-name {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.hero-eyebrow-sep {
    color: var(--secondary);
}

/* Headline: the main message of the page */
.hero-title {
    margin-bottom: 1.25rem;

    font-family: var(--font-display);
    font-size: clamp(2.1rem, 1.1rem + 2.9vw, 3.9rem);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.01em;
    text-wrap: balance;

    color: var(--text-strong);
}

.hero-title span {
    display: block;
    color: var(--primary);
}

.hero-subtitle {
    margin-bottom: 1.5rem;

    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;

    color: var(--text-soft);
}

.hero-subtitle span {
    margin: 0 0.15em;
    color: var(--secondary);
}

.hero-description {
    max-width: 580px;
    margin-bottom: 1.5rem;

    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.9;
}


/* ========================================
   HERO TAGS (focus areas, drawn as signal nodes)
======================================== */

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
    list-style: none;
}

.hero-tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.8rem;

    border: 1px solid var(--border-color);
    border-radius: 2px;
    background: rgba(var(--primary-rgb), 0.05);

    color: var(--text-soft);
    font-family: var(--font-tech);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.hero-tags li::before {
    content: '';
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}


/* ========================================
   HERO BUTTONS
======================================== */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    min-height: 48px;
    padding: 0.85rem 1.4rem;

    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;

    text-decoration: none;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform 0.15s ease;
}

/* Press feedback */
.hero-button:active {
    transform: translateY(1px) scale(0.98);
}

.hero-button span {
    transition: transform var(--transition-fast);
}

.hero-button:hover span {
    transform: translate(3px, -3px);
}

.hero-button-primary {
    background: var(--primary-fill);
    color: var(--on-accent);
}

.hero-button-primary:hover {
    background: var(--primary-fill-hover);
    box-shadow: 0 0 18px var(--cyan-glow);
}

.hero-button-outline {
    border: 1px solid var(--text-subtle);
    color: var(--text-strong);
}

.hero-button-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Resume (CV) button: secondary accent, opens in a new tab */
.hero-button-cv {
    gap: 0.6rem;
    border: 1px solid var(--secondary);
    background: rgba(var(--secondary-rgb), 0.08);
    color: var(--text-strong);
}

.hero-button-cv svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--secondary);
}

.hero-button-cv:hover {
    border-color: var(--secondary);
    background: rgba(var(--secondary-rgb), 0.16);
    color: var(--text-strong);   /* gold text on a gold tint fails AA in light mode */
    box-shadow: 0 0 16px var(--orange-glow);
}

/* Tertiary action: text link whose underline "draws" like a trace */
.hero-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0 0.25rem;

    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.hero-link::after {
    content: '';
    position: absolute;
    left: 0.25rem;
    right: 0.25rem;
    bottom: 12px;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-out);
}

.hero-link span {
    transition: transform var(--transition-fast);
}

.hero-link:hover,
.hero-link:focus-visible {
    color: var(--primary);
}

.hero-link:hover::after,
.hero-link:focus-visible::after {
    transform: scaleX(1);
}

.hero-link:hover span {
    transform: translateX(4px);
}


/* ========================================
   SOCIAL LINKS
======================================== */

.hero-socials {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.hero-socials > span {
    color: var(--text-subtle);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.hero-socials a {
    color: var(--text-muted);
    padding: 0.6rem 0;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;

    transition: color var(--transition-fast);
}

.hero-socials a:hover,
.hero-socials a:focus-visible {
    color: var(--primary);
}


/* ========================================
   PROFILE VISUAL
======================================== */

.hero-visual {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

/* Wrapper that anchors the decorations to the photo (not to the caption) */
.hero-figure {
    position: relative;
    padding: 2rem;
}


/* ========================================
   CIRCULAR PROFILE IMAGE
======================================== */

.hero-image-frame {
    position: relative;

    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;

    margin: 0 auto;
    padding: 9px;

    border-radius: 50%;
    border: 2px solid var(--primary);

    background: linear-gradient(
        135deg,
        var(--primary-fill) 0%,
        var(--primary-fill) 55%,
        var(--secondary-fill) 100%
    );

    box-shadow:
        0 0 22px var(--cyan-glow),
        0 0 50px rgba(var(--primary-rgb), 0.05);
}


/* Outer circular border */

.hero-image-frame::before {
    content: '';
    position: absolute;
    inset: -14px;

    border: 1px solid rgba(var(--primary-rgb), 0.35);
    border-radius: 50%;

    pointer-events: none;
}


/* Orange decorative indicator */

.hero-image-frame::after {
    content: '';
    position: absolute;

    top: 12%;
    right: 5%;

    width: 18px;
    height: 18px;

    border-radius: 50%;
    background: var(--secondary-fill);

    box-shadow: 0 0 10px rgba(var(--secondary-rgb), 0.4);
}


/* Profile photo */

.hero-profile-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    border-radius: 50%;

    filter: saturate(0.9);

    transition:
        filter var(--transition-normal),
        transform var(--transition-normal);
}

.hero-image-frame:hover .hero-profile-image {
    filter: saturate(1.1);
    transform: scale(1.02);
}


/* ========================================
   IMAGE LABEL
======================================== */

.hero-image-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;

    margin-top: 0.5rem;
    text-align: center;

    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.13em;
}

.hero-label-line {
    flex-shrink: 0;
    width: 30px;
    height: 1px;

    background: var(--primary);
}


/* ========================================
   IMAGE DECORATIONS
======================================== */

.hero-decoration {
    position: absolute;

    display: flex;
    flex-direction: column;
    gap: 0.2rem;

    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.hero-decoration span:first-child {
    color: var(--primary);
}

.hero-decoration span:last-child {
    color: var(--text-subtle);
}

.hero-decoration-top {
    top: 0;
    right: 0;
}




/* ========================================
   SCROLL INDICATOR
======================================== */

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;

    color: var(--text-subtle);
    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;

    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.hero-scroll:hover,
.hero-scroll:focus-visible {
    color: var(--primary);
}

.hero-scroll-line {
    width: 1px;
    height: 35px;
    transform-origin: top;
    animation: hero-scroll-pulse 2.2s ease-in-out 3;

    background: linear-gradient(
        to bottom,
        var(--primary),
        transparent
    );
}


/* ========================================
   RESPONSIVE: TABLETS
======================================== */

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-top: 5rem;
    }

    .hero-container {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
        gap: 2rem;
    }

    .hero-visual {
        max-width: 280px;
    }

    .hero-image-frame {
        max-width: 240px;
    }
}


/* ========================================
   RESPONSIVE: MOBILE
======================================== */

@media (max-width: 650px) {
    .hero {
        padding: 2rem var(--gutter) 3rem;
    }

    /* Compact hero: the photo becomes a small avatar above the text */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hero-content {
        text-align: left;
    }

    .hero-visual {
        order: -1;
        width: auto;
        max-width: none;
        margin: 0;
    }

    .hero-figure {
        padding: 0;
        width: 112px;
    }

    .hero-image-frame {
        max-width: 112px;
        padding: 4px;
    }

    .hero-image-frame::before {
        inset: -7px;
    }

    .hero-image-frame::after {
        width: 12px;
        height: 12px;
    }

    .hero-decoration,
    .hero-image-label {
        display: none;
    }

    .hero-title {
        font-size: clamp(1.6rem, 6.6vw, 2.3rem);
    }

    .hero-tags {
        margin-bottom: 1.75rem;
    }

    .hero-actions {
        margin-bottom: 1.75rem;
    }

    .hero-scroll {
        display: none;
    }
}


/* ========================================
   RESPONSIVE: SMALL MOBILE
======================================== */

@media (max-width: 400px) {
    .hero-actions .hero-button {
        flex: 1 1 100%;
    }

    .hero-socials {
        gap: 1rem;
    }

    .hero-socials > span {
        width: 100%;
    }

    .hero-tags li {
        font-size: 0.82rem;
        padding: 0.3rem 0.65rem;
    }
}


/* ========================================
   ANIMATIONS
======================================== */

@keyframes hero-scroll-pulse {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}
