/* CSS Variables */
:root {
  /* Breakpoints - for reference and consistency */
  --breakpoint-xl: 900px;
  --breakpoint-lg: 800px;
  --breakpoint-md: 768px;
  --breakpoint-sm: 700px;
  --breakpoint-xs: 600px;
  --breakpoint-xxs: 480px;

  /* Typography scales */
  --font-h1-base: 8rem;
  --font-h1-sm: 5rem;
  --font-h1-xs: 2.9rem;
  --font-h2-base: 6rem;
  --font-project-p-base: 1.4rem;
}

body {
    font-weight: 400;
    font-style: normal;
    margin: 0;
    background: #fafafa;
    color: #222;
    font-family: "le-monde-livre-classic-byol", serif;
}

a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

h2, h3 {
  font-family: "new-hero", sans-serif;
}

h3 {
  font-family: "le-monde-livre-classic-byol", serif;
  font-size: 2em;
}

h1 {
  font-family: "ivypresto-display", serif;
  font-weight: 200;
  font-style: normal;
  font-size: var(--font-h1-base);
  line-height: 1.5;
  text-align: left;
}

/* Breakpoint: XL (900px) - var(--breakpoint-xl) */
@media (max-width: 900px) {
  h1, h2 {
    font-size: var(--font-h1-sm);
  }
}

/* Breakpoint: XS (600px) - var(--breakpoint-xs) */
@media (max-width: 600px) {
  h1, h2 {
    font-size: var(--font-h1-xs);
  }
}

h2 {
  font-family: "ivypresto-display", serif;
  font-weight: 200;
  font-style: normal;
  font-size: var(--font-h1-xs);
  line-height: 1;
  text-align: left;
}

/* Navigation */
.main-nav {
    font-family: "new-hero", sans-serif;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
}

