/* ============================================================
   PACO ALÁEZ — Mobile-first Storytelling
   Following Alztech Design Guidelines
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: #444;
    background: #fff;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #BE2525; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #990000; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.accent { color: #BE2525; }

.section-title {
    font-family: 'Questrial', sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: #6E5E4E;
    margin-bottom: 3px;
}
.section-title.center { text-align: center; }

.section-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    color: #8B7D6B;
    margin-bottom: 3px;
}
.section-subtitle.center { text-align: center; }

/* --- Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}
#navbar.scrolled {
    background: rgba(50, 60, 70, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-logo {
    font-family: 'Satisfy', cursive;
    font-size: 28px;
    color: #fff;
    text-decoration: none;
}
.nav-logo:hover { color: #fffde0; }

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
    list-style: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(50, 60, 70, 0.97);
    padding: 80px 30px 30px;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nav-links.open { right: 0; }

.nav-links li a {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 3px 0;
    transition: color 0.3s ease;
}
.nav-links li a:hover { color: #fffde0; }

/* --- Hero --- */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 20px;
}

.hero-greeting {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 3px;
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
}

.hero-name {
    font-family: 'Satisfy', cursive;
    font-size: 48px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 3px;
    opacity: 0;
    animation: fadeUp 1s ease 0.6s forwards;
}

.hero-tagline {
    font-family: 'Questrial', sans-serif;
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2px;
    opacity: 0;
    animation: fadeUp 1s ease 0.9s forwards;
}

.hero-cta {
    display: inline-block;
    padding: 14px 36px;
    background: #BE2525;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
    opacity: 0;
    animation: fadeUp 1s ease 1.2s forwards;
}
.hero-cta:hover {
    background: #990000;
    color: #fff;
    transform: translateY(-2px);
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.scroll-hint span {
    display: block;
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    position: relative;
}
.scroll-hint span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    animation: scrollBounce 2s ease infinite;
}

/* --- About --- */
#about {
    padding: 20px 0;
    background: #fff;
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-image {
    text-align: center;
}
.about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.about-lead {
    font-family: 'Questrial', sans-serif;
    font-size: 18px;
    color: #6E5E4E;
    margin-bottom: 3px;
    line-height: 1.2;
}

.about-text p { margin-bottom: 3px; }

.about-details {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6E5E4E;
}
.detail-item i {
    width: 20px;
    text-align: center;
    color: #BE2525;
}

/* --- Story Chapters --- */
#journey {
    padding-top: 20px;
}

.story-chapter {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.chapter-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    transition: transform 0.6s ease;
}

.chapter-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(110, 94, 78, 0.85) 0%, rgba(30, 25, 20, 0.9) 100%);
}

.chapter-content {
    position: relative;
    z-index: 2;
    padding: 20px 0;
    width: 100%;
}

.chapter-label {
    display: inline-block;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #E8DCCA;
    margin-bottom: 3px;
}

.chapter-title {
    font-family: 'Satisfy', cursive;
    font-size: 36px;
    color: #fff;
    margin-bottom: 3px;
}

.chapter-year {
    font-family: 'Questrial', sans-serif;
    font-size: 20px;
    color: #BE2525;
    margin-bottom: 3px;
    padding-bottom: 3px;
    border-bottom: 3px solid rgba(190, 37, 37, 0.4);
    display: inline-block;
}

.chapter-body {
    max-width: 600px;
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    line-height: 1.2;
}
.chapter-body p { margin-bottom: 3px; }

.chapter-body blockquote {
    font-family: 'Satisfy', cursive;
    font-size: 20px;
    color: #E8DCCA;
    padding: 6px 0 16px 20px;
    border-left: 4px solid #BE2525;
    margin: 3px 0;
    font-style: normal;
}

/* Milestone cards within chapters */
.chapter-milestones {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
}

.milestone-card {
    /* NO BORDER - alztech guidelines */
    border: none;
    border-radius: 8px;
    background: rgba(245, 237, 225, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 6px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.milestone-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}
.milestone-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 3px;
}
.milestone-card h4 {
    font-family: 'Questrial', sans-serif;
    font-size: 16px;
    color: #fff;
    margin-bottom: 2px;
}
.milestone-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.2;
}

/* --- Story Interlude (Memories) --- */
.story-interlude {
    padding: 20px 0;
    background: #F5EDE1;
}

.memory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-width: 500px;
    margin: 0 auto;
}

