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

/* ===============================================
   CSS VARIABLES
   =============================================== */
:root {
  /* Layout */
  --side-pad: clamp(20px, 4vw, 60px);
  --project-card-w: 520px;
  --project-gap: 30px;
  
  /* Typography */
  --hero-text-offset: 152px;
  
   /* Z-index layers */
  --z-base: 1;
  --z-blur: 2;
  --z-content: 3;

  --z-toggle: 900;   /* theme toggle */
  --z-nav: 1000;     /* main nav bar */
  --z-menu: 1100;    /* hamburger label + mobile overlay */

  --z-modal: 9999;
  --z-modal-controls: 10000;

  
  /* Colors */
  --color-primary: #DE5456;
  --color-secondary: #E6A15C;
  --color-accent: #5A5E78;
  --color-text-muted: #999;
}

/* ===============================================
   RESET & BASE STYLES
   =============================================== */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===============================================
   THEME COLORS
   =============================================== */
body.dark {
  background-color: #0a0a0a;
  color: #fff;
}

body.light {
  background-color: #f5f5f5;
  color: #333;
}

/* ===============================================
   NAVIGATION
   =============================================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--side-pad);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: var(--z-nav);
  max-width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
  transition: background-color 0.3s, top 0.3s ease-in-out;
  background-color: transparent;
}

.logo h1 {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--color-primary);
}

.logo p{
  font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 4.7px;
  margin-top: 2px;
  line-height: 1;
  color: var(--color-accent);

  /* keeps it from overflowing weirdly */
  white-space: nowrap;
  max-width: 100%;
}



.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-shrink: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  transition: color 0.3s;
}

body.dark .nav-links a {
  color: var(--color-secondary);
}

body.light .nav-links a {
  color: var(--color-primary);
}

body.dark .nav-links a:hover {
  color: var(--color-primary);
}

body.light .nav-links a:hover {
  color: var(--color-accent);
}

