:root {
    --bg: #f4f6f7;
    --surface: #ffffff;
    --surface-strong: #f4f6f7;
    --line: rgba(23, 39, 54, 0.14);
    --line-strong: rgba(23, 39, 54, 0.28);
    --text: #172736;
    --muted: #5d6d7b;
    --accent: #087a6c;
    --accent-ligth: #8db8b3;
    --accent-dark: #071c1a;
    --blue: #85a9ff;
    --font: "Manrope", sans-serif;
    --mono: "IBM Plex Mono", monospace;
    --radius: 18px;
    --shell: 960px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 82% 8%, rgba(82, 211, 180, 0.09), transparent 27rem),
        radial-gradient(circle at 6% 38%, rgba(133, 169, 255, 0.07), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    letter-spacing: 0.005em;
    line-height: 1.7;
    min-width: 320px;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.18;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

.eyebrow,
.company {
    color: var(--accent);
}

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    min-height: min(650px, 70svh);
    padding-block: 32px;
    color: #f2f6fa;
    --accent: #2da790;
}

.hero::before,
.hero::after {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    content: "";
}

.hero::before {
    background: linear-gradient(115deg, #172736 0%, #263b4b 55%, #415665 100%);
}

.hero::after {
    opacity: 0.38;
    background: url("assets/lineas.png") center / cover no-repeat;
}

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

.hero-name {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero .lead {
    color: #b8c7d4;
}

.hero .button-secondary {
    color: #f2f6fa;
    border-color: rgba(216, 226, 233, 0.42);
}

.hero .button-secondary:hover {
    border-color: rgba(216, 226, 233, 0.72);
}

.hero .eyebrow {
    font-size: 0.81rem;
}

.eyebrow {
    margin: 0 0 18px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

p {
    letter-spacing: 0.015em;
}

h1 {
    max-width: 850px;
    margin-bottom: 26px;
    font-size: clamp(2.45rem, 4.3vw, 4.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.025em;
}

.lead {
    max-width: 700px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    letter-spacing: 0.03em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero .hero-actions {
    gap: 5px;
}

.hero-actions .button {
    min-height: 46px;
    padding-inline: 14px;
    font-size: 0.82rem;
}

.hero-actions .button svg {
    width: 17px;
    height: 17px;
    margin-right: 7px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: currentColor;
    flex: 0 0 auto;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--accent-dark);
    background: var(--accent);
}

.button-primary:hover {
    background: #74e2c8;
}

.button-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--line-strong);
}

.button-secondary:hover {
    border-color: var(--muted);
}

.hero-visual {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 16px;
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    width: min(110%, 360px);
    aspect-ratio: 1;
    background: #ffffff;
    border: 10px solid #ffffff;
    border-radius: 50%;
}

.portrait {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: contrast(1.05);
}

.metrics {
    border-block: 1px solid var(--line);
    background: #ffffff;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.metrics-grid div {
    display: flex;
    min-height: 126px;
    padding: 28px;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line);
}

.metrics-grid div:last-child {
    border-right: 0;
}

.metrics-grid strong {
    margin-bottom: 5px;
    color: var(--text);
    font-size: 1.85rem;
    line-height: 1;
}

.metrics-grid span {
    color: var(--muted);
    font-size: 0.9rem;
}

.section {
    padding-block: clamp(64px, 8vw, 104px);
}

.section-heading {
    max-width: 680px;
    margin-bottom: 50px;
}

.section-heading h2,
.closing h2 {
    margin-bottom: 18px;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.section-heading>p:last-child,
.closing>p:not(.eyebrow) {
    color: var(--muted);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.expertise-card {
    display: flex;
    min-height: 360px;
    padding: 30px;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 180ms ease, transform 180ms ease;
}

.expertise-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.card-index {
    margin-bottom: 42px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 1.1rem;
}

.expertise-card h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.expertise-card p {
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 0.9rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.tag-list span {
    padding: 6px 9px;
    color: #4f6270;
    background: #f4f6f7;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.59rem;
}

.section-experience {
    background: #ffffff;
    border-block: 1px solid var(--line);
}

.timeline {
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 40px;
    padding-block: 32px;
    border-bottom: 1px solid var(--line);
}

.timeline-date {
    padding-top: 4px;
    color: #797e88;
    font-family: var(--mono);
    font-size: 0.81rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.timeline-content {
    max-width: 720px;
}

.timeline-content h3 {
    margin-bottom: 4px;
    font-size: 1.22rem;
}

.timeline-content .company {
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.timeline-content>p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.closing {
    padding-block: clamp(64px, 8vw, 104px);
    text-align: center;
}

.closing h2,
.closing>p:not(.eyebrow) {
    max-width: 720px;
    margin-inline: auto;
}

.closing .hero-actions {
    justify-content: center;
    margin-top: 30px;
}

.closing .button-primary {
    background: #2da790;
}

.site-footer {
    padding-block: 28px;
    color: #d8e2e9;
    background: linear-gradient(115deg, #172736 0%, #263b4b 55%, #415665 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-content p {
    margin: 0;
}

.chat-dialog {
    width: min(1000px, calc(100% - 32px));
    height: min(780px, calc(100% - 32px));
    padding: 0;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.55);
}

.chat-dialog::backdrop {
    background: rgba(23, 39, 54, 0.48);
    backdrop-filter: blur(3px);
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 7px 12px 7px 16px;
    background: #e4e8ea;
    border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
    margin: 0;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dialog-close {
    width: 32px;
    height: 32px;
    color: var(--text);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.dialog-close:hover {
    color: var(--accent);
}

.dialog-close:focus-visible {
    color: var(--accent);
    outline: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.chat-dialog iframe {
    display: block;
    width: 100%;
    height: calc(100% - 50px);
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-block: 50px;
    }

    .hero-visual {
        width: min(100%, 520px);
        margin-inline: auto;
        order: -1;
    }

    .metrics-grid,
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .expertise-card:last-child {
        grid-column: 1 / -1;
        min-height: 300px;
    }

    .metrics-grid div:nth-child(even) {
        border-right: 0;
    }

    .metrics-grid div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .hero {
        min-height: auto;
        padding-block: 24px 36px;
    }

    h1 {
        font-size: clamp(2rem, 8.8vw, 2.3rem);
        letter-spacing: -0.045em;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-actions .button-primary {
        grid-column: 1 / -1;
    }

    .portrait-frame {
        width: min(72vw, 290px);
    }

    .metrics-grid,
    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid div {
        min-height: 105px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        border-left: 0;
    }

    .metrics-grid div:last-child {
        border-bottom: 0;
    }

    .expertise-card,
    .expertise-card:last-child {
        grid-column: auto;
        min-height: 320px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-content {
        flex-direction: column;
        gap: 4px;
    }

    .chat-dialog {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
