/* =============================================================================
   WILFREDO VALLE — PORTRAIT PHOTOGRAPHY
   styles.css
   ============================================================================= */


/* -----------------------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------------------- */

:root {
  /* Color palette — warm near-white on deep black */
  --c-text:         #f0eee9;
  --c-text-muted:   rgba(240, 238, 233, 0.60);
  --c-text-dim:     rgba(240, 238, 233, 0.35);
  --c-border:       rgba(240, 238, 233, 0.18);
  --c-border-hover: rgba(240, 238, 233, 0.45);
  --c-glass:        rgba(0, 0, 0, 0.28);
  --c-glass-hover:  rgba(240, 238, 233, 0.09);

  /* Typography */
  --f-display: 'Syne', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-ui:      'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Easing curve */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


/* -----------------------------------------------------------------------------
   2. RESET
   ----------------------------------------------------------------------------- */

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

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--f-ui);
  color: var(--c-text);
  background-color: #0d0d0d;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}


/* -----------------------------------------------------------------------------
   3. BACKGROUND
   ----------------------------------------------------------------------------- */

/*
  ┌───────────────────────────────────────────────────────────────────────────┐
  │  BACKGROUND IMAGE                                                         │
  │  Replace YOUR_BACKGROUND_IMAGE_HERE with your hosted image URL.           │
  │  Example:                                                                 │
  │    background-image: url('/assets/images/background.jpg');                │
  │  Tip: adjust background-position to frame a specific area of the photo.  │
  └───────────────────────────────────────────────────────────────────────────┘
*/
.bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('YOUR_BACKGROUND_IMAGE_HERE');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #111; /* Solid fallback while image loads */
}

/*
  Dark scrim overlay.
  Increase the alpha (currently 0.65) to darken; decrease to lighten.
*/
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.65);
}


/* -----------------------------------------------------------------------------
   4. SHARED: MONOGRAM CIRCLE
   ----------------------------------------------------------------------------- */

