/* NUBIA | Editorial one-page. No dependencies, no JavaScript. */
:root {
  color-scheme: light;
  --ink: #141414;
  --paper: #ebe7e4;
  --line: rgba(35, 32, 31, .23);
  --ease: cubic-bezier(.22,1,.36,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; background: var(--paper); }
body { margin: 0; min-width: 280px; background: var(--paper); color: var(--ink); }
img { max-width: 100%; }
.site {
  width: min(100%, 1580px);
  min-height: 100svh;
  margin-inline: auto;
  padding-block: max(0px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero { position: relative; isolation: isolate; }
.hero__picture, .hero__image { display: block; width: 100%; }
.hero__image { height: auto; }
.hero__tagline {
  position: absolute;
  z-index: 1;
  top: 19.7%;
  left: 7.9%;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 55%;
  color: #1b1a19;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 1.30vw, 20px);
  font-weight: 500;
  letter-spacing: .305em;
  line-height: 1.64;
  white-space: nowrap;
  opacity: 0;
  animation: enterTagline 1.55s var(--ease) .35s forwards;
}
.hero__rule {
  display: block;
  height: 1px;
  width: clamp(25px, 3.8vw, 55px);
  margin-top: clamp(10px, 1.4vw, 21px);
  background: #302d2b;
  transform: scaleX(0);
  transform-origin: left center;
  animation: enterRule .8s ease 1.25s forwards;
}
@keyframes enterTagline {
  from { opacity: 0; transform: translateY(9px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes enterRule { to { transform: scaleX(1); } }
.portfolio {
  margin-inline: 2.85%;
  padding: 7px 0 8px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  opacity: 0;
  animation: enterFooter .75s ease .8s forwards;
}
@keyframes enterFooter { to { opacity: 1; } }
.portfolio__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: clamp(88px, 7.15vw, 105px);
  padding: 4px 2px;
  border-radius: 8px;
  text-decoration: none;
  background: transparent;
  isolation: isolate;
  transition: background-color .42s ease, transform .5s var(--ease), box-shadow .42s ease;
  -webkit-tap-highlight-color: transparent;
}
.portfolio__link + .portfolio__link::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--line);
  pointer-events: none;
  transition: opacity .25s ease;
}
.portfolio__mark {
  display: block;
  width: min(100%, 108px);
  height: auto;
  flex: none;
  object-fit: contain;
  pointer-events: none;
  transition: opacity .35s ease, transform .5s var(--ease);
}
.portfolio__link:is(:hover, :focus-visible) {
  background-color: rgba(35, 31, 29, .065);
  transform: translateY(-4px);
  box-shadow: 0 7px 22px rgba(35, 31, 29, .065);
}
.portfolio__link:is(:hover, :focus-visible) .portfolio__mark { transform: scale(1.045); }
.portfolio__link:focus-visible { outline: 2px solid #363331; outline-offset: 2px; }
.portfolio__link:active { transform: translateY(-1px); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1581px) {
  .hero__tagline { font-size: 20px; }
}
@media (max-width: 900px) {
  .portfolio { grid-template-columns: repeat(6, minmax(0,1fr)); padding-top: 8px; }
  .portfolio__link { min-height: 92px; }
  .portfolio__link:nth-child(7)::before { display: none; }
  .portfolio__link:nth-child(n+7) { border-top: 1px solid rgba(35, 32, 31, .10); }
}
@media (max-width: 600px) {
  .site { justify-content: center; }
  .hero { display: flex; flex-direction: column; }
  .hero__tagline {
    position: relative;
    order: -1;
    left: auto;
    top: auto;
    width: auto;
    max-width: none;
    align-self: start;
    padding: 24px 24px 9px;
    font-size: clamp(11px, 3.2vw, 15px);
    letter-spacing: .27em;
    line-height: 1.72;
  }
  .hero__rule { width: 33px; margin-top: 10px; }
  .portfolio { grid-template-columns: repeat(3, minmax(0,1fr)); margin-inline: 4%; padding-top: 12px; }
  .portfolio__link { min-height: 94px; border-radius: 6px; }
  .portfolio__link::before { display: none; }
  .portfolio__link:not(:nth-child(3n+1))::before {
    display: block;
    content: '';
    position: absolute;
    left: -1px;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: var(--line);
  }
  .portfolio__link:nth-child(n+4) { border-top: 1px solid rgba(35, 32, 31, .10); }
  .portfolio__mark { width: min(100%, 104px); }
}
@media (max-width: 350px) {
  .hero__tagline { padding-inline: 18px; font-size: 10.5px; }
  .portfolio__link { min-height: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .hero__tagline, .portfolio { opacity: 1; }
  .hero__rule { transform: scaleX(1); }
}

/* v1.1 — Viewport-fit composition for tablet and desktop.
   The available BROWSER VIEWPORT is the correct measurement; screen pixels
   alone would ignore browser tabs, toolbars and windowed mode.
   No JS, no forced zoom, no cropping of the editorial hero. Mobile unchanged. */
@media (min-width: 601px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }
  .site {
    --footer-height: clamp(78px, 10.4dvh, 116px);
    width: 100%;
    max-width: 1580px;
    height: 100vh; /* fallback for browsers without dynamic viewport units */
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    padding-block: 0;
    overflow: hidden;
    justify-content: center;
  }
  .hero {
    width: min(100%, calc((100dvh - var(--footer-height) - 3px) * 1.53879));
    aspect-ratio: 1448 / 941;
    min-height: 0;
    flex: 0 1 auto;
    margin-inline: auto;
    container-type: inline-size;
  }
  .hero__picture, .hero__image { width: 100%; height: auto; }
  .hero__tagline {
    font-size: clamp(7px, 1.30cqw, 20px);
    letter-spacing: .305em;
  }
  .hero__rule {
    width: clamp(16px, 3.8cqw, 55px);
    margin-top: clamp(5px, 1.4cqw, 21px);
  }
  .portfolio {
    flex: 0 0 var(--footer-height);
    width: min(94.3%, calc((100dvh - var(--footer-height) - 3px) * 1.53879 * .943));
    height: var(--footer-height);
    margin-inline: auto;
    padding: 3px 0;
    grid-template-rows: minmax(0,1fr);
    min-height: 0;
  }
  .portfolio__link {
    height: 100%;
    min-height: 0;
    padding: 2px;
  }
  .portfolio__mark {
    max-height: 97%;
    width: min(100%, 108px);
  }
  .portfolio__link:is(:hover, :focus-visible) { transform: translateY(-2px); }
}
@media (min-width: 601px) and (max-width: 900px) {
  .site { --footer-height: clamp(124px, 19.5dvh, 188px); }
  .portfolio {
    grid-template-rows: repeat(2, minmax(0,1fr));
    padding: 2px 0;
  }
  .portfolio__mark { max-height: 93%; }
}
@media (min-width: 601px) and (max-height: 500px) {
  .site { --footer-height: clamp(57px, 15dvh, 76px); }
  .portfolio__mark { max-height: 93%; }
}
@media (min-width: 601px) and (max-width: 900px) and (max-height: 500px) {
  .site { --footer-height: clamp(93px, 26dvh, 124px); }
}

/* Compatibility fallback: older Safari versions without dynamic viewport units. */
@supports not (height: 100dvh) {
  @media (min-width: 601px) {
    .site { height: 100vh; max-height: 100vh; }
    .hero { width: min(100%, calc((100vh - var(--footer-height) - 3px) * 1.53879)); }
    .portfolio { width: min(94.3%, calc((100vh - var(--footer-height) - 3px) * 1.53879 * .943)); }
  }
}
