/* ==========================================================================
   Sufyan Shaharin — Photography
   Colours and fonts are defined once here. Change them in :root.
   ========================================================================== */

:root {
  --ink: #0B0B0B;         /* text, borders, dark buttons */
  --paper: #FFFFFF;       /* page background */
  --accent: #FFC933;      /* Fuji-yellow highlight */
  --line: #D9D9D9;        /* light divider lines */
  --placeholder: #EDEDED; /* empty photo slots */

  --font-serif: 'Fraunces', serif;
  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
}

h1 { line-height: 1.12; letter-spacing: -0.015em; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { opacity: 0.6; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: rgba(255, 201, 51, 0.45); }

.site-root { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

@media (pointer: fine) {
  .site-root, .site-root * { cursor: none !important; }
}

/* ---------- Custom camera cursor ---------- */
.cursor-camera {
  position: fixed; top: 0; left: 0;
  width: 112px; height: 57px;
  pointer-events: none; z-index: 9999;
  transform: translate(-999px, -999px);
}
.cursor-camera img { width: 100%; height: 100%; image-rendering: pixelated; }
.cursor-flash {
  position: absolute; left: 64px; top: 31px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #FFFFFF; opacity: 0;
}
.cursor-trail {
  position: fixed; background: var(--accent); opacity: 0.9;
  pointer-events: none; z-index: 9998;
  transition: opacity .5s ease, transform .5s ease;
}
@media (pointer: coarse) { .cursor-camera { display: none; } }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.wordmark {
  font-family: var(--font-serif); font-weight: 600; font-size: 22px;
  letter-spacing: -0.01em; white-space: pre;
}
.wordmark span { display: inline-block; }

/* Letters flick between the three fonts */
@keyframes wmA { 0%,38% { font-family: 'Fraunces', serif; font-style: normal; } 45%,95% { font-family: 'JetBrains Mono', monospace; font-style: normal; } 100% { font-family: 'Fraunces', serif; font-style: normal; } }
@keyframes wmB { 0%,38% { font-family: 'Space Grotesk', sans-serif; font-style: normal; } 45%,95% { font-family: 'JetBrains Mono', monospace; font-style: normal; } 100% { font-family: 'Space Grotesk', sans-serif; font-style: normal; } }
@keyframes wmC { 0%,38% { font-family: 'Fraunces', serif; font-style: italic; } 45%,95% { font-family: 'JetBrains Mono', monospace; font-style: normal; } 100% { font-family: 'Fraunces', serif; font-style: italic; } }

.nav-links {
  display: flex; gap: 26px; flex-wrap: wrap; align-items: center;
  font-size: 16px; font-weight: 500; letter-spacing: 0.02em;
}
.nav-link { border-bottom: 2px solid transparent; padding-bottom: 2px; }
.nav-link.is-active { border-bottom-color: var(--accent); }
.nav-icon { display: inline-flex; align-items: center; }

.work-menu { position: relative; }
.work-toggle {
  background: none; border: 0; padding: 0 0 2px; margin: 0;
  font: inherit; letter-spacing: inherit; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  border-bottom: 2px solid transparent; user-select: none;
}
.work-toggle.is-active { border-bottom-color: var(--accent); }
.work-toggle .arrow { font-size: 10px; }
.work-dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--paper); border: 2px solid var(--ink);
  display: none; flex-direction: column; min-width: 170px; z-index: 200;
}
.work-menu.is-open .work-dropdown { display: flex; }
.work-dropdown a { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.work-dropdown a:last-child { border-bottom-color: transparent; }
.work-dropdown a.is-active { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 36px 32px;
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
  font-size: 13px;
}
.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

/* ---------- Shared bits ---------- */
.accent-bar { width: 44px; height: 4px; background: var(--accent); }
.accent-bar.wide { width: 88px; }
.page-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); margin: 0;
}
.body-text { font-family: var(--font-sans); font-size: 16px; line-height: 1.8; margin: 0; }
.link-underline { border-bottom: 2px solid var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  padding: 14px 22px; border: 2px solid var(--ink);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-outline { background: transparent; color: var(--ink); }

/* Photo slot: shows a grey placeholder until a real image loads */
.slot {
  position: relative; overflow: hidden; background: var(--placeholder);
  display: flex; align-items: center; justify-content: center;
}
.slot::before {
  content: attr(data-placeholder);
  font-family: var(--font-mono); font-size: 12px; color: #8A8A8A;
  text-align: center; padding: 8px;
}
.slot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* ---------- Home ---------- */
.hero {
  max-width: 900px; margin: 0 auto; padding: 72px 32px 56px;
  display: flex; flex-direction: column; gap: 22px;
}
.hero h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 0;
}
.hero .body-text { line-height: 1.7; max-width: 680px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.home-tiles-wrap { padding: 40px 32px 72px; }
.home-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 280px);
  gap: 20px; max-width: 1100px; margin: 0 auto;
}
.home-tile { position: relative; display: block; overflow: hidden; }
.home-tile .slot { width: 100%; height: 100%; }
.home-tile img { transition: transform .5s ease; }
.home-tile:hover { opacity: 1; }
.home-tile:hover img { transform: scale(1.04); }
.home-tile .label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  background: linear-gradient(transparent, rgba(11, 11, 11, 0.75));
  font-size: 12px; font-weight: 700; color: #FFFFFF; letter-spacing: 0.04em;
}
.tile-street     { grid-column: 1; grid-row: 1 / 3; }
.tile-food       { grid-column: 2; grid-row: 1; }
.tile-portrait   { grid-column: 2; grid-row: 2; }
.tile-automotive { grid-column: 3; grid-row: 1 / 3; }