/*
  Default: displays "WA" text monogram.
  To use your portrait photo instead:
    1. Add the class "monogram--photo" alongside "monogram"
    2. Replace the URL in .monogram--photo below
    3. Remove the inner <span class="monogram__text"> from the HTML
*/
.monogram {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background-color: var(--c-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  transition: border-color 400ms var(--ease);
}

.monogram:hover {
  border-color: var(--c-border-hover);
}

.monogram__text {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 0.12em;
  color: var(--c-text);
  line-height: 1;
}

/* Landing page: larger size, no border (ring wrapper handles it) */
.monogram--landing {
  position: relative;
  width: 152px;
  height: 152px;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.monogram--landing video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(2.6);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/*
  Shiny silver ring wrapping the landing logo.
  Uses a conic-gradient to simulate a polished metallic surface —
  highlights at top-right, shadows at bottom-left.
*/
.logo-ring {
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(
    from 125deg,
    #4a4a4a   0deg,
    #b0b0b0  50deg,
    #e8e8e8  85deg,
    #ffffff 110deg,
    #f0f0f0 135deg,
    #c8c8c8 165deg,
    #888888 210deg,
    #5a5a5a 250deg,
    #aaaaaa 295deg,
    #4a4a4a 360deg
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(200, 200, 200, 0.18),
    0 4px 20px rgba(0, 0, 0, 0.55);
  transition: box-shadow 400ms var(--ease);
}

.logo-ring:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 40px rgba(220, 220, 220, 0.28),
    0 4px 24px rgba(0, 0, 0, 0.55);
}

/* Small variant used inside the nav bar */
.monogram--sm {
  width: 42px;
  height: 42px;
}

.monogram--sm .monogram__text {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

/*
  ┌───────────────────────────────────────────────────────────────────────────┐
  │  PORTRAIT PHOTO VARIANT                                                   │
  │  Replace YOUR_HEADSHOT_HERE with your circular portrait image URL.        │
  │  Example: url('/assets/images/wilfredo-headshot.jpg')                    │
  └───────────────────────────────────────────────────────────────────────────┘
*/
.monogram--photo {
  background-image: url('YOUR_HEADSHOT_HERE');
  background-size: cover;
  background-position: center;
}


/* -----------------------------------------------------------------------------
   5. SHARED: SOCIAL LINKS ROW
   ----------------------------------------------------------------------------- */

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-weight: 400;
  transition:
    color 360ms var(--ease),
    border-color 360ms var(--ease),
    background-color 360ms var(--ease);
}

.social-link:hover {
  color: var(--c-text);
  border-color: var(--c-border-hover);
  background-color: var(--c-glass-hover);
}

/* 500px needs smaller text to fit inside the circle */
.social-link--500px {
  font-size: 0.5rem;
  font-weight: 300;
  flex-direction: column;
  line-height: 1.2;
  letter-spacing: 0.01em;
}


/* -----------------------------------------------------------------------------
   6. LANDING SCREEN
   ----------------------------------------------------------------------------- */

.landing {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  /* Fade-out transition applied via JS */
  transition:
    opacity  800ms var(--ease),
    visibility 800ms var(--ease);
}

.landing.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Logo intro: ring sweeps in, photo stays upright ── */
.logo-ring {
  animation: ring-sweep 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Counter-rotate the inner circle so the photo stays face-up */
.logo-ring .monogram--landing {
  animation: ring-counter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes ring-sweep {
  from { rotate: -300deg; }
  to   { rotate: 0deg; }
}

@keyframes ring-counter {
  from { rotate: 300deg; }
  to   { rotate: 0deg; }
}

/* ── Staggered reveal for subtitle, button, socials ── */
.landing__sub {
  animation: landing-item-in 0.7s var(--ease) 1s both;
}

.btn-enter {
  animation: landing-item-in 0.7s var(--ease) 1.2s both;
}

.landing .socials {
  animation: landing-item-in 0.7s var(--ease) 1.4s both;
}

@keyframes landing-item-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.landing__heading {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--c-text);
  line-height: 1.25;
  max-width: 500px;
  padding: 0 1.5rem;
}

.landing__sub {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.67rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* "Enter" pill button */
.btn-enter {
  margin-top: 0.2rem;
  padding: 0.62rem 2rem;
  border-radius: 100px;
  border: 1px solid var(--c-border);
  background-color: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--c-text-muted);
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.67rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition:
    background-color 380ms var(--ease),
    border-color     380ms var(--ease),
    color            380ms var(--ease),
    transform         120ms ease;
}

.btn-enter:hover {
  background-color: var(--c-glass-hover);
  border-color: var(--c-border-hover);
  color: var(--c-text);
}

.btn-enter:active {
  transform: scale(0.97);
}

.btn-replay {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: rgba(243, 241, 238, 0.28);
  font-family: var(--f-ui);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  transition: color 200ms;
  animation: landing-item-in 0.7s var(--ease) 2s both;
}

.btn-replay:hover {
  color: rgba(243, 241, 238, 0.65);
}


/* -----------------------------------------------------------------------------
   7. MAIN CONTENT WRAPPER
   ----------------------------------------------------------------------------- */

.site-main {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Hidden by default; JS adds .is-revealed */
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms var(--ease);
}

.site-main.is-revealed {
  opacity: 1;
  pointer-events: auto;
}

/*
  Staggered reveal: sections slide up from 20px and fade in.
  Each .anim-N class carries a distinct transition-delay.
*/
.anim {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   700ms var(--ease),
    transform 700ms var(--ease);
}

.site-main.is-revealed .anim-1 { opacity: 1; transform: none; transition-delay:  80ms; }
.site-main.is-revealed .anim-2 { opacity: 1; transform: none; transition-delay: 220ms; }
.site-main.is-revealed .anim-3 { opacity: 1; transform: none; transition-delay: 360ms; }
.site-main.is-revealed .anim-4 { opacity: 1; transform: none; transition-delay: 490ms; }


/* -----------------------------------------------------------------------------
   8. NAVIGATION
   ----------------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-nav__link {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  position: relative;
  transition: color 360ms var(--ease);
}

/* Animated underline on hover */
.site-nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 360ms var(--ease);
}

.site-nav__link:hover {
  color: var(--c-text);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}


/* -----------------------------------------------------------------------------
   9. HERO / INTRO
   ----------------------------------------------------------------------------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 4rem;
  gap: 1.2rem;
}

.hero__headline {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  letter-spacing: 0em;
  line-height: 1;
  color: var(--c-text);
  margin-top: 0.4rem;
}

.hero__sub {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.64rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.hero__location {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
  color: var(--c-text);
  line-height: 1.1;
}

/* Gently bouncing scroll indicator */
.scroll-arrow {
  margin-top: 0.9rem;
  font-size: 1rem;
  color: var(--c-text-dim);
  animation: float-down 2.8s ease-in-out infinite;
  user-select: none;
}

@keyframes float-down {
  0%, 100% { transform: translateY(0);   opacity: 0.40; }
  50%       { transform: translateY(7px); opacity: 0.75; }
}


/* -----------------------------------------------------------------------------
   10. PORTRAIT GRID
   ----------------------------------------------------------------------------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
}

.portrait-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  /* Entrance: hidden state — revealed by IntersectionObserver */
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  filter: blur(6px);
  will-change: opacity, transform, filter;
  transition:
    opacity   720ms var(--ease),
    transform 720ms var(--ease),
    filter    480ms ease-out;
}

.portrait-card.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Image wrapper */
.portrait-card__image-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: rgba(240, 238, 233, 0.04);
}