/* Focus states for accessibility */
.nav-links a:focus,
.contact-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.contact-btn {
  background: linear-gradient(135deg, #ff6b6b, var(--color-primary));
  color: white !important;
  padding: 12px 30px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* ===============================================
   HERO SECTION
   =============================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 20px 50px;
  position: relative;
}

.hero-image {
  max-width: 650px;
  width: 90%;
  margin-bottom: -30px;
}

.hero-image img {
  width: 100%;
  height: auto;
}

.hero-text {
  text-align: center;
  width: 100%;
  position: relative;
  min-height: 200px;
}

.hero-text h2 {
  font-size: clamp(72px, 9vw, 140px);
  font-weight: 400;
  font-family: "American Typewriter", Georgia, serif;
  letter-spacing: 5px;
  margin: 0;
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  width: min(800px, 92vw);
  max-width: 92vw;
  overflow: hidden;
}

.hero-text h2 span::after {
  content: '|';
  animation: blink 0.7s infinite;
  background: var(--color-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-text h3 {
  font-family: Avenir Next Condensed;
  font-weight: 200;
  font-size: clamp(32px, 4.5vw, 64px);
  margin-bottom: -5px;
  margin-top: var(--hero-text-offset);
  line-height: 1.2;
}

body.dark .hero-text h3 { color: #999; }
body.light .hero-text h3 { color: #666; }

.hero-text h3 .name {
  font-weight: bold;
  color: var(--color-secondary);
}

.hero-text p {
  font-family: "Avenir Next Condensed", Arial, sans-serif;
  font-size: 26px;
  letter-spacing: 11px;
  text-transform: uppercase;
}

body.dark .hero-text p { color: #666; }
body.light .hero-text p { color: #999; }

/* ===============================================
   MODE TOGGLE
   =============================================== */
.mode-toggle {
  position: fixed;
  bottom: 30px;
  right: 60px;
  cursor: pointer;
  z-index: var(--z-nav);
  width: 130px;
  height: 60px;
  overflow: visible;
  border-radius: 27px;
  transition: transform 0.3s;
}

.mode-toggle:hover {
  transform: scale(1.05);
}

.mode-toggle:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.toggle-slider {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-toggle:hover .toggle-slider {
  will-change: transform;
}

.toggle-slider svg {
  width: 130px;
  height: 60px;
  object-fit: cover;
}

body.dark .toggle-slider {
  transform: translateX(0);
}

body.light .toggle-slider {
  transform: translateX(-130px);
}

/* ===============================================
   PROJECTS SECTION
   =============================================== */
.projects-section {
  min-height: 100vh;
  padding: 23px 20px 100px;
  position: relative;
  overflow: hidden;
}

.projects-title {
  font-family: Bebas Neue;
  font-size: 360px;
  font-weight: bold;
  letter-spacing: 20px;
  text-align: center;
  margin-bottom: -100px;
  position: relative;
  z-index: var(--z-base);
  color: var(--color-accent);
  text-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.blur-shape {
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1200px;
  background: rgba(90, 94, 120, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: var(--z-blur);
  clip-path: polygon(0 10%, 100% 0%, 100% 100%, 0 100%);
}

.projects-scroll-wrapper {
  position: relative;
  z-index: var(--z-content);
  margin-top: 50px;
}

.projects-container {
  display: grid;

  /* ✅ two visible rows */
  grid-template-rows: repeat(2, auto);

  /* ✅ fill down the rows, then continue to the right (creates horizontal overflow) */
  grid-auto-flow: column;

  /* ✅ each “column” is one card width */
  grid-auto-columns: var(--project-card-w);

  gap: var(--project-gap);

  overflow-x: auto;
  overflow-y: hidden;

  padding: 40px var(--side-pad);

  scroll-behavior: smooth;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}


.projects-container::-webkit-scrollbar {
  display: none;
}

.project-card {
  width: var(--project-card-w);
  background: #252525;
  border-radius: 5px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  scroll-snap-align: start;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  margin-bottom: 15px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  row-gap: 10px;
  max-width: 100%;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 15px;
  font-weight: bold;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

body.dark .tag {
  background: rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

body.light .tag {
  background: rgba(255, 111, 0, 0.2);
  color: var(--color-secondary);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--color-accent);
}

/* ===============================================
   MODAL
   =============================================== */
.modal {
  display: none;
  position: fixed;
  z-index: var(--z-modal);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  padding: 0;
}

.modal img {
  display: block;
  margin: 0;
  max-width: 80%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: grab;
  transform-origin: top center;
}

.modal img:active {
  cursor: grabbing;
}

.close-modal {
  position: fixed;
  top: 30px;
  right: 50px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  z-index: var(--z-modal-controls);
}

.close-modal:hover,
.close-modal:focus {
  color: var(--color-primary);
  outline: none;
}

.zoom-controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: var(--z-modal-controls);
}

/* =========================
   GLASS MODAL BUTTONS
========================= */

.zoom-controls button {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;

  color: #fff;
  width: 42px;
  height: 42px;

  font-size: 18px;
  font-weight: 600;

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

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 12px 30px rgba(0,0,0,0.35);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px) scale(1.06);
}

.zoom-controls button:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.35),
    0 8px 18px rgba(0,0,0,0.25);
}

#reset-zoom-btn,
#resume-reset-zoom-btn,
#resume-download-btn {
  width: auto;
  padding: 0 22px;
  height: 42px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
}

body.light .zoom-controls button {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #111;
}

.zoom-controls button:hover svg,
.zoom-controls button:hover {
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.35));
}


/* ===============================================
   SERVICES SECTION
   =============================================== */
.services-section {
  min-height: 100vh;
  padding: 50px 20px 100px;
  position: relative;
}

.services-title {
  font-family: Bebas Neue;
  font-size: 360px;
  font-weight: bold;
  letter-spacing: 20px;
  text-align: center;
  margin-bottom: -160px;
  position: relative;
  z-index: var(--z-base);
  color: var(--color-accent);
  text-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  position: relative;
  z-index: var(--z-blur);
}

.service-card {
  background: rgba(90, 94, 120, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 20px;
  line-height: 1.4;
  min-height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

body.dark .service-title {
  color: #ff6b6b;
}

body.light .service-title {
  color: #ff5252;
}

.service-description {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.8;
}

body.dark .service-description {
  color: #ccc;
}

body.light .service-description {
  color: var(--color-accent);
}

/* ===============================================
   ABOUT SECTION
   =============================================== */
.about-section {
  min-height: 100vh;
  padding: 50px 20px 160px;
  position: relative;
}

.about-title {
  display: none;
  color: var(--color-accent);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  position: relative;
  z-index: var(--z-blur);
}

.about-content::before {
  content: '';
  position: absolute;
  top: 200px;
  left: 0;
  right: 0;
  bottom: -170px;
  background: rgba(90, 94, 120, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  z-index: -1;
}

body.light .about-content::before {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-primary);
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.about-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

body.dark .about-image-dark {
  display: block;
}

body.dark .about-image-light {
  display: none;
}

body.light .about-image-dark {
  display: none;
}

body.light .about-image-light {
  display: block;
}

.about-text h3 {
  font-family: Verdana;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

body.dark .about-text h3 {
  color: #999;
}

body.light .about-text h3 {
  color: #666;
}

.about-text p {
  font-family: Verdana;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

body.dark .about-text p {
  color: #ccc;
}

body.light .about-text p {
  color: #555;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 270px;
}

.skills-title {
  font-family: Bebas Neue;
  font-size: 80px;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 30px;
}

body.dark .skills-title {
  color: #ff6b6b;
}

body.light .skills-title {
  color: #ff5252;
}

.skill-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 0px;
}

.skill-item label {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  min-width: 180px;
  flex-shrink: 0;
  color: #7d82a1;
}

.skill-bar {
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #ff6b6b 0%, #ffa726 100%);
  border-radius: 20px;
  overflow: visible;
  position: relative;
}

.skill-fill {
  height: 100%;
  background: transparent;
  border-radius: 20px;
  transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  width: 0;
}

.skill-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background: #e8e8e8;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(107, 122, 153, 0.5);
  border: 4px solid #2d3748;
}

body.light .skill-fill::after {
  background: #6b7a99;
  border-color: #e8e8e8;
}

.skill-fill.animated {
  width: var(--skill-width);
}

.resume-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  margin: 30px auto 0;
  display: block;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: var(--z-content);
}

.resume-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.resume-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

/* ===============================================
   PHOTOGRAPHY SECTION
   =============================================== */
.photography-section {
  min-height: 80vh;
  padding: 20px 20px 10px;
  position: relative;
  overflow: visible;
}

body.dark .photography-section {
  background-color: #1E202C;
}

body.light .photography-section {
  background-color: #e8e8e8;
}

.photography-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(80px, 18vw, 360px);
  font-weight: bold;
  letter-spacing: clamp(5px, 1.2vw, 20px);
  text-align: center;
  margin-bottom: 0;
  position: relative;
  z-index: var(--z-base);
  color: var(--color-accent);
  text-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.title-full {
  display: inline;
}

.title-split {
  display: none;
}

.gallery-wrapper {
  position: relative;
  overflow: hidden;
  padding: 0 40px;
  z-index: var(--z-content);
  margin-top: -150px;
}

.gallery-scroll {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: auto;            /* IMPORTANT: stop fighting JS teleport */
  -webkit-overflow-scrolling: touch; /* iOS momentum */
  padding: 60px 0 60px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.photo-bunch {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  position: relative;
}

.photo-frame {
  flex-shrink: 0;
  background: white;
  padding: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: var(--z-base);
}

.photo-bunch .photo-frame:not(:first-child) {
  margin-left: -40px;
}

.photo-frame:nth-child(odd) {
  transform: translateY(-40px);
}

.photo-frame:nth-child(even) {
  transform: translateY(40px);
}

.photo-frame:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: var(--z-content);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(60%) contrast(90%);
  transition: filter 0.3s ease;
}

.photo-frame:hover img {
  filter: sepia(0%) contrast(100%);
}

/* Photo sizes */
.size-small { 
  width: 320px;
  height: 230px;
}

.size-medium { 
  width: 400px;
  height: 290px;
}

.size-large { 
  width: 480px;
  height: 350px;
}

.size-portrait { 
  width: 350px;
  height: 470px;
}

.size-square { 
  width: 380px;
  height: 380px;
}

.scroll-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-content);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 24px;
  user-select: none;
}

body.dark .scroll-indicator {
  background: rgba(90, 94, 120, 0.9);
  color: #ffa726;
}

body.light .scroll-indicator {
  background: rgba(255, 255, 255, 0.9);
  color: #4a4e5c;
}

.scroll-indicator:hover {
  transform: translateY(-50%) scale(1.1);
}

body.dark .scroll-indicator:hover {
  background: rgba(90, 94, 120, 1);
}

body.light .scroll-indicator:hover {
  background: white;
}

.scroll-indicator:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.scroll-left { left: 10px; }
.scroll-right { right: 10px; }

/* Photo modal */
.modal--clear { 
  background-color: transparent !important;
} 

#photo-modal { 
  align-items: center;
} 

#photo-modal .photo-modal-frame { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  width: auto; 
  height: auto;
  max-width: 88vw; 
  max-height: 74vh; 
} 

#photo-modal .photo-modal-frame img { 
  display: block; 
  width: auto; 
  height: auto;
  max-width: calc(92vw - 36px);
  max-height: calc(78vh - 36px);
  object-fit: contain; 
  margin: 0; 
  padding: 0; 
  filter: none !important; 
} 

#photo-close-btn { 
  color: #fff; 
  text-shadow: 0 8px 25px rgba(0,0,0,0.45); 
} 

