
:root {
  /* Colors */
  --bg: #ffffff;
  --ink: #0a0a0a;
  --red: #d7261e;
  --muted: #6b6b6b;
  --line: #d6d6d6;

  /* Font: Helvetica everywhere */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Space between tiles and columns */
  --gap: clamp(20px, 4vw, 64px);
}

/* Dark mode: swaps white and black, keeps the red */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --ink: #ffffff;
    --red: #ff4a3f;
    --muted: #a0a0a0;
    --line: #333333;
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* Nav */
nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 36px);
  padding: clamp(20px, 3vw, 34px) 0;
  font-weight: 700;
  font-size: 1rem;
}
nav a { padding-bottom: 3px; border-bottom: 3px solid transparent; }
nav a:hover,
nav a[aria-current] { border-color: var(--red); }

/* Hero (big heading) */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding: clamp(12px, 3vw, 40px) 0 clamp(48px, 7vw, 96px);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);   /* heading size: change here */
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;      /* all caps; remove this line for normal case */
}
h1 span { display: block; overflow: hidden; padding-bottom: 0.06em; }
h1 b {
  display: block;
  font-weight: inherit;
  transform: translateY(105%);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
h1 span:nth-child(2) b { animation-delay: 0.12s; }
h1 i { font-style: normal; color: var(--red); }  /* the red period */

@keyframes rise { to { transform: none; } }

.hero p {
  margin: 0;
  max-width: 15rem;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Work grid: 3 equal columns */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* minmax(0, 1fr) keeps all 3 columns equal */
  column-gap: var(--gap);
  row-gap: clamp(64px, 9vw, 140px);   /* space between rows of work */
  align-items: start;
}

.tile { display: block; min-width: 0; }

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: auto;               /* lets aspect-ratio set the height, not the HTML height="" */
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: #ddd;
}
.tile video { background: #fff; }

.tile-title {
  display: block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

/* Images that levitate on hover (work tiles and about portraits) */
.tile img,
.tile video,
.portraits img {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}


/* Skills (home page) */
/* Solid words = most experienced. Outlined words = currently building. */
.skills {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  padding-top: clamp(96px, 14vw, 200px);
}
.skills-intro { grid-column: 1 / 4; }
.skills h2 { margin: 0 0 12px; font-size: 1.1rem; font-weight: 700; }
.skills-intro p { margin: 0; max-width: 15rem; color: var(--muted); font-size: 1rem; line-height: 1.4; }

.skill-list { grid-column: 4 / 13; margin: 0; padding: 0; list-style: none; }
.skill {
  padding: 0.14em 0;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.8vw, 3.4rem);   /* skill size: change here */
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s;
}
.skill:last-child { border-bottom: 1px solid var(--line); }
.skill.learning {
  color: transparent;
  -webkit-text-stroke: 1.25px var(--ink);
}

/* About page */
.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
}
.portraits {
  grid-column: 1 / 7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 28px);
}
.portraits img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #ddd;
}
.story { grid-column: 8 / 13; }
.story p { margin: 0 0 1.4em; font-size: 1.1rem; line-height: 1.55; }
.story .lead { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; }

