/* ═══════════════════════════════════════════════════════
   Edgar Andrés Zorrilla — Light Gallery
   Clean, airy, professional portfolio
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --ink: #1a1a1a;
    --muted: #666666;
    --border: #e8e8e8;

    --accent-design: #4A90E8;
    --accent-illustration: #E8634A;
    --accent-photography: #E5A536;
    --accent-ai: #9B6FE8;
    --accent-primary: #2D5016;
    --accent-photo-manip: #D46BC8;
    --accent-doodles: #3DBFA0;
    --accent-logos: #8B7355;
    --accent-murals: #C75050;
    --accent-web: #5B8DEF;
    --accent-editorial: #7A5BA9;

    --forest: #2D5016;
    --moss: #52A557;
    --moss-glow: #6EE7B7;

    --gradient-vibrant: var(--accent-primary);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --max-width: 1400px;
    --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 600ms;
    --stagger: 100ms;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

hr { margin: 0; border: none; height: 1px; background: var(--border); }

::selection { background: var(--forest); color: #fff; }

/* ── Scroll progress ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-vibrant);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 10001;
    will-change: transform;
}

/* ── Page transition ── */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 450ms var(--ease-out);
}
.page-transition.active { opacity: 1; pointer-events: all; }
body.page-transitioning { overflow: hidden; }

/* ══════════════════════════════════════
   Navigation
   ══════════════════════════════════════ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 400ms ease, padding 400ms ease, backdrop-filter 400ms ease;
    background: transparent;
}

nav.nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* On hero pages, nav starts light text on dark bg */
.hero-page nav { background: transparent; }
.hero-page nav.nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 400ms ease;
}

nav.nav-scrolled .nav-container { padding: 1rem 2rem; }

.logo {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 200ms;
}
.logo:hover { opacity: 0.7; }

/* Hero page: logo starts white */
.hero-page .logo { color: #fff; }
.hero-page nav.nav-scrolled .logo { color: var(--ink); }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 300ms ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--forest);
    transition: width 300ms var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hero page: nav links start light */
.hero-page .nav-links a { color: rgba(255,255,255,1); }
.hero-page .nav-links a:hover,
.hero-page .nav-links a.active { color: #fff; }
.hero-page .nav-links a::after { background: #fff; }
.hero-page nav.nav-scrolled .nav-links a { color: var(--muted); }
.hero-page nav.nav-scrolled .nav-links a:hover,
.hero-page nav.nav-scrolled .nav-links a.active { color: var(--ink); }
.hero-page nav.nav-scrolled .nav-links a::after { background: var(--forest); }

/* ══════════════════════════════════════
   Container
   ══════════════════════════════════════ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ══════════════════════════════════════
   Hero (index.html)
   ══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
    position: relative;
    background: #000;
    color: #fff;
}

.hero-content {
    width: 100%;
    align-items: start;
    padding: 4rem 0;
}

.hero-main {
    opacity: 0;
    animation: heroReveal 1s var(--ease-out) 0.6s forwards;
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.backgroundHero {
    background: url('img/edgar-zorrilla-hero-bg.jpg') no-repeat top center/100% auto;
    padding-top: 45%;
    margin-top: -10%;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: inherit;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Word-by-word reveal for [data-split] */
[data-split] .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: wordReveal 0.6s var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 80ms + 0.8s);
}

@keyframes wordReveal {
    to { opacity: 1; transform: translateY(0); }
}

.hero-brands {
    opacity: 0;
    animation: heroReveal 1s var(--ease-out) 1.2s forwards;
}

.brands-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--moss);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

img.brands-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0;
    mix-blend-mode: screen;
    opacity: 0;
    animation: fadeIn 1.2s var(--ease-out) 1.6s forwards;
}

.fixed-image { display: none; }

/* ── Tagline ── */
.tagline { padding: .5rem 0 2rem; }

