/* ChrisOfTheOutdoors.com Portfolio Site
   Light mode, modern product aesthetic.
   Colors: black/white with red accents.
*/

:root{
  --bg: #d0d0d0;
  --text: #0b0b0c;
  --muted: #5a5f66;
  --border: #e7e9ed;
  --card: #e1e1e1;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --accent: #d11b1b; /* red accent */
  --accent-2: #b21414;
  --focus: 0 0 0 3px rgba(209,27,27,.25);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --header-h: 72px; /* default/fallback; JS will overwrite */
  --header-gap: 16px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}
img{max-width:100%; display:block}
a{color:inherit}
p{margin:0 0 1rem}
.container{
  width:min(var(--max), calc(100% - 2rem));
  margin-inline:auto;
}
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:1rem; top:1rem;
  width:auto;height:auto;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:999px;
  padding:.6rem 1rem;
  z-index:999;
  outline:none;
  box-shadow:var(--focus);
}

.site-header{
  position: sticky;
  top: 0;
  background: var(--card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; /* was 50 */
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-evenly;
  gap:1rem;
  padding:.85rem 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.2px;
}
.brand .logo{
  width:34px;height:34px;
  place-items:center;
}
.brand img{width:100%;height:100%;object-fit:contain}
.navlinks{
  display:flex;
  align-items:center;
  gap:.9rem;
}
.navlinks a{
  text-decoration:none;
  padding:.45rem .55rem;
  border-radius:10px;
  color:var(--muted);
  font-weight:600;
  font-size:.95rem;
}
.navlinks a:hover{color:var(--text)}
.navlinks a[aria-current="page"]{
  color:var(--text);
  background:rgba(0,0,0,.04);
}
.actions{
  display:flex;
  align-items:center;
  gap:.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: .5rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
  min-width: -webkit-fill-available;
  margin: 0;
}
.btn-wide {
  width: 100%;
}
.btn:hover{
  border-color:#d9dce1;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn-primary:hover{
  background:var(--accent-2);
  border-color:var(--accent-2);
}
.btn:focus-visible{outline:none; box-shadow:var(--focus)}

.hero-cta.smallBtnRowGrp {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.8rem;
  width: 100%;
}


.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 0;
}
.hero-name {
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: left;
  gap: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-top: 1rem;
  padding-bottom: 4rem;
  box-shadow: var(--shadow);
  background: #ffffffd6;
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: min(720px);
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  transition:
    width .6s ease,
    padding .6s ease,
    box-shadow .6s ease,
    transform .6s ease;
}

.hero-grid.small-hero {
  margin: 0 auto 0 0;
  width: 28%;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0rem;
  padding-bottom: 2rem;

  /* optional: make the "dock" feel intentional */
  transform: translateY(-6px);

  /* snaps are okay */
  text-align: left;

  /* fix invalid value */
  place-self: start;
}



.hero-grid > div {
  max-width: 100%;
}


@media (max-width: 900px){
  .hero-grid{grid-template-columns: 1fr}
}
.kicker{
  margin: 0 auto;
}
.dot{
  width:9px;height:9px;border-radius:999px;
  background:rgb(15, 209, 15);
}
h1 {
  margin: 1rem 0 0.75rem;
}

.lede {
  margin-left: auto;
  margin-right: auto;
}
.hero-cta{
  display:flex;
  gap:.8rem;
  margin-top:1.35rem;
  flex-wrap:wrap;
}
.meta-card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.1rem;
  box-shadow:var(--shadow);
  background:var(--card);
}
.meta-card h2{
  font-size:1.05rem;
  margin:0 0 .55rem;
}
.meta{
  display:grid;
  gap:.55rem;
  margin:0;
  padding:0;
  list-style:none;
  color:var(--muted);
  font-weight:600;
  font-size:.95rem;
}
.meta li{
  display:flex;
  align-items:flex-start;
  gap:.6rem;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.3rem .6rem;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  font-weight:700;
  font-size:.85rem;
  background:#fff;
}

