:root {
    --bg: #F1F1F1;
    --text: #111111;
    --muted: #8a8a8a;
    --line: rgba(17,17,17,0.15);
    --nav-h: 92px;
}

:root[data-theme="dark"] {
    --bg: #121212;
    --text: #F2EFE9;
    --muted: #ababab;
    --line: rgba(242,239,233,0.16);
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nohemi', sans-serif;
    transition: background .4s ease, color .4s ease;
    overflow-x: hidden;
}

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

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    z-index: 1001;
}

.nav-logo {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
}
body.menu-open .nav-logo { color: var(--text); }
.nav-logo:hover { color: #fff; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-item {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: color .3s, opacity .3s;
}
.nav-item:hover { color: #fff; }
.nav-item.current { color: #fff; pointer-events: none; }

/* Theme toggle — simple filled circle */
.theme-toggle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.75);
    transition: color .3s;
}
.theme-toggle:hover { color: #fff; }
.theme-toggle .knob { display: none; }
.theme-toggle svg { width: 18px; height: 18px; display: none; }
.theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.lang-toggle {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.75);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .3s;
}
.lang-toggle:hover { color: #fff; }

/* Burger */
.burger {
    position: relative;
    width: 20px;
    height: 14px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1002;
}
.burger span {
    display: block;
    position: absolute;
    height: 2.1px;
    width: 100%;
    background: #fff;
    border-radius: 9px;
    left: 0;
    transition: top .25s .25s ease-in-out,
                bottom .25s .25s ease-in-out,
                transform .25s ease-in-out,
                opacity .1s ease-in-out;
}
.burger span:nth-of-type(1) { top: 0; }
.burger span:nth-of-type(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-of-type(3) { bottom: 0; }
body.menu-open .burger span { background: var(--text); }
.burger.open span:nth-of-type(1) { top: 50%; transform: translateY(-50%) rotate(45deg); transition: top .25s ease-in-out, transform .25s .25s ease-in-out; }
.burger.open span:nth-of-type(2) { opacity: 0; transition: opacity .1s ease-in-out; }
.burger.open span:nth-of-type(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); transition: bottom .25s ease-in-out, transform .25s .25s ease-in-out; }

.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; height: 100dvh;
    background: var(--bg);
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    transition: right 0.3s ease;
    z-index: 1000; padding: 0 40px; box-sizing: border-box; text-align: left; }
.mobile-menu.open { right: 0; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 44px; align-items: flex-start; text-align: left; }
.mobile-menu-links .nav-item { font-size: 30px; color: var(--text); }
.mobile-menu-links .nav-item:hover { color: var(--muted); }
.mobile-menu-links .nav-item.current { color: var(--muted); }
.mobile-menu-links .lang-toggle { color: var(--text); }
.mobile-menu-links .lang-toggle:hover { color: var(--muted); }
.mobile-menu-links .theme-toggle { margin-top: 12px; color: var(--text); }
.mobile-menu-links .theme-toggle:hover { color: var(--muted); }

/* ---------- HERO / INFINITE DRAGGABLE IMAGE CANVAS ---------- */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100dvh;
    overflow: hidden;
    background: #000;
}

body.no-select {
    user-select: none;
    -webkit-user-select: none;
}

.canvas-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    z-index: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
.canvas-container.dragging { cursor: grabbing; }

.canvas {
    position: absolute;
    top: 0; left: 0;
    will-change: transform;
}

.canvas-item {
    position: absolute;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    animation: canvasItemFadeIn 1.6s ease forwards;
}
@keyframes canvasItemFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .canvas-item { animation: none; opacity: 1; }
}
.canvas-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.5) saturate(0.85);
    transition: filter .35s ease, transform .35s ease, opacity .35s ease;
}
.canvas-item:hover img {
    filter: brightness(0.68) saturate(1);
    transform: scale(1.03);
}

