/* ===================================
   CSS Variables
   =================================== */
:root {
  /* Classic newspaper / editorial palette */
  --color-primary: #1A1A1A;
  --color-secondary: #4A3A2D;
  --color-accent: #B08D57; /* muted brass accent */
  --color-text: #2A2A2A;
  --color-text-light: #5A564F;
  --color-background: #FCF9F2; /* off‑white paper */
  --color-background-alt: #F4EFE7; /* subtle contrast section */
  --font-primary: 'Lora', 'Georgia', serif;
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --max-width: 1200px;
  --max-width-narrow: 1000px;
  --transition: all 0.3s ease;
  --gallery-img-height: 420px; /* Constant snapshot image height */
  --hero-mobile-height: 70vh; /* Tablet/mobile hero height */
  --hero-phone-height: 60vh; /* Small phone hero height */
}

/* ===================================
   Font Face
   =================================== */
@font-face {
  font-family: 'Gellix';
  font-weight: 400;
  font-style: normal;
  src: url('Didot_Italic.otf') format('opentype');
  font-display: swap;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.62;
  color: var(--color-text);
  background: var(--color-background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 25% 20%, #FFFFFF 0%, #FCF9F2 60%), radial-gradient(circle at 75% 80%, #FFFFFF 0%, #F7F2E9 65%);
  background-blend-mode: multiply;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===================================
   Skip to Content (Accessibility)
   =================================== */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing-sm);
  text-decoration: none;
  z-index: 200;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Breadcrumb removed: using nav aria-current for active page */

/* ===================================
   Container
   =================================== */
.container {
  width: 90%;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.container-portfolio {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* ===================================
   Header
   =================================== */
header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  border-bottom: 4px double rgba(0,0,0,0.3);
}
/* Mobile Menu Toggle (restored) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--spacing-xs);
  z-index: 101;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  transition: var(--transition);
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
}
header nav { margin-left: auto; }
header nav ul { justify-content: flex-end; }

/* Remove leftover breadcrumb styles and orphan transform */


nav ul {
  list-style-type:lower-greek;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: center;
  flex-wrap: nowrap;
}

nav ul li a {
  color: #fff;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
  font-variant: normal;
  letter-spacing: normal;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

nav ul li a[aria-current="page"] {
  color: #fff;
}

nav ul li a[aria-current="page"]::after {
  content: none;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}
  
/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  position: relative;
  text-align: center;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #000;
}

.hero-content {
  position: relative;
  width: 100%;
  height: 100%;
  animation: fadeIn 1s ease;
}

.hero-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 40%,
    rgba(0,0,0,0.3) 70%,
    rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.9) contrast(1.05);
}

.hero-text {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-family: var(--font-heading);
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.015em;
  font-weight: 600;
  position: relative;
  animation: fadeInUp 1s ease 0.3s both;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.55), 0 0 4px rgba(0,0,0,0.4);
}
.hero-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  width: 140px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-family: var(--font-primary);
  color: #f0e6d6;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 0.6s both;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  transition: var(--transition);
  margin-top: var(--spacing-md);
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
  font-variant: small-caps;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn:hover {
  background: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  font-size: 1.25rem;
  padding: 0.85rem 2.2rem;
  animation: scaleIn 0.8s ease 0.9s both;
  letter-spacing: 0.08em;
}

/* ===================================
   Hero CTA Section
   =================================== */
