/* ======================================================
   Josh Shields • Minimal layout
   1  sidebar   | 2 main copy | 3 video
                |     4 infobox (spans full width, bottom)
   ====================================================== */

/* global box‑model reset */
*, *::before, *::after { box-sizing: border-box; }

/* custom font */
@font-face {
  font-family: "Neue Haas Grotesk Display Pro 55 Roman";
  src: url("../fonts/nhgdpro-55.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Grotesk Display Pro 55 Roman Placeholder";
  src: local("Arial");
  ascent-override: 97.93%;
  descent-override: 24.38%;
  line-gap-override: 0%;
  size-adjust: 93.53%;
}

/* design tokens */
:root {
  --bg: #ffffff;
  --text: #111111;
  --text-muted: rgb(105, 105, 105);
  --accent: #002fa7;
  --font-sans: "Neue Haas Grotesk Display Pro 55 Roman", "Neue Haas Grotesk Display Pro 55 Roman Placeholder", sans-serif;
}

/* ----- base ----- */
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: normal;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- top‑level grid (boxes 1‑4) ----- */
.main-wrapper {
  display: grid;
  grid-template-columns: 17% 34% 49%;
  grid-template-rows: 1fr auto;
  height: 100vh;
  min-height: 0;
}

/* ========== 1. Sidebar ========== */
.sidebar {
  grid-column: 1;
  grid-row: 1;
  padding: 6rem 1.25rem 1rem;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}
.sidebar-inner {
  width: fit-content;
  margin-right: auto;
  position: relative;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: 0.5rem; }
.sidebar > div > ul > li > ul {
  padding-left: 1rem;
}
.sidebar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sidebar a:hover,
.sidebar a.active { 
  color: var(--text); 
  font-weight: 600;
}

.submenu {
  display: none;
  margin-top: 0.5rem;
}

/* ========== 2. Main copy & Projects ========== */
.main-content {
  grid-column: 2;
  grid-row: 1;
  padding: 6rem 2rem 3rem;
  max-width: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
.main-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.main-content p {
  color: var(--text-muted);
  margin: 0;
  letter-spacing: -0.015rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

#cv {
  display: none;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}
.projects-section .project-item {
  margin-bottom: 2rem;
}
.projects-section .project-item:last-child {
  margin-bottom: 0;
}
.project-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.project-title {
  font-weight: 600;
  color: var(--text);
}
.project-title a {
  color: var(--text);
  text-decoration: none;
}
.project-title a:hover {
  color: var(--text);
}
.project-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.project-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.project-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: -0.015rem;
}

.experience-section {
  margin-bottom: 2rem;
}
.projects-section {
  margin-bottom: 2rem;
}
.section-heading {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  color: var(--text);
}
.job-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.job-title {
  color: var(--text);
}
.job-company {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.job-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.job-bullets {
  list-style: none;
  margin: 0.75rem 0 0 0;
  padding: 0;
  color: var(--text-muted);
}
.job-bullets li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
  letter-spacing: -0.015rem;
}
.job-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ========== Project Pages ========== */
#project-content {
  display: block;
}
.project-page-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1.5rem 0;
  color: var(--text);
}
.project-content-section {
  margin-bottom: 2rem;
}
.project-content-section p {
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  letter-spacing: -0.015rem;
  line-height: 1.4;
}
.project-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}
.project-list-items li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
  letter-spacing: -0.015rem;
}
.project-list-items li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}
.project-list-items a {
  color: var(--text-muted);
  text-decoration: none;
}
.project-list-items a:hover {
  color: var(--text);
}

/* ========== 3. Video panel ========== */
.right-panel {
  grid-column: 3;
  grid-row: 1;
  padding: 6rem 1.5rem;
  overflow-y: auto;
  min-height: 0;
}
.right-panel video {
  width: 400px;
  height: 400px;
  object-fit: cover;
  object-position: 50% 50%;
  background-color: transparent;
  border-radius: 0;
  display: block;
  opacity: 0.6;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== 4. InfoBox (bottom bar) ========== */
.infobox {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3rem 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  gap: 1rem;
  flex-shrink: 0;
  min-height: 8rem;
}
.infobox a {
  color: var(--text-muted);
  text-decoration: none;
}
.infobox a:hover {
  color: var(--text);
}
.left-item {
  margin-right: auto;
}
.right-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.right-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.right-links a:hover {
  color: var(--text);
}

/* ----- Mobile Responsive ----- */
@media (max-width: 768px) {
  html, body {
    height: auto;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .main-wrapper {
    display: block;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    padding: 1.5rem;
    align-items: flex-start;
  }

  .main-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .right-panel {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
  }

  .right-panel video {
    width: 100%;
    max-width: 320px;
    height: auto;
    opacity: 0.5;
  }

  .infobox {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0.5rem;
  }

  .right-links {
    flex-wrap: wrap;
  }

  .right-links li {
    margin-right: 1rem;
  }
}

/* ----- DEBUG LAYOUT MODE (toggle with "D" key) ----- */
body.debug-layout * {
  outline: 1px solid rgba(255, 0, 0, 0.5) !important;
}
body.debug-layout .main-wrapper {
  outline: 2px solid rgba(255, 0, 0, 0.8) !important;
}
body.debug-layout .sidebar {
  outline: 2px solid rgba(255, 0, 0, 0.8) !important;
}
body.debug-layout .main-content {
  outline: 2px solid rgba(255, 0, 0, 0.8) !important;
}
body.debug-layout .right-panel {
  outline: 2px solid rgba(255, 0, 0, 0.8) !important;
}
body.debug-layout .infobox {
  outline: 2px solid rgba(255, 0, 0, 0.8) !important;
}
