:root {
    --bg: #050505;
    --text: #EDEBE6;
    --muted: #9A978F;
    --amber: #FFB454;
    --line: #ffffff18;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, sans-serif;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--amber); color: #000; }

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    background: var(--amber);
    color: #000;
    font-weight: 600;
    padding: .75rem 1.25rem;
    transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Navigation */
nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 5vw;
    transition: background .3s ease, padding .3s ease;
}
nav.solid {
    background: rgba(5, 5, 5, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 5vw;
    border-bottom: 1px solid var(--line);
}
nav .logo { font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: .85rem; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover { color: var(--amber); }
.nav-links a.active { color: var(--amber); border-color: var(--amber); }
.menu-button { display: none; background: none; border: 1px solid var(--line); padding: 8px 16px; cursor: pointer; color: var(--text); }
.mobile-menu {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 49;
    background: rgba(5, 5, 5, .96);
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}
.mobile-menu a {
    padding: 18px 5vw;
    font-family: 'JetBrains Mono', monospace;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--amber); }

/* Hero */
.hero { display: flex; flex-direction: column; justify-content: flex-start; padding: 88px 5vw 70px; }
.hero-meta { display: flex; justify-content: space-between; margin-bottom: 16px; }
.frame {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: calc(56vh * 1.7778);
    margin: 0 auto;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
}
.frame video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.rec { position: absolute; top: 18px; left: 20px; z-index: 2; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.sound-btn {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    background: var(--amber);
    color: #000;
    border: 0;
    cursor: pointer;
    padding: 11px 22px;
    transition: background .25s ease;
}
.sound-btn:hover { background: #fff; }

.title { margin-top: 36px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 4vw; align-items: end; }
.title h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); font-weight: 300; line-height: 1.04; letter-spacing: -.03em; }
.title h1 b { font-weight: 600; }
.title p { color: var(--muted); font-size: 1.05rem; }

.btns { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.btns.center { justify-content: center; }
.btn {
    display: inline-block;
    padding: 12px 26px;
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all .25s ease;
}
.btn.primary { background: var(--amber); color: #000; border-color: var(--amber); font-weight: 500; }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn:not(.primary):hover { border-color: var(--amber); color: var(--amber); }

/* Stats */
/* One row for any number of stats (3, 4 or 5) */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 5vw; }
.stat { padding: 32px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-weight: 300; font-size: clamp(2.6rem, 4.8vw, 4.2rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat b i { font-style: normal; font-weight: 400; color: var(--amber); }
.stat .label { display: block; margin-top: 12px; max-width: 28ch; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Sections */
section { padding: 120px 5vw 20px; }
section.tight { padding-top: 100px; }
h2 { font-weight: 300; font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 50px; }

/* Section divider: numbered label with a hairline that runs across the page */
.section-label { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.section-label b { font-weight: 500; color: var(--amber); }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #ffffff45, #ffffff26 70%, #ffffff12); }
.about .section-label { grid-column: 1 / -1; margin-bottom: 0; }

/* Reels */
.reels { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.reels figure { padding-top: 26px; }
.reels figure:first-child { padding-right: 26px; }
.reels figure + figure { padding-left: 26px; border-left: 1px solid var(--line); }
.reels video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.reels figcaption { padding-top: 14px; }
.reels figcaption b { font-weight: 400; font-size: 1.5rem; letter-spacing: -.02em; display: block; }
.reels figcaption span { color: var(--muted); font-size: .92rem; }

/* Work */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -20px 0 34px; }
.filters:empty { display: none; }
.filter-btn {
    background: transparent;
    border: 1px solid var(--line);
    padding: 8px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: all .25s ease;
}
.filter-btn.group-start { margin-left: 14px; }
.filter-btn:hover { border-color: var(--amber); color: var(--amber); }
.filter-btn.active { background: var(--amber); border-color: var(--amber); color: #000; }

/* Work grid: every tile is the same size, pictures are fitted into it */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.item { display: block; }
#portfolio-feature:not(:empty) { margin-bottom: 46px; }
.item.feature { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center; }
.item .img { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #111; }
.item .badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 11px;
    background: #000a;
    backdrop-filter: blur(6px);
    border: 1px solid #ffffff40;
    color: var(--text);
}
.more-wrap { margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.more-wrap .btn { min-width: 240px; text-align: center; }
.item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.item:hover img { transform: scale(1.04); }.item .play {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid #ffffffaa;
    background: #0008;
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    font-size: .8rem;
}
.item .meta { padding-top: 14px; }
.item.feature .meta { padding-top: 0; }
.item .tag { color: var(--amber); }
.item h3 { font-weight: 400; font-size: 1.4rem; letter-spacing: -.02em; margin: 4px 0; line-height: 1.2; transition: color .25s ease; }
.item.feature h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.08; margin: 10px 0 14px; }
.item:hover h3 { color: var(--amber); }
.item p { color: var(--muted); font-size: .95rem; }
.item:not(.feature) .meta p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lb-content .lb-desc { max-width: 720px; text-align: center; color: var(--muted); font-size: .95rem; line-height: 1.55; }

/* Logos */
.fact-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; margin-top: 22px; }
.logo-img { height: 48px; width: auto; opacity: .72; transition: opacity .25s ease; }
.logo-img:hover { opacity: 1; }
.logo-inline { height: .9em; width: auto; vertical-align: -.1em; margin-left: 2px; opacity: .85; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 0; align-items: stretch; padding-top: 110px; }
.about p { color: #BDBAB2; font-size: 1.1rem; margin-bottom: 16px; max-width: 640px; }
.about-bio { padding-right: 3.5vw; }
.about-details { min-width: 0; padding-left: 3.5vw; border-left: 1px solid #ffffff2e; }
.facts { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 130px 1fr; gap: 6px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.about .fact p { color: var(--text); font-size: 1.02rem; margin: 0; max-width: none; line-height: 1.4; }
.about .fact p.second { margin-top: 14px; }
.fact small { display: block; color: var(--muted); font-size: .92rem; font-weight: 300; margin-top: 2px; }
.skills { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 0; }
.skills span:not(:last-child)::after { content: "|"; margin: 0 14px; color: var(--amber, #FFB454); opacity: 0.6; }

/* Contact and footer */
.contact { padding: 120px 5vw 130px; }
.contact-inner { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 5vw; align-items: center; padding-top: 10px; }
.contact-photo {
    display: block;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 15%;
    filter: grayscale(1) contrast(1.05);
    border: 1px solid #ffffff30;
}
.contact h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); margin-bottom: 28px; }
.contact p { color: var(--muted); max-width: 520px; margin: 0 0 34px; }
footer { display: flex; justify-content: space-between; padding: 24px 5vw; border-top: 1px solid var(--line); }

/* Back to top */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, .85);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease, border-color .3s ease, color .3s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--amber); color: var(--amber); }

/* Viewer */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vw;
    overflow-y: auto;
}
.lb-content { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: fadeIn .3s ease-out; }
.lb-content video { width: 100%; max-width: 1200px; max-height: 66vh; background: #000; }
.lb-content img { max-width: 92vw; max-height: 66vh; }
.lb-content .lb-caption { font-weight: 400; font-size: 1.1rem; text-align: center; }
.lb-content .lb-caption .lb-count { display: block; margin-top: 4px; }
.lb-content .lb-caption small { display: block; color: var(--amber); font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.lb-btn {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, .08);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background .2s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 18px; right: 22px; width: 46px; height: 46px; font-size: 2rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 2rem; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* Smaller screens */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .menu-button { display: block; }
    .title, .about { grid-template-columns: 1fr; }
    .contact-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 30px; }
    .contact-photo { width: 200px; height: 200px; }
    .contact p { margin-left: auto; margin-right: auto; }
    .contact .btns { justify-content: center; }
    .about-bio { padding-right: 0; }
    .about-details { padding-left: 0; border-left: 0; }
    .frame { aspect-ratio: 16 / 9; }
    .strip { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr 1fr; }
    .stat, .stat:first-child { padding: 24px 18px; border-left: 0; border-top: 1px solid var(--line); }
    .stat:nth-child(-n+2) { border-top: 0; }
    .stat:nth-child(odd) { padding-left: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--line); }
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .reels { grid-template-columns: 1fr; }
    .reels figure:first-child { padding-right: 0; }
    .reels figure + figure { padding-left: 0; border-left: 0; }
    .item.feature { grid-template-columns: 1fr; gap: 18px; }
    .work-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .work-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding-top: 88px; padding-bottom: 50px; }
    .fact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rec i, .lb-content { animation: none; }
    .item img, .item h3, .btn { transition: none; }
}
