/* =========================
   Base / Theme
========================= */
:root{
	/* Typography tuning (match mockup: not bold) */
h1, h2, h3,
.brand__name,
.section-title{
  font-weight: 400; /* normal, not bold */
}

.brand__role,
.nav-link,
.hint{
  font-weight: 400;
}
  --bg: #111111;
  --text: #eeeeee;
  --muted: rgba(238,238,238,0.75);
  --green: #006400;

  --container: 1400px;
  --pad-x: 48px;

  --shadow: 0 12px 30px rgba(0,0,0,0.55);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Helvetica, Arial, sans-serif; /* BODY/UI font */
}

/* Headings use Georgia (per your rule) */
h1, h2, h3{
  font-family: Georgia, "Times New Roman", serif;
  margin: 0;
}

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

/* Layout container */
.container{
  width: min(var(--container), calc(100% - (var(--pad-x) * 2)));
  margin: 0 auto;
}

/* Better text rendering */
body{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection highlight (subtle green) */
::selection{
  background: rgba(0,100,0,0.35);
  color: var(--text);
}
/* =========================
   Header / Nav (matches mockup)
========================= */
.site-header{
  padding: 28px 0 18px;
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
}

.brand__mark{
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  letter-spacing: 1px;
  color: var(--green);
  line-height: 1;
}

.brand__title{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.brand__name{
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.6px;
  color: var(--green);
}

.brand__pipe{
  color: rgba(238,238,238,0.55);
  font-size: 20px;
  font-weight: 400;
}

.brand__role{
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(238,238,238,0.92);
  letter-spacing: 0.2px;
}

.brand__logo{
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

/* Nav */
.site-nav{
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link{
  font-size: 18px;
  color: var(--text);
  opacity: 0.95;
  padding: 10px 2px;
  position: relative;
}

.nav-link:hover{
  opacity: 1;
  color: var(--text);
}

.nav-link.is-active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.nav-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

/* Active nav underline support */
.nav-link.active,
.nav-link[aria-current="page"]{
  /* keep whatever active text styling you already use */
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after{
  opacity: 1;
  transform: scaleX(1);
}

.nav-icon:hover{
  background: rgba(255,255,255,0.06);
}

/* Force normal cursor everywhere (prevents hover-disappearing) */
html, body, a, button, input, textarea, select, .card, .carousel-btn {
  cursor: auto !important;
}

/* =========================
   Page placeholders (temporary)
========================= */
.page{
  padding: 28px 0 80px;
}

.section-title{
  margin-top: 34px;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: rgba(238,238,238,0.95);
}

.hint{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* =========================
   Content Rows / Carousel (Films)
========================= */
.content-row{
  margin-top: 22px;
}

.row-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.carousel{
  position: relative;
}

.carousel-track{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 360px; /* card width (desktop-first) */
  gap: 26px;

  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 54px; /* space for arrows */
  margin: 0 -54px;    /* let track reach edges */
  scrollbar-width: none; /* Firefox */
}
.carousel-track::-webkit-scrollbar{ display: none; }

.card{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  outline: none;
  user-select: none;
}

/* 16:9 media area */
.card-media{
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a4dbf; /* your blue placeholder */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 220ms ease;
}

/* Hover reveal overlay */
.card-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.05));
  opacity: 0;
  transition: opacity 180ms ease;
}

/* Thumbnail lazy-load placeholder */
.card-media {
  background: #1a1a1a; /* fallback while loading */
  background-size: cover;
  background-position: center;
}

/* Optional: subtle fade-in once loaded */
.card-media.is-loaded {
  animation: thumbFade 220ms ease-out;
}

@keyframes thumbFade {
  from { opacity: 0.0; }
  to   { opacity: 1.0; }
}

.card-title{
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--text);
}

.card-type{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(238,238,238,0.78);
}

.card:hover .card-overlay,
.card:focus-visible .card-overlay{
  opacity: 1;
}

.card:hover .card-media,
.card:focus-visible .card-media{
  transform: scale(1.03);
}

/* Keyboard focus (clean cinematic glow) */
.card:focus-visible{
  box-shadow: 0 0 0 2px rgba(0,100,0,0.55), var(--shadow);
}

/* Arrow buttons (Netflix-ish) */
.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 88px;
  border: 0;
  border-radius: 14px;
  background: rgba(0,0,0,0.55);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 22px rgba(0,0,0,0.45);
  opacity: 0.88;
  z-index: 10;
  pointer-events: auto;
}

.carousel-btn span{
  font-size: 34px;
  line-height: 1;
  opacity: 0.95;
}

.carousel-btn:hover{
  opacity: 1;
  background: rgba(0,0,0,0.68);
}

.carousel-btn:focus-visible{
  outline: 2px solid rgba(0,100,0,0.7);
  outline-offset: 2px;
}

.carousel-btn.left{ left: 8px; }
.carousel-btn.right{ right: 8px; }

/* =========================
   Modal (streaming-style)
========================= */
body.modal-open{
  overflow: hidden;
}

.modal{
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-hero{
  flex: 0 0 auto;
}
.modal-body{
  flex: 1 1 auto;
}
.modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

.modal-dialog{
  position: relative;
  width: min(980px, calc(100% - 96px));
  margin: 70px auto;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0b;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);

  transform: translateY(16px) scale(0.985);
  transition: transform 240ms ease;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

/* Scroll the whole modal content (hero + body) together */
.modal-dialog.modal-scroll{
  max-height: calc(100vh - 120px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.modal.is-open .modal-dialog{
  transform: translateY(0) scale(1);
}

.modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(0,0,0,0.55);
  color: var(--text);
  display: grid;
  place-items: center;
  z-index: 2;
}

.modal-close{
  position: sticky;
  top: 16px;
  align-self: flex-end;
  z-index: 50;
}

.modal-close span{
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.modal-close:hover{
  background: rgba(0,0,0,0.72);
}

.modal-close:focus-visible{
  outline: 2px solid rgba(0,100,0,0.75);
  outline-offset: 2px;
}

/* Hero area */
/* Modal hero container: flexible (no forced crop) */
#modal-hero{
  width: 100%;
  background: rgba(0,0,0,0.35);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 10px;
}

/* Images: keep original aspect ratio (no crop) */
#modal-hero img{
  width: 100%;
  height: auto;
  max-height: 72vh;      /* prevents massive tall images */
  object-fit: contain;   /* key: no cropping */
  border-radius: 12px;
  display: block;
}

/* Local MP4 heroes: keep original aspect ratio (no crop) */
#modal-hero video{
  width: 100%;
  height: auto;
  max-height: 72vh;      /* matches your portrait-photo tweak */
  object-fit: contain;   /* key: prevents cropping */
  border-radius: 12px;
  display: block;
  background: rgba(0,0,0,0.25);
}

/* Video/iframe wrapper: stays 16:9 */
.hero-frame{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.35);
}

