/* ---------------------------------------------------------
   Dylan Pfeifer — design system
   Navy / cream palette, redesigned layout & type system
--------------------------------------------------------- */

:root {
  /* navy + blue sampled directly from the dp logo artwork */
  --navy: #173764;
  --navy-deep: #0f2547;
  --cream: #f8f4ea;
  --cream-deep: #efe6d2;
  --paper: #ffffff;
  --accent: #3a80c0;
  --accent-soft: #dce9f3;
  --ink: #173764;
  --ink-soft: rgba(23, 55, 100, 0.68);
  --cream-text: #f3ead4;
  --cream-text-soft: rgba(243, 234, 212, 0.72);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --max: 1600px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* keeps the footer at the bottom on pages shorter than the viewport */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1 0 auto; }
body > footer.site-footer { flex-shrink: 0; }

/* Visible keyboard focus. Mouse users never see this; keyboard users depend
   on it to know where they are. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--cream);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
  .card:hover .card-thumb img { transform: none; }
}

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

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

/* Prose stays at a readable measure even though the container is wide —
   only the grid, header and media are allowed to use the full width. */
.wrap--text { max-width: 1080px; }
/* the resume is structured, not long prose, so it runs the full container width */
.wrap--resume { max-width: var(--max); }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 234, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(13, 43, 78, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 30px;
  width: auto;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav.main-nav a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
}

/* ---------------- Footer ---------------- */

footer.site-footer {
  background: var(--navy-deep);
  color: var(--cream-text);
  margin-top: 72px;
}

footer.site-footer .wrap {
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(243, 234, 212, 0.15);
}

.footer-brand img {
  height: 26px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a {
  color: var(--cream-text-soft);
  padding: 0 14px;
  border-right: 1px solid rgba(243, 234, 212, 0.25);
  transition: color 0.15s ease;
}
.footer-links a:first-child { padding-left: 0; }
.footer-links a:last-child { border-right: none; }
.footer-links a:hover { color: var(--cream-text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--cream-text-soft);
}

.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
}
.footer-social a {
  color: var(--cream-text-soft);
  font-weight: 600;
  font-size: 13px;
}
.footer-social a:hover { color: var(--cream-text); }

