/* Celtic Trinity Studios — copper sidebar, neutral main */

:root {
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.82);
  --overlay: rgba(0, 0, 0, 0.77);
  --sidebar-width: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: #1d1e20;
}

/* Header — neutral, not copper */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem clamp(1rem, 3vw, 2rem);
  background: transparent;
}

.site-header.is-scrolled {
  background: rgba(29, 30, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.site-logo img {
  width: 36px;
  height: auto;
  border-radius: 4px;
}

.site-logo span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  opacity: 0.75;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
}

.page-layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: calc(100vh - 120px);
}

/* ── Copper theme: sidebar only ── */
.projects-sidebar {
  --copper: #b87333;
  --copper-rich: #8f4f1f;
  --copper-dark: #3d2414;
  --copper-light: #d4a064;
  --copper-pale: #e8c9a0;
  --copper-glow: #c9894a;
  --sidebar-bg: #26150c;
  --card-bg: rgba(61, 36, 20, 0.92);
  --card-border: rgba(212, 160, 100, 0.28);
  --sidebar-text: #fff8f0;
  --sidebar-text-muted: rgba(255, 248, 240, 0.8);

  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  align-self: flex-start;
  overflow-y: auto;
  padding: 0.85rem 0.7rem 1rem;
  background: var(--sidebar-bg);
  border-right: 2px solid var(--copper-rich);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
  color: var(--sidebar-text);
  font-size: 0.875rem;
}

.sidebar-header {
  margin-bottom: 0.75rem;
  padding: 0 0.2rem;
}

.sidebar-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--copper-pale);
}

.projects-sidebar .section-label {
  display: inline-block;
  margin-bottom: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-light);
}

.sidebar-group {
  margin-bottom: 0.45rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: rgba(61, 36, 20, 0.4);
  overflow: hidden;
}

.sidebar-group:last-child {
  margin-bottom: 0;
}

.sidebar-dev-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: rgba(143, 79, 31, 0.3);
  color: var(--copper-pale);
  transition: background 0.2s ease;
}

.sidebar-dev-toggle::-webkit-details-marker {
  display: none;
}

.sidebar-dev-toggle::after {
  content: '';
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--copper-light);
  border-bottom: 2px solid var(--copper-light);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.15rem;
}

.sidebar-group[open] .sidebar-dev-toggle::after {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.sidebar-dev-toggle:hover {
  background: rgba(184, 115, 51, 0.35);
}

.sidebar-group--dougal .sidebar-dev-toggle {
  border-left: 2px solid var(--copper-light);
}

.sidebar-group--kael .sidebar-dev-toggle {
  border-left: 2px solid var(--copper-glow);
}

.sidebar-group__projects {
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Sidebar project pickers */
.project-picker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  margin: 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.project-picker:hover {
  border-color: var(--copper-light);
}

.project-picker.is-active {
  border-color: var(--copper-light);
  background: rgba(184, 115, 51, 0.25);
  box-shadow: inset 3px 0 0 var(--copper);
}

.project-picker__status {
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-picker__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--copper-pale);
  line-height: 1.2;
}

.projects-sidebar .project-status--live {
  color: #a8d5a2;
}

.projects-sidebar .project-status--wip {
  color: var(--copper-pale);
}

/* Legacy card styles removed — details live in main panel */

/* Main content */
.main-content {
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 64px);
  overflow: hidden;
}

.main-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.main-bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.main-bg__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.main-content__inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) 2.5rem;
}

.main-view.is-hidden {
  display: none;
}

/* Project detail panel (main area) */
.project-detail {
  max-width: 52rem;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-detail__header {
  margin-bottom: 1.25rem;
}

.project-detail__dev {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.project-detail__status {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-detail .project-status--live {
  color: #9fd99a;
}

.project-detail .project-status--wip {
  color: #e8c97a;
}

.project-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-detail .project-tag {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-muted);
}

.project-screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-screenshots img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.screenshot-placeholder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Hide placeholder when real screenshots are added */
.project-screenshots:has(img) .screenshot-placeholder {
  display: none;
}

.project-detail__body {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.project-detail__body p {
  margin: 0 0 1rem;
}

.project-detail__body p:last-child {
  margin-bottom: 0;
}

.project-detail__link {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.project-detail__link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero {
  max-width: 48rem;
  padding: 0.5rem 0 2rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.hero .lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  max-width: 36rem;
}

.hero-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  max-width: 34rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.hero-links a {
  color: var(--text);
  font-size: 1rem;
}

.connect {
  padding: 1.5rem 0 0.5rem;
  max-width: 36rem;
}

.connect h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.connect-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.connect-links a {
  color: var(--text);
  font-size: 1rem;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icons a {
  color: var(--text);
  transition: opacity 0.2s ease;
}

.social-icons a:hover {
  opacity: 0.7;
}

.social-icons svg {
  width: 22px;
  height: 22px;
}

.site-footer {
  width: 100%;
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(29, 30, 32, 0.85);
}

@media (max-width: 900px) {
  .page-layout {
    flex-direction: column;
  }

  .projects-sidebar {
    position: relative;
    top: 0;
    flex: none;
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 2px solid var(--copper-rich);
    box-shadow: none;
  }

  .main-bg__image {
    object-position: center center;
  }

  .main-content__inner {
    padding: 1.25rem 1rem 2rem;
  }

  .hero {
    text-align: center;
    margin: 0 auto;
  }

  .hero .lead,
  .hero-note {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-links {
    justify-content: center;
  }

  .connect {
    text-align: center;
    margin: 0 auto;
  }

  .connect-links,
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(29, 30, 32, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header {
    position: relative;
    flex-wrap: wrap;
  }
}
