/* Dark-first presentation and restrained interactive effects. */
:root {
  --bg: #000;
  --surface: #111;
  --text: #f5f2ea;
  --muted: #aaa59d;
  --line: #2f2f2d;
  --accent: #8198ff;
  --soft: #171b2b;
  --shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.site-header {
  border-bottom: 0;
  background: #000;
}
.site-header.scrolled {
  border-color: transparent;
  background: rgba(0, 0, 0, .94);
}
body { overflow-x: hidden; }
.site-header { height: 86px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.03em;
  transition: border-color .25s, transform .25s, background .25s;
}
.logo:hover .logo-mark { transform: rotate(-8deg); border-color: var(--accent); background: rgba(129, 152, 255, .08); }
.logo-name { font-size: 17px; }
.logo-name b { color: var(--accent); }

#main-nav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 8px 28px rgba(0, 0, 0, .16);
}
#main-nav a {
  z-index: 2;
  padding: 10px 15px;
  border-radius: 999px;
  color: #8d8a85;
  font-size: 12px;
  transition: color .25s;
}
#main-nav a:hover, #main-nav a.active { color: #f5f2ea; }
#main-nav a.active::after { display: none; }
.nav-indicator {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border: 1px solid rgba(129, 152, 255, .24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(129, 152, 255, .17), rgba(129, 152, 255, .06));
  box-shadow: 0 0 22px rgba(129, 152, 255, .08);
  pointer-events: none;
  opacity: 0;
  transition: width .38s cubic-bezier(.2, .75, .2, 1), transform .38s cubic-bezier(.2, .75, .2, 1), opacity .2s;
}
.header-time {
  justify-self: end;
  color: #686762;
  font: 600 9px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}

.banner {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 18px auto 0;
  background: #000;
  overflow: hidden;
  box-shadow: none;
  border-radius: 0;
  padding-bottom: 16px;
  isolation: isolate;
}

.banner img {
  width: 100%;
  aspect-ratio: 2005 / 1154;
  object-fit: contain;
  transform: none;
  filter: contrast(1.03);
  mask-image: linear-gradient(to bottom, #000 0, #000 91%, transparent 100%);
}

.banner::before {
  display: none;
}

.banner::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, #000);
}

.hero-frame {
  --frame-colour: rgba(245, 242, 234, .28);
  position: absolute;
  z-index: 4;
  inset: 22px 0 14px;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  opacity: .78;
  transition: width .7s cubic-bezier(.2, .75, .2, 1), height .7s cubic-bezier(.2, .75, .2, 1), opacity .3s;
}

.corner-tl { top: 0; left: 0; border-top: 1px solid var(--frame-colour); border-left: 1px solid var(--frame-colour); }
.corner-tr { top: 0; right: 0; border-top: 1px solid var(--frame-colour); border-right: 1px solid var(--frame-colour); }
.corner-bl { bottom: 0; left: 0; border-bottom: 1px solid var(--frame-colour); border-left: 1px solid var(--frame-colour); }
.corner-br { right: 0; bottom: 0; border-right: 1px solid var(--frame-colour); border-bottom: 1px solid var(--frame-colour); }

.banner:hover .corner { width: 52px; height: 52px; opacity: 1; }

.frame-label {
  position: absolute;
  bottom: -9px;
  color: rgba(245, 242, 234, .34);
  font: 600 8px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .15em;
}
.frame-label-left { left: 0; }
.frame-label-right { right: 0; }

.banner-caption { display: none; }

.welcome {
  position: relative;
  isolation: isolate;
  margin-top: -1px;
  background: #000;
  color: #f5f2ea;
}

.welcome::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #000;
}

.welcome-copy p { color: #aaa59d; }
.welcome-copy a { border-color: #2f2f2d; }

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(.992);
  filter: blur(7px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .72, .25, 1), filter .75s ease;
}

.reveal.visible { opacity: 1; transform: none; filter: blur(0); }

.section-header { position: relative; padding-bottom: 22px; }
.section-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--line);
  transition: right 1s cubic-bezier(.2, .75, .2, 1) .15s;
}
.section-header.visible::after { right: 0; }

.photo-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .14) 50%, transparent 58%);
  transform: translateX(-70%) rotate(8deg);
  transition: transform .85s ease;
}
.photo-card:hover::after { transform: translateX(70%) rotate(8deg); }
.photo-card img { transform: scale(1.015); transition: transform .7s cubic-bezier(.2, .72, .2, 1), filter .45s; }
.photo-card:hover img { transform: scale(1.055); }

.project {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  transform: perspective(1100px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .25s;
}
.project:hover { transform: perspective(1100px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)) translateY(-5px); }
.project h3, .project .project-top, .project > a { transform: translateZ(18px); }

.track { transition: padding-left .25s, color .25s; }
.track:hover { padding-left: 10px; color: var(--accent); }
.welcome-copy a, .post > a, .project > a { transition: translate .18s ease, background .2s, color .2s, border-color .2s; }

@media (max-width: 800px) {
  .site-header { height: 78px; }
  .header-time { display: none; }
  #main-nav { top: 78px; display: none; gap: 0; padding: 12px 24px 24px; border: 0; border-radius: 0; background: #080808; box-shadow: none; }
  #main-nav.open { display: flex; }
  #main-nav a { padding: 13px 0; border-radius: 0; }
  #main-nav a.active { color: var(--accent); }
  .nav-indicator { display: none; }
  .banner { width: min(calc(100% - 28px), 1180px); margin-top: 12px; padding-bottom: 16px; }
  .banner img { width: 100%; transform: none; mask-image: linear-gradient(to bottom, #000 0, #000 93%, transparent 100%); }
  .hero-frame { inset: 8px 0 8px; }
  .corner { width: 20px; height: 20px; }
  .frame-label { display: none; }
  .welcome { padding-top: 65px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
  .banner img, .project, .photo-card img { transform: none !important; }
}
