/* ==========================================================================
   Scutoid — Video Editor / Motion Graphics Portfolio
   Original Design System: Swiss Grotesque, Sculptural Curves & Pure Monochrome
   ========================================================================== */

:root {
  --black: #000000;
  --surface-dark: #0f0f0f;
  --surface-card: #151515;
  --surface-hover: #1e1e1e;
  
  --border-dark: #262626;
  --border-light: #444444;
  --border-focus: #777777;

  --white: #f7f7f7;
  --light: #d8d8d8;
  --gray: #7a7a7a;
  --dark-gray: #4d4d4d;
  
  --radius-pill: 999px;
  --radius-card: 36px;
  --radius-sm: 18px;
}

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

html {
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -0.035em;
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.4;
  overflow-x: hidden;
  overflow-y: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img, video {
  display: block;
  max-width: 100%;
}

.site-wrap {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* ==========================================================================
   Restrained Masthead
   ========================================================================== */

.masthead {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin-bottom: 48px;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  padding: 10px 16px 10px 22px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: invert(1);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}

.brand-sub {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1;
}

.brand-sub em {
  font-style: normal;
  color: var(--dark-gray);
  margin: 0 2px;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-anchor {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  color: var(--light);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-anchor:hover {
  background: #252525;
  color: var(--white);
}

.nav-cta {
  padding: 10px 20px;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: #e4e4e4;
  transform: translateY(-1px);
}

/* ==========================================================================
   Section Headers & Common Elements
   ========================================================================== */

.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  font-weight: 600;
}

.section-sublabel {
  font-size: 0.85rem;
  color: var(--dark-gray);
}

.section-heading {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--white);
}

/* Meta tags */
.meta-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
/* ==========================================================================
   Selected Work Section & Dual Layout
   ========================================================================== */

.work-section {
  margin-bottom: 80px;
}

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-strip {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  border: 1px solid var(--border-dark);
}

.filter-tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  color: var(--gray);
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: var(--white);
}

.filter-tab.is-active {
  background: #333333;
  color: var(--white);
}

/* ==========================================================================
   Portfolio Layout: Unified Grid
   ========================================================================== */

.portfolio-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 24px;
}

.col-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  font-weight: 600;
}

.col-count {
  font-size: 0.78rem;
  color: var(--dark-gray);
  font-variant-numeric: tabular-nums;
}

/* Unified Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-dark);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

/* 16:9 Landscape Media */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080808;
  overflow: hidden;
}

/* 9:16 Vertical Media */
.work-card.layout-tall .card-media {
  aspect-ratio: 9 / 16;
  max-height: none;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.work-card:hover .card-media img,
.work-card:hover .card-media video {
  transform: scale(1.02);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}

.card-tag {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
}

.card-play-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  padding-left: 2px;
  z-index: 2;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.work-card:hover .card-play-btn {
  background: var(--white);
  color: var(--black);
  transform: scale(1.08);
}

.card-bottom {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--white);
}

.card-desc {
  margin: 0;
  color: var(--gray);
  font-size: 0.88rem;
  line-height: 1.35;
  flex: 1;
}

.card-meta-line {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--dark-gray);
}

.empty-col-notice {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  color: var(--gray);
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-dark);
  font-size: 0.9rem;
}

/* ==========================================================================
   Services Strip
   ========================================================================== */

.services-section {
  margin-bottom: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
}

.services-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-box {
  background: var(--surface-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
}

.service-num {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 16px;
}

.service-box h3 {
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  margin: 0;
}

/* ==========================================================================
   About & Contact Section
   ========================================================================== */

.about-section {
  margin-bottom: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.about-copy {
  background: var(--surface-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  display: flex;
  align-items: center;
}

.about-heading {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--white);
  margin: 0;
}

.contact-box {
  background: var(--surface-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-email {
  display: block;
  text-align: center;
  padding: 16px 20px;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-pill);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: background 0.15s ease;
}

.contact-email:hover {
  background: #e2e2e2;
}

.copy-btn {
  padding: 12px 18px;
  background: #252525;
  color: var(--light);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: #333333;
  color: var(--white);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--light);
  font-size: 0.95rem;
}

.footer-mark {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.footer-left b {
  color: var(--white);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--gray);
}

.footer-right a:hover {
  color: var(--white);
}

.back-top {
  color: var(--light);
}

/* ==========================================================================
   Video Lightbox Modal
   ========================================================================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.video-modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-dark);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 10;
  cursor: pointer;
}

.modal-close:hover {
  background: #333333;
}

.modal-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-screen video {
  width: 100%;
  height: 100%;
  outline: none;
}

.modal-meta {
  padding: 24px 28px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-title-row h3 {
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--white);
}

.modal-meta p {
  font-size: 0.95rem;
  color: var(--light);
  margin: 0;
}

.modal-dialog.is-vertical {
  width: min(420px, 92vw);
}

.modal-dialog.is-vertical .modal-screen {
  aspect-ratio: 9 / 16;
  max-height: 72vh;
}

/* ==========================================================================
   Mobile & Responsive Adaptations
   ========================================================================== */

@media (max-width: 768px) {
  .site-wrap {
    width: min(100% - 28px, 760px);
    padding-top: 14px;
  }
  .masthead {
    margin-bottom: 32px;
  }
  .brand-sub {
    display: none;
  }
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
  }
  .services-strip {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .masthead-nav .nav-anchor {
    display: none;
  }
  .masthead-inner {
    padding: 8px 12px 8px 16px;
  }
  .filter-strip {
    width: 100%;
    overflow-x: auto;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}