body.light #photo-close-btn { 
  color: #111; 
  text-shadow: 0 8px 25px rgba(255,255,255,0.45); 
}

/* =========================
   Photography Modal – Large Image View
========================= */


/* ===============================================
   CONTACT SECTION
   =============================================== */
.contact-section {
  min-height: 80vh;
  padding: 20px 20px;
  position: relative;
}

body.dark .contact-section {
  background-color: #0a0a0a;
}

body.light .contact-section {
  background-color: #f5f5f5;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  align-items: center;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-illustration {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.contact-illustration img {
  width: 100%;
  height: auto;
}

body.dark .contact-dark-img {
  display: block;
}

body.dark .contact-light-img {
  display: none;
}

body.light .contact-dark-img {
  display: none;
}

body.light .contact-light-img {
  display: block;
}

.contact-text {
  font-family: Verdana;
  font-size: 15px;
  line-height: 1.8;
}

body.dark .contact-text {
  color: #999;
}

body.light .contact-text {
  color: #666;
}

.contact-text p {
  margin-bottom: 15px;
}

.contact-right {
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-family: 'Bebas Neue';
  font-size: 80px;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 30px;
}

body.dark .contact-title {
  color: #ff6b6b;
}

body.light .contact-title {
  color: #ff5252;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  border-radius: 5px;
  border: 2px solid transparent;
  font-family: Verdana;
  font-size: 14px;
  transition: border-color 0.3s;
}