.tagline-content {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 200;
    color: rgba(255,255,255,0.85);
    max-width: 900px;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.tagline-content strong {
    font-weight: 400;
    color: var(--moss);
    font-style: italic;
    font-family: var(--font-serif);
}

/* ── Hero to light transition ── */
.hero-light-transition {
    height: 120px;
    background: var(--bg);
}

/* ══════════════════════════════════════
   Work History (index.html)
   ══════════════════════════════════════ */
.work {
    padding: 6rem 0 8rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    background: var(--bg);
    position: relative;
}

.work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--bg);
    pointer-events: none;
}

.work .section-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--forest);
    letter-spacing: -0.02em;
}

.work p { color: var(--ink); }
.work p strong { color: var(--ink); }

.work-description-container { position: relative; }

.work-text-content { position: relative; overflow: hidden; }
.work-text-preview { display: block; transition: opacity 400ms var(--ease-out); }
.work-text-expanded { display: none; opacity: 0; transition: opacity 400ms var(--ease-out); }
.work-text-content.expanded .work-text-preview { display: none; }
.work-text-content.expanded .work-text-expanded { display: block; opacity: 1; }

.read-more-btn {
    background: none;
    border: 1px solid var(--forest);
    color: var(--forest);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    margin-top: 1.5rem;
    transition: all 300ms ease;
    font-family: var(--font-sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0;
}

.read-more-btn:hover {
    background: var(--forest);
    color: #fff;
}

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

.work-entry {
    padding: 1.5rem;
    background: transparent;
    transition: background 300ms ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-entry:hover { background: rgba(45, 80, 22, 0.03); }

.work-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.35rem;
}

.work-company { font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.work-date { font-size: 0.8rem; color: var(--muted); font-weight: 400; letter-spacing: 0.02em; }
.work-role { font-size: 0.85rem; color: var(--forest); font-weight: 600; margin-bottom: 0.75rem; letter-spacing: 0.02em; }
.work-description { color: var(--muted); line-height: 1.8; font-size: 0.85rem; letter-spacing: 0.01em; }

.work-brands { margin-top: auto; padding-top: 0.75rem; font-size: 0.65rem; letter-spacing: 0.04em; line-height: 1.8; color: var(--muted); }
.work-brands strong {
    color: #fff;
    font-weight: 600;
    display: inline-block;
    background: var(--forest);
    padding: 3px 8px;
    border-radius: 0;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Projects CTA ── */
.projects-cta {
    text-align: center;
    padding: 4rem 0 2rem;
    background: var(--bg);
}

.projects-cta a {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--forest);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 300ms ease;
    border: 2px solid var(--forest);
}

.projects-cta a:hover {
    background: transparent;
    color: var(--forest);
}

/* ══════════════════════════════════════
   Projects (projects.html)
   ══════════════════════════════════════ */
.projects {
    padding: 6rem 0 8rem;
    background: var(--bg);
}

.projects .section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.projects-intro {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 600px;
    font-weight: 300;
    line-height: 1.8;
}

/* ── Filter Bar ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    position: sticky;
    top: 70px;
    z-index: 100;
    background: var(--bg);
    padding: 1rem 0;
}

.filter-pill {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 300ms ease;
    font-family: var(--font-sans);
}

.filter-pill:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.filter-pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.filter-pill.active[data-filter="design"] {
    background: var(--accent-design);
    border-color: var(--accent-design);
}

.filter-pill.active[data-filter="illustration"] {
    background: var(--accent-illustration);
    border-color: var(--accent-illustration);
}

.filter-pill.active[data-filter="photography"] {
    background: var(--accent-photography);
    border-color: var(--accent-photography);
}

.filter-pill.active[data-filter="photo-manipulation"] {
    background: var(--accent-photo-manip);
    border-color: var(--accent-photo-manip);
}

.filter-pill.active[data-filter="doodles"] {
    background: var(--accent-doodles);
    border-color: var(--accent-doodles);
}

.filter-pill.active[data-filter="logos"] {
    background: var(--accent-logos);
    border-color: var(--accent-logos);
}

.filter-pill.active[data-filter="murals"] {
    background: var(--accent-murals);
    border-color: var(--accent-murals);
}

.filter-pill.active[data-filter="web-design"] {
    background: var(--accent-web);
    border-color: var(--accent-web);
}

.filter-pill.active[data-filter="editorial-design"] {
    background: var(--accent-editorial);
    border-color: var(--accent-editorial);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 2rem;
    row-gap: 5rem;
}

.project-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Kill every hover/tilt effect on project cards; preserve lazy-reveal (via data-animate) */
.project-card,
.project-card:hover,
.project-card:focus,
.project-card:active {
    transform: none !important;
    box-shadow: none !important;
    border: 0 !important;
}
.project-card .project-thumb,
.project-card:hover .project-thumb,
.project-card:focus .project-thumb {
    transform: none !important;
    filter: none !important;
    transition: none !important;
}

/* hover effects removed */

.project-card.hiding {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.project-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: var(--ink);
}

/* thumb hover zoom removed */

.project-card > :not(.project-thumb) {
    padding: 0 1.5rem;
}

.project-card > :last-child {
    padding-bottom: 1.5rem;
}

.project-type { display: none; }

/* Category-colored badges */
.project-card[data-category~="design"] .project-type { color: var(--accent-design); }
.project-card[data-category~="illustration"] .project-type { color: var(--accent-illustration); }
.project-card[data-category~="photography"] .project-type { color: var(--accent-photography); }
.project-card[data-category~="photo-manipulation"] .project-type { color: var(--accent-photo-manip); }
.project-card[data-category~="doodles"] .project-type { color: var(--accent-doodles); }
.project-card[data-category~="logos"] .project-type { color: var(--accent-logos); }
.project-card[data-category~="murals"] .project-type { color: var(--accent-murals); }
.project-card[data-category~="web-design"] .project-type { color: var(--accent-web); }
.project-card[data-category~="editorial-design"] .project-type { color: var(--accent-editorial); }

.project-name {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    letter-spacing: -0.01em;
}

.project-desc {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.7;
    font-weight: 400;
}

/* ══════════════════════════════════════
   Capabilities (capabilities.html)
   ══════════════════════════════════════ */
.capabilities {
    padding: 6rem 0 8rem;
    background: var(--bg);
    position: relative;
}

.capabilities .section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.capabilities-intro {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 4rem;
    max-width: 720px;
    line-height: 1.9;
    font-weight: 300;
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
    margin-top: 2rem;
}

.cap-item {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
    border-bottom: none;
    align-items: start;
}

.cap-label { position: static; }

.cap-number { display: none; }

.cap-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.cap-body p {
    font-size: 0.95rem;
    color: #000;
    line-height: 1.85;
    margin-bottom: 1rem;
    font-weight: 400;
}
.cap-body p:last-child { margin-bottom: 0; }

.cap-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.25rem;
}

.cap-tag {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.35em 0.9em;
    border-radius: 0;
    background: rgba(45, 80, 22, 0.06);
    color: var(--forest);
    border: 1px solid rgba(45, 80, 22, 0.12);
    transition: background 200ms ease, color 200ms ease;
}

.cap-tag:hover {
    background: var(--forest);
    color: #fff;
}

/* ══════════════════════════════════════
   AI Explorations (explorations.html)
   — stays dark for gallery context
   ══════════════════════════════════════ */
.explorations {
    padding: 6rem 0 8rem;
    background: #0a0a0a;
}

.explorations .section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.explorations-intro {
    font-size: 1.05rem;
    color: #9CA3AF;
    margin-bottom: 1.5rem;
    max-width: 700px;
    line-height: 1.85;
    font-weight: 300;
}

.explorations-meta {
    font-size: 0.8rem;
    color: var(--moss);
    margin-bottom: 3rem;
    letter-spacing: 0.04em;
}

.explorations-masonry {
    columns: 4;
    column-gap: 14px;
}

.explorations-masonry .exp-item {
    break-inside: avoid;
    margin-bottom: 14px;
    
    overflow: hidden;
    cursor: pointer;
    transition: transform 400ms var(--ease-out);
    position: relative;
}

.explorations-masonry .exp-item:hover {
    transform: translateY(-4px);
}

.explorations-masonry .exp-item img {
    width: 100%;
    display: block;
    transition: transform 500ms var(--ease-out);
}

.explorations-masonry .exp-item:hover img { transform: scale(1.03); }

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms var(--ease-out), visibility 400ms;
    backdrop-filter: blur(30px);
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 0; }

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0;
    transition: background 200ms;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close svg { width: 20px; height: 20px; stroke: white; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: none;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0;
    transition: background 200ms;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-nav svg { width: 24px; height: 24px; stroke: white; }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #9CA3AF;
    font-size: 0.8rem;
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: 0.1em;
}