/* ---------- Gallery pages ---------- */
.gallery-section { padding: 56px 64px 120px; max-width: 1400px; margin: 0 auto; }
.gallery-section .accent-bar { margin-bottom: 16px; }
.gallery-section .page-title { font-size: clamp(30px, 4.5vw, 48px); margin-bottom: 48px; }

.gallery { display: flex; gap: 14px; align-items: stretch; }
.gallery-col { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; }

.g-item {
  position: relative; overflow: hidden; background: var(--placeholder);
  cursor: pointer; border: 0; padding: 0; width: 100%; display: block;
}
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.g-item:hover img, .g-item:hover video { transform: scale(1.03); }
.g-item.is-last { flex: 1; min-height: 120px; }
.g-item .ph-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #8A8A8A;
}
.g-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(11, 11, 11, 0.88));
  opacity: 0; transition: opacity .25s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; pointer-events: none; text-align: left;
}
.g-item:hover .g-overlay, .g-item:focus-visible .g-overlay { opacity: 1; }
.g-credit { font-size: 13px; font-weight: 700; color: #FFFFFF; letter-spacing: 0.02em; }
.g-exif { font-size: 11px; color: var(--accent); margin-top: 4px; }
.g-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: rgba(11, 11, 11, 0.55);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.g-play::after {
  content: ""; width: 0; height: 0; margin-left: 2px;
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #FFFFFF;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: #1A1A1A; z-index: 500;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; cursor: pointer;
}
.lightbox.is-open { display: flex; }
.lightbox-media { max-width: min(900px, 90vw); width: 100%; height: 78vh; display: flex; align-items: center; justify-content: center; }
.lightbox-media img, .lightbox-media video { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; }
.lightbox-media .ph { width: 100%; height: 100%; background: #2A2A2A; }
.lightbox-caption { margin-top: 20px; text-align: center; }
.lightbox-credit { font-size: 14px; font-weight: 700; color: #FFFFFF; letter-spacing: 0.02em; }
.lightbox-exif { font-size: 12px; color: var(--accent); margin-top: 6px; }
.lightbox-close {
  position: absolute; top: 28px; right: 36px;
  background: none; border: 2px solid #FFFFFF; color: #FFFFFF;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  padding: 8px 14px; cursor: pointer;
}

/* ---------- About ---------- */
.about-section {
  max-width: 960px; margin: 0 auto; padding: 64px 32px 96px;
  display: flex; flex-direction: column; gap: 32px;
}
.about-head { display: flex; flex-direction: column; gap: 24px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.about-photo { width: 100%; aspect-ratio: 4 / 5; }
.about-text { display: flex; flex-direction: column; gap: 24px; }
.awards {
  border-top: 2px solid var(--line); padding-top: 20px; margin-top: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.small-label { font-size: 12px; letter-spacing: 0.06em; font-weight: 700; }
.awards a { font-family: var(--font-sans); font-size: 16px; line-height: 1.8; width: fit-content; }

/* ---------- Contact ---------- */
.contact-section {
  max-width: 720px; margin: 0 auto; padding: 64px 32px 96px;
  display: flex; flex-direction: column; gap: 32px;
}
.contact-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  border-top: 2px solid var(--ink); padding-top: 32px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea {
  font-family: var(--font-mono); font-size: 15px; padding: 12px 14px;
  border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.contact-form button { cursor: pointer; width: fit-content; }
.form-thanks { border: 2px solid var(--ink); padding: 24px; font-size: 15px; }
.form-error { color: #B3261E; font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .gallery-section { padding: 48px 32px 96px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .site-nav { justify-content: center; padding: 16px; }
  .nav-links { justify-content: center; gap: 20px; }
  .site-footer { justify-content: center; text-align: center; }
  .site-footer .footer-links { justify-content: center; }

  .hero, .about-head, .about-text, .contact-section { text-align: center; align-items: center; }
  .hero-buttons, .contact-links { justify-content: center; }
  .accent-bar { margin-left: auto; margin-right: auto; }
  .gallery-section .page-title { text-align: center; }

  .home-tiles-wrap { padding: 24px 16px 56px; }
  .home-tiles { grid-template-columns: 1fr; grid-template-rows: none; }
  .home-tiles .home-tile { grid-column: 1; grid-row: auto; aspect-ratio: 4 / 5; }

  .gallery-section { padding: 40px 16px 80px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form { text-align: left; align-self: stretch; }
  .lightbox { padding: 24px 16px; }
  .lightbox-close { top: 16px; right: 16px; }
}
