/* ==========================================================================
   pedrofernandez.cloud · marca personal neutra (noviembre de 2026)
   Tinta #0f172a con acento azul/cian. Los colores de AWS y Google Cloud
   solo aparecen en las insignias de certificación.
   ========================================================================== */

:root {
    --ink-950: #020617;
    --ink-900: #0f172a;
    --ink-850: #131d33;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --ink-50: #f8fafc;
    --white: #ffffff;

    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: #eff6ff;
    --cyan: #06b6d4;
    --cyan-bright: #22d3ee;
    --grad: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);

    /* Solo para las insignias */
    --vendor-aws: #ff9900;
    --vendor-gcp: #4285f4;

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.07);
    --shadow: 0 14px 34px -14px rgba(15, 23, 42, 0.22);
    --shadow-lg: 0 30px 60px -24px rgba(2, 6, 23, 0.55);

    --container: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 68px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

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

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink-900);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1rem;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 300;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink-900);
    font-weight: 600;
    box-shadow: var(--shadow);
}

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

section[id] {
    scroll-margin-top: var(--header-h);
}

/* --------------------------------------------------------------------------
   Cabecera y navegación
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(15, 23, 42, 0.72);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 10px 30px -18px rgba(2, 6, 23, 0.8);
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand:hover {
    color: var(--white);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: linear-gradient(var(--ink-900), var(--ink-900)) padding-box, var(--grad) border-box;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-300);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--white);
    background: rgba(148, 163, 184, 0.12);
}

.nav-link.nav-cta {
    margin-left: 10px;
    color: var(--white);
    background: var(--accent);
}

.nav-link.nav-cta:hover,
.nav-link.nav-cta.is-active {
    background: var(--accent-strong);
}

.nav-toggle {
    display: none;
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: 600 0.95rem/1 var(--font-sans);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 12px 26px -14px rgba(37, 99, 235, 0.9);
}

.btn-primary:hover {
    background: var(--accent-strong);
    color: var(--white);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--white);
}

.btn-ghost:hover {
    border-color: var(--ink-300);
    background: rgba(148, 163, 184, 0.08);
    color: var(--white);
}

.btn i {
    font-size: 0.85em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
    background: var(--ink-900);
    color: var(--ink-300);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 65% 35%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 75% at 65% 35%, #000 35%, transparent 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(640px circle at 82% 12%, rgba(37, 99, 235, 0.28), transparent 62%),
        radial-gradient(520px circle at 4% 96%, rgba(6, 182, 212, 0.14), transparent 60%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    padding: 6px 14px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
    color: var(--cyan-bright);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan-bright);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.hero-title {
    margin-bottom: 20px;
    color: var(--white);
    font-size: clamp(2.6rem, 5.6vw, 4.25rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-lead {
    max-width: 36em;
    margin-bottom: 24px;
    color: var(--ink-300);
    font-size: clamp(1.04rem, 1.5vw, 1.16rem);
}

.hero-creds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.hero-creds li {
    padding: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    color: var(--ink-200);
    font-size: 0.8rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    color: var(--ink-300);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
    border-color: var(--ink-300);
    background: rgba(148, 163, 184, 0.1);
    color: var(--white);
}

/* Esquema AWS ↔ Google Cloud */

.hero-visual {
    position: relative;
}

.arch {
    width: 100%;
    height: auto;
    overflow: visible;
}

.arch-zone {
    fill: rgba(2, 6, 23, 0.45);
    stroke: rgba(148, 163, 184, 0.4);
    stroke-width: 1.2;
    stroke-dasharray: 5 6;
}

.arch-zone-name {
    fill: var(--white);
    font: 600 16px var(--font-sans);
}

.arch-cidr {
    fill: var(--ink-400);
    font: 500 13px var(--font-mono);
}

.arch-node {
    fill: var(--ink-850);
    stroke: rgba(148, 163, 184, 0.45);
    stroke-width: 1.2;
}

