:root {
  --paper: #eae8ef;
  --ink: #1f162c;
  --accent: #508cda;
  --acid: #378e8a;
  --deep: #106053;
  --muted: #544665;
  --font-display: "Oswald", "Arial Black", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background:
    radial-gradient(120% 120% at 50% 20%, transparent 55%, rgba(31, 22, 44, 0.08)),
    var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Film grain + scratches over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpath d='M0 45h28 M44 90h55 M120 155h42' stroke='%231f162c' stroke-width='1' fill='none'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(31, 22, 44, 0.6);
}

.brand-mark {
  color: #378e8a;
  margin-right: 8px;
}

.nav-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(31, 22, 44, 0.6);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 70svh;
  min-height: 480px;
  overflow: hidden;
  background:
    linear-gradient(rgba(31, 22, 44, 0.15), rgba(31, 22, 44, 0.15)),
    url("hero.jpg") center / cover no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.hero .hero-eyebrow {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(31, 22, 44, 0.6);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(31, 22, 44, 0.5);
}

.hero .outline {
  -webkit-text-stroke: 2px #ffffff;
}

.outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.hero-sub {
  max-width: 480px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(31, 22, 44, 0.6);
}

.squiggle {
  display: block;
  width: min(44%, 340px);
  margin: 10px 0 0 18px;
}

.squiggle path {
  stroke: #378e8a;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.hero-mark {
  position: absolute;
  right: -4rem;
  top: 9rem;
  font-size: 24rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

/* ---------- Torn divider ---------- */
.rip {
  position: relative;
  z-index: 2;
  height: 18px;
  margin-top: -9px;
  background: #104a5e;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 6 0 12 8 6 16Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 12px 100%;
  -webkit-mask-repeat: repeat-x;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 6 0 12 8 6 16Z'/%3E%3C/svg%3E");
  mask-size: 12px 100%;
  mask-repeat: repeat-x;
}

.rip-paper {
  background: var(--paper);
}

/* ---------- Work ---------- */
.work {
  padding: 110px 0;
}

.section-head {
  margin-bottom: 48px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.tile {
  position: relative;
  grid-column: span 4;
  border: 2px solid var(--ink);
  background: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:nth-child(odd) {
  rotate: -0.6deg;
}

.tile:nth-child(even) {
  rotate: 0.6deg;
}

.tile:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
  rotate: none;
}

.tile-photo {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: saturate(0.75) contrast(1.12);
  transition: filter 0.3s ease, transform 0.4s ease;
}

.tile:hover .tile-photo {
  filter: none;
  transform: scale(1.03);
}

/* Placeholder images (swap with real photos) */
.w1 { background-image: url("work-1-thumb.jpg"); }
.w2 { background-image: url("work-2-thumb.jpg"); }
.w3 { background-image: url("work-3-thumb.jpg"); }
.w4 { background-image: url("work-4-thumb.jpg"); }
.w5 { background-image: url("work-5-thumb.jpg"); }
.w6 { background-image: url("work-6-thumb.jpg"); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 22, 44, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 32px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 82vw;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 2px solid rgba(234, 232, 239, 0.4);
  border-radius: 50%;
  color: var(--paper);
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lightbox-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-arrow.prev {
  left: 20px;
}

.lightbox-arrow.next {
  right: 20px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 130px 0;
  overflow: hidden;
}

.contact-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.contact .hero-eyebrow {
  color: var(--acid);
}

.contact .section-title {
  color: var(--paper);
}

.contact .outline {
  -webkit-text-stroke: 2px var(--paper);
}

.contact-sub {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(241, 237, 227, 0.7);
  max-width: 460px;
  margin: 28px auto 44px;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.contact-social {
  display: block;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-social:hover {
  color: #378e8a;
}

.ig-icon {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
  vertical-align: -0.08em;
  margin-right: 10px;
}

.contact-mark {
  color: var(--acid);
  opacity: 0.12;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 140px 0 80px;
  }

  .nav-tag {
    display: none;
  }

  .hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    gap: 8px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
