/* ==========================================================
   Jack Danis — site styles
   (style.css is kept as-is for the older class assignments)
   ========================================================== */

/*---Fonts---*/
@font-face {
  font-family: 'Chicago';
  src: url('../fonts/chicagoflf-webfont.woff2') format('woff2'),
       url('../fonts/chicagoflf-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Century Gothic Web';
  src: url('../fonts/CenturyGothic.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'Chicago', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Century Gothic Web', 'Century Gothic', 'Avenir Next', Futura, ui-sans-serif, system-ui, sans-serif;

  --bg: #fbfbf9;
  --surface: #ffffff;
  --fg: #111111;
  --muted: #6d6d6a;
  --line: #e7e7e3;

  --blue: rgb(144, 215, 236);
  --pink: rgb(244, 154, 194);
  --yellow: rgb(249, 235, 105);

  --max: 1120px;
  --text: 680px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/*---Reset---*/
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
p a, .text-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
  transition: text-decoration-color .2s;
}
p a:hover, .text-link:hover { text-decoration-color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.15;
  letter-spacing: .01em;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--fg); color: var(--bg);
  padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/*---Header / Nav---*/
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo img { width: 104px; height: auto; }

.nav-list {
  display: flex; gap: 2.25rem; list-style: none;
  font-family: var(--font-display); font-size: .95rem;
}
.nav-list a {
  position: relative; padding: .25rem 0;
  color: var(--muted); transition: color .2s;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--fg); }
.nav-list a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--pink), var(--yellow));
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--fg);
  transition: transform .25s var(--ease), background .2s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav-open .site-nav { max-height: 20rem; }
  .nav-list { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem; font-size: 1.1rem; }
  .nav-list a { display: block; padding: .7rem 0; }
  .nav-list a::after { display: none; }
}

/*---Buttons---*/
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .95rem;
  padding: .8rem 1.4rem;
  border: 1.5px solid var(--fg); border-radius: 999px;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: #2a2a2a; }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/*---Shared type---*/
.eyebrow {
  font-family: var(--font-display); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 2rem;
}
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.prose { max-width: var(--text); }
.prose p + p { margin-top: 1rem; }

.gradient-text {
  background: linear-gradient(90deg, var(--blue), var(--pink), var(--yellow), var(--blue));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 10s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }

/*---Home hero---*/
.hero {
  display: flex; align-items: center;
  padding: clamp(3rem, 10vw, 7rem) 0;
}
@media (min-width: 721px) {
  .hero { min-height: calc(100vh - 72px - 120px); }
}
.hero h1 {
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: .95; letter-spacing: -.01em;
  margin: 1rem 0 1.5rem;
}
.hero .lede { margin-bottom: 2.5rem; }

/*---Work grid---*/
.work-grid {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card { display: block; }
.card-media {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: #f0f0ec;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.card-media.contain img { object-fit: contain; padding: 12%; }
/* YouTube hqdefault thumbnails are 4:3 with letterbox bars; zoom past them */
.card-media.yt img { transform: scale(1.34); }
.card:hover .card-media.yt img { transform: scale(1.39); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding-top: 1rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.card-body p { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.card-body .eyebrow { display: block; margin-bottom: .4rem; font-size: .7rem; }
.card .arrow { display: inline-block; transition: transform .25s var(--ease); }
.card:hover .arrow { transform: translateX(4px); }

/*---Page header (inner pages)---*/
.page-head { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem); }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.75rem); margin: .75rem 0 1.25rem; }
.back-link { font-family: var(--font-display); font-size: .85rem; color: var(--muted); transition: color .2s; }
.back-link:hover { color: var(--fg); }

.meta {
  display: grid; gap: 1.25rem 2.5rem; margin-top: 2.25rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
}
.meta dt { font-family: var(--font-display); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meta dd { font-size: .95rem; }

/*---Project sections---*/
.project { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.project-head { display: grid; gap: 1rem 3rem; margin-bottom: 2rem; }
@media (min-width: 900px) {
  .project-head { grid-template-columns: minmax(220px, 1fr) 2fr; }
}
.project-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.project-head .eyebrow { display: block; margin-bottom: .5rem; }
.project-head .prose { color: #333; }

.media-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .media-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .media-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
figure { margin: 0; }
figure img, figure video {
  width: 100%; border-radius: var(--radius); background: #f0f0ec;
}
figure.framed img { border: 1px solid var(--line); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; line-height: 1.5; }
.media-grid.cover img, .media-grid.cover video { aspect-ratio: 4 / 3; object-fit: cover; }

.video-embed {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.link-list { list-style: none; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a {
  display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.5rem; padding: 1.1rem 0;
  transition: padding .25s var(--ease);
}
.link-list a:hover { padding-left: .5rem; }
.link-list strong { font-family: var(--font-display); font-weight: normal; }
.link-list span { color: var(--muted); font-size: .92rem; grid-column: 1; }
.link-list .arrow { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/*---About---*/
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 340px 1fr; } }
.about-grid img { border-radius: var(--radius); width: 100%; }
.faq { display: grid; gap: 2rem; max-width: var(--text); }
.faq h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.faq p { color: #333; }
.ascii {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(3.2px, 1.05vw, 9px); line-height: 1.1;
  color: var(--muted); overflow: hidden; white-space: pre;
}

/*---Contact---*/
.contact-list { list-style: none; max-width: var(--text); border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.4rem 0; font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.6rem);
  transition: padding .25s var(--ease);
}
.contact-list a span { font-family: var(--font-body); font-size: .95rem; color: var(--muted); }
.contact-list a:hover { padding-left: .6rem; }

/*---Footer---*/
.site-footer { margin-top: auto; }
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center;
  padding-top: 2rem; padding-bottom: 2rem;
  font-size: .9rem; color: var(--muted);
}
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a:hover { color: var(--fg); }
.triangle-strip {
  height: 14px;
  background:
    linear-gradient(135deg, transparent 50%, var(--bg) 50%) 0 0 / 14px 14px,
    linear-gradient(225deg, transparent 50%, var(--bg) 50%) 0 0 / 14px 14px,
    linear-gradient(90deg, var(--pink) 0 33.33%, var(--blue) 0 66.66%, var(--yellow) 0) 0 0 / 42px 14px;
}

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