/* Billie Cavallaro — billiecavallaro.com
   Notebook-paper background, clean old-computer monospace type, flat-aligned cards */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #f9fafc;
  --paper-line: #fbe6ec;
  --margin-line: #fbe6ec;
  --hole-color: #aecbed;
  --ink: #1d2333;
  --body: #454c60;
  --muted: #6c7384;
  --muted-soft: #aab0bd;
  --hairline: #dde2ea;
  --card: #ffffff;
  --card-dark: #14182a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  color: var(--ink);
  line-height: 1.6;
  background-color: var(--paper);
  background-image: linear-gradient(var(--paper-line) 1px, transparent 1px);
  background-size: 100% 34px;
  background-position: 0 90px;
  position: relative;
  cursor: url('../images/cursor-pencil.png') 2 32, auto;
}

a, button, .btn-primary, .btn-outline, .nav-links a, .brand-mark {
  cursor: url('../images/cursor-pencil.png') 2 32, pointer;
}

/* left margin rule, like notebook paper */
body::before {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 1px;
  background: var(--margin-line);
  opacity: 0.7;
  z-index: 0;
}

h1, h2, h3 {
  font-family: 'Space Mono', 'IBM Plex Mono', monospace;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.4px;
  line-height: 1.15;
}


a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 56px 0 112px;
  position: relative;
  z-index: 1;
}

@media (min-width: 1800px) {
  .container { max-width: 1680px; padding: 0 64px 0 132px; }
}

.section { padding: 72px 0; }

.section-title {
  font-size: clamp(30px, 1.6vw + 22px, 48px);
  letter-spacing: -0.36px;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(13px, 0.5vw + 11px, 18px);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 16px;
}

/* margin holes (decorative, like spiral binding) */
.margin-hole {
  position: absolute;
  left: 28px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--hole-color);
  background: var(--paper);
  z-index: 2;
}

/* Nav */
nav.site-nav {
  background: var(--paper);
  height: 72px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px dashed var(--hairline);
}
nav.site-nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand-mark {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(18px, 0.4vw + 16px, 24px);
  display: inline-block;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: clamp(14.5px, 0.35vw + 13px, 18px);
  padding: 12px 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}
.nav-links a:hover { border-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* Hero */
.hero-band { position: relative; padding: 64px 0 48px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-band h1 { font-size: clamp(40px, 2.6vw + 22px, 76px); }
.hero-sub {
  margin-top: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(16px, 0.6vw + 14px, 21px);
  color: var(--muted);
  max-width: clamp(420px, 32vw, 600px);
}
.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-portrait {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: 0 16px 32px -8px rgba(33,31,28,0.16);
  max-width: clamp(320px, 22vw, 440px);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait.is-empty::after {
  content: 'Add headshot → assets/images/headshot.jpg';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted-soft);
}

/* Buttons */
.btn-primary, .btn-outline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(14px, 0.2vw + 13px, 16.5px);
  font-weight: 500;
  padding: 14px 22px;
  min-height: 44px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -4px rgba(33,31,28,0.35); }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--muted-soft); box-shadow: 0 4px 10px -6px rgba(33,31,28,0.18); }
.btn-outline:hover { border-color: var(--ink); background: var(--paper); transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(33,31,28,0.24); }

/* Note (used for case-study note, etc.) */
.sticky-note {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 14px 20px;
  display: inline-block;
  box-shadow: 0 8px 20px -10px rgba(33,31,28,0.12);
  font-size: clamp(13.5px, 0.25vw + 12.5px, 16px);
  color: var(--body);
}

/* About */
#about { position: relative; overflow: visible; }

.paper-plane {
  position: absolute;
  left: 6%;
  bottom: -64px;
  width: 84px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translate(0, 0) rotate(-8deg) scale(0.92);
  animation-name: paper-plane-fly;
  animation-duration: 11s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-play-state: paused;
}
.paper-plane.is-flying { animation-play-state: running; }

/* Path mimics a hand-thrown paper plane: a quick launching rise, a smooth
   banking glide as it rides the air, gentle lift and dip, then a soft
   fade-out as it sails off the top-right of the screen. animation-timing-function
   is linear on the element itself — easing lives inside the keyframes so the
   curve (not the playback) controls acceleration, avoiding any stutter. */