/* Hover: warm shimmer overlay (image scale removed — parallax owns transform) */
.portrait-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(240, 238, 233, 0);
  transition: background 500ms var(--ease);
  pointer-events: none;
  z-index: 1;
}


.portrait-card:hover .portrait-card__image-wrap::after {
  background: rgba(240, 238, 233, 0.07);
}

.portrait-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.1);
  transition: transform 80ms linear;
  will-change: transform;
}

/* Placeholder shown before real image is inserted */
.portrait-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-card__num {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: rgba(240, 238, 233, 0.10);
  letter-spacing: 0.06em;
}

/* Name + title overlaid on image */
.portrait-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 2;
}

.portrait-card__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.2;
}

.portrait-card__title {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}


/* -----------------------------------------------------------------------------
   11. FOOTER
   ----------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem 2rem 3rem;
}

.site-footer__copy {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}


/* -----------------------------------------------------------------------------
   12. RESPONSIVE
   ----------------------------------------------------------------------------- */

/* Tablet: 2-column grid */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .site-nav {
    padding: 1.1rem 1.25rem;
  }

  .site-nav__links {
    gap: 1.5rem;
  }

  .site-nav__link {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
  }

  .monogram {
    width: 80px;
    height: 80px;
  }

  .monogram__text {
    font-size: 1.9rem;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
    gap: 1rem;
  }

  /* Single-column portrait grid on mobile */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .portrait-card__image-wrap {
    aspect-ratio: 3 / 4;
  }

  .site-footer {
    padding: 1.5rem 1.5rem 2.5rem;
    gap: 1rem;
  }

  .socials {
    gap: 0.9rem;
  }
}


/* =============================================================================
   13. VIDEO BACKGROUND (landing page — Vimeo embed)
   ============================================================================= */

/*
  The .video-bg div wraps the Vimeo iframe.
  The iframe is scaled to always cover the viewport (16:9 source).
  A dark .bg-overlay (defined earlier) sits on top for readability.
*/
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #080808; /* Shows while video loads */
}

.video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Scale to cover the viewport regardless of window aspect ratio */
  width: 177.78vh;  /* 100vh × (16/9) */
  height: 100vh;
  min-width: 100vw;
  min-height: 56.25vw; /* 100vw × (9/16) */
  transform: translate(-50%, -50%);
  pointer-events: none;
  object-fit: cover;
}


