/* PortfolioStylesheet.css — single-page, mobile-first, non-janky */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html { scroll-behavior: auto; } }

:root{
  --bg: #0f0b16;
  --bg2: #16111e;

  --text: #e9e6f1;
  --muted: rgba(233,230,241,0.74);
  --muted2: rgba(233,230,241,0.58);

  --card: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);

  --accent: #bda7ff;
  --accent2: #79d6ff;

  --shadow: 0 18px 60px rgba(0,0,0,0.45);

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 44px);
  --radius: 18px;

  --fs: clamp(16px, 1.15vw + 12px, 20px);
  --h1: clamp(34px, 4vw + 10px, 64px);
  --h2: clamp(22px, 2vw + 10px, 34px);
  --h3: clamp(18px, 1.3vw + 10px, 26px);

  --work-narrow: 740px;         /* normal centered width */
  --work-wide: 980px;           /* expanded centered width (desktop) */
  --work-wide-mobile: 760px;    /* expanded max on small screens */
}

body{
  margin: 0;
  min-height: 100dvh;
  font-size: var(--fs);
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(189,167,255,0.20), transparent 55%),
    radial-gradient(900px 600px at 80% 10%, rgba(121,214,255,0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  overflow-x: hidden;

  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a{
  color: var(--text);
  text-decoration-color: aqua;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover{
  text-decoration: underline;
  text-underline-offset: 8px;
  color: rgb(24, 24, 238);
}

img{ max-width: 100%; height: auto; display: block; }

:focus-visible{
  outline: 2px solid rgba(189,167,255,0.9);
  outline-offset: 3px;
  border-radius: 10px;
}

.container{
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.muted{ color: var(--muted); }
.muted2{ color: var(--muted2); }

.section{
  padding: clamp(44px, 7vh, 92px) 0;
}

.section--tint{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.section__head{
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.h2{
  margin: 0 0 10px 0;
  font-size: var(--h2);
  letter-spacing: -0.02em;
}

.h3{
  margin: 18px 0 10px 0;
  font-size: var(--h3);
  letter-spacing: -0.01em;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.2vw, 28px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card__title{
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.list{
  margin: 0;
  padding-left: 18px;
}
.list li{ margin: 8px 0; }

/* ---------- Top nav ---------- */
.site-top{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 8, 14, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display: grid;
  gap: 2px;
  text-decoration: none;
}
.brand__name{
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand__role{
  font-size: 0.9em;
  color: var(--muted);
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__logo{
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
}

.brand__text{
  display: grid;
  gap: 2px;
}

@media (max-width: 420px){
  .brand__logo{ width: 34px; height: 34px; }
  .brand__role{ display: none; }
}


.nav{
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav a{
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover{
  color: var(--text);
  border-color: rgba(189,167,255,0.35);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.navbtn{
  display: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.navbtn__bar{
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(233,230,241,0.82);
  margin: 5px 0;
  border-radius: 999px;
}

@media (max-width: 860px){
  .navbtn{ display: inline-flex; flex-direction: column; }
  .nav{
    position: absolute;
    right: var(--gutter);
    left: var(--gutter);
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: rgba(10, 8, 14, 0.92);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .nav a{ text-align: center; }
  .nav.is-open{ display: flex; }
}

/* ---------- Hero ---------- */
.hero{
  padding-top: clamp(42px, 7vh, 90px);
}
.hero__grid{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.hero__kicker{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.portrait{
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  background: rgba(255,255,255,0.06);
}

.hero__kickerText{ display: grid; gap: 2px; }
.hero__name{
  font-weight: 850;
  letter-spacing: -0.02em;
}
.hero__tags{
  color: var(--muted);
  font-size: 0.95em;
}

.hero__title{
  margin: 0 0 12px 0;
  font-size: var(--h1);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero__subtitle{
  margin: 0 0 18px 0;
  color: var(--muted);
  max-width: 65ch;
}

.hero__cta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__panelTitle{
  font-weight: 800;
  margin-bottom: 12px;
}
.quicklinks{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
}
.chip:hover{
  border-color: rgba(189,167,255,0.45);
  background: rgba(255,255,255,0.10);
  text-decoration: none;
}
.hero__note{
  margin-top: 12px;
  color: var(--muted2);
  font-size: 0.95em;
}

@media (max-width: 960px){
  .hero__grid{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .portrait{ width: 76px; height: 76px; }
  .hero__kicker{ gap: 12px; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 44px;
  padding: 12px 16px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--text);

  font-weight: 700;
  letter-spacing: -0.01em;

  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(189,167,255,0.45);
  text-decoration: none;
}
.btn:active{ transform: translateY(0px); }

.btn--primary{
  background: linear-gradient(90deg, rgba(189,167,255,0.35), rgba(121,214,255,0.22));
  border-color: rgba(189,167,255,0.50);
}

/* ---------- Grids ---------- */
.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 18px);
}
@media (max-width: 860px){
  .grid2{ grid-template-columns: 1fr; }
}

/* IMPORTANT: single-column project lists (portfolio + testimonials) */
.workgrid{
  display: grid;
  grid-template-columns: 1fr;         /* <- forced single column */
  gap: clamp(12px, 2vw, 18px);
  justify-items: center;
  align-items: start;
}

/* ---------- Work cards (details) ---------- */
.work{
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
  overflow: hidden;

  width: 100%;
  max-width: var(--work-narrow);
  margin-inline: auto;

  /* faster close (default) */
  transition:
    max-width 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

/* slower open (when active) */
.work.is-active{
  max-width: var(--work-wide);
  transform: translateY(-1px);
  border-color: rgba(189,167,255,0.22);

  transition-duration: 320ms; /* <- slower open */
}

/* keep expanded width sane on smaller screens */
@media (max-width: 960px){
  .work{ max-width: var(--work-wide-mobile); }
  .work.is-active{ max-width: var(--work-wide-mobile); }
}

/* Hide default marker */
.work > summary{ list-style: none; }
.work > summary::-webkit-details-marker{ display: none; }

.work__summary{
  position: relative;
  padding: 18px 18px 18px 56px; /* left space for speaker */
  cursor: pointer;
  user-select: none;

  display: grid;
  gap: 4px;

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Speaker indicator */
.work__playdot{
  position: absolute;
  top: 16px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 2;
}
.work__icon{
  font-size: 16px;
  opacity: 0.55;
}

/* Playing state */
.work.is-playing .work__playdot{
  border-color: rgba(121,214,255,0.55);
  background: rgba(121,214,255,0.14);
}
.work.is-playing .work__icon{
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(121,214,255,0.35));
}

/* Readable overlay */
.work__summary::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.66), rgba(0,0,0,0.40) 55%, rgba(0,0,0,0.72));
}
.work__summary > *{ position: relative; z-index: 1; }

.work__title{
  font-weight: 820;
  letter-spacing: -0.02em;
  font-size: 1.12em;
}

.work__meta{
  color: rgba(233,230,241,0.78);
  font-size: 0.95em;
}

.work__summary::after{
  content: "Tap to expand";
  position: relative;
  z-index: 1;
  margin-top: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(233,230,241,0.80);
  font-size: 0.9em;
}

.work[open] .work__summary::after{
  content: "Tap to collapse";
}

.work__body{
  padding: 18px;
  background:
    radial-gradient(900px 360px at 20% 10%, rgba(189,167,255,0.12), transparent 60%),
    radial-gradient(700px 320px at 85% 15%, rgba(121,214,255,0.08), transparent 60%),
    rgba(10, 8, 14, 0.55);
  border-top: 1px solid rgba(255,255,255,0.10);
}

.work__text{
  margin: 0 0 12px 0;
  color: rgba(233,230,241,0.90);
  max-width: 72ch;
}

/* Media */
.media{
  width: 100%;
  display: block;
  border-radius: 14px;
}
audio.media{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
video.media{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
}

/* Tracklist */
.tracklist{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.track__name{
  font-weight: 700;
  margin-bottom: 6px;
}

/* PDF wrapper (empty until JS injects iframe) */
.pdfwrap{
  margin-top: 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  min-height: 0;
}
.pdfwrap.is-empty{
  border: 0;
  margin-top: 0;
}
.pdfwrap iframe{
  width: 100%;
  height: min(70vh, 820px);
  border: 0;
  display: block;
}
@media (max-width: 640px){
  .pdfwrap iframe{ height: 62vh; }
}

/* Background images for work cards */

.work--race > summary { background-image: url("Files/Pictures/daniel-terrado-the-race-daniel-terrado-02-2.jpg"); }
.work--corto > summary { background-image: url("Files/Pictures/Corto.png"); }
.work--sticky > summary { background-image: url("Files/Pictures/StickySituation.jpg"); }
.work--ravengard > summary { background-image: url("Files/Pictures/RavenguardBackground2.png"); }
.work--wonderworks > summary { background-image: url("Files/Pictures/Wonderworks.png"); }

/* Default: small images */
.work--unity > summary {
  background-image: url("Files/Pictures/Unity-small.png");
}

.work--burn > summary {
  background-image: url("Files/Pictures/When%20We%20Burn-small.png");
}

/* When large image is ready */
.work--unity.is-hires > summary {
  background-image: url("Files/Pictures/Unity.png");
}

.work--burn.is-hires > summary {
  background-image: url("Files/Pictures/When%20We%20Burn.png");
}

/* Smooth swap */
.work__summary{
  transition: background-image 0.2s ease, opacity 0.25s ease;
}


/* ---------- Form ---------- */
.form{
  display: grid;
  gap: 14px;
}
.form__row{
  display: grid;
  gap: 8px;
}
.form__label{
  font-weight: 700;
  color: rgba(233,230,241,0.88);
}
.form__input{
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
.form__input:focus{
  border-color: rgba(189,167,255,0.55);
  box-shadow: 0 0 0 3px rgba(189,167,255,0.16);
}
.form__textarea{
  resize: vertical;
  min-height: 140px;
}
.form__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.form__status{
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.footer{
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

/* ---------- Reveal (subtle) ---------- */
.reveal{ opacity: 0; transform: translateY(10px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.reveal--in{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

.footer__seal{
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}
