:root {
  --bg: #181818;
  --white: #fff;
  --black: #000;
  --dark-grey: #9b9b9b;
  --dim-grey: #636363;
  --serif: "Gambarino", "Palatino Linotype", Palatino, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5vh 5vw 0;
  pointer-events: none;
}
.navbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; height: 90px; }
.brand svg { transition: transform .4s ease; }
.brand:hover svg { transform: rotate(-20deg); }
.nav-menu { display: flex; padding-top: 2vh; }
.nav-link {
  margin: 0 4px;
  padding: 6px 10px;
  border: 1px solid var(--black);
  border-radius: 20px;
  background: var(--white);
  color: var(--black);
  font-size: 12px;
  line-height: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: box-shadow .2s, color .2s;
}
.nav-link:hover { box-shadow: 0 2px var(--black); }
.nav-link.is-current { background: var(--black); color: var(--white); border-color: var(--black); }

/* ---------- Hero ---------- */
.hero { display: flex; justify-content: center; overflow: hidden; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(110px, auto));
  grid-auto-flow: row dense;
  gap: 1.5em;
  width: 100%;
  max-width: 1600px;
  padding: 2em 2vw 100px;
}
.hero-center {
  grid-area: 3 / 5 / 9 / 9;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2em;
  text-align: center;
  padding: 6em 0;
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 9vw, 8rem);
  line-height: .9;
  letter-spacing: -.2vh;
}
.hero-sub {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-arrow { display: inline-block; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* Tiles */
.tile {
  width: 80%;
  max-width: 20em;
  border-radius: 8px;
  overflow: hidden;
  animation: float 9s ease-in-out infinite;
  will-change: transform;
}
.tile-art { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; }
.tile:nth-of-type(odd) { animation-duration: 11s; animation-direction: reverse; }
@keyframes float { 50% { transform: translateY(-14px) rotate(.6deg); } }

.t1  { grid-area: 2 / 1 / 4 / 3;   place-self: end center; }
.t2  { grid-area: 1 / 5 / 3 / 8;   place-self: center; }
.t3  { grid-area: 4 / 2 / 6 / 5;   place-self: center stretch; }
.t4  { grid-area: 2 / 10 / 4 / 13; place-self: start center; }
.t5  { grid-area: 3 / 8 / 5 / 11;  place-self: center end; }
.t6  { grid-area: 5 / 11 / 8 / 13; place-self: center end; }
.t7  { grid-area: 6 / 3 / 8 / 5;   place-self: center; }
.t8  { grid-area: 6 / 9 / 9 / 11;  place-self: center; }
.t9  { grid-area: 8 / 1 / 10 / 3;  place-self: center; }
.t10 { grid-area: 9 / 5 / 11 / 8;  place-self: end center; }
.t11 { grid-area: 9 / 10 / 11 / 12; place-self: center start; }

/* Placeholder artwork — replace with real images */
.art-a { background: radial-gradient(circle at 30% 30%, #ffdd04 0 22%, transparent 23%), #47888a; aspect-ratio: 1; }
.art-b { background: linear-gradient(135deg, #ff5d8f, #ff9a3c); }
.art-c { background: repeating-linear-gradient(45deg, #c2ecd5 0 14px, #204f58 14px 28px); aspect-ratio: 1; }
.art-d { background: conic-gradient(from 90deg, #8a61ff, #3cd3ff, #ffdd04, #8a61ff); aspect-ratio: 3 / 4; }
.art-e { background: radial-gradient(circle at 70% 60%, #fff 0 18%, transparent 19%), #2c2c2c; }
.art-f { background: linear-gradient(180deg, #ffdd04 0 50%, #fa1919 50%); aspect-ratio: 3 / 4; }
.art-g { background: radial-gradient(ellipse at bottom, #3cd3ff, #204f58); aspect-ratio: 1; }
.art-h { background: linear-gradient(90deg, #f4efe6 0 33%, #ff5d8f 33% 66%, #47888a 66%); }
.art-i { background: radial-gradient(circle, #ff9a3c 0 30%, #8a61ff 31% 55%, #181818 56%); aspect-ratio: 1; border: 1px solid #333; }
.art-j { background: linear-gradient(160deg, #c2ecd5, #47888a 60%, #204f58); aspect-ratio: 16 / 9; }
.art-k { background: repeating-radial-gradient(circle at 50% 50%, #ffdd04 0 6px, #181818 6px 14px); aspect-ratio: 1; }

/* ---------- Projects ---------- */
.projects { margin: 0 5vw; }
.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 40px 0;
}
.project {
  position: relative;
  height: 400px;
  border-radius: 64px;
  overflow: hidden;
  background: var(--art) center / cover no-repeat;
}
.project-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  border: 1px solid var(--white);
  border-radius: 64px;
  background: var(--bg);
  opacity: 0;
  transition: opacity .35s ease;
}
.project:hover .project-card,
.project-card:focus-visible { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.category-tag {
  padding: 4px 8px;
  border: 1px solid var(--white);
  border-radius: 24px;
  font-family: "Inter Tight", var(--sans);
  font-size: 10px;
  line-height: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.project-number { font-size: 14px; letter-spacing: 2px; font-weight: 400; }
.project-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 56px;
  letter-spacing: -.2px;
}
.project-description { margin: 0; padding-top: 8px; font-size: 14px; line-height: 24px; font-weight: 400; max-width: 46ch; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding: 0 5vw;
  border-radius: 80px 80px 0 0;
  background: var(--bg);
  color: var(--dark-grey);
}
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; padding: 80px 0 40px; }
.footer-logo { margin-bottom: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 20px 0; }
.footer-links a {
  color: var(--white);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 5px;
  transition: box-shadow .2s;
}
.footer-links a:hover { box-shadow: inset 0 -2px 0 0 var(--white); }
.small-p { color: var(--dim-grey); font-size: 10px; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (min-width: 1920px) {
  .project-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .hero-grid { grid-template-rows: repeat(10, minmax(80px, auto)); gap: 1em; }
  .project { height: 340px; }
  .project-title { font-size: 44px; line-height: 46px; }
}
@media (max-width: 767px) {
  .hero-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    padding-top: 160px;
  }
  .hero-center { grid-area: auto / 1 / auto / -1; order: -1; padding: 2em 0 3em; }
  .tile { grid-area: auto / span 3 !important; width: 100%; max-width: none; place-self: center !important; }
  .project-list { grid-template-columns: 1fr; }
  .project, .project-card { border-radius: 40px; }
  .project-card { padding: 28px; }
  .footer { border-radius: 40px 40px 0 0; }
}
@media (hover: none) {
  /* Touch devices can't hover — show the card info over the image instead */
  .project-card { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.1) 70%); border-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .hero-arrow { animation: none; }
  html { scroll-behavior: auto; }
}