/* ══════════════════════════════════════
   Contact Footer
   ══════════════════════════════════════ */
.contact {
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    background: var(--ink);
    color: #fff;
}

/* decorative line removed */

.contact-content {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}

.contact-item {
    color: #9CA3AF;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    transition: color 300ms ease;
    position: relative;
}

.contact-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--moss);
    transition: width 300ms var(--ease-out);
}

.contact-item:hover { color: var(--moss); }
.contact-item:hover::after { width: 100%; }

/* ══════════════════════════════════════
   Scroll-triggered animations
   ══════════════════════════════════════ */
@keyframes fadeIn { to { opacity: 1; } }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration) var(--ease-out),
                transform var(--duration) var(--ease-out);
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

[data-lazy] {
    opacity: 0;
    transition: opacity 1.2s var(--ease-out);
}

[data-lazy].in-view { opacity: 1; }

/* ══════════════════════════════════════
   Reduced Motion
   ══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    [data-animate], [data-lazy] { opacity: 1; transform: none; }
    .page-transition { display: none !important; }
    .cursor-glow { display: none; }
}

/* ══════════════════════════════════════
   Explorations Index (explorations.html)
   ══════════════════════════════════════ */
.explorations-index {
    padding: 10rem 0 6rem;
    background: var(--bg);
}

