/*
Main content background:  #fdfaf7
Sidebar background:       #f6f3ee
Border:                   #e4ded7
Primary text:             #1a1a1a
Secondary text:           #5a5a5a
Link color:               #2d4a73
Hover link:               #1a3353
*/

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  font-family: "Georgia", serif;
  color: #1a1a1a;
  background-color: #f6f3ee;
}

/* ── Layout ── */

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 52px 36px;
  background: #f6f3ee;
  border-right: 1px solid #e4ded7;
  box-sizing: border-box;
  overflow-y: auto;
}

.content {
  flex: 1;
  background: #fdfaf7;
  overflow-y: auto;
  padding: 52px 72px 52px 64px;
  box-sizing: border-box;
}

.content-inner {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Sidebar header ── */

.sidebar-header h1 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 2rem 0;
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  color: #68645d;
  line-height: 1.6;
}

/* ── Profile row ── */

.profile-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e4ded7;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.links a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: #2d4a73;
  text-decoration: none;
}

.links a:hover {
  color: #1a3353;
  text-decoration: underline;
}

.profile-image {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid #c8c3bc;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Navigation panel ── */

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.navigation {
  margin: 0 0 0.6rem 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9c9890;
}

.navigation::after {
  content: "";
  display: block;
  width: 40px;
  border-top: 1px solid #d4cfc8;
  margin-top: 0.45rem;
}

.nav-link {
  text-decoration: none;
  color: #3a3a3a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.45rem 0.5rem;
  border-radius: 2px;
  transition: background-color 0.12s ease, padding-left 0.12s ease, color 0.12s ease;
  display: block;
}

.nav-link:not(.active):hover {
  background-color: #ede8e1;
  padding-left: 0.85rem;
  color: #1a1a1a;
}

.nav-link.active {
  background-color: #e3ddd6;
  color: #1a1a1a;
  font-weight: 500;
}

.nav-link.active::before {
  content: "→ ";
}

/* ── Page content ── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.18s ease;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-inner h2 {
  font-size: 1.6rem;
  font-weight: normal;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e4ded7;
  letter-spacing: -0.01em;
}

.content-inner h4 {
  font-size: 0.95rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a5a5a;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #eeebe6;
}

.content-inner p {
  font-size: 1rem;
  line-height: 1.75;
  color: #2a2a2a;
  margin: 0 0 0.75rem 0;
}

.content-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-inner li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #2a2a2a;
  padding-left: 1rem;
  position: relative;
}

.content-inner li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #9c9890;
}

/* ── Education / entry rows ── */

.entry {
  margin-bottom: 1.25rem;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.entry-title {
  font-size: 1rem;
  color: #1a1a1a;
  font-style: italic;
}

.entry-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: #9c9890;
  flex-shrink: 0;
}

.entry-detail {
  margin: 0.2rem 0 0 0;
  font-size: 0.9rem;
  color: #5a5a5a;
  line-height: 1.5;
}

/* ── Skills list ── */

.skills-list li {
  padding-left: 0;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.skills-list li::before {
  content: none;
}

.skill-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: #68645d;
  min-width: 115px;
  flex-shrink: 0;
}

.placeholder {
  color: #9c9890;
  font-style: italic;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

/* ── Nested research outputs ── */

.sub-entry {
  margin-top: 1.1rem;
  padding-left: 1.1rem;
  border-left: 2px solid #e4ded7;
}

.sub-entry-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9c9890;
  margin: 0 0 0.35rem 0;
}

/* ── Project entries ── */

.page-header {
  margin-bottom: 0.75rem;
}

.project-entry {
  margin-bottom: 1.75rem;
}

.project-title {
  font-size: 1rem;
  color: #1a1a1a;
  font-style: normal;
  font-weight: bold;
}

.project-entry .entry-header {
  margin-bottom: 0.5rem;
}

.project-desc {
  margin: 0.4rem 0 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #2a2a2a;
}

.project-image {
  width: 100%;
  height: auto;
  border: 1px solid #c8c3bc;
  border-radius: 2px;
  margin-top: 0.85rem;
  display: block;
}

.project-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0.85rem;
}

.project-image-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid #c8c3bc;
  border-radius: 2px;
  display: block;
}

.project-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  display: inline-block;
  margin-top: 0.35rem;
}

/* ── CV iframe ── */

.cv-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 180px);
  margin-top: 0.75rem;
  border: 1px solid #e4ded7;
  border-radius: 2px;
}

/* ── Content links ── */

.content-inner a {
  color: #2d4a73;
  text-decoration-color: #c8c3bc;
}

.content-inner a:hover {
  color: #1a3353;
  text-decoration-color: currentColor;
}

/* ── Mobile ── */

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    padding: 32px 24px;
    border-right: none;
    border-bottom: 1px solid #e4ded7;
    overflow-y: visible;
  }

  .content {
    padding: 40px 24px;
    overflow-y: visible;
  }

  .content-inner {
    max-width: 100%;
  }

  .project-image-grid {
    grid-template-columns: 1fr;
  }
}
