/* ==========================================================================
   Alison Gaddis — Portfolio
   Clean rebuild of the original theme. Design tokens (colors, type sizes,
   spacing rhythm, alternating section backgrounds) are carried over from
   the original main.css so the site keeps its look. The old Bootstrap 3 +
   custom percentage-grid system has been replaced with plain flexbox/grid.
   ========================================================================== */

:root {
  --color-ink: #010203;         /* near-black: nav, hero, footer, body copy */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f7;      /* alternating section band */
  --color-white: #ffffff;
  --color-accent: #00c19f;      /* teal accent used across case studies */
  --color-muted: #6b6b6b;

  --font-heading: 'Raleway', Helvetica, Arial, sans-serif;
  --font-body: 'Lato', Helvetica, Arial, sans-serif;

  --container-max: 1240px;
  --container-min: 320px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 6px;
  --shadow-soft: 0 0 6px rgba(0, 0, 0, 0.24);
}

/* -------------------------------------------------- reset & base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 1.5rem; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

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

/* focus visibility (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------------------------------------- nav ----------------- */
.nav {
  position: fixed;
  top: 0; right: -260px;
  width: 260px;
  height: 100%;
  z-index: 100;
  transition: right 0.3s ease;
}
.nav.is-open { right: 0; }

.nav__panel {
  background: rgba(1, 2, 3, 0.92);
  width: 200px;
  height: 100%;
  margin-left: 60px;
  padding-top: 90px;
}

.nav__link {
  display: block;
  margin-left: 20px;
  color: #b9b9b9;
  font-size: 12px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav__link:hover, .nav__link:focus { color: #fff; }

.nav__socials { margin-top: var(--space-2); }
.nav__socials a {
  display: inline-block;
  margin-left: 20px;
  margin-right: 14px;
  color: #b9b9b9;
  font-size: 18px;
}
.nav__socials a:hover { color: #fff; }

.nav-toggle {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 101;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 2, 3, 0.5);
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}
.nav-toggle:hover { background: rgba(1, 2, 3, 0.8); }

.body-push { transition: left 0.3s ease; position: relative; left: 0; }
.body-push.is-pushed { left: -200px; overflow-x: hidden; }

/* -------------------------------------------------- hero ---------------- */
.hero {
  background: var(--color-ink);
  color: #fff;
  text-align: center;
  padding: 90px 0 80px;
}
.hero__icon { width: 80px; margin: 0 auto var(--space-3); }
.hero__name {
  color: #fff;
  font-size: 3.2rem;
  font-weight: 400;
  margin-bottom: 0.25em;
}
.hero__tagline {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: var(--space-3);
}
.hero__bio {
  max-width: 700px;
  margin: 0 auto;
  color: #fff;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* -------------------------------------------------- case study tiles ---- */
.project-list { background: var(--color-bg); }

.project-tile {
  padding: var(--space-5) 0;
}
.project-tile:nth-child(even) { background-color: var(--color-bg-alt); }

.project-tile__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.project-tile__figure {
  flex: 1 1 280px;
  width: 280px;    /* explicit width so the icon has a definite box to scale against */
  text-align: center;
}
.project-tile__figure img {
  width: 55%;
  max-width: 200px;
  min-width: 90px;
  margin: 0 auto;
}
.project-tile__info { flex: 1 1 380px; }

.project-logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  display: block;
  margin-bottom: 0.6em;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1.2;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}
.project-title b { font-weight: 700; }
.project-desc {
  margin-bottom: 2em;
  line-height: 1.5;
}

.cta-button {
  display: inline-block;
  min-width: 60%;
  padding: 0.9em 1.5em;
  border: 1px solid var(--color-ink);
  border-radius: var(--radius);
  color: var(--color-ink);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-ink);
  color: #fff;
}

/* -------------------------------------------------- client logos -------- */
.logos {
  background: var(--color-bg);
  padding: var(--space-5) 0;
  text-align: center;
}
.logos h4 {
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}
.logos__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
}
.logos__row img { max-width: 130px; opacity: 0.85; }