.explorations-index .section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--ink);
}

.explorations-index-intro {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 1rem;
}

.explorations-index-note {
    font-size: 0.85rem;
    color: var(--forest);
    font-style: italic;
    margin-bottom: 4rem;
    font-weight: 400;
}

/* ── Exploration Cards ── */
.explorations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.exploration-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: transform 400ms var(--ease-out), border-color 300ms ease;
    overflow: hidden;
}

.exploration-card:hover {
    transform: translateY(-4px);
    border-color: var(--forest);
}

.exploration-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.exploration-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms var(--ease-out);
}

.exploration-card:hover .exploration-card-thumb img {
    transform: scale(1.03);
}

.exploration-card-body {
    padding: 1.5rem 1.5rem 2rem;
}

.exploration-card-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.25em 0.8em;
    background: var(--accent-ai);
    color: #fff;
    margin-bottom: 0.75rem;
}

.exploration-card-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.exploration-card-excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--muted);
    font-weight: 400;
}

.exploration-card-cta {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--forest);
}

.exploration-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.exploration-card.featured .exploration-card-thumb {
    aspect-ratio: auto;
    min-height: 320px;
}

.exploration-card.featured .exploration-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.exploration-card.featured .exploration-card-title {
    font-size: 1.8rem;
}

.exploration-card-thumb-grid {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    background: #f0f0f0;
    overflow: hidden;
}

.exploration-card-thumb-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms var(--ease-out);
}

.exploration-card:hover .exploration-card-thumb-grid img {
    transform: scale(1.03);
}

/* ══════════════════════════════════════
   Exploration Detail Pages
   ══════════════════════════════════════ */
.exploration-detail {
    padding: 10rem 0 6rem;
    background: var(--bg);
}

.exploration-detail-breadcrumb {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.exploration-detail-breadcrumb a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    transition: color 200ms;
}

.exploration-detail-breadcrumb a::before {
    content: '←';
    margin-right: 0.5rem;
}

.exploration-detail-breadcrumb a:hover {
    color: var(--forest);
}

.exploration-detail-breadcrumb span {
    margin: 0 0.5rem;
    color: var(--border);
}

.exploration-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3em 1em;
    background: var(--accent-ai);
    color: #fff;
    margin-bottom: 1rem;
}

