/* ============================================================
   Iñaki Urbizu — Portfolio
   style.css
   ============================================================ */

/* ── Variables ── */
:root {
    --ink: #0a0a0f;
    --paper: #f5f3ef;
    --accent: #1a3cff;
    --accent-dim: rgba(26, 60, 255, 0.10);
    --muted: #6b6b78;
    --border: rgba(10, 10, 15, 0.10);
    --border-strong: rgba(10, 10, 15, 0.18);
    --white: #ffffff;
    --max: 1060px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ── Base ── */
body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Nav ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 243, 239, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--ink);
}

/* ── Hero ── */
.hero {
    padding: 7rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-deco {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 60, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 4rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1.75rem;
    line-height: 1.05;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-end;
    padding-bottom: 0.5rem;
}

.hero-stat {
    text-align: right;
}

.hero-stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.hero-divider {
    width: 1px;
    height: 40px;
    background: var(--border-strong);
    margin-left: auto;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s var(--ease);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    background: var(--white);
    border-color: var(--ink);
    transform: translateY(-1px);
}

/* ── Sections ── */
.section {
    padding: 5.5rem 0;
}

.section-stripe {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: var(--muted);
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 3rem;
}

/* ── Profile ── */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-text p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.8;
    font-weight: 300;
}

.profile-text p+p {
    margin-top: 1rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.tag {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--border-strong);
    color: var(--muted);
}

.profile-card {
    background: var(--ink);
    color: var(--paper);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(26, 60, 255, 0.4) 0%, transparent 70%);
}

.profile-card-name {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    position: relative;
}

.profile-card-role {
    font-size: 0.85rem;
    color: rgba(245, 243, 239, 0.55);
    margin-bottom: 2rem;
    position: relative;
}

.profile-card-items {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
}

.profile-card-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(245, 243, 239, 0.75);
}

.profile-card-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ── Experience ── */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.exp-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(26, 60, 255, 0.07);
}

.exp-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.exp-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.exp-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    background: var(--accent-dim);
    color: var(--accent);
}

.exp-sub {
    font-size: 0.825rem;
    color: var(--muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.exp-desc {
    font-size: 0.925rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.exp-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.exp-bullets li {
    font-size: 0.875rem;
    color: var(--ink);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.55;
}

.exp-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.exp-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.exp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: gap 0.2s;
}

.exp-link:hover {
    gap: 0.5rem;
}

.exp-link-sep {
    color: var(--muted);
    font-size: 0.825rem;
}

/* ── Skills ── */
.skills-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-group {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
}

.skill-group-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--ink);
    transition: all 0.18s;
    cursor: default;
}

.chip:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ── Education ── */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem 2.25rem;
    transition: border-color 0.2s;
}

.edu-card:hover {
    border-color: var(--border-strong);
}

.edu-degree {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.edu-school {
    font-size: 0.875rem;
    color: var(--muted);
}

.edu-period {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--paper);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* ── Contact ── */
.contact-shell {
    background: var(--ink);
    border-radius: 20px;
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-shell::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(26, 60, 255, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.contact-shell h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--paper);
    margin-bottom: 1rem;
    position: relative;
}

.contact-shell p {
    color: rgba(245, 243, 239, 0.55);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.contact-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn-contact-primary {
    background: var(--accent);
    color: var(--paper);
    padding: 0.8rem 1.75rem;
}

.btn-contact-primary:hover {
    background: #0a2be0;
    transform: translateY(-2px);
}

.btn-contact-ghost {
    background: rgba(245, 243, 239, 0.08);
    color: var(--paper);
    border: 1px solid rgba(245, 243, 239, 0.15);
    padding: 0.8rem 1.75rem;
}

.btn-contact-ghost:hover {
    background: rgba(245, 243, 239, 0.14);
    transform: translateY(-2px);
}

/* ── Footer ── */
footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.825rem;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    font-size: 0.825rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--ink);
}

/* ── Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta {
        display: none;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .skills-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .skills-layout {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .edu-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .contact-shell {
        padding: 3rem 1.75rem;
    }
}

/* ── Particles Canvas ── */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
}