/* =============================================================================
   14. PAGE ENTRANCE ANIMATION (all pages except landing)
   ============================================================================= */

.page-enter {
  animation: page-fade-in 0.55s var(--ease) both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* =============================================================================
   15. WORK PAGE WRAPPER
   ============================================================================= */

.work-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* =============================================================================
   15a. MASTHEAD (work page — video covering top third)
   ============================================================================= */

/*
  The masthead sits at the top of the work page and fills ~1/3 of the viewport.
  The nav is fixed above it; the portrait grid sits below it.
*/
.masthead {
  position: relative;
  height: 50vh;
  min-height: 340px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Full-bleed video, always covers the masthead area */
.masthead__video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: 177.78vh;
  height: 56.25vw;
  object-fit: cover;
  pointer-events: none;
}

/* Dark scrim — matches the reference image tone */
.masthead__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

/* Hero text sits above the overlay */
.masthead .hero {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 5rem; /* clear the fixed nav */
  padding-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .masthead {
    height: 45vh;
  }
}


/* =============================================================================
   16. PORTRAIT DETAIL PAGE
   ============================================================================= */

.portrait-detail {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Full-screen portrait image */
.portrait-detail__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.portrait-detail__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Gradient: subtle at top, strong at bottom so text is always readable */
.portrait-detail__gradient {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.10) 100%
  );
}

/* Text block at bottom */
.portrait-detail__content {
  position: relative;
  z-index: 10;
  margin-top: auto;
  padding: 0 2.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ← Back to Work link */
.portrait-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-decoration: none;
  margin-bottom: 1.6rem;
  transition: color 360ms var(--ease);
}

.portrait-detail__back:hover {
  color: var(--c-text);
}

.portrait-detail__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--c-text);
}

.portrait-detail__title {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-top: 0.65rem;
}

/* Portrait detail — responsive */
@media (max-width: 600px) {
  .portrait-detail__content {
    padding: 0 1.5rem 2.5rem;
  }
}


/* =============================================================================
   17. STUB PAGES (Blog, About Me, Contact)
   ============================================================================= */

.stub-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  gap: 1rem;
}

.stub-page__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.04em;
  color: var(--c-text);
}

.stub-page__msg {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.66rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}


/* =============================================================================
   18a. ABOUT PAGE — EDITORIAL HERO LAYOUT
   ============================================================================= */

/* Nav with frosted dark backdrop */
.site-nav--backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Float layout — photo right, text wraps the silhouette */
.about-hero {
  min-height: 100vh;
  display: flow-root;
}

/* RIGHT: floated photo, text flows around the shape */
.about-hero__photo-wrap {
  float: right;
  width: 52%;
  min-height: 100vh;
  shape-outside: url('assets/wilfredo-about.png');
  shape-image-threshold: 0.05;
  shape-margin: 1.5rem;
}

/* LEFT: text wraps around the float */
.about-hero__content {
  display: flex;
  flex-direction: column;
  padding: 8rem 2rem 4rem 4rem;
  justify-content: center;
  min-height: 100vh;
}

.about-hero__label {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.about-hero__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.about-hero__role {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
}

.about-hero__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--c-border);
  margin-bottom: 2rem;
}

.about-hero__body p {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--c-text-muted);
}

.about-hero__body p:first-child {
  color: var(--c-text);
}

.about-hero__credits {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--c-border);
  margin-bottom: 2rem;
}

.about-hero__credits span {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.about-hero__photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  filter: grayscale(100%);
}

@media (max-width: 768px) {
  .about-hero__photo-wrap {
    float: none;
    width: 100%;
    height: 65vh;
    shape-outside: none;
  }

  .about-hero__content {
    padding: 2rem 1.5rem 3rem;
    min-height: 0;
  }
}


/* About page — light theme overrides */
body.about-page {
  background-color: #ffffff;
}

body.about-page .site-nav--backdrop {
  background: rgba(255, 255, 255, 0.85);
}

body.about-page .monogram {
  border-color: rgba(0, 0, 0, 0.12);
  background-color: rgba(0, 0, 0, 0.04);
}

