/* ==========================================================================
   ZACHARY LIND — PORTFOLIO
   Design system: animator's tool kit — bond paper, blue-pencil roughs,
   red grease-pencil corrections, storyboard panels.

   HOW TO CHANGE COLORS/FONTS: edit the variables at the top of this file.
   Every page pulls from these same values, so one edit updates the
   whole site.
   ========================================================================== */

:root {
  /* ---- Color: animator's desk ---- */
  --paper: #F6F1E6;        /* background — warm bond paper */
  --paper-dim: #EDE4D0;    /* card / alt-section background */
  --ink: #201C15;          /* primary text — graphite line */
  --ink-soft: #55503F;     /* secondary text */
  --blue-pencil: #3E6E9E;  /* rough-pencil blue — links, labels */
  --marker-red: #C1401F;   /* grease-pencil red — accents, buttons */
  --line: #D9CCA9;         /* hairline dividers */
  --paper-white: #FFFCF5;  /* lightest surface, panel backgrounds */

  /* ---- Type ---- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* ---- Scale ---- */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-pencil); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Focus visibility (accessibility floor) ---- */
a:focus-visible, button:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--marker-red);
  outline-offset: 3px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Sprocket-hole divider — a thin nod to a film strip edge. Used sparingly
   at the top of the header and above the footer.
   ========================================================================== */
.sprockets {
  display: flex;
  gap: 22px;
  justify-content: center;
  padding: 6px 0;
  background: var(--ink);
}
.sprockets span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.55;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--marker-red); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

.main-nav ul {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  flex-wrap: wrap;
}
.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--marker-red);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0 1rem; }
  .main-nav a { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .nav-wrap { flex-wrap: wrap; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-pencil);
  margin-bottom: 0.9rem;
  display: block;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-style: italic;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  font-weight: 700;
  color: var(--marker-red);
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--marker-red); border-color: var(--marker-red); color: var(--paper-white); }
.btn-primary:hover { background: #A6350F; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper-white); }

/* ==========================================================================
   Flipbook signature — a small looping bounce-cycle, the first exercise
   every animator learns (squash & stretch). Purely decorative motion;
   pauses automatically for reduced-motion users.
   ========================================================================== */
.flipbook {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 6 / 7;
  margin: 0 auto;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--paper-dim);
}
.flipbook .frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: flip-reveal 1.6s steps(1, end) infinite;
}
.flipbook .frame svg { width: 100%; height: 100%; }
.flipbook .frame:nth-child(1) { animation-delay: 0s; }
.flipbook .frame:nth-child(2) { animation-delay: 0.2s; }
.flipbook .frame:nth-child(3) { animation-delay: 0.4s; }
.flipbook .frame:nth-child(4) { animation-delay: 0.6s; }
.flipbook .frame:nth-child(5) { animation-delay: 0.8s; }
.flipbook .frame:nth-child(6) { animation-delay: 1.0s; }
.flipbook .frame:nth-child(7) { animation-delay: 1.2s; }
.flipbook .frame:nth-child(8) { animation-delay: 1.4s; }
@keyframes flip-reveal {
  0%      { opacity: 1; }
  12.49%  { opacity: 1; }
  12.5%   { opacity: 0; }
  100%    { opacity: 0; }
}
.flipbook-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
@media (prefers-reduced-motion: reduce) {
  .flipbook .frame { animation: none; opacity: 0; }
  .flipbook .frame:first-child { opacity: 1; }
}

/* ==========================================================================
   Sections / containers
   ========================================================================== */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
}
.section-alt { background: var(--paper-dim); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue-pencil);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Storyboard panel — the reusable card for every work grid (Animation,
   Life Drawing, Designs, and the homepage highlights). Styled like a
   labeled storyboard/shot-list frame: panel number, format, action note.
   ========================================================================== */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}
.panel {
  background: var(--paper-white);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-frame {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    45deg, var(--paper-dim), var(--paper-dim) 10px, var(--paper) 10px, var(--paper) 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}
.panel-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Use class="panel-frame fit" for wide art or logos that shouldn't be cropped */
.panel-frame.fit { background: var(--paper-white); }
.panel-frame.fit img { object-fit: contain; padding: 0.75rem; }
.panel-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-pencil);
  padding: 0.6rem 1rem 0;
}
.panel-body { padding: 0.6rem 1rem 1.2rem; }
.panel-body h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.panel-body p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

/* ==========================================================================
   Full-bleed hero banner — recreates the old site's opening: the artwork
   collage behind large overlaid type. The dark scrim keeps the text
   readable over a busy image.
   ========================================================================== */
.hero-banner {
  position: relative;
  min-height: min(78vh, 620px);
  display: flex;
  align-items: center;
  background-image: url("../images/hero-collage.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,18,14,0.82) 0%, rgba(20,18,14,0.62) 55%, rgba(20,18,14,0.35) 100%);
}
.hero-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter);
  width: 100%;
}
.hero-banner .eyebrow {
  color: #E8C39A;
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-banner h1 {
  color: var(--paper-white);
  font-size: clamp(2.8rem, 9vw, 6rem);
  margin-bottom: 0.35em;
  letter-spacing: -0.01em;
}
.hero-banner p.lede {
  color: rgba(255,252,245,0.88);
  max-width: 44ch;
  font-size: 1.1rem;
}
.hero-banner .btn-ghost {
  border-color: var(--paper-white);
  color: var(--paper-white);
}
.hero-banner .btn-ghost:hover {
  background: var(--paper-white);
  color: var(--ink);
}

/* ==========================================================================
   Masonry gallery — for Life Drawing and Designs. Matches the old site's
   flat "click to view full size" gallery flow. Images are listed in a
   JS array at the bottom of each page — add a filename, drop the file in
   images/, done. No per-image HTML needed.
   ========================================================================== */
.masonry {
  column-count: 4;
  column-gap: 1rem;
}
@media (max-width: 1000px) { .masonry { column-count: 3; } }
@media (max-width: 700px)  { .masonry { column-count: 2; } }
@media (max-width: 460px)  { .masonry { column-count: 1; } }
.masonry a {
  display: block;
  break-inside: avoid;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: var(--paper-white);
  border-radius: var(--radius);
  overflow: hidden;
}
.masonry img {
  width: 100%;
  display: block;
}
.masonry-empty {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
  border: 1px dashed var(--line);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

/* ==========================================================================
   Placeholder callouts — visible reminders of what to replace. Delete
   the .placeholder-note elements once real content is in.
   ========================================================================== */
.placeholder-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--marker-red);
  background: #FBEAE3;
  border: 1px dashed var(--marker-red);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  margin: 0 0 1.5rem;
}

/* ==========================================================================
   Simple two-column content block (About / CV summary sections)
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ==========================================================================
   CV page specifics
   ========================================================================== */
.cv-block { margin-bottom: 2rem; }
.cv-block h3 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-pencil);
  margin-bottom: 0.8rem;
}
.cv-entry { border-left: 2px solid var(--line); padding-left: 1rem; margin-bottom: 1.1rem; }
.cv-entry .role { font-weight: 600; }
.cv-entry .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.contact-card .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-pencil);
  display: block;
  margin-bottom: 0.5rem;
}
.contact-card a { font-size: 1.1rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.contact-card a:hover { color: var(--marker-red); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 2rem var(--gutter) 3rem; text-align: center; }
.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0.3rem 0 0;
}
.site-footer a { color: var(--ink-soft); }
