/* ==========================================
   REYMOND ATHIE — PORTFOLIO
   DARK CINEMATIC DESIGN
========================================== */

/* COLOURS */

:root {
  --background: #101010;
  --surface: #191919;
  --text: #f5f1e9;
  --muted: #aaa39a;
  --accent: #d3b995;
}

/* GENERAL */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ==========================================
   HEADER
========================================== */

.site-header {
  min-height: 90px;
  padding: 24px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #292929;
}

.site-logo {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 2px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.main-nav a {
  font-size: 12px;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent);
}

/* ==========================================
   HERO
========================================== */

.hero {
  min-height: 76vh;
  padding: 100px 9%;
  display: flex;
  align-items: center;

  background:
    radial-gradient(
      ellipse at 75% 45%,
      #35302b 0%,
      #191817 40%,
      #101010 75%
    );
}

.hero-content {
  max-width: 760px;
}

.eyebrow,
.section-label {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 3px;
}

.hero h1 {
  margin: 28px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero-description {
  max-width: 470px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.hero-link {
  display: inline-flex;
  gap: 20px;
  margin-top: 38px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 2px;
}

/* ==========================================
   PORTFOLIO SECTIONS
========================================== */

.portfolio-section {
  padding: 100px 6%;
  scroll-margin-top: 30px;
}

.section-heading {
  margin-bottom: 45px;
}

.section-heading h2 {
  margin: 15px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 400;
  letter-spacing: 2px;
}

/* PROJECT GRID */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ==========================================
   PROJECT CARDS — GENERAL
========================================== */

.project-card {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

/* Real images and videos */

.project-media img,
.project-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transition: transform 0.6s ease;
}

/* ==========================================
   FILM — HORIZONTAL 16:9
========================================== */

/* Only FILM cards use widescreen format */

.film-card .project-media {
  aspect-ratio: 16 / 9;
  background: #000;
}

/* Show the entire film thumbnail */

.film-card .project-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ==========================================
   PLACEHOLDER IMAGES
========================================== */

.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #c8b9a4;
  font-size: 12px;
  letter-spacing: 2px;
  transition: transform 0.6s ease;
}

.film-one {
  background: linear-gradient(145deg, #484238, #171a1b);
}

.film-two {
  background: linear-gradient(145deg, #303d45, #141517);
}

.film-three {
  background: linear-gradient(145deg, #514137, #1b1918);
}

.photo-one {
  background: linear-gradient(145deg, #57504a, #1b1b1b);
}

.photo-two {
  background: linear-gradient(145deg, #353c38, #181a19);
}

.photo-three {
  background: linear-gradient(145deg, #4a4038, #171717);
}

/* ==========================================
   HOVER OVERLAY
========================================== */

.project-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

.project-card:hover .project-title,
.project-card:focus-visible .project-title {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle image zoom */

.project-card:hover .media-placeholder,
.project-card:hover img,
.project-card:hover video {
  transform: scale(1.03);
}

/* Keyboard accessibility */

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ==========================================
   FADE-IN ON SCROLL
========================================== */

/* Content stays visible without JavaScript */

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

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

/* ==========================================
   FOOTER
========================================== */

.site-footer {
  padding: 35px 6%;
  border-top: 1px solid #292929;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1200px) {

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 65vh;
  }

}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }

  .site-logo {
    font-size: 19px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 11px;
  }

  .hero {
    min-height: 65vh;
    padding: 85px 6%;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .portfolio-section {
    padding: 70px 6%;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* Photography becomes square on mobile */

  .project-media {
    aspect-ratio: 1 / 1;
  }

  /* Film remains widescreen on mobile */

  .film-card .project-media {
    aspect-ratio: 16 / 9;
  }

  .site-footer {
    flex-direction: column;
  }

}

/* ==========================================
   TOUCHSCREENS
========================================== */

@media (hover: none) {

  .project-overlay,
  .project-title {
    opacity: 1;
  }

  .project-title {
    transform: none;
  }

  .project-card:hover .media-placeholder,
  .project-card:hover img,
  .project-card:hover video {
    transform: none;
  }

}

/* ==========================================
   REDUCED MOTION ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .project-media *,
  .main-nav a {
    transition: none !important;
    animation: none !important;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }

}

/* =====================================
   PHOTOGRAPHY — FULL IMAGE DISPLAY
===================================== */

/* Only photography cards */

#photography .project-media {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  background: #101010;
}

/* Show the complete photograph */

#photography .project-media > img {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Keep the hover overlay over the image */

#photography .project-overlay {
  position: absolute;
  inset: 0;
}

/* =====================================
   PHOTOGRAPHY — UNIFORM EDITORIAL GRID
===================================== */

/* All photography cards have the same proportions */

#photography .project-media {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #191919;
}

/* Display complete images without cropping */

#photography .project-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Hover overlay covers the entire card */

#photography .project-overlay {
  position: absolute;
  inset: 0;
}

/* Square cards on smaller screens */

@media (max-width: 600px) {
  #photography .project-media {
    aspect-ratio: 1 / 1;
  }
}

/* =====================================
   PHOTOGRAPHY — EDITORIAL THUMBNAILS
===================================== */

#photography .project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #191919;
}

#photography .project-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Individual framing adjustments */

#photography .project-card:nth-child(1) img {
  object-position: center center;
}

#photography .project-card:nth-child(2) img {
  object-position: center 35%;
}

#photography .project-card:nth-child(3) img {
  object-position: center center;
}

@media (max-width: 600px) {
  #photography .project-media {
    aspect-ratio: 1 / 1;
  }
}

/* ==========================================
   PHOTOGRAPHY — HORIZONTAL PROJECT COVERS
========================================== */

#photography .project-media {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #191919;
}

#photography .project-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#photography .project-overlay {
  position: absolute;
  inset: 0;
}

/* Keep photography horizontal on mobile */

@media (max-width: 600px) {
  #photography .project-media {
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================
   HERO SOCIAL ICONS — REFINED DESIGN
========================================== */

.hero .hero-socials {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 34px;

  margin-top: 48px;
  padding-top: 0;

  width: fit-content;
}

.hero .hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 32px;

  color: #d3b995;
  font-size: 24px;
  line-height: 1;

  text-decoration: none;
  border: none;

  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.hero .hero-socials a:hover {
  color: #ffffff;
  transform: translateY(-4px);
}

.hero .hero-socials a:focus-visible {
  outline: 2px solid #d3b995;
  outline-offset: 6px;
}

/* MOBILE */

@media (max-width: 600px) {

  .hero .hero-socials {
    margin-top: 38px;
    gap: 30px;
  }

  .hero .hero-socials a {
    font-size: 22px;
  }

}