.hero-cta {
  padding: var(--spacing-xl) var(--spacing-sm);
  text-align: center;
  background: linear-gradient(to bottom, #ffffff, #fafafa);
}

/* ===================================
   About Section
   =================================== */
.about {
  padding: var(--spacing-xl) var(--spacing-sm);
  text-align: center;
  background: linear-gradient(to bottom, #ffffff, #fafafa);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

.about h2 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-heading);
  position: relative;
  display: inline-block;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.about p {
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
  color: var(--color-text-light);
  text-align: center;
  text-rendering: optimizeLegibility;
}
.about p:first-of-type:first-letter {
  float: left;
  font-size: 4.2rem;
  line-height: 0.85;
  font-family: var(--font-heading);
  padding: 0.15rem 0.5rem 0.15rem 0;
  margin-right: 0.25rem;
  color: var(--color-secondary);
  font-weight: 600;
}

@media (min-width: 769px) {
  .about p {
    text-align: justify;
    text-align-last: center;
  }
}

.about h3 {
  font-size: 2rem;
  margin: var(--spacing-xl) 0 var(--spacing-lg);
  font-family: var(--font-heading);
  color: var(--color-primary);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.stats-list li {
  padding: var(--spacing-md);
  background: #fff;
  border-radius: 12px;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border-left: 4px solid var(--color-primary);
}

.stats-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.stats-list strong {
  color: var(--color-primary);
  display: inline-block;
  min-width: 110px;
  font-weight: 700;
}

/* ===================================
   Portfolio Section
   =================================== */
.portfolio {
  background: var(--color-background-alt);
  padding: var(--spacing-xl) var(--spacing-sm);
  position: relative;
}

.portfolio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

.portfolio h2 {
  text-align: center;
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-xl);
  font-family: var(--font-heading);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.portfolio h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.portfolio-intro {
  font-size: 1.08rem;
  line-height: 1.85;
  max-width: 900px;
  margin: var(--spacing-md) auto var(--spacing-xl);
  padding: 0 var(--spacing-sm);
  color: var(--color-text-light);
  text-align: center;
  text-rendering: optimizeLegibility;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

@media (max-width: 768px) {
  .portfolio-intro {
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 95%;
    margin: var(--spacing-sm) auto var(--spacing-lg);
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  padding: var(--spacing-md) 0;
}

.gallery-portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.gallery-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(176,141,87,0.35);
  filter: grayscale(75%) sepia(18%) contrast(1.05) brightness(0.98);
}

.gallery-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-img:hover {
  transform: translateY(-6px) scale(1.015);
  filter: grayscale(10%) sepia(8%) contrast(1.08) brightness(1.02);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.gallery-img:hover::after {
  opacity: 1;
}

/* ===================================
   Overlay Styles
   =================================== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.overlay-image {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 90%;
  max-width: 600px;
  height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  font-weight: bold;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1002;
  pointer-events: auto;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}




/* ===================================
   Contact Section
   =================================== */
.contact {
  padding: var(--spacing-xl) var(--spacing-sm);
  text-align: center;
  background: linear-gradient(to bottom, #fafafa, #ffffff);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

.contact h2 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-heading);
  position: relative;
  display: inline-block;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.contact-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.btn-contact {
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  text-align: center;
}

.btn-contact {
  background: var(--color-primary);
  color: #fff;
  padding: 0.65rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  transition: var(--transition);
  min-width: 150px;
  text-align: center;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-contact:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.btn-contact:active {
  transform: translateY(0);
}

/* ===================================
   Footer
   =================================== */
footer {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: var(--spacing-md) 0;
  margin-top: var(--spacing-xl);
}

footer p {
  font-size: 0.95rem;
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-secondary);
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* ===================================
   Mobile Responsive Design
   =================================== */

/* Tablet and below */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
  }
  /* Force horizontal nav on mobile (user request) */
  header .container { position: relative; }
  .mobile-menu-toggle { display: none; }
  nav {
    position: static;
    top: auto;
    right: auto;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    padding-top: 0;
    box-shadow: none;
  }
  nav ul {
    flex-direction: row;
    gap: 1.25rem;
    align-items: center;
    justify-content: flex-end;
  }
  nav ul li { width: auto; }
  nav ul li a {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: none;
    font-size: 1rem;
    min-height: auto;
    align-items: center;
  }

  .hero {
    height: var(--hero-mobile-height);
  }

  .hero-image {
    height: var(--hero-mobile-height);
  }

  .hero-text {
    width: 95%;
  }

  .btn-primary {
    font-size: 1.25rem;
    padding: 0.875rem 1.5rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
  }

  .gallery-portfolio {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
  }

  .gallery-img {
    height: auto; /* Unrestricted height on tablet/mobile */
  }

  .stats-list {
    grid-template-columns: 1fr;
  }
  
  .stats-list li {
    padding: var(--spacing-lg);
    font-size: 1.1rem;
  }

  .overlay-image {
    width: 95%;
    height: 80vh;
  }

  .close-btn {
    top: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
    font-size: 2.5rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero {
    height: var(--hero-phone-height);
  }

  .hero-image {
    height: var(--hero-phone-height);
    object-position: center 40%; /* Slight upward focus on subject */
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-portfolio {
    grid-template-columns: 1fr;
  }

  .gallery-img {
    height: auto; /* Unrestricted height on small phones */
  }

  nav {
    width: 80%;
  }
}

/* Large screens */
@media (min-width: 1400px) {
  /* Maintain constant height on large screens */
}

/* ===================================
   Loading States & Transitions
   =================================== */
.gallery-img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.gallery-img[src] {
  animation: none;
  background: transparent;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Scroll reveal for sections */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Focus visible styles for better keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}  
/* ===================================
   Overrides: revert header/nav/hero to original style
   =================================== */
header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  font-family: 'Gellix','Georgia',serif;
  z-index: 101;
  letter-spacing: normal;
}
nav ul li a {
  color: #fff;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: var(--transition);
  font-variant: normal;
  letter-spacing: normal;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
nav ul li a[aria-current="page"]::after { content: none; }
.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-family: 'Gellix','Georgia',serif;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 3px;
  color: #f5f5dc; /* original lighter title color */
  margin-bottom: var(--spacing-md);
  text-shadow: 3px 3px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
  letter-spacing: 0.02em;
}
.hero-title::after { content: none; }