body.about-page .site-nav__link {
  color: rgba(20, 20, 20, 0.50);
}

body.about-page .site-nav__link:hover {
  color: #141414;
}

body.about-page .site-nav__link::after {
  background: #141414;
}

body.about-page .about-hero__label {
  color: rgba(20, 20, 20, 0.45);
}

body.about-page .about-hero__name {
  color: #141414;
}

body.about-page .about-hero__role {
  color: rgba(20, 20, 20, 0.45);
}

body.about-page .about-hero__body {
  border-top-color: rgba(0, 0, 0, 0.09);
}

body.about-page .about-hero__body p {
  color: rgba(20, 20, 20, 0.60);
}

body.about-page .about-hero__body p:first-child {
  color: #141414;
}

body.about-page .about-hero__credits {
  border-top-color: rgba(0, 0, 0, 0.09);
}

body.about-page .about-hero__credits span {
  color: rgba(20, 20, 20, 0.35);
}

body.about-page .portrait-single__back {
  color: rgba(20, 20, 20, 0.45);
}

body.about-page .portrait-single__back:hover {
  color: #141414;
}


/* =============================================================================
   18. PORTRAIT SINGLE PAGE (two-panel editorial layout)
   ============================================================================= */

/*
  Two-column grid: photo panel (left, 62%) + info panel (right, 38%).
  On mobile it stacks vertically.
*/
.portrait-single {
  display: grid;
  grid-template-columns: 62fr 38fr;
  min-height: 100vh;
  background: #0d0d0d;
}

/* ── LEFT: Photo panel ───────────────────────────────────────────────────────── */

.portrait-single__photo {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.portrait-single__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── RIGHT: Info panel ───────────────────────────────────────────────────────── */

.portrait-single__info {
  display: flex;
  flex-direction: column;
  padding: 5.5rem 2.5rem 2.5rem;
  border-left: 1px solid var(--c-border);
  min-height: 100vh;
}

/* Top: logo + nav links (stacked right-aligned) */
.portrait-single__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.portrait-single__nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

/* Middle: name + title — fills remaining space, centers content vertically */
.portrait-single__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
}

.portrait-single__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: var(--c-text);
}

.portrait-single__role {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* Bottom: back link */
.portrait-single__back {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 360ms var(--ease);
}

.portrait-single__back:hover {
  color: var(--c-text);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .portrait-single {
    grid-template-columns: 1fr;
  }

  .portrait-single__photo {
    height: 65vh;
    min-height: 0;
  }

  .portrait-single__info {
    border-left: none;
    border-top: 1px solid var(--c-border);
    min-height: 0;
    padding: 1.75rem 1.5rem 2rem;
  }

  .portrait-single__nav-links {
    flex-direction: row;
    gap: 1.25rem;
  }
}


/* =============================================================================
   19. CONTACT PAGE — two-column editorial layout
   ============================================================================= */

.contact-v2 {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT: info panel ─────────────────────────────────────────────────────── */

.contact-v2__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 4rem 5rem 4rem;
  min-height: 100vh;
  border-right: 1px solid var(--c-border);
}

.contact-v2__label {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}

.contact-v2__heading {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: 2.5rem;
}

.contact-v2__email {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.03em;
  color: var(--c-text-muted);
  text-decoration: none;
  align-self: flex-start;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.35rem;
  margin-bottom: 3rem;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}

.contact-v2__email:hover {
  color: var(--c-text);
  border-color: var(--c-border-hover);
}

.contact-v2__socials {
  border-top: 1px solid var(--c-border);
}

.contact-v2__social-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--c-border);
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 300ms var(--ease);
}

.contact-v2__social-row:hover {
  color: var(--c-text);
}

/* ── RIGHT: form panel ────────────────────────────────────────────────────── */

.contact-v2__form-col {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8rem 4rem 5rem 4rem;
  min-height: 100vh;
  /* Background image */
  background-image: url('assets/sf-bridge.jpg');
  background-size: cover;
  background-position: center;
  /* Dark overlay via pseudo-element */
  isolation: isolate;
}