body.dark .contact-form input[type="text"],
body.dark .contact-form input[type="email"],
body.dark .contact-form textarea {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

body.light .contact-form input[type="text"],
body.light .contact-form input[type="email"],
body.light .contact-form textarea {
  background: white;
  color: #333;
  border-color: #ddd;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ff6b6b;
}

.contact-form textarea {
  resize: none;
  min-height: 120px;
  overflow-y: auto;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.submit-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: white;
  padding: 15px 50px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.submit-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Inline form status */
.form-status {
  min-height: 1.25em;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-status.is-success {
  border-color: rgba(46, 204, 113, 0.35);
}

.form-status.is-error {
  border-color: rgba(255, 107, 107, 0.45);
}

.form-status.is-loading {
  opacity: 1;
  transform: translateY(0);
}


/* ===============================================
   FOOTER SECTION
   =============================================== */
.footer-section {
  padding: 40px 20px 30px;
  position: relative;
}

body.dark .footer-section {
  background: rgba(90, 94, 120, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.light .footer-section {
  background-color: #FFFFFF;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.footer-logo h1 {
  font-size: 44px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--color-primary);
}

.footer-logo p {
  font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 8.2px;
  margin-top: 2px;
  line-height: 1;
  color: var(--color-accent);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-column a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.3s;
  color: var(--color-accent);
}

body.dark .footer-column a:hover {
  color: #ffa726;
}

body.light .footer-column a:hover {
  color: #ff6f00;
}

.footer-column a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-illustration {
  width: 100%;
  max-width: 700px;
  height: auto;
}

body.dark .footer-dark-img {
  display: block;
}

body.dark .footer-light-img {
  display: none;
}

body.light .footer-dark-img {
  display: none;
}

body.light .footer-light-img {
  display: block;
}

.footer-bottom {
  text-align: center;
  margin-top: 60px;
  padding-top: 30px;
}

.footer-bottom p {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--color-accent);
}

/* ===============================================
   HAMBURGER MENU
   =============================================== */
/* Mobile menu must be above everything */
.nav,
.mobile-nav {
  position: fixed;
  z-index: 1000;
}

/* Theme toggle default stacking */
.mode-toggle,
#mode-toggle {
  position: relative;
  z-index: 100;
}

/* When menu is open, push toggle behind + disable it */
body.menu-open .mode-toggle,
body.menu-open #mode-toggle {
  z-index: 1;
  pointer-events: none;
  opacity: 0; /* optional visual feedback */
  display: none; /* strongest possible */
}

.menu-icon {
  position: fixed;
  top: 0;
  right: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.menu-icon + label {
  position: fixed;
  top: 30px;
  right: 40px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: var(--z-menu);
  display: none;
}

.menu-icon + label::before,
.menu-icon + label::after {
  content: "";
  position: absolute;
  left: 0;
  width: 30px;
  height: 3px;
  transition: all 0.3s ease;
  background: var(--color-primary);
}

.menu-icon + label::before {
  top: 8px;
}

.menu-icon + label::after {
  top: 18px;
}

.menu-icon:checked + label::before {
  transform: rotate(45deg);
  top: 13px;
}

.menu-icon:checked + label::after {
  transform: rotate(-45deg);
  top: 13px;
}

.mobile-nav {
  position: fixed;
  top: 13px;
  right: 16px;
  width: 70px;
  height: 70px;
  z-index: var(--z-menu);
  overflow: hidden;
  animation: border-transform 7s linear infinite;
  transition: width 0.7s ease, height 0.7s ease, top 0.7s ease, right 0.7s ease;
  display: none;
  background: #353746;
}

.menu-icon:checked ~ .mobile-nav {
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  width: 200%;
  height: 200%;
  animation-play-state: paused;
}

@keyframes border-transform {
  0%, 100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
  50% { border-radius: 40% 60% 60% 40% / 50% 60% 40% 50%; }
}

.mobile-nav ul {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: all 0.3s ease;
  margin: 20px 0;
}

.menu-icon:checked ~ .mobile-nav ul li {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-icon:checked ~ .mobile-nav ul li:nth-child(1) { transition-delay: 0.7s; }
.menu-icon:checked ~ .mobile-nav ul li:nth-child(2) { transition-delay: 0.8s; }
.menu-icon:checked ~ .mobile-nav ul li:nth-child(3) { transition-delay: 0.9s; }
.menu-icon:checked ~ .mobile-nav ul li:nth-child(4) { transition-delay: 1.0s; }
.menu-icon:checked ~ .mobile-nav ul li:nth-child(5) { transition-delay: 1.1s; }

.mobile-nav ul li a {
  font-size: 6vh;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
  color: var(--color-primary);
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a:focus {
  color: #fff;
  outline: none;
}

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

/* Desktop Large - Push hero elements up slightly */
@media (min-width: 1025px) {
  .hero-image { 
    transform: translateY(-60px); 
  }
  .hero-text { 
    transform: translateY(-30px); 
  }
}

/* Desktop Small / Tablet Large - 1200px */
@media (max-width: 1200px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .about-title {
    font-size: 200px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet - 1024px */
@media (max-width: 1024px) {
  :root { 
    --project-card-w: 400px; 
  }
  
  /* Hide desktop navigation, show hamburger */
  .nav-links {
    display: none;
  }
  
  .menu-icon + label {
    display: block;
  }
  
  .mobile-nav {
    display: block;
  }
  
  nav {
    justify-content: flex-start;
    padding: 20px 40px;
  }
  
  /* Hero Section */
  .hero {
    padding: 80px 20px 40px;
  }
  
  .hero-image {
    max-width: 500px;
  }
  
  .hero-text h2 {
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .hero-text h3 {
    margin-top: 106px;
  }
  
  .hero-text p {
    font-size: 22px;
    letter-spacing: 8px;
  }
  
  /* Projects Section */
  .projects-title {
    font-size: 200px;
    letter-spacing: 15px;
    margin-bottom: -80px;
  }

  .projects-container {
    display: grid;
    grid-template-columns: repeat(5, var(--project-card-w)); 
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 30px 40px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    grid-auto-flow: row;
  }
    
  .blur-shape {
    top: 100px;
    height: 900px;
  }
  
  .projects-container::-webkit-scrollbar {
    display: none;
  }

  .project-card img {
    height: 200px;
  }
    
  /* Services Section */
  .services-title {
    font-size: 200px;
    letter-spacing: 15px;
    margin-bottom: -120px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 40px;
  }
    
  /* About Section */
  .about-content {
    gap: 60px;
    padding: 0 20px;
  }
  
  .about-content::before {
    top: 200px;
    bottom: -150px;
  }
  
  .about-right {
    margin-top: 50px;
  }
  
  .skills-title {
    font-size: 60px;
  }
  
  .skill-item label {
    min-width: 150px;
    font-size: 12px;
  }
  
  .about-image-wrapper {
    max-width: 620px;
    margin: 0 auto;
  }
    
  /* Photography Section */
  .photography-section {
    padding-top: 120px;
    padding-bottom: 100px;
  }
  
  .photography-title {
    font-size: 150px;
    letter-spacing: 12px;
    margin-bottom: 30px;
  }
  
  .gallery-wrapper {
    padding: 0 20px;
    margin-top: -100px;
  }
  
  .gallery-scroll {
    gap: 50px;
    padding: 40px 0 30px;
    overflow-y: hidden;
    align-items: center;
  }
  
  .size-small { width: 240px; height: 180px; }
  .size-medium { width: 300px; height: 220px; }
  .size-large { width: 360px; height: 260px; }
  .size-portrait { width: 260px; height: 360px; }
  .size-square { width: 290px; height: 290px; }

  /* Contact Section */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 0 40px;
    margin-top: -80px;
  }
  
  .contact-title {
    font-size: 60px;
  }
  
  .contact-illustration {
    max-width: 500px;
    margin: 0 auto;
  }
    
  /* Footer Section */
  .footer-section {
    margin-top: 100px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 40px;
  }

  .footer-left,
  .footer-right {
    margin: 0;
  }
  
  .footer-left { 
    margin-top: 20px; 
  }

  .footer-logo {
    text-align: center;
  }

  .footer-links {
    justify-items: center;
    text-align: center;
  }

  .footer-column {
    align-items: center;
  }

  .footer-right {
    justify-content: center;
  }

  .footer-illustration {
    max-width: 600px;
  }

  .footer-bottom {
    margin-top: 20px;
    padding-top: 10px;
  }
}

/* Mobile - 768px */
@media (max-width: 768px) {
  :root {
    --project-card-w: 350px;
  }

  body {
    overflow-x: hidden;
  }

  .blur-shape {
    top: 3%;
    height: 100%;
    clip-path: polygon(0 8%, 100% 5%, 100% 100%, 0 100%);
  }

  /* Hero */
  .hero {
    padding: 60px 20px 30px;
    min-height: 100vh;
  }

  .hero-image {
    max-width: 350px;
    width: 100%;
    margin-bottom: -20px;
  }

  .hero-text {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text h2 {
    width: 100%;
    margin: 0 auto;
    min-height: 1.2em;
    min-width: 150px;
  }

  .hero-text h3 {
    margin-top: 84px;
    text-align: center;
  }

  .hero-text p {
    font-size: 16px;
    letter-spacing: 5px;
  }

  /* Mode Toggle */
  .mode-toggle {
    bottom: 76px;
    right: 76px;
    width: 80px;
    height: 20px;
  }

  .toggle-slider svg {
    width: 80px;
    height: 34px;
  }

  /* Mobile Menu */
  .mobile-nav ul li a {
    font-size: 9vw;
    font-weight: 800;
  }

  .menu-icon + label {
    right: 20px;
    top: 25px;
  }

  .mobile-nav {
    right: 5px;
    top: 10px;
  }

  /* Projects */
  .projects-title {
    font-size: clamp(90px, 19vw, 250px);
    letter-spacing: clamp(2px, 1vw, 8px);
    text-align: center;
    white-space: normal;
    max-width: 95%;
    margin: 0 auto;
  }

  .projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--project-card-w));
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    grid-auto-flow: column;
    padding: 20px;
    scroll-snap-type: x proximity;
  }

  .project-card {
    width: var(--project-card-w);
    scroll-snap-align: start;
  }

  /* Services */
  .services-section {
    margin-top: 40px;
  }

  .services-title {
    font-size: 100px;
    letter-spacing: 8px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
    margin-top: 70px;
  }

  /* About */
  .about-section {
    margin-top: -40px;
  }

  .about-content {
    padding: 0 20px;
  }

  .about-content::before {
    top: 90px;
  }

  .about-right {
    margin-top: 30px;
  }

  .skills-title {
    font-size: 50px;
  }

  .skill-item label {
    min-width: 120px;
    font-size: 11px;
  }

  .skill-item {
    display: grid;
    grid-template-columns: 134px 1fr;
    align-items: center;
    gap: 20px;
  }

  /* Photography */
  .photography-section {
    padding: 90px 20px 90px;
    margin-top: 60px;
  }

  .photography-title {
    margin-bottom: -40px;
  }

  .title-full {
    display: none;
  }

  .title-split {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
    position: relative;
    width: 100%;
  }

  .title-split .photo {
    font-size: 140px;
    line-height: 0.85;
    padding-left: 0px;
    position: relative;
    z-index: var(--z-blur);
  }

  .title-split .graphy {
    font-size: 116px;
    line-height: 0.85;
    padding-left: 0px;
    margin-top: -35px;
    position: relative;
    z-index: var(--z-base);
    opacity: 0.99;
  }

  .gallery-wrapper {
    padding: 0 15px;
    margin-top: -60px;
  }

  .gallery-scroll {
    margin-top: 10px;
    padding: 52px 0 80px;
    gap: 40px;
    overflow-y: hidden;
  }

  .size-small { width: 220px; height: 160px; }
  .size-medium { width: 270px; height: 200px; }
  .size-large { width: 320px; height: 240px; }
  .size-portrait { width: 250px; height: 340px; }
  .size-square { width: 260px; height: 260px; }

  /* Contact */
  .contact-illustration {
    transform: translateY(10px);
  }

  .contact-container {
    padding: 0 20px;
    margin-top: -40px;
  }

  .contact-title {
    font-size: 50px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-btn {
    width: 100%;
  }

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr;
    padding: 0 20px;
    gap: 40px;
    text-align: center;
  }

  .footer-left {
    align-items: center;
  }

  .footer-logo {
    text-align: center;
  }

  .footer-logo h1 {
    font-size: 32px;
  }

  .footer-logo p {
    font-size: 14px;
    letter-spacing: 8px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .footer-links .footer-column:first-child { 
    padding-bottom: 25px; 
    margin-bottom: 19px; 
    border-bottom: 1px solid rgba(255,255,255,0.15); 
  }

  body.light .footer-links .footer-column:first-child {
    border-bottom: 1px solid rgba(0,0,0,0.15);
  }

  .footer-column {
    align-items: center;
  }

  .footer-right {
    justify-content: center;
    padding: 0;
  }

  .footer-illustration {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }
}

/* =========================
   FIX: Mobile menu must cover theme toggle
   (works with body.menu-open from JS)
========================= */

/* Theme toggle baseline (below menu) */
.mode-toggle,
#mode-toggle {
  position: fixed;
  z-index: var(--z-toggle); /* 900 */
}

/* Mobile menu overlay */
.mobile-nav {
  z-index: var(--z-menu); /* 1100 */
}

/* Hamburger icon ALWAYS on top */
.menu-icon + label {
  z-index: 2000; /* explicit, no calc, no surprises */
}

/* When menu is open: hide + disable toggle */
body.menu-open .mode-toggle,
body.menu-open #mode-toggle {
  display: none;
  pointer-events: none;
}


/* ===============================================
   FIX: Hamburger icon always visible above overlay
   =============================================== */

/* 1) Remove/avoid .nav conflicts (you do not use .nav) */
.nav { 
  position: static !important;
  z-index: auto !important;
}

/* 2) Make hamburger label always above the blob overlay */
.menu-icon + label {
  z-index: calc(var(--z-menu) + 2) !important;
}

/* 3) Keep the overlay under the label */
.mobile-nav {
  z-index: var(--z-menu) !important;
}

/* 4) When menu is open, ensure label stays clickable */
.menu-icon:checked + label {
  pointer-events: auto !important;
}

/* 5) Keep theme toggle below menu layer */
.mode-toggle,
#mode-toggle {
  z-index: var(--z-toggle) !important;
}

/* ===============================================
   CLEAN, NEUTRAL FOCUS STYLES (FINAL OVERRIDE)
=============================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Light mode tweak */
body.light :focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.25);
}

