/* Kailen Swensen — portfolio */

@font-face {
  font-family: "Syne Mono";
  src: url("../fonts/SyneMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette taken from the soundwaves video: cyan crests, violet
     undertone, on pure black */
  --bg: #000;
  --surface: #0a0f14;
  --surface-2: #101820;
  --line: #1b2731;
  --text: #e6f1f5;
  --muted: #8ea3b0;
  --accent: #4fd1e8;
  --accent-2: #b48cf0;
  --accent-ink: #00141a;
  --glow: linear-gradient(90deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --wrap: 1120px;
  --mono: "Syne Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--mono); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--accent);
  margin: 0 0 .75rem;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(0 0 0 / .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--mono); color: var(--text); text-decoration: none; font-size: .95rem; text-transform: uppercase; letter-spacing: .16em; white-space: nowrap; }
.nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav nav a {
  font-family: var(--mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); text-decoration: none;
  padding: 6px 10px; border-radius: 8px;
}
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 560px) {
  /* the name would wrap above the links here; the hero already shows it */
  .brand { display: none; }
  .nav { padding-block: 10px; justify-content: center; }
  .nav nav { width: 100%; justify-content: space-around; }
  .nav nav a { padding: 6px 6px; font-size: .85rem; }
}

/* ---------- sections ---------- */
section { padding-block: clamp(56px, 9vw, 104px); }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.page-head { padding-block: clamp(48px, 8vw, 88px) 8px; }
.page-head p { max-width: 640px; color: var(--muted); font-size: 1.1rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(72px, 14vw, 160px); border-bottom: 1px solid var(--line); }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 55%;
  opacity: .9; pointer-events: none;
}
.hero::after { /* soften only the top and bottom edges into the page */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#000, transparent 22%, transparent 70%, #000);
}
.hero .wrap { z-index: 1; }
.hero .wrap { position: relative; }
.hero-logo { width: min(100%, 760px); margin-bottom: 28px; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 600px; color: #e6f1f5; text-shadow: 0 1px 12px #000, 0 0 2px #000; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn.primary { background: var(--glow); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.12); color: var(--accent-ink); }

/* ---------- layout helpers ---------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 820px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

ul.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
ul.ticks li { padding-left: 22px; position: relative; margin-bottom: .35em; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--glow); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: .85rem; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: #cfe0e6; background: var(--surface); }

/* ---------- cards ---------- */
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); text-decoration: none;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-3px); border-color: rgb(79 209 232 / .45); box-shadow: 0 8px 30px -12px rgb(79 209 232 / .35); color: var(--text); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--surface-2); }
.card .body { padding: 20px 22px 24px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card .more { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: .85rem; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transform: none; } }