.arch-node--gw {
    stroke: url(#archGrad);
    stroke-width: 1.8;
}

.arch-glyph {
    fill: none;
    stroke: var(--cyan-bright);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.arch-label {
    fill: var(--ink-300);
    font: 500 14px var(--font-mono);
    text-anchor: middle;
}

.arch-wire {
    fill: none;
    stroke: rgba(148, 163, 184, 0.55);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.arch-dot {
    fill: var(--ink-300);
}

.arch-link {
    fill: none;
    stroke: url(#archGrad);
    stroke-width: 2.4;
}

.arch-flow {
    fill: none;
    stroke: var(--white);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 8 160;
    animation: arch-flow 3.2s linear infinite;
}

.arch-flow--back {
    opacity: 0.6;
    animation-delay: -1.6s;
}

.arch-link-label {
    fill: var(--ink-200);
    font: 500 14px var(--font-mono);
    text-anchor: middle;
}

@keyframes arch-flow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -168; }
}

/* Cifras */

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(48px, 7vw, 88px);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 0 34px;
}

.stat + .stat {
    padding-left: clamp(16px, 4vw, 40px);
    border-left: 1px solid rgba(148, 163, 184, 0.16);
}

.stat-number {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--ink-300);
    font-size: 0.92rem;
}

.stat-note {
    color: var(--ink-400);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */

.section {
    padding: clamp(72px, 10vw, 120px) 0;
}

.section-soft {
    background: var(--ink-50);
    border-top: 1px solid var(--ink-100);
    border-bottom: 1px solid var(--ink-100);
}

.section-dark {
    background: var(--ink-900);
    color: var(--ink-300);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(36px, 5vw, 56px);
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
}

.section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-intro {
    margin: 16px 0 0;
    color: var(--ink-600);
    font-size: 1.07rem;
}

.section-dark .section-title {
    color: var(--white);
}

.section-dark .kicker {
    color: var(--cyan-bright);
}

.card-icon {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.05rem;
}

/* Sobre mí */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
}

.about-grid .section-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin-bottom: 0;
}

.focus-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.focus-list li {
    padding: 5px 12px;
    border: 1px solid var(--ink-200);
    border-radius: 999px;
    color: var(--ink-600);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.about-text p {
    color: var(--ink-600);
    font-size: 1.06rem;
    line-height: 1.75;
}

.about-text p:first-child {
    color: var(--ink-800);
    font-size: 1.18rem;
    line-height: 1.7;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Habilidades */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.skill-card {
    grid-column: span 2;
    padding: 26px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.skill-card--cloud {
    grid-column: span 3;
}

.skill-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.08rem;
    font-weight: 700;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags li {
    padding: 5px 10px;
    border: 1px solid var(--ink-200);
    border-radius: 6px;
    background: var(--ink-50);
    color: var(--ink-700);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

/* Certificaciones */

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.cert-card {
    position: relative;
}

.cert-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 30px 20px 22px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cert-link:hover {
    transform: translateY(-4px);
    border-color: var(--ink-300);
    box-shadow: var(--shadow);
    color: inherit;
}

.cert-badge {
    width: 112px;
    height: 112px;
    margin-bottom: 18px;
    object-fit: contain;
}

.cert-vendor {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--ink-500);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cert-vendor::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--vendor-aws);
}

.cert-card[data-vendor="gcp"] .cert-vendor::before {
    background: var(--vendor-gcp);
}

.cert-name {
    margin-bottom: 10px;
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.3;
}

.cert-level {
    margin-bottom: 14px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cert-level.professional {
    background: #eef2ff;
    color: #3730a3;
}

.cert-level.specialty {
    background: #ecfeff;
    color: #0e7490;
}

.cert-level.associate {
    background: var(--ink-100);
    color: var(--ink-700);
}

.cert-level.training {
    border: 1px dashed var(--ink-300);
    background: transparent;
    color: var(--ink-500);
}

.cert-desc {
    flex: 1;
    margin-bottom: 18px;
    color: var(--ink-600);
    font-size: 0.88rem;
    line-height: 1.55;
}

.cert-verify {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.cert-verify i {
    font-size: 0.72rem;
}

.cert-all {
    margin: 32px 0 0;
    text-align: center;
}

.cert-all a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Servicios */

.services-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    border-color: var(--ink-300);
    box-shadow: var(--shadow);
}

.service-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--ink-900);
    color: var(--cyan-bright);
    font-size: 1.08rem;
}

.service-card h3,
.project-card h4 {
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 700;
}

.service-card p,
.project-card p {
    color: var(--ink-600);
    font-size: 0.95rem;
}

.service-features {
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--ink-100);
}

