/* ─── Google Fonts: DM Sans (body/headings) + DM Mono (captions) ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,475;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400;1,9..40,500&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* ─── Reset & base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  --mobile-scale: 1.09;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;

  /* Swatches matching original exactly */
  --swatch-1: rgba(0, 0, 0, 0.85);
  --swatch-2: rgba(0, 0, 0, 0.75);
  --swatch-3: rgba(0, 0, 0, 0.6);
  --swatch-4: rgba(0, 0, 0, 0.4);
  --swatch-5: rgba(0, 0, 0, 0.25);
  --swatch-6: rgba(255, 0, 0, 0.85);
  --swatch-7: rgba(125, 125, 125, 0.25);
  --baseColor-accent: #ff0000;

  display: flex;
  flex-direction: column;
}

/* ─── Typography ─── */
body,
p,
li,
td,
input,
textarea,
select,
button {
  font-family: 'DM Sans', sans-serif;
}

.bodycopy {
  font-size: 1.35rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: 0em;
  display: block;
}

.bodycopy a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

h1,
.h1 {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0em;
}

h1 a,
.h1 a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

h2,
.h2 {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 484;
  margin: 0;
  color: rgba(0, 0, 0, 0.75);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0em;
}

h2 a,
.h2 a {
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
}

.caption {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.75);
  font-family: 'DM Mono', monospace;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0em;
  display: block;
}

.caption a {
  color: rgba(0, 0, 0, 0.75);
  text-decoration: underline;
}

hr {
  background: rgba(0, 0, 0, 0.77);
  border: 0;
  height: 1px;
  display: block;
  margin-top: 0.9em;
  margin-bottom: 0.9em;
}

ol {
  margin: 0;
  padding: 0 0 0 2.5em;
}
ul {
  margin: 0;
  padding: 0 0 0 2em;
}

blockquote {
  margin: 0;
  padding: 0 0 0 2em;
}

a:active {
  opacity: 0.7;
}

/* ─── Site layout ─── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Sidebar (fixed left panel) ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 20%;
  height: 100vh;
  background-color: rgba(101, 18, 255, 0.85);

  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2.2rem;
  overflow: hidden;
  /* No scrollbar — content clips intentionally */
}

.sidebar a {
  color: rgba(254, 242, 242, 0.85);
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: underline;
}

.sidebar .site-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 484;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(254, 242, 242, 0.85);
  margin-bottom: 0;
}

/* Marquee link fills top portion of sidebar */
.marquee-link {
  flex: 1;
  overflow: hidden;
  display: flex;
  min-height: 0;
}

/* Marquee — single name, vertical (K top → g bottom), scrolls right-to-left */
.marquee-container {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  position: absolute;
  top: 0;
  animation: marquee-single 12s linear infinite;
}

.marquee-track .site-name {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  display: block;
  transform: rotate(var(--mouse-rotate, 0deg));
  transition: transform 0.1s ease-out;
}

@keyframes marquee-single {
  from {
    left: 100%;
  }
  to {
    left: -3rem;
  }
}

.sidebar-bio {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(254, 242, 242, 0.85);
  line-height: 1.4;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.sidebar-bio p {
  margin: 0 0 1em 0;
}

.sidebar-nav {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(254, 242, 242, 0.85);
  text-decoration: underline;
  display: block;
}

.sidebar-nav a:hover {
  opacity: 0.7;
}

/* ─── Main content area ─── */
.main-content {
  margin-left: 20%;
  display: flex;
  flex-direction: column;
}

/* ─── Work section ─── */
.work-section {
  background-color: #000000;
  min-height: 100vh;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

.work-section-inner {
  width: 100%;
  padding: 2.2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.work-header {
  width: 100%;
}

.work-body {
  width: 100%;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 3rem;
  align-items: flex-start;
}

.work-gallery {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.work-gallery.visible {
  opacity: 1;
  transform: translateY(0);
}

.work-text {
  color: rgba(255, 255, 255, 0.85);
}

.work-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 2.16rem;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.5rem 0;
}

.work-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.work-meta .medium {
  display: block;
}
.work-meta .specs {
  display: block;
}
.work-meta .funded {
  display: block;
  margin-top: 0.4em;
}

.work-description {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
}

.work-description p {
  margin: 0 0 1em 0;
}

.work-description a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.work-description em {
  font-style: italic;
}

.work-links {
  margin-top: 1.5rem;
}

.work-links a {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

/* ─── Gallery / Slideshow ─── */

.slideshow {
  position: relative;
  overflow: hidden;
}

.slideshow-slides {
  display: grid;
  grid-template-areas: 'slide';
}

.slide {
  grid-area: slide;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1rem solid rgba(0, 0, 0, 0.85);
}

/* Nav buttons */
.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 calc(1rem + 15px);
  pointer-events: none;
  z-index: 10;
}

.slideshow-btn {
  pointer-events: all;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(87, 87, 87, 0.35);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
}

.slideshow-btn:hover {
  opacity: 0.8;
}
.slideshow-btn:active {
  opacity: 0.5;
}

.slideshow-btn svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.5px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Single image (no slideshow) */
.single-image img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1rem solid rgba(0, 0, 0, 0.85);
}

/* Vimeo embed */
.vimeo-embed {
  position: relative;
  width: 100%;
  border: 1rem solid rgba(0, 0, 0, 0.85);
}

.vimeo-embed iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 821;
}

/* SoundCloud link */
.soundcloud-link {
  display: block;
  margin-top: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  word-break: break-all;
}

/* ─── CV page ─── */
.cv-section {
  background-color: #000000;
  min-height: 100vh;
}

.cv-inner {
  max-width: 90%;
  padding: 2.2rem 4rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}

.cv-inner h2 {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem 0;
  letter-spacing: 0.05em;
}

.cv-inner p {
  margin: 0 0 0.4em 0;
}

.cv-inner a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  word-break: break-all;
}

.cv-inner hr {
  background: rgba(255, 255, 255, 0.2);
  margin: 1.5rem 0;
}

/* ─── Contact form page ─── */
.contact-section {
  background-color: #000000;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}

.contact-inner {
  max-width: 90%;
  padding: 2.2rem;
  width: 100%;
}

.contact-inner h1 {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 520px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.form-field input,
.form-field textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  padding: 0.6em 0.8em;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.6em 1.5em;
  cursor: pointer;
  align-self: flex-start;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.form-submit:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.form-submit:active {
  opacity: 0.6;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .marquee-container {
    height: auto;
    min-height: 3rem;
  }

  .main-content {
    margin-left: 0;
  }

  .work-section-inner {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .cv-inner,
  .contact-inner {
    max-width: 100%;
  }

  h1,
  .work-title {
    font-size: 4.5rem;
  }
}