.section{
  padding:2.4rem 0;
}
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.section-header h2{
  margin:0;
  font-size:3rem;
  letter-spacing:-.01em;
}
.section-header p{
  margin:0;
  color:var(--muted);
  font-weight:600;
  max-width:60ch;
}
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:1rem;
}
.card{
  grid-column: span 4;
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--card);
  box-shadow:var(--shadow);
  text-decoration:none;
  display:flex;
  flex-direction:column;
  min-height: 320px;
}
@media (max-width: 950px){
  .card{grid-column: span 6}
}
@media (max-width: 620px){
  .card{grid-column: span 12}
}
.card-media{
  aspect-ratio: 16/9;
  background:#fff;
  border-bottom:1px solid var(--border);
  display:grid;
  place-items:center;
  color:rgba(0,0,0,.55);
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.85rem;
}
.card-body{
  padding:1rem 1rem 1.1rem;
  display:flex;
  flex-direction:column;
  gap:.55rem;
  flex:1;
}
.card-title{
  font-size:1.05rem;
  margin:0;
  text-align: center;
}
.card-desc{
  color:var(--muted);
  font-weight:600;
  margin:0;
}
.chips{
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
  margin-top:auto;
}
.chip{
  font-size:.8rem;
  font-weight:800;
  color:var(--muted);
  border:1px solid var(--border);
  border-radius:999px;
  padding:.25rem 1rem;
  background:#fff;
}
.chip.accent{
  border-color: #d11b1b;
  color:#d11b1b;
  background:#fff;
}
.inline-link{
  color:var(--accent);
  font-weight:800;
  text-decoration:none;
}
.inline-link:hover{text-decoration:underline}

.about-row{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap:1.2rem;
  align-items:start;
}
@media (max-width: 720px){
  .about-row{grid-template-columns: 1fr}
}
.headshot{
  width:160px;height:160px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  overflow:hidden;
  background:linear-gradient(135deg, rgba(0,0,0,.04), rgba(209,27,27,.06));
  display:grid;
  place-items:center;
  color:rgba(0,0,0,.5);
  font-weight:800;
}
.small {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  font-size: .95rem;
  color: var(--muted);
  font-weight: 600;
}

.blurb {
  display: flex;
  flex-direction: column;
}

.site-footer{
  border-top:1px solid var(--border);
  margin-top:2rem;
  padding:1.8rem 0 2.4rem;
  color:var(--muted);
  background: var(--card);
}
.footer-grid{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.footer-grid a{color:inherit; text-decoration:none}
.footer-grid a:hover{text-decoration:underline}
.footer-cta{
  max-width:65ch;
}
.footer-cta strong{color:var(--text)}
.footer-links{
  display:flex;
  gap:.9rem;
  flex-wrap:wrap;
  font-weight:700;
}

/* Work filtering */
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin: .9rem 0 1.3rem;
}
.filter-btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:.45rem .75rem;
  font-weight:800;
  color:var(--muted);
  cursor:pointer;
  transition: border-color .2s ease, transform .06s ease, box-shadow .2s ease;
}
.filter-btn:hover{
  border-color:#d9dce1;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.filter-btn:active{transform:translateY(1px)}
.filter-btn[aria-pressed="true"]{
  background: rgba(209,27,27,.07);
  border-color: rgba(209,27,27,.35);
  color:#8f1212;
}
.filter-btn:focus-visible{outline:none; box-shadow:var(--focus)}

.search-row{
  display:flex;
  gap:.7rem;
  flex-wrap:wrap;
  align-items:center;
  margin-top:.8rem;
}
.search{
  flex:1;
  min-width: 240px;
  border:1px solid var(--border);
  border-radius:999px;
  padding:.55rem .85rem;
  font-weight:700;
  color:var(--text);
}
.search:focus-visible{outline:none; box-shadow:var(--focus)}

/* Case study layout */
.page-title{
  margin:0 0 .4rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing:-.015em;
}
.subhead{
  margin:0;
  color:var(--muted);
  font-weight:700;
  max-width: 75ch;
}
.kv{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1rem;
  box-shadow:var(--shadow);
  margin-top:1.2rem;
}
.kv-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:.8rem;
}
.kv-item{
  grid-column: span 6;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:.75rem .8rem;
  background:#fff;
}
@media (max-width: 720px){
  .kv-item{grid-column: span 12}
}
.kv-item dt{
  color:var(--muted);
  font-weight:800;
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:.2rem;
}
.kv-item dd{
  margin:0;
  font-weight:600;
}
.prose{
  max-width: 78ch;
}
.prose h2{
  font-size:1.25rem;
  margin:1.7rem 0 .7rem;
  letter-spacing:-.01em;
}
.prose ul{
  margin:.5rem 0 1rem 1.1rem;
}
.prose li{
  margin:.35rem 0;
}
.hr{
  height:1px;
  background:var(--text);
  margin:1.3rem 0;
}