/* ---------- video (click-to-load YouTube) ---------- */
.yt {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; cursor: pointer; background: #000;
  border-radius: var(--radius); overflow: hidden;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; translate: -50% -50%;
  border-radius: 12px; background: rgb(0 0 0 / .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: background-color .2s;
}
.yt:hover::after { background-color: var(--accent); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .95rem; margin-top: 12px; }

/* ---------- audio ---------- */
.tracks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.track { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; }
.track h3 { font-size: 1rem; margin: 0 0 8px; }
.track audio { width: 100%; height: 40px; }
.subhead { margin: 40px 0 16px; font-size: 1.15rem; }

/* ---------- gallery ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 560px);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; scrollbar-color: var(--line) transparent;
}
.gallery img { scroll-snap-align: start; border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border: 1px solid var(--line); }

/* ---------- about ---------- */
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-photos img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.about-photos img.wide { grid-column: span 2; aspect-ratio: 3 / 2; }

/* ---------- spotify ---------- */
.spotify { width: 100%; height: 352px; border: 0; border-radius: 12px; background: var(--surface); }

/* ---------- synth ---------- */
.synth { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.controls { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-bottom: 24px; }
.controls fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0; padding: 12px 14px 6px; }
.controls legend { font-family: var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; padding: 0 6px; font-size: .78rem; }
.controls label { display: grid; grid-template-columns: 4.5em 1fr 3.2em; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.controls output { text-align: right; font-family: var(--mono); color: var(--text); font-size: .8rem; }
.controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.piano { grid-column: 1 / -1; margin-top: 4px; position: relative; display: flex; height: 170px; user-select: none; touch-action: none; }
.key { flex: 1; border: 1px solid #000; border-radius: 0 0 8px 8px; background: linear-gradient(#f4f4f6, #dcdce2); cursor: pointer; }
.key.black {
  position: absolute; z-index: 1; width: calc(100% / 14 * .62); height: 60%;
  margin-left: calc(100% / 14 * -.31); background: linear-gradient(#2a2a30, #0c0c0e);
  border-radius: 0 0 6px 6px;
}
.key.white.on { background: linear-gradient(#d8f6fc, var(--accent)); }
.key.black.on { background: linear-gradient(#2a2050, var(--accent-2)); }
.key span { display: block; text-align: center; padding-top: 120px; font: .7rem var(--mono); color: #77777f; pointer-events: none; }
.key.black span { padding-top: 70px; color: #888; }
.hint { font-size: .9rem; color: var(--muted); margin-top: 14px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-size: .95rem;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.social a:hover { border-color: var(--muted); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer small { color: var(--muted); font-family: var(--mono); }

/* thin cyan->violet rule under section headings, echoing the wave */
.section-head h2::after, .page-head h1::after {
  content: ""; display: block; width: 56px; height: 2px; margin-top: 14px; background: var(--glow);
}

/* ---------- plug-ins / music additions ---------- */
.panel-shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 20px 60px -30px rgb(79 209 232 / .45); transition: transform .3s; }
.panel-shot:hover { transform: translateY(-3px); }
.panel-shot img { width: 100%; }
.note { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.card .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.card img.contain { object-fit: contain; padding: 14px; background: radial-gradient(circle at 50% 40%, #121c24, #05080b); }
.contain-bg { background: radial-gradient(circle at 50% 40%, #121c24, #05080b); padding: 24px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--surface); }
.jump a:hover { border-color: var(--accent); }
.disc { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.disc li { display: grid; grid-template-columns: 5.2em 1fr auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.disc .yr { font-family: var(--mono); color: var(--accent); }
.disc .kind { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); align-self: center; }
.guest figcaption strong { color: var(--text); }
.guest .role { color: var(--accent); }

/* blurred "in progress" preview (blur is baked into the image) */
.wip { position: relative; margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.wip img { width: 100%; max-height: 520px; object-fit: cover; object-position: top; opacity: .85; }
.wip figcaption {
  position: absolute; inset: 0; margin: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  text-align: center; padding: 24px; background: radial-gradient(ellipse at center, rgb(0 0 0 / .55), rgb(0 0 0 / .15) 70%);
}
.wip-badge {
  font-family: var(--mono); font-size: clamp(1.4rem, 4vw, 2.4rem); letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 24px; border-radius: 999px; color: var(--accent-ink); background: var(--glow);
  box-shadow: 0 10px 40px -10px rgb(79 209 232 / .6);
}
.wip-text { max-width: 520px; color: var(--text); text-shadow: 0 1px 10px #000; font-size: 1rem; }

/* hero: logo and buttons centred, no tagline */
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { margin: 0; }
.hero-logo { margin-inline: auto; margin-bottom: 8px; }
.hero-buttons { justify-content: center; }
.site-footer { padding-block: 32px; }
.site-footer .wrap { justify-content: center; }
.panel-shot.contain-bg img { max-height: 460px; width: auto; margin-inline: auto; }

/* film credit */
.credit { display: grid; grid-template-columns: auto 1fr; gap: 24px; margin-top: 24px; padding: 24px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 820px; }
.credit-year { font-family: var(--mono); font-size: 1.6rem; line-height: 1; padding-top: 4px;
  background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credit h3 { font-size: 1.5rem; margin-bottom: .2em; }
@media (max-width: 520px) { .credit { grid-template-columns: 1fr; gap: 8px; } }

/* About: a single portrait */
.about-photo img { width: 100%; max-width: 460px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-inline: auto; }