/* ---------------- Typography helpers ---------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  /* headings are the same family as body text, so they lean on weight and a
     slight negative tracking rather than a contrasting typeface */
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.4em;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.lede {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 76px 0 44px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 780px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

/* ---------------- Sections ---------------- */

section { padding: 48px 0; }
section.tight { padding: 24px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0; }

.link-more {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.link-more:hover { color: var(--navy); }

/* ---------------- Cards / grid ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(13,43,78,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(13,43,78,0.14);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-badge span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(13,43,78,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(2px);
}

.card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.card-body p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------- Intro / about layout ---------------- */

/* Intro and headline are one block: the photo fills what was an empty right
   half, and the copy is no longer split across two sections that repeated
   each other. */
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 80px;
  align-items: center;
}

.hero--intro { padding-bottom: 56px; }

/* Page headers that sit directly above a section heading rather than a full
   block of content, so the two do not drift apart. */
.hero--compact { padding-bottom: 12px; }
.hero--compact .lede:last-of-type { margin-bottom: 0; }

.hero-text .lede { max-width: 36em; }

.hero-text .lede--sub {
  font-size: 17px;
  margin-top: 14px;
}

.lede .hi {
  color: var(--accent);
  font-weight: 700;
}

.headshot {
  width: 340px;
  height: 340px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------------- Detail page (video / project) ---------------- */

.detail-head { padding-bottom: 0; }

.detail-title {
  font-size: clamp(28px, 4vw, 42px);
  max-width: 820px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--navy-deep);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0 40px;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
}

.detail-copy p { margin: 0 0 1.1em; color: var(--ink-soft); }

.scope-box {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
  box-shadow: 0 1px 2px rgba(13,43,78,0.06);
}
.scope-box h3 {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.scope-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.scope-box li {
  font-size: 14px;
  padding-left: 18px;
  position: relative;
}
.scope-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.prevnext {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(13,43,78,0.1);
  font-size: 14px;
}
.prevnext a { color: var(--ink-soft); font-weight: 600; }
.prevnext a:hover { color: var(--navy); }
.prevnext .dir {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.prevnext .next { text-align: right; }

/* ---------------- Writing page ---------------- */

.script-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: 0 1px 2px rgba(13,43,78,0.06);
  margin-bottom: 24px;
}

/* Cards that lead somewhere carry a thumbnail and lift on hover, so a linked
   credit is visibly different from one that is only listed. */
a.script-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.script-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(13,43,78,0.14);
}

/* No aspect-ratio here: the row stretches this box, and an aspect ratio would
   then derive the width from that height and overflow the column. */
.script-thumb {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  min-height: 150px;
}
.script-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.script-body { padding: 26px 30px 26px 0; }

/* Listed-only credits: flatter, so they do not invite a click that goes nowhere */
.script-card--static {
  background: transparent;
  border: 1px solid rgba(13,43,78,0.14);
  box-shadow: none;
}

a.script-card h3 { color: var(--navy); }
a.script-card:hover h3 { color: var(--accent); }

@media (max-width: 720px) {
  a.script-card { grid-template-columns: 1fr; gap: 0; }
  /* stacked, there is no row height to fill, so give the thumb its own shape */
  .script-thumb { aspect-ratio: 16 / 9; min-height: 0; }
  .script-body { padding: 22px 26px 26px; }
}
.script-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.script-card h3 { font-size: 21px; margin-bottom: 10px; }
.script-card p { color: var(--ink-soft); margin: 0; }
.writing-heading {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(23,55,100,0.12);
}

.writing-sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* ---------------- Contact page ---------------- */

/* Contact is a short page. Rather than pinning a narrow block to the left of a
   1600px container and leaving all the emptiness on one side, the block is
   capped and centred, and the section centres in whatever height is left. */
.main-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 72px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
}

.contact-facts {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px 34px;
  box-shadow: 0 1px 2px rgba(23,55,100,0.06);
}

.contact-facts dl {
  margin: 0;
  display: grid;
  gap: 22px;
}

.contact-facts dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}

.contact-facts dd {
  margin: 0;
  font-size: 15px;
}

.contact-facts a { text-decoration: underline; text-underline-offset: 3px; }
.contact-facts a:hover { color: var(--accent); }

@media (max-width: 880px) {
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------------- Resume ---------------- */

.resume {
  max-width: 100%;
}

.resume-section {
  padding-top: 26px;
  margin-bottom: 40px;
  border-top: 1px solid rgba(23,55,100,0.12);
}

.resume-section > h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 26px;
}

/* Role details on the left, responsibilities on the right, so both sides of
   a wide page carry content instead of leaving an empty gutter. */
.job {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 34px;
}

.job-head h3 {
  font-size: 20px;
  margin: 0;
}

.job-org {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 2px 0 0;
}

.job-dates {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.job ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  align-content: start;
}

.job li {
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  color: var(--ink-soft);
}

.job li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.skill-row {
  margin-bottom: 18px;
}

.skill-row dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}

.skill-row dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------------- Placeholder ---------------- */

.placeholder-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(13,43,78,0.06);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 880px) {
  .wrap { padding: 0 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  /* photo above the text once there is no room beside it */
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: start;
  }
  .hero-layout .headshot { order: -1; width: 240px; height: 240px; }
  /* role details stack above their bullets once there is no room beside them */
  .job { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  nav.main-nav {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 20px;
    border-bottom: 1px solid rgba(13,43,78,0.08);
    transform: translateY(-100%);
    /* keep the closed menu fully clear of the header band and out of the tab order */
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }
  nav.main-nav.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.2s ease, visibility 0s;
  }
  nav.main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(13,43,78,0.06); }
  .nav-toggle { display: block; }
  .footer-top { flex-direction: column; }
  .footer-links a:first-child { padding-left: 0; }
}