/* Label on the left, rows on the right */
.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  padding-top: clamp(72px, 10vw, 150px);
}
.split-label { grid-column: 1 / 4; margin: 0; font-size: 1.1rem; font-weight: 700; }
.split-list { grid-column: 4 / 13; margin: 0; padding: 0; list-style: none; }
.split-list li {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: var(--gap);
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.split-list li:last-child { border-bottom: 1px solid var(--line); }
.role { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.org { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); line-height: 1.3; padding-top: 0.15em; }

/* Project pages (hollows.html) */
.split-first { padding-top: 0; }                 /* overview sits right under the heading */
.split-body { grid-column: 4 / 11; }
.split-body p { margin: 0 0 1.4em; max-width: 46rem; font-size: 1.1rem; line-height: 1.55; }
.split-body .lead {
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.shots {
  display: grid;
  gap: clamp(16px, 2.5vw, 36px);                 /* space between images */
  margin-top: clamp(64px, 9vw, 130px);
}
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; }

/* A row of images side by side. Column widths come from --cols in the HTML. */
.shot-row {
  display: grid;
  grid-template-columns: var(--cols);
  gap: clamp(16px, 2.5vw, 36px);
}
.shot-row img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  align-self: start;
}
.on-white { background: #fff; }                  /* for images with a white background */

/* Brown panel with the brand statement (Hollow's colors) */
.panel {
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 4vw, 56px);
  background: #3b2322;
  color: #98a3b9;
}
.panel p {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.next {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(64px, 10vw, 140px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
}
.next a:hover { color: var(--red); }

/* More project-page pieces */
.step { padding-top: clamp(32px, 5vw, 72px); }
.step .split-label { grid-column: 1 / 4; }
.shot.narrow { width: 56%; margin-inline: auto; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 36px); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.panel-wide { min-height: clamp(220px, 30vw, 420px); }
.panel-wide p { max-width: 16em; font-size: clamp(1.6rem, 4vw, 3.6rem); }

/* Autoplaying videos: use <video autoplay muted loop playsinline> (autoplay needs muted) */
.vid { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot .vid { height: auto; }

/* Project layout: hero image, then sticky text + scrolling images */
.hero-project { padding-bottom: clamp(28px, 4vw, 48px); }
.project-hero .shot { margin: 0; }
.project {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
  margin-top: clamp(40px, 6vw, 88px);
}
/* Text and images are two equal halves (6 columns each) */
.rail {
  grid-column: 1 / 7;
  position: sticky;            /* stays in view while the images scroll */
  top: 32px;
}
.rail h2 { margin: 0 0 16px; font-size: 1.1rem; font-weight: 700; }
.rail p { margin: 0 0 1.2em; max-width: 34rem; font-size: 1rem; line-height: 1.55; }
.rail .lead { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.35; letter-spacing: -0.015em; font-weight: 500; }
.media { grid-column: 7 / 13; display: grid; gap: clamp(16px, 2.5vw, 36px); }
.media .step { padding-top: clamp(24px, 3vw, 48px); }
.media .step h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; }
.media .step p { margin: 0; max-width: 42rem; font-size: 1.05rem; line-height: 1.55; }
.media .shot.narrow { width: 78%; }

/* Optional autoplay video: stays hidden until the file exists (home page reel) */
.vid.optional { display: none; }
.vid.optional.ready { display: block; }
.reel { height: auto; aspect-ratio: 21 / 9; margin-bottom: var(--gap); }

/* Footer (both pages) */
footer { padding: clamp(72px, 10vw, 140px) 0 36px; }
.cv {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);   /* CV link size */
  line-height: 1;
  letter-spacing: -0.03em;
}
.cv span { display: inline-block; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cv:hover { color: var(--red); }
.cv:hover span { transform: translateY(0.12em); }

.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.foot-row a { color: var(--muted); }
.foot-row a:hover { color: var(--red); }


/* Hover effects: only on devices with a real mouse */
@media (hover: hover) {
  /* levitate: the image floats up with a soft shadow beneath it */
  .tile:hover img,
  .tile:focus-visible img,
  .tile:hover video,
  .tile:focus-visible video,
  .portraits img:hover {
    transform: translateY(-12px);
    box-shadow: 0 22px 28px -12px rgba(0, 0, 0, 0.4);
  }
  .tile:hover .tile-title,
  .tile:focus-visible .tile-title { color: var(--red); }

  /* dim the other tiles while one is hovered (delete these two rules to turn off) */
  .grid:hover .tile { opacity: 0.4; transition: opacity 0.25s; }
  .grid:hover .tile:hover { opacity: 1; }

  .skill:hover { transform: translateX(18px); color: var(--red); }
  .skill.learning:hover { color: transparent; -webkit-text-stroke-color: var(--red); }
}

/* Mobile */
@media (max-width: 700px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }

  .skills, .about, .split { grid-template-columns: 1fr; }
  .skills-intro, .skill-list, .portraits, .story, .split-label, .split-list { grid-column: 1; }
  .skills-intro, .portraits { margin-bottom: 32px; }
  .split-label { margin-bottom: 16px; }
  .split-list li { grid-template-columns: 1fr; gap: 4px; }
  .split-body { grid-column: 1; }
  .shot-row { grid-template-columns: 1fr; }
  .shot-row .vid { height: auto; aspect-ratio: 1 / 1; }
  .shot.narrow { width: 100%; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .project { grid-template-columns: 1fr; }
  .rail { grid-column: 1; position: static; margin-bottom: 32px; }
  .media { grid-column: 1; }
  .media .shot.narrow { width: 100%; }
  .step .split-label { grid-column: 1; }
  .panel { min-height: 260px; }
}

/* Respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce) {
  h1 b { animation: none; transform: none; }
  .tile img, .tile video, .portraits img, .tile-title, .skill, .cv span { transition: none; }
}

.ridebuddy-bottom {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.ridebuddy-bottom img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