.memory-card {
    /* NO BORDER */
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 8px;
    text-align: center;
}
.memory-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.memory-name {
    font-family: 'Satisfy', cursive;
    font-size: 24px;
    color: #6E5E4E;
}
.memory-years {
    font-size: 14px;
    color: #A39181;
    margin-bottom: 3px;
}
.memory-quote {
    font-style: italic;
    font-size: 14px;
    color: #8B7D6B;
    line-height: 1.2;
}

/* --- Skills --- */
#skills {
    padding: 20px 0;
    background: #fff;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-item {
    margin-bottom: 16px;
}
.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 14px;
    color: #6E5E4E;
    font-weight: 600;
}
.skill-track {
    height: 8px;
    background: #E8DCCA;
    border-radius: 4px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #BE2525, #990000);
    border-radius: 4px;
    transition: width 1.2s ease;
}

.competencies h3 {
    font-family: 'Questrial', sans-serif;
    font-size: 20px;
    color: #6E5E4E;
    margin-bottom: 3px;
    margin-top: 6px;
}
.competencies h3:first-child { margin-top: 0; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    /* NO BORDER */
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #F5EDE1;
    color: #6E5E4E;
    font-size: 13px;
    font-weight: 400;
    border-radius: 20px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.tag:hover {
    background: #E8DCCA;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tag i { color: #BE2525; }

/* --- Portfolio --- */
#portfolio {
    padding: 20px 0;
    background: #F5EDE1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.gallery-item {
    /* NO BORDER */
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}
.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- Publications --- */
#publications {
    padding: 20px 0;
    background: #fff;
}

.pub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.pub-card {
    /* NO BORDER */
    border: none;
    border-radius: 8px;
    background: #F5EDE1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 8px;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: block;
}
.pub-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    color: #444;
}
.pub-card i {
    font-size: 28px;
    color: #BE2525;
    margin-bottom: 3px;
    display: block;
}
.pub-card h4 {
    font-family: 'Questrial', sans-serif;
    font-size: 18px;
    color: #6E5E4E;
    margin-bottom: 2px;
}
.pub-card p {
    font-size: 14px;
    color: #8B7D6B;
    line-height: 1.2;
}

/* --- Contact --- */
#contact {
    padding: 20px 0;
    background: rgba(8, 7, 7, 0.92);
    text-align: center;
}
#contact .section-title { color: #fff; }
#contact .section-subtitle { color: rgba(255,255,255,0.6); }

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 32px;
    background: #BE2525;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
}
.btn-primary:hover {
    background: #990000;
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: #E8DCCA;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 400;
    border-radius: 4px;
    transition: color 0.3s ease;
}
.btn-secondary:hover { color: #fffde0; }

/* --- Footer --- */
footer {
    padding: 30px 0;
    background: #F2F3EB;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-family: 'Satisfy', cursive;
    font-size: 24px;
    color: #6E5E4E;
}
.footer-brand p {
    font-size: 13px;
    color: #A39181;
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 6px;
}
.footer-links a {
    font-size: 13px;
    color: #767676;
    font-weight: 600;
    transition: color 0.3s ease;
}
.footer-links a:hover { color: #BE2525; }

.footer-powered {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #A39181;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}
.lightbox-close:hover { color: #BE2525; }

/* --- Reveal Animations --- */
.reveal, .reveal-left, .reveal-right, .reveal-up {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-up { transform: translateY(40px); }

.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-up.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Keyframes --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 1; }
}

/* ============================================================
   TABLET — 768px+
   ============================================================ */
@media (min-width: 768px) {
    .container { padding: 0 40px; }

    .nav-toggle { display: none; }
    .nav-links {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: none;
        padding: 0;
        flex-direction: row;
        gap: 4px;
    }
    .nav-links li a {
        font-size: 14px;
        padding: 8px 14px;
    }

    .hero-name { font-size: 64px; }
    .hero-tagline { font-size: 22px; }

    .about-grid {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }
    .about-image img { width: 250px; height: 250px; }

    .section-title { font-size: 32px; }

    .chapter-title { font-size: 42px; }

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

    .memory-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }

    .skills-grid {
        flex-direction: row;
    }
    .skill-bar-group { flex: 1; }
    .competencies { flex: 1; }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .gallery-item img { height: 200px; }

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

    .contact-actions {
        flex-direction: row;
        justify-content: center;
    }

    .footer-grid {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ============================================================
   DESKTOP — 1024px+
   ============================================================ */
@media (min-width: 1024px) {
    .hero-name { font-size: 80px; }
    .hero-tagline { font-size: 24px; }

    .chapter-bg { background-attachment: fixed; }

    .chapter-milestones {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .gallery-item img { height: 220px; }

    .pub-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title { font-size: 36px; }
    .chapter-title { font-size: 48px; }
}