.hero-frame iframe,
.hero-frame video{
  width: 100%;
  height: 100%;
  display: block;
}

.modal-hero img,
.modal-hero video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-body{
  padding: 22px 26px 26px;
  -webkit-overflow-scrolling: touch;
}

.modal-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.2px;
  margin: 0;
}

.modal-meta{
  margin-top: 8px;
  color: rgba(238,238,238,0.75);
  font-size: 14px;
}

.modal-desc{
  margin: 16px 0 0;
  color: rgba(238,238,238,0.92);
  line-height: 1.55;
  font-size: 15.5px;
}

.modal-subtitle{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 22px 0 10px;
  font-size: 18px;
  color: rgba(238,238,238,0.95);
}

.credits-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(238,238,238,0.82);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Role chips (bubbles) */
.role-chips{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-chips li{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,100,0,0.16); /* accent green tint */
  border: 1px solid rgba(0,100,0,0.45);
  color: #eeeeee;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.modal-video{
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  background: #000;
}

/* Small extra polish */
.modal-credits{
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 6px;
  margin-top: 18px;
}

/* =========================
   About page (CV-style)
========================= */
.page-head{
  margin-top: 10px;
  margin-bottom: 28px;
}

.page-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 0.2px;
}

.page-subtitle{
  margin: 10px 0 0;
  color: rgba(238,238,238,0.78);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 72ch;
}

