/* V2 refinements layered over the original redesign styles. */

.hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 88px;
}

.hero h1 {
    max-width: 780px;
    font-size: clamp(4.5rem, 8.5vw, 9.5rem);
    font-weight: 420;
    line-height: 0.88;
}

.hero h1 span {
    display: block;
}

.hero-contact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 38px;
}

.social-icon,
.email-link {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.social-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
}

.social-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.social-icon:hover,
.email-link:hover {
    transform: translateY(-2px);
    color: var(--accent);
    border-color: var(--line-strong);
    background: rgba(0, 201, 255, 0.055);
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 15px;
    border-radius: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.76rem;
    letter-spacing: -0.015em;
}

.email-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

.email-arrow {
    color: var(--accent-soft);
    transition: transform 180ms ease;
}

.email-link:hover .email-arrow {
    transform: translate(2px, -2px);
}

.hero-visual {
    width: min(100%, 410px);
}

.portrait-frame img {
    aspect-ratio: 4 / 5;
    object-position: center 24%;
    filter: none;
}

.portrait-tag-top {
    top: 30px;
    left: -34px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    font-size: 0.72rem;
    letter-spacing: 0.025em;
}

.portrait-tag-top .status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
}

.about-section {
    position: relative;
}

.about-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    border-block: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(255, 255, 255, 0.012);
    z-index: -1;
}

.about-lead strong {
    color: #ffffff;
    font-weight: 650;
}

.about-lead strong:first-child {
    color: transparent;
    background: linear-gradient(105deg, #ffffff 5%, var(--accent-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.about-facts div:last-child strong {
    color: var(--accent-soft);
}

.experience-section::before {
    display: none;
}

.ml-visual {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 48%, rgba(0, 201, 255, 0.12), transparent 33%),
        linear-gradient(145deg, #06111a, #091b26);
}

.model-grid {
    position: absolute;
    inset: 0;
    opacity: 0.72;
    background-image:
        linear-gradient(rgba(0, 201, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 201, 255, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.model-card {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(5, 15, 22, 0.86);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.model-card-main {
    left: 50%;
    top: 50%;
    width: min(64%, 330px);
    min-height: 150px;
    padding: 26px;
    border-color: var(--line-strong);
    border-radius: 18px;
    transform: translate(-50%, -50%);
}

.model-card-main span {
    color: var(--accent-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
}

.model-card-main strong {
    margin-top: 10px;
    max-width: 240px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 560;
    line-height: 1.25;
}

.model-card-small {
    min-width: 72px;
    min-height: 42px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    color: #8aa6b0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
}

.model-a { left: 13%; top: 22%; }
.model-b { right: 13%; top: 29%; }
.model-c { right: 17%; bottom: 18%; }

.ensemble-visual {
    overflow: hidden;
}

.ensemble-node {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 100px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #a9c0c8;
    background: rgba(5, 15, 22, 0.88);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.67rem;
}

.node-xgb { left: 10%; top: 20%; }
.node-lgbm { left: 10%; top: 44%; }
.node-cat { left: 10%; top: 68%; }

.node-meta {
    right: 12%;
    top: 43%;
    min-width: 130px;
    color: var(--text);
    border-color: var(--line-strong);
    box-shadow: 0 0 34px rgba(0, 201, 255, 0.08);
}

.ensemble-line {
    position: absolute;
    z-index: 1;
    left: 31%;
    width: 38%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 201, 255, 0.8), rgba(0, 201, 255, 0.16));
    transform-origin: left center;
}

.line-a { top: 26%; transform: rotate(22deg); }
.line-b { top: 50%; }
.line-c { top: 74%; transform: rotate(-22deg); }

.ensemble-score {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--accent);
    background: rgba(4, 13, 19, 0.78);
    font-size: 1.1rem;
    font-weight: 700;
}

.ensemble-score span {
    color: #829ba4;
    font-size: 0.63rem;
    font-weight: 550;
}

.contact-email-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--accent-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(0.82rem, 1.4vw, 1rem);
    text-decoration: none;
}

.contact-email-link span {
    transition: transform 180ms ease;
}

.contact-email-link:hover span {
    transform: translate(3px, -3px);
}

@media (max-width: 980px) {
    .hero {
        gap: 54px;
    }

    .hero h1 {
        font-size: clamp(4.5rem, 13vw, 8rem);
    }

    .portrait-tag-top {
        left: -18px;
    }
}

@media (max-width: 760px) {
    .hero h1 {
        font-size: clamp(4rem, 18vw, 6rem);
    }

    .hero-contact-row {
        align-items: stretch;
    }

    .email-link {
        justify-content: center;
    }

    .hero-visual {
        width: min(84vw, 360px);
    }

    .portrait-tag-top {
        top: 18px;
        left: -10px;
    }

    .model-card-main {
        width: 66%;
        min-height: 125px;
    }

    .model-a { left: 8%; }
    .model-b { right: 8%; }
    .model-c { right: 10%; }

    .ensemble-node {
        min-width: 82px;
        font-size: 0.59rem;
    }

    .node-xgb,
    .node-lgbm,
    .node-cat { left: 7%; }

    .node-meta {
        right: 7%;
        min-width: 105px;
    }
}

@media (max-width: 470px) {
    .social-icon {
        width: 46px;
        height: 46px;
    }

    .email-link {
        width: 100%;
        min-height: 46px;
        padding-inline: 12px;
        font-size: 0.72rem;
    }

    .portrait-tag-top {
        max-width: calc(100% - 12px);
        font-size: 0.64rem;
    }

    .ensemble-line {
        left: 29%;
        width: 39%;
    }
}
