/* ═══════════════════════════════════════════
   Portfolio Stylesheet
   Font stack: Futura → Jost (Google Fonts)
   ═══════════════════════════════════════════ */

/* ────────────────────────────────────────
   CSS Custom Properties — Dark (default)
   ──────────────────────────────────────── */
:root {
  --bg: #0C0C0C;
  --text-primary: #FFFFFF;
  --text-secondary: #999999;
  --text-muted: #333333;
  --accent-blue: #4a90d9;
  --accent-warm: #e8a87c;
  --plus-color: #FFFFFF;
  --email-color: #888888;
  --carousel-bg: #111111;
  --carousel-border: rgba(255, 255, 255, 0.08);
  --slide-label: #222222;
  --arrow-idle: #444444;
  --arrow-hover: #FFFFFF;
  --toggle-color: #888888;
  --toggle-hover: #FFFFFF;
  --speed: 0.25s;
  --font-family: 'Inter', sans-serif;
  --base-font-size: 14px;
  --letter-spacing-base: 0.02em;
}

/* ────────────────────────────────────────
   Light Mode Override
   ──────────────────────────────────────── */
[data-theme="light"] {
  --bg: #FFFFFF;
  --text-primary: #000000;
  --text-secondary: #555555;
  --text-muted: #CCCCCC;
  --plus-color: #000000;
  --email-color: #AAAAAA;
  --carousel-bg: #F5F5F5;
  --carousel-border: rgba(0, 0, 0, 0.06);
  --slide-label: #E0E0E0;
  --arrow-idle: #CCCCCC;
  --arrow-hover: #000000;
  --toggle-color: #999999;
  --toggle-hover: #000000;
}

/* ────────────────────────────────────────
   Reset
   ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color var(--speed) ease,
    color var(--speed) ease;
}

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

button {
  cursor: pointer;
}

/* ────────────────────────────────────────
   Theme Toggle (top-right)
   ──────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 28px;
  right: 36px;
  z-index: 600;
  background: none;
  border: 1px solid #555555;
  border-radius: 50%;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--toggle-color);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}

.theme-toggle:hover {
  color: var(--toggle-hover);
  border-color: var(--toggle-hover);
}

/* ────────────────────────────────────────
   App Shell & Views
   ──────────────────────────────────────── */
#app {
  position: relative;
  width: 100%;
  height: 100%;
}

.view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity var(--speed) ease;
}

.view.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ────────────────────────────────────────
   Main View — Centred Navigation
   ──────────────────────────────────────── */
#view-main {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 58px;
  align-items: flex-end;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  opacity: 0.35;
}

/* Nav preview image (square thumbnail above label) */
.nav-preview {
  width: 72px;
  height: 72px;
  border: 1px solid var(--text-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.nav-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-preview-empty {
  /* no longer used */
  display: none;
}

.nav-label {
  display: block;
}

/* ────────────────────────────────────────
   MO Home Button — fixed top-left (mirrors theme toggle)
   ──────────────────────────────────────── */
.mo-home {
  position: fixed;
  top: 36px;
  left: 36px;
  z-index: 700;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.mo-home:hover {
  opacity: 0.6;
}

/* ────────────────────────────────────────
   Social Links
   ──────────────────────────────────────── */
.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  color: var(--email-color);
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--text-secondary);
}

/* Email fixed to bottom-left of main view */
.main-footer {
  position: absolute;
  bottom: 32px;
  left: 36px;
  right: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ────────────────────────────────────────
   Sub-page Layout
   ──────────────────────────────────────── */
.page-content {
  padding: 96px 80px 60px calc(var(--mo-width, 160px) + var(--admin-margin, 0px));
}

.page-footer {
  padding: 60px 36px 48px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Shared email footer style */
.email-footer {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--email-color);
  transition: color 0.2s ease;
}

.email-footer:hover {
  color: var(--text-secondary);
}

/* ────────────────────────────────────────
   About Page
   ──────────────────────────────────────── */
.about-content {
  max-width: 380px;
}

.about-tagline {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.about-traits {
  margin-bottom: 64px;
}

.about-traits p {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  line-height: 1.85;
}

.about-roles {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.role-entry {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.role-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.role-company {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--accent-blue);
}

/* ────────────────────────────────────────
   Project List
   ──────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  margin-left: 16px;
}

.project-header {
  padding-top: 26px;
  margin-bottom: 12px;
}

/* Title — link variant */
a.project-title-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 5px;
  transition: opacity 0.2s ease;
}

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

/* Title — non-link variant */
.project-title-text {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.project-description {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 9px;
}

/* The "+" toggle */
.project-toggle {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  color: var(--plus-color);
  user-select: none;
  transition:
    opacity 0.2s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

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

.project-toggle.is-open {
  transform: rotate(45deg);
}

/* ────────────────────────────────────────
   Project Expand Panel
   ──────────────────────────────────────── */
.project-expand {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}

.project-expand.open {
  max-height: 620px;
  opacity: 1;
}

/* ────────────────────────────────────────
   Carousel
   ──────────────────────────────────────── */
.carousel-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 44px 0 12px 0;
  max-width: 860px;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 20px;
  will-change: transform;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: flex-start;
}

.carousel-slide {
  flex: 0 0 calc((100% - 20px) / 2);
  aspect-ratio: 1 / 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background-color: var(--carousel-bg);
  border: 1px solid var(--carousel-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.slide-placeholder-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--slide-label);
  text-transform: uppercase;
}

.slide-index {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--slide-label);
}

.carousel-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--arrow-idle);
  padding: 16px 6px;
  transition: color 0.2s ease;
  line-height: 1;
}

.carousel-btn:hover {
  color: var(--arrow-hover);
}

.carousel-meta {
  padding: 10px 0 44px 0;
}

.carousel-counter {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ────────────────────────────────────────
   Lightbox
   ──────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox-content {
  width: 90%;
  height: 80%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 16px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lightbox-btn:hover {
  opacity: 1;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  color: #888;
  font-size: 11px;
  letter-spacing: 0.2em;
}

/* ────────────────────────────────────────
   Onchain Page
   ──────────────────────────────────────── */
.onchain-links {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.onchain-link {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

.onchain-link:hover {
  opacity: 0.35;
}

/* ────────────────────────────────────────
   Prints Page
   ──────────────────────────────────────── */
.prints-page {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.coming-soon {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ────────────────────────────────────────
   Word Highlights
   ──────────────────────────────────────── */
.hl-blue {
  color: var(--accent-blue);
}

.hl-warm {
  color: var(--accent-warm);
}

/* ────────────────────────────────────────
   View Fade-in Animation
   ──────────────────────────────────────── */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view:not(.hidden) {
  animation: pageIn 0.3s ease forwards;
}

/* ────────────────────────────────────────
   Responsive
   ──────────────────────────────────────── */
@media (max-width: 680px) {
  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: end;
    gap: 32px 16px;
    padding: 0 20px;
    width: 100%;
    max-width: 380px;
  }

  .nav-preview {
    width: 54px;
    height: 54px;
  }

  .page-content {
    padding: 80px 28px 60px calc(80px + var(--admin-margin, 0px));
  }

  .page-footer {
    padding: 0 20px 40px 20px;
  }

  .main-footer {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }

  .carousel-wrap {
    gap: 10px;
  }

  .carousel-slide {
    flex: 0 0 100%;
  }

  .carousel-track {
    gap: 10px;
  }
}