.about-grid{
  display: grid;
  grid-template-columns: 360px 1fr; /* desktop-first */
  gap: 40px;
  align-items: start;
}

.about-side,
.about-main{
  display: grid;
  gap: 22px; /* breathing room between panels */
}

.panel{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.panel-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 12px;
  position: relative;
}

.panel-title::after{
  content: "";
  display: block;
  height: 2px;
  width: 64px;
  margin-top: 10px;
  background: rgba(0,100,0,0.7);
  border-radius: 2px;
}

.body{
  margin: 0;
  color: rgba(238,238,238,0.88);
  line-height: 1.65;
  font-size: 15.5px;
}

.facts{
  margin: 0;
}

.fact{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fact:last-child{ border-bottom: 0; }

.fact dt{
  color: rgba(238,238,238,0.62);
  font-size: 13px;
}
.fact dd{
  margin: 0;
  color: rgba(238,238,238,0.9);
  font-size: 14px;
}

.side-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(0,100,0,0.78);
  color: var(--text);
  border: 1px solid rgba(0,100,0,0.35);
  font-size: 14px;
}

.btn:hover{
  background: rgba(0,100,0,0.92);
}

.btn-ghost{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.06);
}

.small-note{
  margin: 10px 0 0;
  color: rgba(238,238,238,0.6);
  font-size: 12.5px;
  line-height: 1.5;
}

.taglist{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taglist li{
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: rgba(238,238,238,0.82);
}

.timeline{
  display: grid;
  gap: 18px;
}

.item{
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.06);
}

.item-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.item-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0;
}

.item-meta{
  color: rgba(238,238,238,0.65);
  font-size: 13px;
}

.bullets{
  margin: 0;
  padding-left: 18px;
  color: rgba(238,238,238,0.85);
  line-height: 1.6;
  font-size: 15px;
}

.skills{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* =========================
   Contact page
========================= */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 420px; /* desktop-first */
  gap: 40px;
  align-items: start;
}

.contact-side{
  display: grid;
  gap: 22px;
}

.contact-form{
  display: grid;
  gap: 14px;
}

.form-row{
  display: grid;
  gap: 8px;
}

.label{
  font-size: 13px;
  color: rgba(238,238,238,0.72);
}

.input,
.textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.28);
  color: rgba(238,238,238,0.92);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  outline: none;
}

.input::placeholder,
.textarea::placeholder{
  color: rgba(238,238,238,0.45);
}

.input:focus,
.textarea:focus{
  border-color: rgba(0,100,0,0.55);
  box-shadow: 0 0 0 3px rgba(0,100,0,0.18);
}

.form-actions{
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* Email box */
.email-box{
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.08);
}

.email-box code{
  color: rgba(238,238,238,0.9);
  font-size: 13.5px;
}

/* Social links */
.social-links{
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.social{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(238,238,238,0.9);
}

.social:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(0,100,0,0.35);
}

.social-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}

/* Footer */
.site-footer{
  border-top: 1px solid rgba(238,238,238,0.10);
  background: rgba(17,17,17,0.92);
  padding: 18px 0;
  margin-top: 44px;
}

.footer-inner{
  width: min(1200px, calc(100% - 96px));
  margin: 0 auto;
  color: rgba(238,238,238,0.70);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.3px;
}

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

.footer-logo{
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.85;
}

/* =========================
   POLISH PASS (Desktop)
   ========================= */

/* Global type rhythm */
:root{
  --text: #eeeeee;
  --muted: rgba(238,238,238,0.72);
  --soft: rgba(238,238,238,0.10);
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --shadow-soft: 0 14px 40px rgba(0,0,0,0.40);
  --green: #006400;
}