.exploration-detail h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.exploration-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    font-size: 0.85rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.exploration-detail-meta strong {
    color: var(--ink);
    font-weight: 600;
}

.exploration-detail-meta a {
    color: var(--forest);
}

.exploration-detail-body {
    max-width: 800px;
}

.exploration-detail-body p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #000;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.exploration-detail-body h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--ink);
    margin: 3rem 0 1rem;
}

.exploration-detail-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.exploration-detail-body li {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.exploration-screenshot {
    margin: 3rem 0;
}

.exploration-screenshot img {
    width: 100%;
    display: block;
    border: 1px solid var(--border);
}

.exploration-visit {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 200ms ease;
}

.exploration-visit:hover {
    background: var(--forest);
}

.exploration-back-link {
    display: block;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    transition: color 200ms ease;
}

.exploration-back-link:hover {
    color: var(--forest);
}

/* Dark-theme overrides for AI gallery detail */
.hero-page .exploration-detail-breadcrumb { color: #9CA3AF; }
.hero-page .exploration-detail-breadcrumb a { color: #fff; }
.hero-page .exploration-detail-breadcrumb a:hover { color: var(--moss); }
.hero-page .exploration-detail-breadcrumb span { color: #444; }
.hero-page .exploration-back-link {
    border-top-color: #222;
    background: #0a0a0a;
    color: #fff;
}
.hero-page .exploration-back-link:hover { color: var(--moss); }
.hero-page { background: #0a0a0a; }
.hero-page .explorations { padding-top: 8rem; }

/* ══════════════════════════════════════
   About Page (about.html)
   ══════════════════════════════════════ */
.about-hero {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding-top: 10rem;
    padding-bottom: 2rem;
    position: relative;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 4rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-main-content {
    min-width: 0;
}

/* ── About Header ── */
.about-header {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-header-image {
    width: 200px;
    flex-shrink: 0;
}

.about-header-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.about-header-title {
    flex: 1;
    opacity: 0;
    animation: slideUp 600ms cubic-bezier(0.2, 0.6, 0.2, 1) 600ms forwards;
}

.about-header-title h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin: 0;
    color: var(--ink);
}

/* ── About Sections ── */
.about-section {
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.about-section-content {
    display: grid;
    gap: 3rem;
    align-items: start;
}

.about-section.image-left .about-section-content {
    grid-template-columns: 250px 1fr;
}

.about-section.image-right .about-section-content {
    grid-template-columns: 1fr 250px;
}

.about-section.image-right .section-image { order: 2; }
.about-section.image-right .section-text { order: 1; }

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.section-text h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.section-text h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-text p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #000;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.section-text p strong {
    color: var(--ink);
    font-weight: 500;
}

/* ── About Highlights ── */
.about-highlights {
    background: rgba(45, 80, 22, 0.04);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.about-highlights h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 1rem;
    margin-top: 0;
}

.about-highlights ul {
    list-style: none;
    padding: 0;
}

.about-highlights li {
    padding: 0.4rem 0;
    color: #00;
    font-size: 0.95rem;
    font-weight: 400;
}

.about-highlights li:before {
    content: "— ";
    color: var(--forest);
    margin-right: 0.5rem;
}

.clients-grid ul {
    column-count: 2;
    column-gap: 2rem;
}

.clients-grid li {
    break-inside: avoid;
}

/* ── Sidebar Navigation ── */
.sidebar-nav {
    position: fixed;
    top: 8rem;
    right: calc((100vw - 1400px) / 2 + 2rem);
    width: 280px;
    background: var(--surface);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
}

.sidebar-nav h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 1.5rem;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

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

.sidebar-nav li {
    margin-bottom: 0.75rem;
}

.sidebar-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 200ms ease;
    display: block;
    padding: 0.4rem 0;
    font-weight: 400;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--forest);
}

/* ── Hamburger Menu ── */
.hamburger-menu {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    background: var(--forest);
    border: none;
    padding: 1rem;
    cursor: pointer;
    transition: background 200ms ease;
    visibility: hidden;
    opacity: 0;
}

.hamburger-menu:hover {
    background: var(--moss);
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: all 300ms ease;
}

.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 6rem 2rem 2rem;
    transition: opacity 400ms ease, visibility 400ms ease;
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    text-align: center;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--forest);
    margin-bottom: 2rem;
    text-align: center;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-nav li { margin-bottom: 1.5rem; }

.mobile-nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 200ms ease;
    display: block;
    text-align: center;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--forest);
}

/* ── Skills Section ── */
.skills-section {
    padding: 4rem 0;
    max-width: 1400px;
    margin: 0 auto;
    padding-right: calc(280px + 6rem);
    padding-left: 2rem;
}

.skills-section .section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    background: var(--surface);
    padding: 2rem;
    transition: transform 200ms ease;
    border: 1px solid var(--border);
}