/* =========================
   Case study: 2-column layout
   ========================= */

   .case-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2rem;
    align-items: start;
  }
  
  .case-content {
    min-width: 0; /* prevents overflow */
  }
  
  .case-preview {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    align-self: start;
  }
  
  .preview-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
  }
  
  .preview-frame img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .preview-caption {
    margin-top: 0.6rem;
    text-align: center;
  }
  
  @media (max-width: 900px) {
    .case-layout {
      grid-template-columns: 1fr;
    }
  
    .case-preview {
      position: static;
      order: -1; /* preview first on mobile */
    }
  }
  

/* Carousel */
.carousel{
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  background:#fff;
  margin:1.2rem 0;
}
.carousel-viewport {
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
}

.carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-track{
  display:flex;
  transition: transform .35s ease;
  will-change: transform;
}
.slide{
  min-width:100%;
  aspect-ratio: 16/9;
  display:grid;
  place-items:flex-start;
  background:linear-gradient(135deg, rgba(0,0,0,.05), rgba(209,27,27,.08));
  border-bottom:1px solid var(--border);
  color:rgba(0,0,0,.55);
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.carousel-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:.65rem .75rem;
  gap:.6rem;
}
.carousel-controls .left{
  display:flex;
  align-items:center;
  gap:.6rem;
}
.carousel-btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:8px;
  padding:.45rem .7rem;
  font-weight:900;
  cursor:pointer;
  color:var(--accent);
}
.carousel-btn:hover{border-color: var(--accent)}
.carousel-btn:focus-visible{outline:none; box-shadow:var(--focus)}
.carousel-dots{
  display:flex;
  align-items:center;
  gap:.35rem;
  flex-wrap:wrap;
}
.dotbtn{
  width:10px;height:10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.dotbtn[aria-current="true"]{
  background: var(--accent);
  border-color: var(--accent);
}
.dotbtn:focus-visible{outline:none; box-shadow:var(--focus)}
.carousel-status{
  color:var(--muted);
  font-weight:800;
  font-family:var(--mono);
  font-size:.85rem;
}

/* Utility */
.mt-1{margin-top:.7rem}
.mt-2{margin-top:1.2rem}
.center{display:grid; place-items:center}

/* At a glance: reveal + sticky follow */
.featured-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.featured-work {
  padding-top: 4rem;
}

@media (max-width: 900px) {
  .featured-layout {
    grid-template-columns: 1fr;
  }
}

.at-a-glance {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: sticky;
  top: 96px; /* keep for now; we can make this dynamic next */
  align-self: start;
  width: fit-content;
}

.at-a-glance.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aside-item {
  padding: 0.5rem 0;
}

@media (max-width: 900px) {
  .at-a-glance {
    position: static;
    top: auto;
  }
}

/* Tool icon grid – 2 rows of 6 */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: auto;
  gap: 0.5rem;
  align-items: center;
  max-width: 100%;
}