.canvas-container.dim-design .canvas-item[data-category="design"] img,
.canvas-container.dim-photography .canvas-item[data-category="photography"] img {
    opacity: 0.16;
    filter: brightness(0.3) saturate(0.6);
}

.hero-tint {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.05) 100%);
}

.hero-grain {
    position: absolute;
    inset: -60px;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.19;
    mix-blend-mode: screen;
    animation: grainShift 8s steps(8) infinite;
}
@keyframes grainShift {
    0%   { transform: translate(0, 0); }
    12%  { transform: translate(-2%, 2%); }
    24%  { transform: translate(2%, -1%); }
    37%  { transform: translate(-1%, -2%); }
    50%  { transform: translate(2%, 2%); }
    62%  { transform: translate(-2%, -2%); }
    75%  { transform: translate(1%, 2%); }
    87%  { transform: translate(-2%, 1%); }
    100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-grain { animation: none; }
}

.hero-center {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    pointer-events: none;
    padding: 0 48px;
}

.hero-name {
    font-size: clamp(20px, 2.6vw, 44px);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
}

.hero-roles {
    display: flex;
    align-items: center;
    gap: clamp(24px, 5vw, 150px);
    pointer-events: auto;
}
.hero-role-link {
    font-size: clamp(12px, 1.2vw, 14px);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    padding-bottom: 6px;
    transition: opacity .3s ease, color .3s ease;
}
.hero-role-link:hover { opacity: .65; }
.hero-role-link.dimmed { opacity: .3; }

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 64px 40px 40px;
}
.footer-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}
.footer-col-social { flex-shrink: 0; }
.footer-col-right {
    display: flex;
    gap: 96px;
    margin-left: auto;
}
.footer-columns h4 {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
    font-weight: 500;
}
.footer-col-links { display: flex; flex-direction: column; gap: 12px; }
.footer-col-links a, .footer-col-links span {
    font-size: 15px;
    transition: opacity .25s;
}
.footer-col-links a:hover { opacity: .5; }

.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-row a {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 8px 16px;
    transition: opacity .25s;
}
.social-row a:hover { opacity: .5; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 950px) {
    .footer-columns { flex-direction: column; gap: 40px; }
    .footer-col-right { margin-left: 0; gap: 64px; }
}

@media (max-width: 768px) {
    .nav-right { display: none; }
    .burger { display: flex; }
    .navbar { padding: 18px 20px; }

    .canvas-item { border-radius: 2px; }
    .hero-center {
        flex-direction: column;
        justify-content: center;
        gap: 22px;
        text-align: center;
        padding: 0 24px;
    }
    .hero-name { font-size: clamp(38px, 8vw, 118px); letter-spacing: 0; }
    .hero-roles { gap: 20px; flex-wrap: wrap; justify-content: center; }

    .footer { padding: 48px 20px 32px; }
    .footer-col-right { gap: 40px; }
}

@media (max-width: 480px) {
    .footer-col-right { flex-direction: column; gap: 24px; }
}

/* ---------- Planos de profundidad (solo apariencia; el desplazamiento sigue siendo 2D) ---------- */
.canvas-item.tier-far img  { filter: brightness(0.14) saturate(0.5) blur(3.6px); }
.canvas-item.tier-mid img  { filter: brightness(0.34) saturate(0.8) blur(1.2px); }
.canvas-item.tier-near img { filter: brightness(0.95) saturate(1.1); }
.canvas-item.tier-near { box-shadow: 0 70px 120px rgba(0,0,0,0.9), 0 24px 44px rgba(0,0,0,0.65), 0 4px 10px rgba(0,0,0,0.5); }
.canvas-item.tier-mid  { box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 8px 16px rgba(0,0,0,0.4); }
.canvas-item.tier-far  { box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.canvas-item.tier-far:hover img,
.canvas-item.tier-mid:hover img  { filter: brightness(0.68) saturate(1) blur(0); }
.canvas-item.tier-near:hover img { filter: brightness(0.85) saturate(1); }