.contact-v2__form-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 0;
}

.contact-v2__form-col .contact-form {
  position: relative;
  z-index: 1;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-form__field label {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.contact-form__field input,
.contact-form__field textarea {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--c-text);
  background: rgba(240, 238, 233, 0.05);
  border: 1px solid rgba(240, 238, 233, 0.22);
  border-radius: 3px;
  padding: 0.9rem 1.1rem;
  outline: none;
  width: 100%;
  resize: none;
  transition: border-color 300ms var(--ease), background 300ms var(--ease);
  -webkit-appearance: none;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--c-text-dim);
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--c-border-hover);
  background: rgba(240, 238, 233, 0.08);
}

.contact-form__submit {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.75rem 2.4rem;
  border-radius: 100px;
  border: 1px solid var(--c-border);
  background-color: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--c-text-muted);
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 380ms var(--ease),
    border-color     380ms var(--ease),
    color            380ms var(--ease),
    transform         120ms ease;
}

.contact-form__submit:hover {
  background-color: var(--c-glass-hover);
  border-color: var(--c-border-hover);
  color: var(--c-text);
}

.contact-form__submit:active {
  transform: scale(0.97);
}

.contact-form__status {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  min-height: 1.2em;
}

.contact-form__status[data-state="ok"]  { color: var(--c-text-muted); }
.contact-form__status[data-state="err"] { color: #c0614a; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .contact-v2 {
    grid-template-columns: 1fr;
  }

  .contact-v2__info {
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding: 7rem 1.5rem 3rem;
  }

  .contact-v2__form-col {
    min-height: 0;
    padding: 3rem 1.5rem 5rem;
    align-items: flex-start;
  }
}


/* =============================================================================
   20. BLOG — INDEX + POST PAGE
   ============================================================================= */


/* ── Blog index ─────────────────────────────────────────────────────────────── */

.blog-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog-hero {
  padding: 8rem 2.5rem 4rem;
  max-width: 800px;
}

.blog-hero__label {
  display: block;
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.blog-hero__heading {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--c-text);
}

/* Grid */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.5rem;
  padding: 0 2.5rem 6rem;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 1.5rem 5rem;
  }
}

.blog-empty {
  grid-column: 1 / -1;
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--c-text-dim);
  letter-spacing: 0.1em;
}

/* Card */

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: card-in 500ms var(--ease) both;
}

.blog-card__cover-link {
  display: block;
  text-decoration: none;
}

.blog-card__cover {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  transition: border-color 400ms var(--ease);
  border: 1px solid transparent;
}

.blog-card__cover:hover {
  border-color: var(--c-border);
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease);
}

.blog-card:hover .blog-card__img {
  transform: scale(1.04);
}

.blog-card__body {
  padding: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blog-card__tags {
  font-family: var(--f-ui);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 0.3rem;
}

.blog-card__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.2;
  color: var(--c-text);
}

.blog-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 300ms var(--ease);
}

.blog-card__title-link:hover {
  color: var(--c-text);
  opacity: 0.8;
}

.blog-card__excerpt {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  line-height: 1.75;
  margin: 0.3rem 0;
}

.blog-card__meta {
  font-family: var(--f-ui);
  font-size: 0.58rem;
  color: var(--c-text-dim);
  letter-spacing: 0.12em;
}


/* ── Post page — cover ───────────────────────────────────────────────────────── */

.post-cover {
  position: relative;
  height: 55vh;
  min-height: 360px;
  overflow: hidden;
}

@keyframes cover-settle {
  from { transform: scale(1.04); }
  to   { transform: scale(1); }
}

.post-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  animation: cover-settle 1.4s ease-out both;
}

.post-cover__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.post-cover__meta {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 680px;
}

.post-cover__tags {
  font-family: var(--f-ui);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(240, 238, 233, 0.55);
}

.post-cover__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  line-height: 1.1;
}