/* ===============================================
   REMOVE CHROME/SAFARI FOCUS RINGS + TAP HIGHLIGHT
   Paste at very bottom of CSS
=============================================== */

/* Kill focus rings everywhere */
*:focus,
*:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Kill Safari/Chrome tap highlight (mobile + sometimes desktop click flash) */
a, button, label, input, textarea, select,
.mode-toggle, #mode-toggle,
.menu-icon + label,
.nav-links a,
.footer-column a,
.mobile-nav a {
  -webkit-tap-highlight-color: transparent;
}

/* If your toggle is a button or has internal SVG/img, kill any focus styling there too */
.mode-toggle:focus,
.mode-toggle:focus-visible,
#mode-toggle:focus,
#mode-toggle:focus-visible,
.mode-toggle *:focus,
.mode-toggle *:focus-visible,
#mode-toggle *:focus,
#mode-toggle *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* If any element is getting a border on focus from earlier rules, nuke it */
a:focus, a:focus-visible,
button:focus, button:focus-visible,
label:focus, label:focus-visible,
input:focus, input:focus-visible {
  border-color: transparent !important;
}

/* =========================
   PHOTO MODAL – LARGE IMAGE, NO OVERSIZED FRAME
========================= */



/* Frame shrinks to image */
#photo-modal .photo-modal-frame {
  max-width: 88vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image scales UP but keeps natural proportions */
