/* work.css — "Things I've built": filters, search and project cards. */

.portfolio-toolbar{ display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters{ display: flex; gap: 20px; min-width: 0px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar{ display: none; }
.filters button{ position: relative; min-height: 48px; flex-shrink: 0; font-size: 10px; color: var(--muted); transition: color 0.2s; }
.filters button:hover, .filters button.selected{ color: var(--ink); }
.filter-line{ position: absolute; height: 2px; background: var(--red); bottom: 0px; left: 0px; right: 0px; }
.search-box{ display: flex; align-items: center; gap: 9px; color: var(--muted); max-width: 165px; }
.search-box input{ width: 100%; background: none; border: 0px; min-height: 44px; color: var(--ink); font-size: 11px; min-width: 0px; }
.search-box input::placeholder{ color: var(--muted); }
.project-grid{ display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 28px 22px; position: relative; }
.project-card{ min-width: 0px; }
.project-open{ display: block; width: 100%; aspect-ratio: 1.65 / 1; position: relative; overflow: hidden; background: rgb(19, 16, 16); border: 1px solid var(--line); }
.project-picture{ position: absolute; inset: -12px 0px; transition: filter 0.5s; filter: saturate(0.55); }
.project-picture > .media-image{ height: 100%; width: 100%; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.project-open:hover .project-picture > .media-image{ transform: scale(1.055); }
.project-open:hover .project-picture{ filter: saturate(1); }
.media-image{ display: block; position: relative; background: rgb(21, 18, 18); overflow: hidden; isolation: isolate; }
.media-image > img{ width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s; }
.media-image.loading > img{ opacity: 0; }
.media-image.loaded > img{ opacity: 1; }
.media-image.error > img{ visibility: hidden; }
.image-fallback{ position: absolute; inset: 0px; display: flex; flex-direction: column; gap: 12px; justify-content: center; align-items: center; font-size: 11px; color: var(--muted); background: rgb(23, 17, 17); }
.image-fallback .display{ color: var(--red); font-size: 64px; }
.project-type{ position: absolute; top: 15px; left: 15px; font-size: 8px; padding: 5px 7px; background: rgba(9, 9, 9, 0.7); color: rgb(221, 221, 221); z-index: 2; }
.project-hover{ width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, 0.396); display: flex; align-items: center; justify-content: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); border-radius: 50%; opacity: 0; background: rgba(9, 9, 9, 0.467); transition: opacity 0.3s, transform 0.4s; }
.project-open:hover .project-hover, .project-open:focus-visible .project-hover{ opacity: 1; transform: translate(-50%, -50%); }
.project-frame{ position: absolute; inset: 9px; border: 1px solid rgba(255, 255, 255, 0.07); pointer-events: none; }
.project-caption{ display: flex; gap: 14px; align-items: center; min-height: 78px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.project-number{ font-size: 32px; color: var(--red); line-height: 1; min-width: 29px; }
.project-caption > span:nth-child(2){ min-width: 0px; flex: 1 1 0%; }
.project-caption h3{ font-size: 12px; font-weight: 700; line-height: 1.4; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-category{ display: block; font-size: 9px; color: var(--muted); margin-top: 5px; text-transform: uppercase; }
.project-caption > svg{ color: var(--muted); transition: transform 0.3s; }
.project-caption:hover > svg{ transform: translate(3px, -3px); color: var(--red); }
.load-more{ display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 30px; }
.load-more > span{ font-size: 10px; color: var(--muted); }
.outline-button{ border: 1px solid rgb(73, 52, 56); min-height: 44px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; font-size: 11px; transition: background 0.25s, border-color 0.25s; white-space: nowrap; }
.outline-button:hover{ background: rgb(37, 18, 22); border-color: var(--red); }
.empty-state{ text-align: center; padding: 55px 20px; }
.empty-state p{ color: var(--muted); font-size: 14px; }
.project-brief{ border-top: 1px solid var(--line); margin-top: 40px; }
.project-brief summary{ list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 60px; font-size: 12px; }
.project-brief summary::-webkit-details-marker{ display: none; }
.project-brief[open] summary > svg{ transform: rotate(45deg); }
.project-brief form{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px 25px; padding: 12px 0px 24px; }
.project-brief label{ display: flex; flex-direction: column; gap: 10px; font-size: 11px; color: var(--muted); }
.project-brief input, .project-brief select, .project-brief textarea{ width: 100%; background: rgb(17, 17, 17); border: 1px solid rgb(51, 38, 42); border-radius: 0px; color: var(--ink); min-height: 46px; padding: 12px 15px; font-size: 12px; }
.project-brief input::placeholder, .project-brief textarea::placeholder{ color: rgb(147, 135, 139); }
.project-brief textarea{ resize: vertical; }
.project-dialog{ width: min(1040px, 100%); max-height: calc(100dvh - 56px); overflow-y: auto; background: rgb(16, 16, 16); border: 1px solid rgb(70, 50, 54); outline-offset: -3px; scrollbar-width: thin; scrollbar-color: var(--red) #111; }
.media-loading{ position: absolute; inset: 0px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; z-index: 1; padding: 25px; text-align: center; font-size: 12px; color: var(--muted); }

@media (min-width: 1600px){
.project-caption h3{ font-size: 14px; }
}

@media (max-width: 1100px){
.portfolio-toolbar{ flex-wrap: wrap; gap: 0px; }
.filters{ width: 100%; justify-content: space-between; gap: 15px; }
.search-box{ display: none; }
}

@media (max-width: 800px){
.project-grid{ gap: 20px 15px; }
.project-caption{ gap: 8px; min-height: 70px; }
.project-caption h3{ font-size: 10px; }
.project-number{ font-size: 28px; min-width: 23px; }
.project-category{ font-size: 8px; }
.project-caption > svg{ width: 15px; }
.project-type{ font-size: 6px; left: 10px; top: 10px; }
}

@media (max-width: 600px){
.portfolio-toolbar{ margin-bottom: 20px; }
.filters{ justify-content: start; gap: 22px; }
.filters button{ font-size: 10px; min-height: 46px; }
.project-grid{ grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 19px 12px; }
.project-card:first-child{ grid-column: 1 / -1; }
.project-card:first-child .project-open{ aspect-ratio: 1.9 / 1; }
.project-open{ aspect-ratio: 1.5 / 1; }
.project-type{ font-size: 6px; top: 8px; left: 8px; padding: 4px 5px; }
.project-frame{ inset: 6px; }
.project-hover{ width: 34px; height: 34px; opacity: 1; transform: translate(-50%, -50%); background: rgba(9, 9, 9, 0.4); }
.project-hover svg{ width: 14px; }
.project-card:first-child .project-hover{ width: 44px; height: 44px; }
.project-caption{ min-height: 60px; gap: 9px; }
.project-caption h3{ font-size: 9px; line-height: 1.5; }
.project-caption > svg{ width: 13px; }
.project-number{ font-size: 26px; min-width: 21px; }
.project-category{ font-size: 7px; margin-top: 4px; }
.project-card:first-child .project-caption h3{ font-size: 12px; }
.project-card:first-child .project-caption{ min-height: 68px; }
.load-more{ flex-direction: column; gap: 10px; margin-top: 24px; }
.load-more .outline-button{ width: 100%; font-size: 11px; justify-content: center; }
.project-brief{ margin-top: 25px; }
.project-brief summary{ font-size: 12px; min-height: 58px; }
.project-brief form{ grid-template-columns: 1fr; gap: 18px; padding-bottom: 0px; }
.project-brief input, .project-brief select, .project-brief textarea{ font-size: 16px; }
.project-dialog{ max-height: calc(100dvh - 24px); }
}

.search-box > span{ font-size: 10px; flex-shrink: 0; color: var(--muted); }

@media (max-width: 1100px){
.search-box{ display: flex; max-width: none; width: 100%; border-top: 1px solid var(--line); }
.search-box input{ font-size: 12px; }
}

@media (max-width: 600px){
.search-box{ min-height: 44px; }
.search-box input{ font-size: 16px; }
}

.project-hover{ background: rgba(9, 9, 9, 0.85); }
.media-image.loading > img{ opacity: 1; }
.filters button{ min-width: 44px; padding-inline: 3px; }

@media (max-width: 600px){
.project-brief input, .project-brief textarea, .project-brief select{ scroll-margin-top: 90px; }
}

.project-caption h3{ font-size: 13px; }
.project-category{ font-size: 10px; }
.project-type{ font-size: 9px; }
.filters button, .search-box input{ font-size: 12px; }

@media (max-width: 1100px) and (min-width: 601px){
.project-type{ font-size: 8px; }
}

@media (max-width: 600px){
.filters button{ font-size: 11px; }
.project-caption h3{ font-size: 10px; }
.project-type{ font-size: 8px; }
.project-brief label{ font-size: 12px; }
}

@media (hover: none){
.project-hover{ opacity: 1; transform: translate(-50%, -50%); }
.project-picture{ filter: saturate(0.9); }
}

.ph{display:block;width:100%;height:100%}
.project-picture .ph,.reel-screen .ph{display:grid;place-items:center;font-size:12px;letter-spacing:.06em;color:#6f6a69;background:#0c0c0c}
.projects-status{margin:28px 0 0;color:var(--muted);font-size:13px}
.projects-status:empty{display:none}
.project-card.vertical .project-picture img,.project-card.vertical .ph{object-fit:contain;background:#000}
.project-picture img{width:100%;height:100%;object-fit:cover;display:block}