.tool-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.tool-icon:hover {
  transform: translateY(-1px);
  opacity: 1;
}

/* Hero Background Video */
.hero-video {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.hero-video .container {
  position: relative;
  z-index: 2;
}

#about-card {
  width: 80%;
  margin: 0 auto;
}

/* Hero collapse toggle */

.hero-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #000;
  opacity: 0.6;
  z-index: 3;
}

.hero-toggle:hover {
  opacity: 1;
}

.anchor-offset {
  scroll-margin-top: 69px; /* adjust to your header height */
}

.ftWorkImg {
  height: 100%;
  max-height: 137px;
  width: 100%;
  object-fit: cover;
  background: #fff;
  overflow-y: hidden;
}

.tall {
  height: 100%;
  max-height: 325px;
}
.tallPhoto {
  height: 100%;
  object-fit: cover;
}

/* =========================
   Mobile responsiveness patch
   Paste at bottom of styles.css
   ========================= */

/* 1) Prevent horizontal overflow from long words / fixed elements */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* 2) Header/nav: stack neatly on smaller screens */
@media (max-width: 920px) {
  .navbar {
    flex-wrap: wrap;
    gap: .75rem;
  }

  .navlinks {
    flex-wrap: wrap;
    gap: .35rem .5rem;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .actions .btn {
    width: auto;
    min-width: unset; /* your .btn uses fill-available; override in header actions */
  }
}

/* 3) Hero: make panel size/spacing scale down cleanly */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh; /* keep cinematic hero */
    padding: 0;
  }

  .hero-overlay {
    background: rgba(0, 0, 0, 0.5); /* keep contrast without the video */
  }

  .hero-grid {
    width: 100%;
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 2rem;
  }

  /* If user collapses the hero on mobile, keep it usable */
  .hero-grid.small-hero {
    width: 100%;
    margin: 0 auto;
    transform: none;
  }

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-title {
    font-size: 1.4rem;
    line-height: 1.15;
  }

  .lede {
    margin-left: 0;
    margin-right: 0;
  }

  /* CTAs: stack (tap targets) */
  .hero-cta {
    width: 100%;
  }

  /* When your smallBtnRowGrp class is present, force stacking on small screens */
  .hero-cta.smallBtnRowGrp {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .ftWorkImg {
    max-height: none; /* reduce featured work image height on mobile */
  }
}

/* 4) Featured work layout: single column earlier + consistent spacing */
@media (max-width: 980px) {
  .featured-layout {
    grid-template-columns: 1fr; /* sidebar drops under cards */
  }

  .at-a-glance {
    width: 100%; /* avoid awkward fit-content width on narrow layouts */
  }
  #at-a-glance { grid-row: 1; }
  .featured-layout > .grid { grid-row: 2; }

}

/* 5) Cards: reduce minimum height a bit on mobile */
@media (max-width: 620px) {
  .card {
    min-height: 280px;
  }

  .card-title {
    text-align: left; /* center titles look cramped on mobile */
  }
}

/* 6) About card: stop forcing 50% width on small screens */
@media (max-width: 900px) {
  #about-card {
    width: 100%;
  }

  .headshot {
    width: 140px;
    height: 140px;
  }
}

/* 7) Tool icons: keep 2x6 but allow wrap if space is too tight */
@media (max-width: 420px) {
  .tool-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
@media (max-width: 768px) {
  .btn { padding: .7rem 1.1rem; }
  .navlinks a { padding: .55rem .65rem; }
}

/* Capabilities section: single-column rows */

.capabilities-grid {
  grid-template-columns: 1fr;
}

.capabilities-grid .card {
  grid-column: 1 / -1;     /* force full-width row */
  min-height: unset;      /* keep your intent */
}

.capabilities-grid .card-body {
  gap: .75rem;
}

.capabilities-grid .card-title {
  text-align: left;
}

.social-icon {
  width: 8%
}