#photo-modal #photo-modal-image {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;

  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* =========================
   PHOTO MODAL – GLASS FRAME (BIGGER)
========================= */

#photo-modal .photo-modal-frame {
  padding: 14px; /* was 16px → slightly tighter */
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* 🔥 Bigger image */
#photo-modal #photo-modal-image {
  max-width: 98vw;  /* was ~92 */
  max-height: 98vh; /* was ~92 */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

/* =========================
   FIX: Photo modal frame on mobile
========================= */

@media (max-width: 768px) {

  #photo-modal .photo-modal-frame {
    padding: 14px;                 /* tighter frame */
    max-width: 100vw;
    box-sizing: border-box;
  }

  #photo-modal #photo-modal-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
  }
}

/* =========================
   FIX: Balanced modal spacing
========================= */

.modal {
  padding: 48px 32px;              /* TOP/BOTTOM | LEFT/RIGHT */
  box-sizing: border-box;
  align-items: center;             /* vertical centering */
  justify-content: center;         /* horizontal centering */
}

.modal {
  backdrop-filter: blur(12px);
}

/* Image inside project & resume modals */
#project-modal img,
#resume-modal img {
  max-height: calc(100vh - 200px); /* leaves space for controls */
  max-width: 100%;
  margin: auto;
  display: block;
}