/* Section headings (Films/Photography/Social) */
.section-title,
.carousel-title,
.row-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--text);
  font-size: 22px;
  letter-spacing: 0.4px;
  margin: 26px 0 12px;
}

/* Give each row breathing room */
.carousel,
.section-row,
.category-row{
  margin-bottom: 26px;
}


/* Card look */
.card{
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transform: translateZ(0); /* smoother hover */
  transition: transform 220ms ease, box-shadow 220ms ease;
  outline: none;
}

.card:focus-visible{
  box-shadow: 0 0 0 2px rgba(0,100,0,0.65), var(--shadow-soft);
}

/* Thumbnail surface */
.card-media{
  border-radius: 16px;
  background-color: #1a1a1a;
}

/* Hover lift (subtle, premium) */
.card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Overlay: smoother + slightly glassy */
.card-overlay{
  padding: 14px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.06));
  backdrop-filter: blur(6px);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.card:hover .card-overlay,
.card:focus-visible .card-overlay{
  opacity: 1;
  transform: translateY(0);
}

.card-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.card-type{
  margin-top: 6px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: rgba(238,238,238,0.75);
}

/* Carousel arrows: centered icon, no hover movement */
.carousel-btn,
.carousel-arrow{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(238,238,238,0.16);
  background: rgba(0,0,0,0.45);
  box-shadow: 0 14px 40px rgba(0,0,0,0.50);
  display: inline-flex;          /* centers icon */
  align-items: center;           /* centers icon */
  justify-content: center;       /* centers icon */
  line-height: 1;                /* prevents vertical offset */
  padding: 0;                    /* prevents drift */
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

/* If your arrow is a text character like ‹ › or < > */
.carousel-btn span,
.carousel-arrow span{
  display: block;
  line-height: 1;
  transform: translateY(0);
}

/* Hover: no movement, just styling */
.carousel-btn:hover,
.carousel-arrow:hover{
  background: rgba(0,0,0,0.62);
  border-color: rgba(0,100,0,0.55);
}

.carousel-btn:focus-visible,
.carousel-arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,100,0,0.65), 0 14px 40px rgba(0,0,0,0.50);
}



/* Role chips: slightly tighter + consistent with About chips */
.role-chips{
  gap: 10px;
}

.role-chips li{
  padding: 8px 12px;
  background: rgba(0,100,0,0.14);
  border: 1px solid rgba(0,100,0,0.42);
  color: rgba(238,238,238,0.90);
}

/* Optical centering for text chevrons inside carousel buttons */
.carousel-btn span{
  display: inline-block;
  line-height: 1;
  transform: translateY(1px);
}

/* Separate left/right optical tweak (adjust 1px -> 2px if needed) */
.carousel-btn.left span{
  transform: translate(1px, -2px);
}
.carousel-btn.right span{
  transform: translate(1px, -2px);
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce){
  .card,
  .card-overlay,
  .carousel-btn,
  .carousel-arrow{
    transition: none !important;
  }
}

/* Hard-force active nav underline (fallback, bulletproof) */
body.page-about nav a[href*="about"]{
  border-bottom: 2px solid #006400 !important;
  padding-bottom: 6px !important;
}

body.page-work nav a[href*="index"]{
  border-bottom: 2px solid #006400 !important;
  padding-bottom: 6px !important;
}

body.page-contact nav a[href*="contact"]{
  border-bottom: 2px solid #006400 !important;
  padding-bottom: 6px !important;
}

/* Prevent double underline: disable old ::after underline on the active link */
body.page-work nav a[href*="index"]::after,
body.page-about nav a[href*="about"]::after,
body.page-contact nav a[href*="contact"]::after{
  content: none !important;
  display: none !important;
}

/* =========================
   MOBILE v1 (minimal tweaks)
   ========================= */