@keyframes paper-plane-fly {
  0%   { transform: translate(0, 0) rotate(-8deg) scale(0.92); opacity: 0; }
  4%   { opacity: 1; }
  14%  { transform: translate(12vw, -28px) rotate(3deg) scale(0.98); }
  26%  { transform: translate(25vw, -52px) rotate(-3deg) scale(1); }
  38%  { transform: translate(38vw, -68px) rotate(4deg) scale(1); }
  50%  { transform: translate(51vw, -74px) rotate(-4deg) scale(0.99); }
  62%  { transform: translate(64vw, -83px) rotate(3deg) scale(0.97); }
  74%  { transform: translate(80vw, -98px) rotate(-3deg) scale(0.94); }
  86%  { transform: translate(98vw, -118px) rotate(3deg) scale(0.90); opacity: 1; }
  96%  { transform: translate(122vw, -139px) rotate(-1deg) scale(0.86); opacity: 0.4; }
  100% { transform: translate(140vw, -151px) rotate(0deg) scale(0.84); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .paper-plane { display: none; }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-grid p {
  color: var(--body);
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(15.5px, 0.4vw + 13.5px, 19px);
  margin-bottom: 14px;
  max-width: 640px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 6px 16px -8px rgba(33,31,28,0.10);
}
.stat-number {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(24px, 1.2vw + 19px, 38px);
  color: var(--ink);
  display: inline-block;
}
.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(13px, 0.3vw + 11.5px, 16px);
  color: var(--muted);
  margin-top: 4px;
}

/* Work cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.work-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 8px 20px -10px rgba(33,31,28,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px -10px rgba(33,31,28,0.16); }
.work-card .role {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: clamp(11.5px, 0.15vw + 11px, 13.5px);
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.work-card h3 { font-size: clamp(22px, 0.8vw + 18px, 30px); margin-bottom: 8px; }
.work-card p { color: var(--body); font-family: 'IBM Plex Mono', monospace; font-size: clamp(13.5px, 0.2vw + 13px, 16px); }
.work-card .tags { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: clamp(11.5px, 0.15vw + 11px, 13.5px);
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 3px 9px;
}
.case-study-note { margin-top: 28px; }
.case-study-note a { text-decoration: underline; }

/* Card thumbnails */
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1px solid var(--hairline);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-logo {
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card-thumb-logo img { width: auto; height: auto; max-width: 70%; max-height: 70%; object-fit: contain; }

/* Projects */
.project-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  box-shadow: 0 8px 20px -10px rgba(33,31,28,0.10);
}
.project-card-body { display: flex; gap: 18px; align-items: center; flex: 1; }
.project-thumb {
  width: 88px;
  height: 88px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--hairline);
  flex-shrink: 0;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card h3 { font-size: clamp(18px, 0.5vw + 16px, 24px); margin-bottom: 4px; }
.project-card p { color: var(--body); font-family: 'IBM Plex Mono', monospace; font-size: clamp(13.5px, 0.2vw + 13px, 16px); }

/* Writing */
.writing-card {
  background: var(--card-dark);
  color: #f0ece2;
  border-radius: 8px;
  padding: 40px;
  margin-top: 32px;
  box-shadow: 0 16px 32px -10px rgba(0,0,0,0.3);
}
.writing-card h2 { color: #f0ece2; font-size: 28px; }
.writing-card p { color: #b6ad9c; margin-top: 10px; font-family: 'IBM Plex Mono', monospace; font-size: clamp(14px, 0.25vw + 13px, 17px); max-width: 480px; }
.writing-card .btn-primary { margin-top: 20px; background: #f0ece2; color: var(--card-dark); border-color: #f0ece2; }

/* Contact */
.contact-band { text-align: center; }
.contact-band h2 { font-size: clamp(30px, 1.6vw + 22px, 48px); }

/* Paper football — a little 90s-classroom flick toy */
.paper-football-wrap {
  background: none;
  border: none;
  padding: 0;
  margin: 0 auto 18px;
  display: block;
  cursor: url('../images/cursor-pencil.png') 2 32, pointer;
  -webkit-tap-highlight-color: transparent;
}
.paper-football {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto;
  transform-origin: 50% 60%;
  transition: transform 0.15s ease;
}
.paper-football-wrap:hover .paper-football { transform: rotate(-6deg) scale(1.06); }
.paper-football-wrap:active .paper-football { transform: rotate(-6deg) scale(0.94); }
.paper-football.is-flicking {
  animation: football-flick 0.9s cubic-bezier(0.33, 1, 0.68, 1);
}
@keyframes football-flick {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  35%  { transform: translate(60px, -90px) rotate(360deg) scale(0.92); }
  65%  { transform: translate(110px, -40px) rotate(560deg) scale(0.85); opacity: 1; }
  85%  { transform: translate(40px, 10px) rotate(680deg) scale(0.95); opacity: 1; }
  100% { transform: translate(0, 0) rotate(720deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .paper-football.is-flicking { animation: none; }
}
.contact-band p { color: var(--muted); margin-top: 14px; font-family: 'IBM Plex Mono', monospace; font-size: clamp(15px, 0.3vw + 13.5px, 18px); }
.note-box {
  display: inline-block;
  margin-top: 10px;
  border: 1px dashed var(--hairline);
  border-radius: 4px;
  padding: 10px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(13px, 0.2vw + 12.5px, 15.5px);
  background: var(--card);
}
.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Footer */
footer {
  border-top: 1px dashed var(--hairline);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(12.5px, 0.15vw + 12px, 14.5px);
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-band h1 { font-size: 40px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 280px; }
  .about-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px 0 56px; }
  body::before { left: 36px; }
  .margin-hole { left: 16px; width: 16px; height: 16px; }
  .hero-band { padding: 48px 0 32px; }
  .hero-band h1 { font-size: 30px; }
  .hero-sub { font-size: 13.5px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px dashed var(--hairline);
    padding: 8px 20px 16px 56px;
    box-shadow: 0 12px 20px -12px rgba(33,31,28,0.18);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .project-card { flex-direction: column; align-items: flex-start; }
  .writing-card { padding: 28px; }
  .contact-band h2 { font-size: 26px; }
  .section { padding: 40px 0; }
}