#project-modal img,
#resume-modal img {
  border-radius: 6px;
}

#project-modal,
#resume-modal {
  border-radius: 8px;
}

/* =========================
   MODAL BUTTONS – DARK MODE
========================= */

body.dark .zoom-controls button {
  background: rgba(0, 0, 0, 0.45);           /* darker glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.28); /* brighter edge */
  color: #ffffff;                              /* pure white text/icons */

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 14px 36px rgba(0,0,0,0.55);
}

body.dark .zoom-controls button:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: translateY(-1px) scale(1.07);
}

/* =========================
   MODAL BUTTONS – LIGHT MODE
========================= */

body.light .zoom-controls button {
  background: rgba(255, 255, 255, 0.75);   /* frosted white */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(0, 0, 0, 0.18);    /* visible border */
  color: #111111;                           /* readable text/icons */

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 12px 28px rgba(0,0,0,0.25);
}

body.light .zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px) scale(1.07);
}

.zoom-controls button {
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

body.light .zoom-controls button {
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
}

.zoom-controls button:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.45),
    0 6px 16px rgba(0,0,0,0.25);
}

/* =========================
   FIX: Modal controls should NOT scroll away on mobile
   ========================= */

/* Stop the modal container from scrolling (prevents buttons drifting away) */
#project-modal,
#resume-modal {
  overflow: hidden !important;        /* was auto */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: auto;
}

