:root {
  --bg: #ffffff;
  --ink: #0e0e0e;
  --muted: #6b6b6b;
  --line: #ececec;
  --soft: #f5f5f4;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

/* Hero */
.hero {
  padding-block: clamp(56px, 12vh, 140px) clamp(48px, 8vh, 96px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(64px, 14vw, 210px);
  line-height: .9;
  letter-spacing: -.05em;
}
/* Tablets and up: keep "cswan portfolio" on one line, sized to fit the page width */
@media (min-width: 720px) {
  .hero h1 {
    white-space: nowrap;
    font-size: min(calc((100vw - var(--gutter) * 2) / 6.7), 176px);
  }
}
.hero h1 span { display: inline-block; animation: rise .9s var(--ease) both; }
.hero .bold { font-weight: 700; }
.hero .thin { font-weight: 200; letter-spacing: -.04em; animation-delay: .12s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Homepage: full-screen title with a link through to the work */
.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.landing {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 5vh, 56px);
  padding-block: clamp(56px, 10vh, 120px) 24px;
}
.landing h1 {
  margin: 0;
  font-size: clamp(64px, 14vw, 210px);
  line-height: .9;
  letter-spacing: -.05em;
}
@media (min-width: 720px) {
  .landing h1 { white-space: nowrap; font-size: min(calc((100vw - var(--gutter) * 2) / 6.7), 176px); }
}
.landing h1 span { display: inline-block; animation: rise .9s var(--ease) both; }
.landing .bold { font-weight: 700; }
.landing .thin { font-weight: 200; letter-spacing: -.04em; animation-delay: .12s; }
.enter {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--ink);
  padding-block: 6px;
  animation: rise .9s var(--ease) .3s both;
}
.enter .mono { font-size: 13px; }
@media (hover: hover) {
  .enter:hover .arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: rotate(-45deg); }
}
.enters {
  display: flex; flex-wrap: wrap; gap: 12px clamp(28px, 4vw, 48px);
  animation: rise .9s var(--ease) .3s both;
}
.enters .enter { animation: none; }
.home .foot { padding-block: 24px 32px; }

/* Work page: the title links back home */
.home-link { text-decoration: none; color: inherit; }

/* List */
.list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
  color: var(--muted);
}
.list-head h2 { margin: 0; font: inherit; color: var(--ink); }

.videos { list-style: none; margin: 0; padding: 0; }
.video { border-bottom: 1px solid var(--line); }
.video a {
  display: grid;
  grid-template-columns: 48px minmax(180px, 320px) 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding-block: clamp(20px, 3vw, 32px);
  text-decoration: none;
  min-height: 44px;
}
.num { color: var(--muted); align-self: start; padding-top: 4px; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--muted);
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.info { min-width: 0; }
.title {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.025em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  display: inline;
  transition: background-size .45s var(--ease);
}
.meta { margin: 10px 0 0; color: var(--muted); }
.credits {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; gap: 16px; align-items: baseline;
}
.credits-label { color: var(--muted); flex: none; }
.credits ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 0;
  font-size: 15px; color: var(--ink);
}
.credits li:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--muted); }
.arrow {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: background .25s, color .25s, border-color .25s, transform .35s var(--ease);
}
.arrow svg { width: 16px; height: 16px; }

@media (hover: hover) {
  .video a:hover .thumb img { transform: scale(1.03); }
  .video a:hover .title { background-size: 100% 1px; }
  .video a:hover .arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: rotate(-45deg); }
}

.empty { padding: 48px 0; color: var(--muted); font-size: 18px; }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-block: 64px 40px;
  color: var(--muted);
}
.contact { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; text-transform: none; }
.contact-label { text-transform: uppercase; margin-right: 6px; }
.contact a { color: var(--ink); }
.contact .sep { color: var(--muted); }
.foot a { text-decoration: none; padding-block: 12px; }
.foot a:hover { color: var(--ink); }

/* Phones */
@media (max-width: 720px) {
  .video a { grid-template-columns: 1fr auto; gap: 14px 16px; }
  .num { display: none; }
  .thumb { grid-column: 1 / -1; }
  .arrow { align-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Swan-bill arrow cursor (computers only; touch screens have no cursor).
   The click point is the tip of the arrow. Text fields keep the normal text cursor. */
@media (hover: hover) and (pointer: fine) {
  html, a, button, [tabindex] {
    cursor: url("/images/beak-cursor.png") 2 2, auto;
    cursor: -webkit-image-set(url("/images/beak-cursor.png") 1x, url("/images/beak-cursor-2x.png") 2x) 2 2, auto;
    cursor: image-set(url("/images/beak-cursor.png") 1x, url("/images/beak-cursor-2x.png") 2x) 2 2, auto;
  }
  input, textarea, [contenteditable="true"] { cursor: text; }
}
