/* ============================================================
   CAYDEN MUDD · PORTFOLIO (v2, light)
   White and light blue with small touches of red.
   Headings: Schibsted Grotesk. Body: Figtree.
   One screen, tabbed panels, no page scrolling on desktop.
   ============================================================ */

:root {
  --paper: #f6f1e8;      /* page background, soft beige */
  --card: #ffffff;       /* cards sit white on the beige */
  --hover: #ece5d6;      /* beige hover tint */
  --mist: #f3f8fc;       /* light blue tint, chips and small fills */
  --sky: #d8e8f4;        /* borders, soft fills */
  --blue: #2f6fa7;       /* primary blue */
  --blue-deep: #24567f;  /* hover */
  --navy: #1d2b38;       /* headings and body text */
  --slate: #5c6b79;      /* secondary text */
  --red: #c74444;        /* small accents only */

  --head: "Schibsted Grotesk", "Helvetica Neue", sans-serif;
  --body: "Figtree", "Segoe UI", sans-serif;

  --radius: 12px;
  --pad: clamp(1rem, 2.5vw, 2rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  font-size: 0.95rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }
a:hover { color: var(--blue-deep); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection { background: var(--sky); }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.2;
}

h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.02rem; }

.muted { color: var(--slate); }

/* ---------- App frame: one screen ---------- */
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--pad);
  border-bottom: 1px solid var(--sky);
  background: var(--paper);
  flex-wrap: wrap;
}

.ident { display: flex; flex-direction: column; min-width: 0; }

.ident-name {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.15rem;
}

.ident-role {
  font-size: 0.78rem;
  color: var(--slate);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-inline: auto;
  flex-wrap: wrap;
}

.tabs button {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--slate);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: color 130ms ease, background 130ms ease;
}

.tabs button:hover { color: var(--blue-deep); background: var(--hover); }

.tabs button[aria-selected="true"] {
  color: #ffffff;
  background: var(--blue);
}

.top-links {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
}

.top-links a {
  text-decoration: none;
  font-weight: 500;
}

/* ---------- Panels ---------- */
main {
  flex: 1;
  min-height: 0;
  background: var(--paper);
}

.panel {
  height: 100%;
  overflow-y: auto;
  padding: clamp(1.25rem, 3.5vh, 2.5rem) var(--pad);
}

.panel[hidden] { display: none; }

/* Gentle entrance when switching tabs */
.panel.active { animation: panel-in 240ms ease; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- About me ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 1060px;
  margin-inline: auto;
}

.photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--sky);
}

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

.photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-family: var(--head);
  font-weight: 700;
  font-size: 3rem;
  color: var(--blue);
  background: var(--mist);
}

.photo.missing img { display: none; }
.photo.missing .photo-fallback { display: grid; }

.facts {
  list-style: none;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.facts li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--sky);
}

.facts li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 0.55rem;
  vertical-align: 2px;
}

.intro { max-width: 44rem; }

.board-label {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 1.5rem 0 0.75rem;
}

.board-label .hint {
  font-family: var(--body);
  font-weight: 400;
  color: var(--slate);
  font-size: 0.8rem;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.work-card {
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.work-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(47, 111, 167, 0.12);
}

.work-card h3 { margin-bottom: 0.2rem; }

.work-card .tagline {
  font-size: 0.82rem;
  color: var(--slate);
}

.work-card .stat {
  margin-top: 0.6rem;
  font-size: 0.8rem;
}

.work-card .stat b {
  color: var(--red);
  font-weight: 600;
}

/* ---------- Faith ---------- */
.faith-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 1000px;
  margin-inline: auto;
}

.faith-main p { max-width: 40rem; margin-bottom: 0.9rem; }

.verse-card {
  margin-top: 1.25rem;
  background: var(--card);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-family: var(--head);
  font-size: 1.05rem;
}

.verse-card cite {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--slate);
}

.faith-side { display: flex; flex-direction: column; gap: 0.9rem; }

/* ---------- Shared small cards ---------- */
.mini-card {
  background: var(--card);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.mini-card p { font-size: 0.86rem; color: var(--slate); }
.mini-card h3 { margin-bottom: 0.35rem; }

.mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

/* ---------- Skills ---------- */
.skills-head { max-width: 1060px; margin-inline: auto; }

.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 1060px;
  margin: 1.25rem auto 0;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  align-content: start;
}

.skill-group {
  background: var(--card);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.skill-group ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--navy);
}

.skill-group li {
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--sky);
}

.skill-group li:last-child { border-bottom: none; }

.skills-right { display: flex; flex-direction: column; gap: 0.9rem; }

.plain-list { list-style: none; }

.plain-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--sky);
  font-size: 0.86rem;
}

.plain-list li:last-child { border-bottom: none; }

.plain-list .sub {
  display: block;
  color: var(--slate);
  font-size: 0.78rem;
}

.exp-list { list-style: none; }

.exp-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--sky);
  font-size: 0.85rem;
}

.exp-list li:last-child { border-bottom: none; }

.exp-list .exp-role { font-weight: 600; }

.exp-list .exp-org { color: var(--blue); }

.exp-list .exp-dates {
  color: var(--slate);
  font-size: 0.76rem;
}

.exp-list .exp-note {
  color: var(--slate);
  font-size: 0.8rem;
}

/* ---------- Where I'm going ---------- */
#panel-going h2,
.going-note { max-width: 1000px; margin-inline: auto; }

.going-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  max-width: 1000px;
  margin: 0.5rem auto 0;
}

.going-card {
  background: var(--card);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.going-card p { font-size: 0.88rem; color: var(--slate); }
.going-card h3 { margin-bottom: 0.4rem; }

.going-step {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.going-note {
  margin-top: 1.25rem;
  font-family: var(--head);
  font-size: 1rem;
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem var(--pad);
  border-top: 1px solid var(--sky);
  font-size: 0.75rem;
  color: var(--slate);
  background: var(--paper);
}

/* ---------- Project overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 43, 56, 0.45);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  z-index: 50;
}

.overlay[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 18px 50px rgba(29, 43, 56, 0.25);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close:hover { color: var(--red); }

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.modal .modal-client {
  color: var(--slate);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.modal h4 {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 1rem 0 0.25rem;
}

.modal .modal-stat { color: var(--red); font-weight: 600; }

.modal .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.modal .chip {
  font-size: 0.74rem;
  background: var(--mist);
  border: 1px solid var(--sky);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  color: var(--slate);
}

.modal .modal-status {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--slate);
}

.modal .modal-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .skill-groups { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 780px) {
  /* One screen relaxes to normal scrolling on small screens */
  .app { height: auto; min-height: 100dvh; }
  main { overflow: visible; }
  .panel { height: auto; overflow: visible; }

  .top { gap: 0.75rem; }
  .tabs { margin-inline: 0; order: 3; width: 100%; }
  .top-links { margin-left: auto; }

  .about-grid,
  .faith-grid,
  .skills-grid { grid-template-columns: 1fr; }

  .photo { max-width: 240px; }
  .work-cards { grid-template-columns: 1fr; }
  .skill-groups { grid-template-columns: 1fr; }
  .going-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .panel.active { animation: none; }
  .work-card,
  .work-card:hover { transition: none; transform: none; }
}