.post-cover__byline {
  font-family: var(--f-ui);
  font-weight: 200;
  font-size: 0.65rem;
  color: rgba(240, 238, 233, 0.45);
  letter-spacing: 0.06em;
}

@media (max-width: 600px) {
  .post-cover__meta {
    bottom: 2rem;
    left: 1.5rem;
    right: 1.5rem;
  }
}


/* ── Post page — article ─────────────────────────────────────────────────────── */

@keyframes article-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.post-article {
  max-width: 660px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  animation: article-in 600ms var(--ease) 300ms both;
  width: 100%;
}

/* Body typography */

.post-body p {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.95;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}

.post-body p:first-child {
  color: var(--c-text);
}

.post-body h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--c-text);
  margin: 2.5rem 0 0.75rem;
}

.post-body h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--c-text-muted);
  margin: 2rem 0 0.5rem;
}

.post-body blockquote {
  border-left: 2px solid var(--c-border);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--c-text-dim);
  margin: 1.5rem 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2.5rem 0;
}

/* Media */

.post-figure {
  margin: 2.5rem -2rem;
}

.post-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.post-figure figcaption {
  font-family: var(--f-ui);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-top: 0.65rem;
  padding: 0 2rem;
}

.post-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2.5rem -2rem;
}

.post-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 600px) {
  .post-figure,
  .post-video {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }

  .post-figure figcaption {
    padding: 0 1.5rem;
  }
}


/* ── Post page — footer + share ─────────────────────────────────────────────── */

.post-footer {
  max-width: 660px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
  border-top: 1px solid var(--c-border);
  width: 100%;
}

.post-share {
  padding: 1.5rem 0;
}

.post-share__btn {
  background: none;
  border: none;
  font-family: var(--f-ui);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 250ms var(--ease);
}

.post-share__btn:hover {
  color: var(--c-text);
}

.post-share__fallback {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 300ms var(--ease), opacity 300ms var(--ease);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding-top: 0;
}

.post-share__fallback.is-open {
  max-height: 80px;
  opacity: 1;
  padding-top: 0.75rem;
}

.post-share__link {
  font-family: var(--f-ui);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 250ms var(--ease);
}

.post-share__link:hover {
  color: var(--c-text);
}

.post-back {
  display: inline-block;
  font-family: var(--f-ui);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 250ms var(--ease);
}

.post-back:hover {
  color: var(--c-text);
}


/* ── Post cover: CSS graphic variants ───────────────────────────────────────── */

.post-cover__graphic {
  position: absolute;
  inset: 0;
}

/* =============================================================================
   WORD INTRO OVERLAY
   ============================================================================= */

.word-intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 600ms var(--ease), visibility 600ms var(--ease);
}

.word-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.word-intro__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.word-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.65);
}

.word-intro__display,
.word-intro__cursor {
  position: relative;
  z-index: 2;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #00ff41;
  letter-spacing: -0.02em;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.9), 0 0 40px rgba(0, 255, 65, 0.35);
}

.word-intro__cursor {
  font-weight: 200;
  margin-left: 0.05em;
  animation: cursor-blink 0.7s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.word-intro__skip {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  font-family: var(--f-ui);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(243, 241, 238, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 200ms;
  padding: 0;
}

.word-intro__skip:hover {
  color: rgba(243, 241, 238, 0.8);
}


/* AI / creativity — deep violet bloom, blue accent */
.post-cover__graphic--ai {
  background:
    radial-gradient(ellipse at 25% 55%, rgba(109, 40, 217, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 25%, rgba(37, 99, 235, 0.22) 0%, transparent 45%),
    #08080f;
}

/* Portrait / photography — warm amber studio light */
.post-cover__graphic--portrait {
  background:
    radial-gradient(ellipse at 65% 60%, rgba(120, 53, 15, 0.70) 0%, transparent 52%),
    radial-gradient(ellipse at 28% 35%, rgba(146, 64, 14, 0.28) 0%, transparent 45%),
    #0d0908;
}