@media (max-width: 820px){

  /* 1) Kill sideways wiggle (root cause protection) */
  html, body{
    overflow-x: hidden;
    width: 100%;
  }
  img, video, iframe{
    max-width: 100%;
    height: auto;
  }

  /* 2) Header: stack cleanly, no overlap */
  header, .site-header{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }

  /* Brand row: allow title to shrink */
  .brand, .site-brand, .logo-wrap{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
  }

  /* Title truncation (prevents running under anything) */
  .brand-title, .site-title, .name-title,
  header h1{
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* 3) Nav: keep minimalist, wrap instead of colliding */
  nav, .nav{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-start;
  }
  nav a, .nav a{
    white-space: nowrap;
  }

  /* 4) Carousels: swipe-first (hide arrows on touch) */
  .carousel-btn, .carousel-arrow{
    display: none !important;
  }
  .carousel-track{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 6px 2px 12px;
    scroll-snap-type: x mandatory;
  }
  .card{
    scroll-snap-align: start;
  }

  /* 5) No hover on mobile: keep overlay readable */
  .card-overlay{
    opacity: 1 !important;
    transform: none !important;
    background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.10));
    backdrop-filter: none;
  }
  .card:hover{ transform: none; }

  /* 6) Thumbnails looking soft on iOS: reduce GPU blur triggers */
  .card, .card-media{
    transform: none !important;
  }
  .card-media{
    background-size: cover !important;
    background-position: center !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* 7) Modal: fit small screens, keep scroll usable */
  .modal-dialog{
    width: calc(100% - 18px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    border-radius: 14px;
  }
  .modal-body{
    padding: 14px 14px 18px;
  }
  .modal-title{ font-size: 20px; }
  .modal-desc{ font-size: 14px; line-height: 1.55; }

  /* 8) About + Contact: stack columns */
  .about-grid, .contact-grid{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 9) Footer: stack if needed */
  .footer-split{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* 10) Disable custom cursor on touch */
  .cursor-dot, #cursor-dot, .custom-cursor{
    display: none !important;
  }
  body{ cursor: auto !important; }
}