.nav-logo {
    font-size: 1.25rem;
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.nav-logo:hover {
    color: #0066cc;
}

/* Logo SVG hover animation */
.logo-svg {
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-circle {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.logo-house {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.nav-logo:hover .logo-svg {
    transform: scale(1.05);
}

.nav-logo:hover .logo-circle {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.05));
}

.nav-logo:hover .logo-house {
    transform: translateY(-2px);
}

/* Dog easter egg animation */
.logo-dog {
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo:hover .logo-dog,
.nav-logo.dog-active .logo-dog {
    transform: translateY(0);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.interactive-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  perspective: 1000px;
  margin: 0;
  padding: 0;
}

.title-line {
  display: flex;
  justify-content: flex-start;
  line-height: 0.9;
}

.char {
  display: inline-block;
  transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}

.char::after {
  content: attr(data-char);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.interactive-title:hover .char::after {
  opacity: 0.2;
}

/* Add subtle animation on initial load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.char {
  animation: fadeInUp 0.6s ease-out backwards;
  animation-delay: calc(var(--char-index) * 0.03s);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .title-line {
    line-height: 0.85;
  }
}

@media (max-width: 600px) {
  .title-line {
    line-height: 0.85;
  }

  .char {
    animation-delay: calc(var(--char-index) * 0.02s);
  }
}

@media (max-width: 480px) {
  .interactive-title {
    gap: 10px;
  }
}

.nav-links a {
    color: #444;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: #0066cc;
}

.nav-link--about {
  font-weight: 600!important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 82%!important;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066cc;
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #222;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.05);
}

.hamburger:active {
    transform: scale(0.95);
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #444;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    color: #0066cc;
    transform: rotate(90deg);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-links li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-links li:last-child {
    border-bottom: none;
}

.sidebar-links a {
    font-family: "new-hero", sans-serif;
    display: block;
    padding: 1rem 1.5rem;
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0066cc;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-links a:hover {
    color: #0066cc;
    background: #f8f9fa;
    padding-left: 2rem;
}

.sidebar-links a:hover::before {
    transform: scaleY(1);
}

.sidebar-links a:active {
    background: #f0f0f0;
}

.section-title {
  margin-top: 7rem;
  margin-bottom: 5rem;
}

/* Footer */
.main-footer {
  font-family: "new-hero", sans-serif;
  background: white;
  border-top: 1px solid #eee;
  margin-top: 5rem;
  padding: 2rem 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copyright {
  color: #666;
  font-size: 0.9rem;
}

.footer-copyright p {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.footer-social a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  color: #0066cc;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 24px;
  height: 24px;
}

/* Footer responsive styles */
@media (max-width: 800px) {
  .footer-container {
    padding: 0 1rem;
  }
}

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-social {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .main-footer {
    padding: 1.5rem 0;
  }

  .footer-container {
    padding: 0 0.5rem;
  }

  .footer-copyright {
    font-size: 0.85rem;
  }

  .footer-social svg {
    width: 22px;
    height: 22px;
  }
}

/* Mobile responsive styles */
/* Breakpoint: XL (900px) - var(--breakpoint-xl) */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* Breakpoint: LG (800px) - var(--breakpoint-lg) */
@media (max-width: 800px) {
  .nav-container {
      height: 76px;
      padding: 0 1rem;
  }

  .nav-logo {
      font-size: 1.1rem;
  }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 780px) {
  .container {
      padding: 0 3rem;
  }
}

/* Breakpoint: XXS (480px) - var(--breakpoint-xxs) */
@media (max-width: 480px) {
  .container {
      padding: 0 0.5rem;
  }
}

header {
  text-align: left;
  padding-top: 9rem;
  padding-bottom: 5rem;
}

@media (max-width: 480px) {
  header {
    padding: 4rem 0;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
  gap: 1rem;
}

.card {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .2s;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

.card h3 {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  font-family: "ivypresto-display", serif;
  left: 0;
  margin: 0;
  padding: 2rem 3rem;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 30%, transparent 70%);
  color: white;
  font-size: 7rem;
  font-weight: 500;
  font-style: normal;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: background 0.3s ease;
}

.card:hover h3 {
  background: rgba(0, 0, 0, 0.8);
}

/* Breakpoint: MD (768px) - var(--breakpoint-md) */
@media (max-width: 768px) {
  .card h3 {
    font-size: 3.2rem;
    padding: 1.2rem 1.5rem;
  }
}

/* Breakpoint: XXS (480px) - var(--breakpoint-xxs) */
@media (max-width: 480px) {
  .card h3 {
    font-size: 3rem;
    padding: 1rem 1.2rem;
  }
}

/* Base gallery styles */
.gallery {
  padding: 1rem;
}

.gallery img {
  width: 100%;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dynamic masonry layout (JavaScript-based) */
.gallery--masonry {
  position: relative;
  width: 100%;
  min-height: 50vh;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery--masonry.masonry-ready {
  opacity: 1;
}

.gallery--masonry img {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Stacked layout */
.gallery--stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery--stack img {
  width: 100%;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 9999;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
}

#lightbox .lightbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 96vw;
  max-height: 96vh;
  padding: 10px;
  box-sizing: border-box;
}

.lb-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#lightbox img.lb-image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  transition: opacity 0.28s ease, transform 0.28s ease;
  opacity: 0;
  transform: scale(0.99);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

#lightbox img.lb-image.fade-in {
  opacity: 1;
  transform: scale(1);
}

.lb-caption {
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-btn {
  background: rgba(255,255,255,0.08);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.16s ease, transform 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lb-btn:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.lb-btn:active {
  transform: translateY(0);
}

/* Responsive adjustments */
/* Breakpoint: MD (768px) - var(--breakpoint-md) */
@media (max-width: 768px) {
  .gallery--masonry {
    padding: 0.5rem;
  }

  .gallery--stack {
    gap: 15px;
    padding: 0.5rem;
  }

  .gallery--stack img {
    max-height: 70vh;
  }
}

/* Breakpoint: SM (700px) - var(--breakpoint-sm) */
@media (max-width: 700px) {
  .lb-btn {
    padding: 8px 10px;
    font-size: 1rem;
  }

  .lb-caption {
    font-size: 0.85rem;
  }

  #lightbox .lightbox-wrapper {
    gap: 8px;
    padding: 6px;
  }
}

/* Breakpoint: XXS (480px) - var(--breakpoint-xxs) */
@media (max-width: 480px) {
  .gallery--masonry {
    padding: 0.25rem;
  }

  .gallery--stack {
    gap: 12px;
    padding: 0.25rem;
  }

  .gallery--stack img {
    max-height: 60vh;
  }
}

.intro-text {
  font-size: 1.4rem;
  line-height: 1.5;
  margin-top: 5rem;
  color: #444;
  font-family: "new-hero", sans-serif;

  @media (max-width: 480px) {
    font-size: 1rem;
    margin-top: 2em;
  }

  span {
    font-size: 65%;
  }
}

.project-content {
  margin: 2rem auto;
  padding: 0;
  line-height: 1.7;
  font-size: 1.1rem;
  color: #444;
}

.project-content p {
  margin-bottom: 1.2rem;
  font-size: var(--font-project-p-base);
  font-weight: 200;
  column-count: 2;

  @media (max-width: 900px) {
    column-count: 1;
  }
}

/* Responsive typography for project content */
/* Breakpoint: XL (900px) - var(--breakpoint-xl) */
@media (max-width: 900px) {
  .project-content p {
    font-size: 1.9rem;
  }
}

/* Breakpoint: MD (768px) - var(--breakpoint-md) */
@media (max-width: 768px) {
  .project-content p {
    font-size: 1.5rem;
  }
}

/* Breakpoint: XS (600px) - var(--breakpoint-xs) */
@media (max-width: 600px) {
  .project-content p {
    font-size: 1.3rem;
  }
}

/* Breakpoint: XXS (480px) - var(--breakpoint-xxs) */
@media (max-width: 480px) {
  .project-content p {
    font-size: 1.1rem;
  }
}

.project-content p:last-child {
  margin-bottom: 3em;
}

.project-content h1,
.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5,
.project-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
  font-weight: 600;
}

.project-content h1:first-child,
.project-content h2:first-child,
.project-content h3:first-child {
  margin-top: 0;
}

.project-content ul,
.project-content ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.project-content li {
  margin-bottom: 0.5rem;
}

.project-content blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid #ddd;
  font-style: italic;
  color: #666;
}

.project-content a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

.project-content a:hover {
  border-bottom-color: #0066cc;
}

/* Breakpoint: SM (700px) - var(--breakpoint-sm) */
@media (max-width: 700px) {
  .project-content {
    margin: 1.5rem auto;
    padding: 0 0.5rem;
    font-size: 1rem;
  }
}

/* Content page styling */
.about-page p {
  margin-bottom: 1.2rem;
  font-size: var(--font-project-p-base);
  font-weight: 100;
  line-height: 1.5;
}

.about-page .about-page-intro{
  position: relative;
  font-style: italic;
  font-size: 2.2rem;
  line-height: 1.5;
}

.about-page h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
  font-weight: 600;
  font-size: 1.5rem;
}

.shop-notice {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f5f5f5;
  border-radius: 8px;
  text-align: center;
}

/* Breakpoint: SM (700px) - var(--breakpoint-sm) */
@media (max-width: 700px) {
  .content-page {
    margin: 1.5rem auto;
    padding: 0 0.5rem;
    font-size: 1rem;
  }

  .content-page h2 {
    font-size: 1.3rem;
  }
}