/* -------------------------------------------------- footer / contact ---- */
.social-footer { background: var(--color-ink); }
.social-footer__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.social-footer__cell {
  padding: var(--space-4) var(--space-2);
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.social-footer__cell:first-child { border-left: 0; }
.social-footer__cell h4 { color: #fff; letter-spacing: 0.08em; font-size: 0.9rem; }
.social-footer__cell p { color: #fff; }
.social-footer__cell i, .social-footer__cell .icon { font-size: 2.6rem; color: #fff; margin: var(--space-2) 0; }
.social-footer__cell a { color: #fff; }
.social-footer__cell--link:hover { background: rgba(255,255,255,0.04); }

@media (max-width: 767px) {
  .social-footer__row { grid-template-columns: 1fr; }
  .social-footer__cell { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .social-footer__cell:first-child { border-top: 0; }
}

/* -------------------------------------------------- project detail page  */
.pd-header {
  background: var(--color-ink);
  padding: var(--space-3) 0;
  display: flex;
  justify-content: center;
}
.pd-header a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.pd-header img { display: block; width: 80px; height: 80px; }
.pd-header__name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: 400;
}

.pd-section { padding: var(--space-4) 0; }
.pd-section--alt { background: var(--color-bg-alt); }
.pd-section--dark { background: var(--color-ink); }
.pd-section--dark h2, .pd-section--dark h3, .pd-section--dark h4 { color: #fff; }
.pd-section--dark p, .pd-section--dark figcaption { color: #cccccc; }

.pd-inset {
  border-radius: 20px;
  padding: var(--space-3) var(--space-3) var(--space-4);
  margin: 0 auto var(--space-3);
  max-width: 1000px;
  text-align: center;
}
.pd-inset h2, .pd-inset h3 { margin-bottom: 0.4em; }
.pd-inset p { max-width: 700px; margin-left: auto; margin-right: auto; }
.pd-inset .pd-figure { margin-top: var(--space-3); }

.pd-video { margin: 0 auto; }
.pd-video iframe { max-width: 100%; border-radius: 8px; }

.pd-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.pd-row--reverse { flex-direction: row-reverse; }
.pd-col { flex: 1 1 380px; width: 380px; }
.pd-col--icon { text-align: center; }
.pd-col--icon svg { width: 45%; max-width: 220px; min-width: 120px; }

.pd-copy { max-width: 780px; margin: 0 auto; }
.pd-copy h3 { font-size: 1.4rem; margin-top: 1.4em; }
.pd-copy p { line-height: 1.7; }

.pd-figure { text-align: center; margin: var(--space-3) 0; }
.pd-figure img {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
}
.pd-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

/* modifier for images that shouldn't get the card shadow/border treatment */
.pd-figure img.pd-figure__img--plain {
  box-shadow: none;
  border-radius: 0;
  border: 0;
  background: none;
}

.pd-next {
  text-align: center;
  padding: var(--space-5) 0;
}

/* zoomable images anywhere get a cursor + subtle hover cue */
.zoomable { cursor: zoom-in; }
.zoomable:hover { opacity: 0.94; }

/* -------------------------------------------------- lightbox ------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(1, 2, 3, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  transition: transform 0.2s ease;
  cursor: zoom-in;
  touch-action: pinch-zoom;
}
.lightbox__img.is-zoomed {
  max-width: none;
  max-height: none;
  width: auto;
  cursor: zoom-out;
  transform: scale(1.8);
}
.lightbox__caption {
  position: absolute;
  bottom: 28px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: 14px;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 0;
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,0.2); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox__prev, .lightbox__next { width: 40px; height: 40px; font-size: 16px; }
}

/* -------------------------------------------------- responsive ---------- */
@media (max-width: 900px) {
  .project-tile__inner { flex-direction: column; text-align: center; }
  .project-tile__figure,
  .project-tile__info {
    flex: 0 0 auto;
    width: 100%;
  }
  .project-tile__figure img {
    width: 40%;
    max-width: 160px;
    min-width: 100px;
  }
  .pd-row, .pd-row--reverse { flex-direction: column; }
  .pd-col { flex: 0 0 auto; width: 100%; }
  .pd-col--icon svg { width: 32%; max-width: 140px; min-width: 90px; }
  .hero__name { font-size: 2.3rem; }
  .hero__tagline { font-size: 1.3rem; }
}

@media (max-width: 600px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .cta-button { min-width: 100%; }
  .project-title { font-size: 1.7rem; }
  .hero { padding: 70px 0 56px; }
}