/* Make sure close + zoom controls are always pinned to viewport */
#project-modal .close-modal,
#resume-modal .close-modal,
#project-modal .zoom-controls,
#resume-modal .zoom-controls {
  position: fixed !important;
  z-index: var(--z-modal-controls);
}

/* Route touch gestures to the image (so user can drag/pan instead of page-scroll) */
#project-modal img,
#resume-modal img {
  touch-action: none;                 /* critical for mobile */
}

/* =========================
   FIX: Keep modal controls pinned on mobile (iOS + Android)
   ========================= */

/* 1) Never allow the modal itself to scroll */
#project-modal,
#resume-modal {
  overflow: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: auto;
  touch-action: none; /* stops touch scrolling inside the modal */
}

/* 2) Make sure controls are truly viewport-fixed */
#project-modal .close-modal,
#resume-modal .close-modal,
#project-modal .zoom-controls,
#resume-modal .zoom-controls {
  position: fixed !important;
  z-index: var(--z-modal-controls);
}

/* 3) Route touch gestures to your drag/pan JS (instead of scrolling) */
#project-modal img,
#resume-modal img {
  touch-action: none !important;
}

/* ===============================================
   SAFARI iOS FIX – Normalize title shadows
=============================================== */
@supports (-webkit-touch-callout: none) {

  .projects-title,
  .services-title,
  .photography-title {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.18),
      0 6px 12px rgba(0, 0, 0, 0.12);
  }

}

/* Dark mode (current look) */
body.dark .mobile-nav {
  background: #353746;
}

/* Light mode */
body.light .mobile-nav {
  background: #E2E5E8;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Dark mode */
body.dark .mobile-nav ul li a {
  color: var(--color-primary);
}

/* Light mode */
body.light .mobile-nav ul li a {
  color: #E6A15C;
}

/* =========================
   Hamburger + Close icon colors
========================= */

/* Dark mode — keep existing */
body.dark .menu-icon + label::before,
body.dark .menu-icon + label::after {
  background: var(--color-primary);
}

/* Light mode — gold accent */
body.light .menu-icon + label::before,
body.light .menu-icon + label::after {
  background: #E6A15C;
}

body.light .menu-icon + label:hover::before,
body.light .menu-icon + label:hover::after {
  box-shadow: 0 0 8px rgba(230, 161, 92, 0.6);
}

body.light .menu-icon + label::before,
body.light .menu-icon + label::after {
  height: 3.5px;
}

/* ===============================================
   PHOTO MODAL — FRAME ALWAYS FITS IMAGE
   Paste at VERY bottom of CSS
=============================================== */

#photo-modal {
  display: none;                /* JS controls open/close */
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 16px;                /* breathing room from edges */
  box-sizing: border-box;
}

/* Frame wraps image (never smaller than image) */
#photo-modal .photo-modal-frame {
  display: inline-flex;         /* shrink-wrap to content */
  align-items: center;
  justify-content: center;

  padding: 14px;                /* frame thickness */
  box-sizing: border-box;

  width: max-content;           /* follow image width */
  height: max-content;          /* follow image height */

  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* Image defines the frame size */
#photo-modal #photo-modal-image {
  display: block;

  width: auto;
  height: auto;

  max-width: calc(100vw - 32px - 28px);  /* modal padding + frame padding*2 */
  max-height: calc(100vh - 32px - 28px);

  object-fit: contain;
  filter: none !important;

  border-radius: 12px;          /* inner radius */
}

/* Light mode frame tuning */
body.light #photo-modal .photo-modal-frame {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.14);
}

/* Mobile: tighter paddings so nothing overflows */
@media (max-width: 768px) {
  #photo-modal { padding: 12px; }

  #photo-modal .photo-modal-frame {
    padding: 10px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  #photo-modal #photo-modal-image {
    max-width: calc(100vw - 24px - 20px);
    max-height: calc(100vh - 24px - 20px);
  }
}

/* ===============================================
   PHOTO MODAL — PREVENT TOP FRAME CROPPING (SAFE AREA)
   Paste at VERY bottom of CSS
=============================================== */

#photo-modal {
  /* keep your existing stuff, but add/override these */
  overflow: auto; /* if something still ends up taller, you can scroll */
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-right: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  padding-left: 16px;
}

/* Reduce allowed height a bit more + include safe areas */
#photo-modal .photo-modal-frame {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

/* Image max sizes stay slightly smaller than frame max sizes */
#photo-modal #photo-modal-image {
  max-width: calc(100vw - 32px - 28px);
  max-height: calc(100vh - 32px - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