.skill-category:hover {
    transform: translateY(-4px);
    border-color: var(--forest);
}

.skill-category h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 0.25rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 400;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
    .work-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .cap-grid { grid-template-columns: repeat(2, 1fr); }
    .cap-item { gap: 1rem; }
    .cap-label { position: static; }
    .explorations-masonry { columns: 3; }
    .explorations-grid { grid-template-columns: 1fr 1fr; }
    .exploration-card.featured { grid-template-columns: 1fr; }
    .exploration-card.featured .exploration-card-thumb { min-height: 240px; }
    .sidebar-nav { display: none; }
    .hamburger-menu { visibility: visible; opacity: 1; }
    .about-wrapper { grid-template-columns: 1fr; }
    .about-section.image-left .about-section-content,
    .about-section.image-right .about-section-content { grid-template-columns: 1fr; }
    .section-image { max-width: 250px; margin: 0 auto; }
    .section-text h2 { font-size: 2rem; }
    .skills-section { padding-right: 2rem; }
}

@media (max-width: 768px) {
    .cap-grid { grid-template-columns: 1fr; gap: 2rem; }
    .backgroundHero {
        background-image: url('img/edgar-zorrilla-hero-bg-mobile.jpg');
        padding-top: 10%;
    }

    .nav-container { padding: 1rem 1.5rem; }
    .logo { font-size: 1.15rem; }
    .nav-links { gap: 1.5rem; }
    .nav-links a { font-size: 0.75rem; }

    h1 { margin-bottom: 1.5rem; }

    .work {
        display: block;
        padding: 4rem 0 6rem;
    }
    .work::before { height: 80px; }
    .work .section-title { font-size: 2rem; margin-bottom: 2rem; }
    .work-description-container { margin-bottom: 3rem; }
    .work-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .work-entry { padding: 1rem; }
    .work-company { font-size: 0.95rem; }
    .work-date { font-size: 0.75rem; }
    .work-role { font-size: 0.8rem; }
    .work-description { font-size: 0.8rem; }
    .work-brands { font-size: 0.65rem; }

    .contact { padding: 6rem 0 3rem; }
    /* contact::before removed */
    .contact-content { flex-direction: column; gap: 1rem; }

    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .project-thumb { aspect-ratio: 3 / 4; }

    .filter-bar { top: 55px; }

    .explorations-masonry { columns: 2; column-gap: 10px; }
    .explorations-masonry .exp-item { margin-bottom: 10px; }
    .explorations-grid { grid-template-columns: 1fr; gap: 2rem; }
    .exploration-card.featured .exploration-card-title { font-size: 1.4rem; }
    .about-hero { padding-top: 6rem; }
    .about-wrapper { padding: 0 1.5rem; }
    .about-header { flex-direction: column; gap: 2rem; }
    .about-header-image { width: 100%; max-width: 250px; margin: 0 auto; }
    .about-header-title h1 { font-size: 2rem; }
    .section-text h2 { font-size: 1.75rem; }
    .section-text p { font-size: 1rem; }
    .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .nav-links { display: none; }

    .backgroundHero { padding-top: 70%; margin-top: 5%; }
    .hero { min-height: 50vh; }
    .hero-content { padding: 2rem 0; }

    .projects-grid { grid-template-columns: 1fr; }
    .explorations-masonry { columns: 2; }
}
