/* ===== Base ===== */
body { background-color: #FAF8F4; color: #17130F; font-family: 'Inter', sans-serif; line-height: 1.6; }
::selection { background: #D22B1F; color: #FAF8F4; }

/* ===== Custom cursor ===== */
html.has-custom-cursor, html.has-custom-cursor a, html.has-custom-cursor button, html.has-custom-cursor input, html.has-custom-cursor textarea { cursor: none; }
#custom-cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none; }
html.has-custom-cursor #custom-cursor { display: block; }
.cursor-dot { position: fixed; top: 0; left: 0; width: 6px; height: 6px; background: #D22B1F; border-radius: 50%; transform: translate(-50%, -50%); transition: opacity 0.15s ease; }
.cursor-ring { position: fixed; top: 0; left: 0; width: 32px; height: 32px; border: 1px solid #D22B1F; border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; opacity: 0.6; }
#custom-cursor.is-active .cursor-ring { width: 56px; height: 56px; background-color: rgba(210, 43, 31, 0.08); opacity: 1; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.2, 0.65, 0.3, 0.9), transform 0.6s cubic-bezier(0.2, 0.65, 0.3, 0.9); transition-delay: var(--reveal-delay, 0ms); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Navigation ===== */
.nav-blur { background-color: rgba(250, 248, 244, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav-link { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; color: #6E6659; transition: color 0.2s ease; }
.nav-link:hover { color: #D22B1F; }

/* ===== Eyebrow label ===== */
.eyebrow { display: block; font-family: 'Space Mono', monospace; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: #D22B1F; }

/* ===== Mobile menu ===== */
#mobile-menu.is-open { display: block !important; }
#mobile-menu-btn.is-open .mobile-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
#mobile-menu-btn.is-open .mobile-bar:nth-child(2) { opacity: 0; }
#mobile-menu-btn.is-open .mobile-bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background-color: #D22B1F; color: #FAF8F4; font-weight: 600; font-size: 1rem; padding: 0.9rem 1.85rem; border-radius: 2px; transition: background-color 0.2s ease, transform 0.2s ease; }
.btn-primary:hover { background-color: #9C1D14; transform: translateY(-1px); }
.btn-outline { display: inline-flex; align-items: center; gap: 0.5rem; background-color: transparent; color: #17130F; font-weight: 600; font-size: 1rem; padding: 0.9rem 1.85rem; border: 1px solid #17130F; border-radius: 2px; transition: border-color 0.2s ease, color 0.2s ease; }
.btn-outline:hover { border-color: #D22B1F; color: #D22B1F; }

/* ===== Hero portrait ===== */
.portrait-shell { position: relative; padding-bottom: 3rem; }
.portrait-frame { position: relative; width: 100%; aspect-ratio: 4 / 5; }
.portrait-frame::before { content: ''; position: absolute; top: 14px; left: 14px; right: -14px; bottom: -14px; border: 1px solid #D22B1F; z-index: 0; transition: transform 0.25s ease; }
.portrait-frame:has(.portrait-image-wrap:hover)::before, .portrait-frame:has(.portrait-image-wrap:focus-visible)::before { transform: translate(4px, 4px); }
.portrait-image-wrap { position: relative; display: block; width: 100%; height: 100%; background-color: #FFFFFF; border: 1px solid #E6DFD0; overflow: hidden; cursor: pointer; z-index: 1; transition: border-color 0.25s ease; }
.portrait-image-wrap:hover, .portrait-image-wrap:focus-visible { border-color: #D22B1F; }
.portrait-image-wrap:focus-visible { outline: 2px solid #D22B1F; outline-offset: 4px; }
.portrait-img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; transition: transform 0.5s cubic-bezier(0.2, 0.65, 0.3, 0.9), filter 0.4s ease; }
.portrait-image-wrap:hover .portrait-img, .portrait-image-wrap:focus-visible .portrait-img { transform: scale(1.06); }
.portrait-image-wrap.is-active .portrait-img { filter: brightness(0.35); }
.socials-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: rgba(23, 19, 15, 0.55); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
.portrait-image-wrap.is-active .socials-overlay { opacity: 1; transform: translateY(0); pointer-events: auto; }
.socials-overlay-link { color: #FAF8F4; font-family: 'Space Mono', monospace; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.4rem 0; border-bottom: 1px solid transparent; transition: border-color 0.2s ease, color 0.2s ease; }
.socials-overlay-link:hover { color: #D22B1F; border-color: #D22B1F; }
.portrait-badge { position: absolute; bottom: 0; left: -18px; background-color: #17130F; color: #FAF8F4; padding: 0.75rem 1.1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; z-index: 2; }
.portrait-caption { font-family: 'Space Mono', monospace; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6E6659; text-align: center; margin-top: 0.5rem; }

/* ===== Waveform divider ===== */
.waveform-divider { width: 100%; line-height: 0; border-bottom: 1px solid #E6DFD0; background-color: #FAF8F4; }
.waveform-divider svg { width: 100%; height: 40px; display: block; }
.waveform-divider polyline { fill: none; stroke: #D22B1F; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Skills list ===== */
.skill-row { font-size: 1.05rem; color: #17130F; padding-bottom: 0.65rem; border-bottom: 1px solid #E6DFD0; }

/* ===== Service cards ===== */
.service-card { position: relative; background-color: #FFFFFF; border: 1px solid #E6DFD0; padding: 1.75rem; transition: border-color 0.2s ease, transform 0.2s ease; }
.service-card:hover { border-color: #D22B1F; transform: translateY(-2px); }
.service-index { display: block; font-family: 'Space Mono', monospace; font-size: 0.85rem; color: #D22B1F; margin-bottom: 0.85rem; }

/* ===== Work cards ===== */
.work-card { display: block; background-color: #FFFFFF; border: 1px solid #E6DFD0; overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; text-decoration: none; color: inherit; }
.work-card:hover { border-color: #D22B1F; transform: translateY(-2px); }
.work-cover { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #F1EBE0, #F1EBE0 10px, #FAF8F4 10px, #FAF8F4 20px); border-bottom: 1px solid #E6DFD0; overflow: hidden; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.65, 0.3, 0.9); }
.work-card:hover .work-cover img { transform: scale(1.06); }
.work-cover--syrup { background: linear-gradient(135deg, #D22B1F 0%, #9C1D14 100%); }
.work-cover--niko { background: linear-gradient(135deg, #17130F 0%, #3a3228 100%); }
.work-cover--kata { background: linear-gradient(135deg, #9C1D14 0%, #D22B1F 50%, #17130F 100%); }
.work-cover--illectrika { background: linear-gradient(135deg, #6E6659 0%, #17130F 100%); }

/* ===== Footer ===== */
.footer-link { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6E6659; transition: color 0.2s ease; }
.footer-link:hover { color: #D22B1F; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
    .portrait-frame { max-width: 280px; margin: 0 auto; }
    .portrait-badge { left: 0; font-size: 0.7rem; padding: 0.5rem 0.8rem; }
    .eyebrow { font-size: 0.75rem; }
}

/* ===== Motion ===== */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
