/* =============================
   Kevin Roden Portfolio
   Unified Cinematic Style (v5 restored)
   ============================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Montserrat:wght@400;500&display=swap');

:root {
  --bg-page: #1e1b19;
  --bg-panel: rgba(30,27,25,0.85);

  --text-main: #f5f5f5;
  --text-dim: #bdbdbd;
  --text-soft: rgba(255,255,255,0.9);

  --accent-warm: #c3a36a;

  --radius-card: 12px;
  --radius-card-lg: 14px;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.5rem, 4vw, 5%);
  background: var(--bg-panel);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Structural rules for nav links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

/* All link styles are now controlled by 
   .nav-link-style at the bottom of this file.
*/

/* =============================
   PAGE HEADER TITLES (MODELS, NATURE, ABOUT)
   ============================= */

.page-header {
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  color: var(--text-soft);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* =============================
   HERO (front page top section)
   ============================= */

.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background: url('images/hero/hero-background.jpg') center/cover no-repeat;
  background-color: #000;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 30%, rgba(255,200,130,0.18) 0%, rgba(0,0,0,0.55) 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(30,27,25,0.8) 80%);
}

.hero-inner {
  position: relative;
  max-width: 90%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 3.5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-tagline {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(.9rem, 1vw, 1.05rem);
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  letter-spacing: .08em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
  line-height: 1.5;
  max-width: 32ch;
  text-align: center;
}

/* =============================
   PORTALS on homepage
   ============================= */

.portals-section {
  padding: 4rem 0 5rem;
  background: var(--bg-page);
}

.portals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(500px,100%),1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 5%);
}

.portal-card {
  position: relative;
  border-radius: var(--radius-card-lg);
  min-height: 360px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);

  transform-origin: center;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none;
  color: var(--text-main);
}

.portal-card:hover {
  transform: scale(1.03);
  box-shadow: 0 30px 60px rgba(0,0,0,0.75);
}

.portal-card-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 60%),
    linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: background .3s ease;
}
.portal-card:hover .portal-card-overlay {
  background:
    radial-gradient(circle at 30% 30%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 60%),
    linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 60%);
}

.portal-card-label {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  transform: translateY(0);
  transition: transform .3s ease;
}
.portal-card:hover .portal-card-label {
  transform: translateY(-4px);
}
.portal-card-label h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
  line-height: 1.3;
}

/* specific portal backgrounds (home page cards) */
#portal-models {
  background-image: url('images/portals/portal-models.jpg');
  filter: brightness(0.95) contrast(1.05) sepia(0.08);
}
#portal-nature {
  background-image: url('images/portals/portal-nature.jpg');
  filter: brightness(0.95) contrast(1.05) sepia(0.08);
}

/* =============================
   PORTFOLIO GRID (Models / Nature pages)
   ============================= */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* lock 2 columns */
  gap: 2.5rem;
  padding: 0 clamp(1.5rem, 4vw, 5%) 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.grid-item {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-card);
  overflow: hidden;

  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transition: transform .4s ease, box-shadow .4s ease;
  cursor: pointer;
  opacity: 0; /* Start hidden */
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.1s;
}
.grid-item:hover {
  transform: scale(1.03);
  box-shadow: 0 30px 60px rgba(0,0,0,0.75);
}

/* bottom gradient overlay for text readability */
.grid-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0) 65%
  );
  opacity: 0.9;
  transition: opacity .3s ease;
  pointer-events: none;
}
.grid-item:hover::after {
  opacity: 0.7;
}

.grid-item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 1.2rem;
  z-index: 2;
  pointer-events: none;
}

/* main line (name / place) */
.grid-item-title h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text-soft);
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  letter-spacing: .02em;
  margin: 0 0 0.25rem;
}

/* subtitle line */
.grid-item-title h3 span {
  display: block;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: .95rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  letter-spacing: .02em;
  opacity: 0.9;
}

/* =============================
   ABOUT PAGE LAYOUT
   ============================= */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-start;
  gap: 2rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 5%) 3rem;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 6px solid rgba(255,255,255,0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
  background-color: #2a2725;
  object-fit: cover;
}

.about-text h2 {
  font-family: 'Playfair Display', serif;
  color: var(--accent-warm);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 2vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  line-height: 1.25;
}

.about-text p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 90%;
  margin-bottom: 1.2rem;
  font-family: 'Montserrat', system-ui, sans-serif;
}

/* =============================
   CONTACT PAGE & LINKS
   ============================= */

/* Style for the "please get in touch" link on the About page */
.contact-link {
  /* Use the main (brighter) text color to stand out */
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  
  /* Have the underline "appear" on hover */
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}

.contact-link:hover {
  /* On hover, match the navigation link style */
  color: var(--accent-warm);
  border-bottom: 1px solid var(--accent-warm);
}
.contact-form-container {
  max-width: 700px; /* Constrain form width */
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

.contact-intro {
  text-align: center;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--text-main);
  transition: all .3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
  background: var(--bg-page);
  box-shadow: 0 0 15px rgba(195, 163, 106, 0.2);
}

.form-group textarea {
  resize: vertical; /* Allow vertical resize only */
}

/* Center the submit button */
.form-group-submit {
  text-align: center;
  margin-top: 2rem;
}

