/* ============================================================
   CHANNING WILLIFORD — Portfolio Site
   ============================================================
   HOW TO CUSTOMIZE:
   - Colors: edit the --color-* variables below
   - Fonts: swap the Google Fonts import and --font-* variables
   - Spacing: adjust --space-* variables
   - Add projects: copy a .panel block in index.html
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;1,300;1,400&family=DM+Mono:ital,wght@0,300;0,400;1,300&display=swap');

/* ---- Design Tokens ---- */
:root {
  --color-bg:       #F0EDE6;   /* warm cream background */
  --color-text:     #1a1a18;   /* near-black */
  --color-muted:    #5a5a55;   /* subdued text */
  --color-border:   #c8c4bc;   /* hairline rules */
  --color-panel-bg: #ECEAE4;   /* panel background, slightly different */
  --color-btn-border: #2a2a28;

  --font-display:   'Spectral', serif;
  --font-body:      'DM Mono', monospace;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;

  --panel-width: 55vw;   /* width of the sliding right panel */
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---- Type scale matching Cargo text styles ---- */

.site-name {
  font-family: var(--font-display);
  font-weight: 400;           /* Spectral Regular */
  font-size: clamp(28px, 2.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: none;       /* remove the uppercase from before */
}

/* ============================================================
   MAIN LEFT PANEL
   ============================================================ */

.main {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-sm) var(--space-md);
  pointer-events: none; /* let panel clicks pass through */
  z-index: 1;
}

.main > * { pointer-events: all; }

/* Header — name top left */
.site-header {
  padding-top: var(--space-xs);
}

.logo-container {
  display: inline-block;
}

.logo-video {
  height: clamp(40px, 5vw, 80px); /* adjust height to match your animation's proportions */
  width: auto;
  display: block;
}

/* Main content — role + project list */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--space-lg);
}

.role {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1.5vw, 20px);
  line-height: 1.1;
  letter-spacing: -0.014em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-link {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1.5vw, 20px);
  line-height: 1.1;
  letter-spacing: -0.014em;
  color: var(--color-text);
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.15s ease;
}

.project-link:hover {
  opacity: 0.5;
}

.project-link.active {
  opacity: 0.5;
}

/* Footer — nav buttons + credit */
.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--space-sm);
}

.footer-nav {
  display: flex;
  gap: var(--space-xs);
}

.btn {
  font-family: var(--font-body);
  font-size: 11px;
  border: 1px solid var(--color-btn-border);
  padding: 4px 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  display: inline-block;
}

.btn:hover, .btn.active {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.footer-credit {
  font-size: 11px;
  color: var(--color-muted);
  text-align: center;
  line-height: 1.5;
}


/* ============================================================
   OVERLAY PANELS (right-side slide-in)
   ============================================================ */

/* Dim layer behind the panel */
.overlay-bg {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 10;
  pointer-events: none;
  transition: background 0.3s ease;
}

.overlay-bg.active {
  pointer-events: all;
}

/* Panel container */
.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  height: 100vh;
  background: var(--color-panel-bg);
  z-index: 20;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid var(--color-border);
}

.panel.open {
  transform: translateX(0);
}

/* Panel header bar */
.panel-header {
  position: sticky;
  top: 0;
  background: var(--color-panel-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-muted);
  z-index: 5;
}

.panel-close {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.05em;
}

.panel-close:hover {
  opacity: 0.5;
}

/* Panel body */
.panel-body {
  padding: var(--space-lg) var(--space-md) var(--space-lg);
}

/* Centered intro block (title + meta) */
.panel-intro {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
}

.panel-meta {
  font-size: 11px;
  color: var(--color-text);
  line-height: 1.8;
}

/* Media block */
.panel-media {
  width: 100%;
  margin-bottom: var(--space-lg);
  background: #d0cdc7;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-media video,
.panel-media iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* Two-column details block */
.panel-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  font-size: 11px;
  line-height: 1.8;
}

.panel-credits {
  color: var(--color-text);
}

.panel-description {
  color: var(--color-text);
}

.panel-description p + p {
  margin-top: var(--space-sm);
}


/* ============================================================
   ABOUT PANEL
   ============================================================ */

.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  font-size: 11px;
  line-height: 1.8;
}

.about-section:first-child {
  padding-top: 0;
}

.about-left {
  color: var(--color-text);
}

.about-right {
  color: var(--color-text);
}

.about-entry {
  margin-bottom: var(--space-md);
}

.about-entry:last-child {
  margin-bottom: 0;
}

.about-entry em {
  font-style: italic;
}

.about-right a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-divider {
  border-top: 1px solid var(--color-border);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --panel-width: 100vw;
  }

  .panel-details,
  .about-section {
    grid-template-columns: 1fr;
  }

  .main {
    padding: var(--space-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}
