/* =====================================================
   CSS Custom Properties — edit these to retheme the whole site
   ===================================================== */
:root {
  /* Colours */
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #181818;
  --text:         #f0ece4;
  --text-muted:   #888880;
  --accent:       #b8935a;   /* warm gold */
  --accent-light: #d4aa72;
  --border:       #242424;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   8rem;

  /* Layout */
  --container:  1320px;
  --nav-height: 72px;

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration:   0.6s;
}

/* =====================================================
   Reset & Base
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

body.lightbox-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  list-style: none;
}

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

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  max-width: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* =====================================================
   Custom Cursor
   ===================================================== */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease), width 0.2s var(--ease), height 0.2s var(--ease), opacity 0.2s;
  mix-blend-mode: normal;
  will-change: transform;
}

.cursor.cursor--hover {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--accent);
  mix-blend-mode: normal;
}

.cursor.cursor--hidden {
  opacity: 0;
}

@media (hover: none) {
  .cursor { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }
  a { cursor: pointer; }
}

/* =====================================================
   Scroll Reveal Animation
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* =====================================================
   Navigation
   ===================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

.nav.nav--scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.3s;
}

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

.nav__links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav__links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  padding: 4px 0;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.35s;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =====================================================
   Hero
   ===================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}

.hero__bg.is-loaded {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.15) 0%,
    rgba(10, 10, 10, 0.05) 40%,
    rgba(10, 10, 10, 0.7) 80%,
    rgba(10, 10, 10, 0.92) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--space-md) var(--space-xl);
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  max-width: none;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.hero__name-last {
  display: block;
  padding-left: 0.15em;
  font-style: italic;
}

.hero__tagline {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: none;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  transition: color 0.3s;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: var(--accent);
  transform-origin: top;
  animation: scrollLine 2s var(--ease) infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* =====================================================
   About
   ===================================================== */
.about {
  padding: var(--space-xl) 0;
  background: var(--bg);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: start;
}

.about__image-wrap figure {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
  overflow: hidden;
}

.about__portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.6s;
}

.about__portrait:hover {
  filter: grayscale(0%);
}

.about__text {
  padding-top: var(--space-md);
}

.about__heading {
  margin-bottom: var(--space-md);
  font-style: italic;
  color: var(--text);
}

.about__body p {
  margin-bottom: var(--space-md);
}

.btn-text {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  margin-top: var(--space-sm);
  transition: color 0.3s, border-color 0.3s, letter-spacing 0.3s;
}

.btn-text:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
  letter-spacing: 0.28em;
}

/* =====================================================
   Portfolio / Gallery
   ===================================================== */
.portfolio {
  padding: var(--space-xl) 0;
  background: var(--bg-2);
}

.portfolio__header {
  margin-bottom: var(--space-lg);
}

.portfolio__header h2 {
  font-style: italic;
  color: var(--text);
}

/* Filter bar */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-md);
}

.filter__btn {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 0;
  position: relative;
  transition: color 0.3s;
}

.filter__btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.filter__btn:hover,
.filter__btn.active {
  color: var(--text);
}

.filter__btn.active::after {
  width: 100%;
}

/* Masonry Gallery */
.gallery {
  columns: 3 300px;
  column-gap: 8px;
  transition: opacity 0.3s var(--ease);
}

.gallery.is-filtering {
  opacity: 0;
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
  cursor: none;
  display: block;
}

.gallery__item.is-hidden {
  display: none;
}

.gallery__item figure {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: grayscale(10%);
}

.gallery__item:hover img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

.gallery__item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md) var(--space-sm) var(--space-sm);
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 100%);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
}

.gallery__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   Lightbox
   ===================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 5, 5, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

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

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-md)) var(--space-xl) var(--space-md);
}