/* =============================
   LIGHTBOX VIEWER
   ============================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  place-items: center;
  z-index: 1000;
  overflow: hidden;
  user-select: none;
}
.lightbox.open {
  display: grid;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  user-select: none;
  z-index: 1100;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(0,0,0,0.4);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  user-select: none;
  z-index: 1100;

  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lightbox-arrow:hover {
  background: rgba(0,0,0,0.6);
}
.lightbox-arrow-left { left: 20px; }
.lightbox-arrow-right { right: 20px; }
.lightbox-arrow.hidden {
  display: none !important;
}

.lightbox-inner {
  position: relative;
  width: 92vw;
  height: 88vh;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  cursor: zoom-in;
}
.lightbox-inner.zoomed {
  cursor: grab;
}

.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  transition: transform .2s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

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

.main-footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  color: var(--text-dim);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255,255,255,0.03) 0%,
      rgba(0,0,0,0) 70%
    );
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: 'Montserrat', system-ui, sans-serif;
}

/* =============================
   RESPONSIVE
   ============================= */

@media (max-width: 900px) {

  /* about page becomes single column */
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1rem 3rem;
  }

  .about-text p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .about-image img {
    max-width: 400px;
    margin: 0 auto;
  }

  /* gallery grid collapses to 1 column */
  .portfolio-grid {
    grid-template-columns: 1fr;
    padding-bottom: 4rem;
  }
}

/* =========================================
   MOBILE NAV REFORMAT FOR VERY NARROW VIEWPORTS
   (iPhone SE, etc.)
   ========================================= */

@media (max-width: 480px) {

  /* The header bar becomes taller and stacks content */
  .main-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;

    padding: 1rem 1rem 0.75rem;
    text-align: center;
  }

  /* Brand line sits on top, full width, centered */
  .nav-logo a {
    font-size: 0.9rem;           /* slightly smaller */
    letter-spacing: 0.14em;      /* still elegant but tighter */
    line-height: 1.3;
    display: block;
    text-align: center;
  }

  /* The menu links become a horizontal row,
     BUT that row sits under the logo, centered,
     and can wrap to two lines if it's too tight. */
  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;    /* row-gap col-gap */
    padding: 0;
    margin: 0;

    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.75rem;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    line-height: 1.4;
    display: block;
    text-align: center;
    white-space: nowrap;
  }
}

/* =============================
   LIGHTBOX PROTECTION ADD-ONS
   ============================= */

/* Transparent layer above the image:
   - blocks drag
   - blocks right-click on img itself
   - blocks long-press save on mobile */
.protect-layer {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
  user-select: none;
  /* leave cursor control to .lightbox-inner */
}

/* Credit / ownership message */
.lightbox-credit {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: rgba(255,255,255,0.6);
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  user-select: none;
  pointer-events: none;
}

@media (max-width: 480px) {
  .lightbox-credit {
    font-size: 0.6rem;
    left: 0.75rem;
    bottom: 0.75rem;
  }
}

/* Reinforce interaction lock on the displayed image */
.lightbox-img {
  pointer-events: none;       /* can't click / drag img itself */
  user-select: none;
  -webkit-user-drag: none;
}

/* ============================================
   WATERMARK POSITION / RESPONSIVE CREDIT
   ============================================ */

/* default (landscape / wide) */
.lightbox-credit {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);

  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  z-index: 1200; /* stay above image */
}

/* tweak size for very small screens */
@media (max-width: 480px) {
  .lightbox-credit {
    font-size: 0.6rem;
    bottom: 4%;
    letter-spacing: 0.12em;
  }
}

/* portrait mode:
   we add .portrait dynamically via JS to BOTH the img and the credit.
   When .portrait is present on .lightbox-credit, we center it vertically.
*/
.lightbox-credit.portrait {
  /* portrait uses the same placement as default */
  bottom: 3%;
  top: auto;
  transform: translateX(-50%);
}

/* =============================
   LOAD MORE BUTTON (Container only)
   ============================= */

.load-more-container {
  text-align: center;
  padding: 1rem 0 5rem; /* Container still provides spacing */
}

/* Button is styled by .nav-link-style 
*/


/* =============================
   ANIMATIONS
   ============================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px); /* Start slightly lower */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================
   GRID LOADER
   ============================= */
.grid-loader {
  text-align: center;
  /* Make sure it spans both columns */
  grid-column: 1 / -1; 
  
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.8;
  
  /* --- REVISED FIX FOR JUMP --- */
  min-height: 70vh;
  display: grid;
  place-items: center;
}

/* =============================
   REUSABLE NAVIGATION LINK STYLE
   ============================= */

.nav-link-style {
  /* --- Base font and layout --- */
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  opacity: 0.9;
  
  /* --- Resets for <button> elements --- */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0; /* Base padding reset */
  
  /* --- Transitions --- */
  transition: color .3s ease, opacity .3s ease;
}

/* --- Underline --- */
.nav-link-style::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px; /* Sits 6px below the text */
  height: 1px;
  background: var(--accent-warm);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

/* --- Hover State --- */
.nav-link-style:hover {
  color: var(--accent-warm);
  opacity: 1;
}

/* --- Underline on Hover --- */
.nav-link-style:hover::after {
  transform: scaleX(1);
}

/* --- Disabled State (for "Loading...") --- */
.nav-link-style:disabled {
  color: #555;
  opacity: 0.5;
  cursor: wait;
}
.nav-link-style:disabled:hover {
  color: #555;
  opacity: 0.5;
}
.nav-link-style:disabled:hover::after {
  transform: scaleX(0); /* No underline on disabled hover */
}
/* =============================
   SUCCESS PAGE (Thank You)
   ============================= */
.success-message {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
  text-align: center;
}

.success-message p {
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-family: 'Montserrat', system-ui, sans-serif;
}

.success-message .redirect-notice {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* We can reuse the .contact-link style from the About page */
.success-message .contact-link {
  font-size: 1rem;
}