.service-features li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--ink-700);
    font-size: 0.9rem;
}

.service-features i {
    flex: none;
    color: var(--accent);
    font-size: 0.78rem;
}

/* Proyectos */

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--ink-300);
    box-shadow: var(--shadow);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-index {
    color: var(--ink-500);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.project-tech li {
    padding: 4px 9px;
    border: 1px solid var(--ink-200);
    border-radius: 6px;
    background: var(--ink-50);
    color: var(--ink-700);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

/* Proyectos: bloques, metadatos y enlace al codigo */

.projects-group + .projects-group {
    margin-top: 56px;
}

.projects-subhead {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.projects-subhead::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ink-200);
}

.projects-note {
    max-width: 70ch;
    margin-bottom: 26px;
    color: var(--ink-600);
    font-size: 0.93rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin: -2px 0 14px;
    color: var(--ink-500);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.5;
}

.project-meta li:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--ink-300);
}

.project-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: 16px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 600;
}

.project-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.project-link i {
    font-size: 0.7rem;
}

/* Contacto */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}

.contact-info p {
    color: var(--ink-300);
}

.contact-info .contact-lead {
    margin: 20px 0 8px;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-items {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.contact-items a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-200);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.contact-items a:hover {
    color: var(--white);
}

.contact-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    color: var(--cyan-bright);
}

.contact-form {
    padding: clamp(24px, 4vw, 36px);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    color: var(--ink-700);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    color: var(--ink-800);
    font-size: 0.85rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ink-200);
    border-radius: 10px;
    background: var(--ink-50);
    color: var(--ink-900);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--ink-500);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid transparent;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.contact-form .btn {
    width: 100%;
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Siempre en el árbol de accesibilidad (role="status") para que se anuncie al cambiar */
.form-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.9rem;
}

.form-message:empty {
    margin: 0;
    padding: 0;
    border: 0;
}

.form-message.success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

.form-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

/* Pie */

.site-footer {
    padding: 28px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: var(--ink-950);
    color: var(--ink-400);
    font-size: 0.875rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 6px;
}

.footer-links a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    color: var(--ink-400);
}

.footer-links a:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Aparición al hacer scroll (solo si script.js se ha ejecutado)
   -------------------------------------------------------------------------- */

.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--i, 0) * 70ms);
}

.reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* script.js quita .reveal al terminar la aparición para no pisar las transiciones propias */
@media print {
    .reveal-ready .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .cert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .services-grid,
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skill-card,
    .skill-card--cloud {
        grid-column: span 1;
    }

    .skill-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        padding: 12px var(--gutter) 20px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
        background: var(--ink-900);
        box-shadow: 0 24px 40px -24px rgba(2, 6, 23, 0.8);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    }

    .nav-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .nav-link.nav-cta {
        margin: 8px 0 0;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-grid .section-head {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-visual {
        display: none;
    }

    .hero-stats .stat {
        padding: 22px 0 26px;
    }

    .services-grid,
    .projects-grid,
    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .skill-card:last-child {
        grid-column: auto;
    }

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

    .cert-link {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        column-gap: 18px;
        align-items: start;
        padding: 20px;
        text-align: left;
    }

    .cert-badge {
        grid-row: 1 / span 5;
        width: 76px;
        height: 76px;
        margin: 0;
    }

    .cert-vendor,
    .cert-name,
    .cert-level,
    .cert-desc,
    .cert-verify {
        grid-column: 2;
        justify-self: start;
    }

    .cert-name {
        margin-bottom: 8px;
    }

    .cert-level {
        margin-bottom: 10px;
    }

    .cert-desc {
        margin-bottom: 12px;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .brand-name {
        font-size: 0.95rem;
    }

    .hero-actions .btn {
        flex: 1 1 auto;
    }

    .stat + .stat {
        padding-left: 12px;
    }

    .stat-label {
        font-size: 0.82rem;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .arch-flow {
        display: none;
    }
}