.lightbox__figure {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.lightbox__img.is-loading {
  opacity: 0;
  transform: scale(0.98);
}

.lightbox__caption {
  margin-top: var(--space-sm);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 2001;
  color: var(--text-muted);
  font-size: 1.8rem;
  font-weight: 300;
  transition: color 0.3s, transform 0.3s;
  line-height: 1;
  padding: var(--space-sm);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  color: var(--text);
}

.lightbox__close {
  top: var(--space-md);
  right: var(--space-md);
  font-size: 2rem;
}

.lightbox__close:hover {
  transform: rotate(90deg);
}

.lightbox__prev {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox__next {
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox__prev:hover {
  transform: translateY(-50%) translateX(-4px);
}

.lightbox__next:hover {
  transform: translateY(-50%) translateX(4px);
}

.lightbox__counter {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* =====================================================
   Experience / CV
   ===================================================== */
.experience {
  padding: var(--space-xl) 0;
  background: var(--bg);
}

.experience__header {
  margin-bottom: var(--space-lg);
}

.experience__header h2 {
  font-style: italic;
  color: var(--text);
}

.timeline {
  position: relative;
  padding-left: 160px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 140px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__year {
  position: absolute;
  left: -160px;
  top: 3px;
  width: 130px;
  text-align: right;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.timeline__content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline__org {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
  max-width: none;
}

.timeline__content p {
  max-width: 55ch;
  margin-bottom: 0;
}

/* Awards */
.awards {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.awards .section-label {
  margin-bottom: var(--space-md);
}

.awards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.award__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-md);
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

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

.award__year {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.award__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.award__body {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =====================================================
   Clients
   ===================================================== */
.clients {
  padding: var(--space-xl) 0;
  background: var(--bg-2);
}

.clients__header {
  margin-bottom: var(--space-lg);
}

.clients__header h2 {
  font-style: italic;
  color: var(--text);
}

.clients__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.clients__grid li {
  padding: var(--space-md) var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.3s, background 0.3s;
  text-align: center;
}

.clients__grid li:hover {
  color: var(--text);
  background: var(--bg-3);
}

/* =====================================================
   Contact
   ===================================================== */
.contact {
  padding: var(--space-xl) 0;
  background: var(--bg);
}

.contact__inner {
  max-width: 720px;
}

.contact__heading {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.contact__email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  margin-bottom: var(--space-lg);
  transition: color 0.3s, border-color 0.3s;
}

.contact__email:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.contact__details p {
  display: flex;
  gap: var(--space-md);
  max-width: none;
}

.contact__label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 100px;
  padding-top: 2px;
}

.contact__details a {
  color: var(--text-muted);
  transition: color 0.3s;
}

.contact__details a:hover {
  color: var(--text);
}

.contact__social {
  display: flex;
  gap: var(--space-lg);
}

.contact__social a {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}

.contact__social a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.contact__social a:hover {
  color: var(--text);
}

.contact__social a:hover::after {
  width: 100%;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer__name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer__copy {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social a {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer__social a:hover {
  color: var(--accent);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
  .timeline {
    padding-left: 120px;
  }

  .timeline::before {
    left: 100px;
  }

  .timeline__year {
    left: -120px;
    width: 90px;
    font-size: 0.6rem;
  }

  .timeline__item::before {
    left: -22px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg:   2.5rem;
    --space-xl:   5rem;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
    z-index: 999;
  }

  .nav__links.is-open {
    transform: translateY(0);
  }

  .nav__links a {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
  }

  .nav__toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about__image-wrap figure {
    position: static;
  }

  .about__portrait {
    aspect-ratio: 4 / 3;
  }

  .gallery {
    columns: 2 160px;
  }

  .timeline {
    padding-left: 0;
    padding-top: var(--space-md);
  }

  .timeline::before {
    display: none;
  }

  .timeline__item {
    padding-left: 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    margin-bottom: var(--space-lg);
  }

  .timeline__item::before {
    display: none;
  }

  .timeline__year {
    position: static;
    display: block;
    text-align: left;
    width: auto;
    margin-bottom: var(--space-xs);
  }

  .contact__details p {
    flex-direction: column;
    gap: 4px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .gallery {
    columns: 1;
  }

  .hero__name {
    font-size: clamp(2.8rem, 12vw, 5rem);
  }

  .lightbox__prev,
  .lightbox__next {
    font-size: 2rem;
    padding: var(--space-xs);
  }
}