/* MOBILE SAFETY: stop off-screen panels due to padding/width */
@media (max-width: 820px){
  *, *::before, *::after{
    box-sizing: border-box;
  }

  html, body{
    overflow-x: hidden;
    width: 100%;
    margin: 0;
  }

  /* Ensure key layout wrappers never exceed viewport */
  .container,
  main,
  section,
  header,
  footer{
    max-width: 100%;
  }

  /* About/Contact grids: full width and no negative offsets */
  .about-grid,
  .contact-grid{
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: 1fr !important;
  }

  /* Panels/boxes: fit the screen */
  .panel{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 820px){
  /* Header becomes 2 rows: brand then nav */
  header, .site-header{
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 0 !important;
  }

  /* Brand row must allow text truncation */
  .brand, .site-brand, .logo-wrap{
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Title: prevent running off-screen */
  .brand-title, .site-title, .name-title,
  header h1{
    width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 18px !important;   /* adjust if you want slightly bigger */
    line-height: 1.15 !important;
  }

  /* Nav: wrap, don’t overlap */
  nav, .nav{
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px 14px !important;
  }

  nav a, .nav a{
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  /* Instagram icon alignment (if it’s an <img> or <svg>) */
  nav img, nav svg{
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
  }
}

@media (max-width: 820px){

  /* --- Header: hard override to stop desktop flex layout on mobile --- */
  header, .site-header{
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    align-items: start !important;
    padding-top: 14px !important;
  }

  /* Brand row takes full width */
  .brand, .site-brand, .logo-wrap{
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Title: allow it to wrap if needed (better than truncating to “MAYS”) */
  header h1,
  .brand-title, .site-title, .name-title{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: 100% !important;
    line-height: 1.05 !important;
    font-size: 22px !important;
  }

  /* Nav becomes its own row and aligns cleanly */
  nav, .nav{
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 10px 16px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  nav a, .nav a{
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  /* Instagram icon: keep it inline and not oversized */
  nav .ig-icon, nav img, nav svg{
    width: 20px !important;
    height: 20px !important;
  }

  /* If your header has left/right wrappers from desktop layout, neutralise */
  .header-left, .header-right{
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 820px){

  /* Stack grids */
  .about-grid, .contact-grid{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Make panels fit the viewport cleanly */
  .panel{
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* If you have a central container with side padding already, keep it */
  .container{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* =========================
   MOBILE HEADER (new layout)
   ========================= */

.mobile-header{ display: none; }

@media (max-width: 820px){

  /* Hide desktop header completely on mobile */
  .desktop-header{ display: none !important; }

  /* Show mobile header */
  .mobile-header{
    display: block;
    padding: 14px 0 6px;
  }

  .mobile-brand{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
  }

@media (max-width: 820px){
  .mobile-logo{
    width: 46px;
    height: 46px;
    border-radius: 0;      /* or keep 12px if you want rounded logo */
    overflow: hidden;
    flex: 0 0 auto;
    border: none;
    background: transparent;
  }
}

  .mobile-title{
    min-width: 0;
  }

  .mobile-name{
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    letter-spacing: 0.6px;
    color: #006400;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 46px - 12px - 32px);
  }

  .mobile-tag{
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: rgba(238,238,238,0.85);
    margin-top: 2px;
  }

  .mobile-nav{
    display: flex;
    flex-direction: column;        /* two rows: links then IG */
    align-items: center;           /* center everything */
    gap: 10px;
    padding: 10px 16px 0;
  }

  .mobile-nav .nav-link{
    font-family: Helvetica, Arial, sans-serif;
    color: #eeeeee;
    text-decoration: none;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    opacity: 0.92;
  }

  /* Row of page links centered */
  .mobile-nav .nav-row{
    display: flex;
    justify-content: center;
    gap: 18px;
    width: 100%;
  }

  /* IG centered on its own line */
  .mobile-nav .nav-ig{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    opacity: 0.95;
  }
  .mobile-nav .nav-ig svg{
    width: 22px;
    height: 22px;
    display: block;
    color: #eeeeee;
  }
}

@media (max-width: 820px){
  /* Mobile carousel peek cue */
  .carousel-track{
    padding-left: -50px !important;     /* normal inset */
    margin-left: -70px !important;     /* pull track left so first card crops slightly */
    padding-right: 30px !important;    /* breathing room at end */
  }
}

/* =========================
   MOBILE: stop panels drifting off-screen
   ========================= */
@media (max-width: 820px){

  /* Prevent width + padding from overflowing */
  *, *::before, *::after{
    box-sizing: border-box !important;
  }

  html, body{
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* If you have a global container, keep it as the only side padding */
  .container{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Force grids to behave */
  .about-grid, .contact-grid{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: 1fr !important;
  }

  /* The actual cards/panels */
  .panel{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  /* Wrap long text so it doesn’t force width */
  .panel, .panel *{
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* Specifically for that “Focus” mega-line if it’s in a table/grid */
  .profile-grid, .profile-grid *{
    min-width: 0 !important;
  }
}

/* Mobile splash overlay (desktop recommended) */
.mobile-splash[hidden]{ display: none !important; }

.mobile-splash{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 360ms ease;
}

.mobile-splash.is-show{
  opacity: 1;
}

.mobile-splash-card{
  width: min(320px, calc(100% - 48px));
  text-align: center;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: rgba(17,17,17,0.78);
  border: 1px solid rgba(238,238,238,0.10);
  box-shadow: 0 22px 80px rgba(0,0,0,0.65);
}

.mobile-splash-logo{
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.mobile-splash-text{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;            /* bold but classy */
  letter-spacing: 0.2px;
  font-size: 16px;
  line-height: 1.35;
  color: rgba(238,238,238,0.92);
}

/* Only show/use splash logic on mobile widths */
@media (min-width: 821px){
  .mobile-splash{ display: none !important; }
}