:root {
  --brand: #111;
  --bg: white;
  --text: black;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: monospace;
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar-projects p {
  font-size: 0.8em;
  margin-top: 2em;
  margin-bottom: 0.8em;
  text-decoration: underline;
}

.sidebar-projects .sidebar-heading {
  text-decoration: none;
}

.sidebar {
  width: 25vw;
  color: var(--text);
  padding: 50px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 1.4em;
  font-weight: 500;
  margin-bottom: 1.2em;
}

.sidebar h1 a {
  color: black;
  text-decoration: none;
}

.sidebar h1 a:hover {
  color: dodgerblue;
}


.sidebar nav ul {
  list-style: none;
  padding: 0;
}

.sidebar nav ul li {
  margin-bottom: 0.4em;
  font-size: 0.8em;
  margin-left: 0.8em;
}

.sidebar nav a {
  color: black;
  text-decoration: none;
}

.sidebar nav a:hover{
  color: dodgerblue;
}

.sidebar nav a.active {
  text-decoration: underline;
}


.sidebar .social-links {
  margin-top: auto;
}

.sidebar .social-links a {
  color: black;
  display: block;
  margin-top: 0.4em;
  text-decoration: none;
  font-size: 0.8em;
}

.sidebar .social-links a:hover {
  color: dodgerblue;
}

.content {
  flex: 1;
  padding: 50px 50px 10px;   /* top 50, sides 50, bottom 10 */
  display: grid;
  grid-template-columns: 2fr 1fr; 
  gap: 30px;
}

.content-images {
  /* Left column now */
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-right: 50px;
}

.content-text {
  position: sticky;
  top: 0;                  /* pin to top of viewport */
  align-self: flex-start;
  border-left: 1px solid black;
  padding-left: 30px;
}

.content-text p{ 
  font-size: 0.8em;
  line-height: 1.6em;
  margin-bottom: 0.8em;
  margin-top: 0;   /* prevents accidental spacing increase */
}

.content-text h2 {
  font-size: 0.8em;
  line-height: 1.2em;
  margin-bottom: 1.8em;   /* space before medium/dimensions text */
}

.content-text a{ 
  color: black;
  text-decoration: none;
}

.content-text a:hover{ 
  color: dodgerblue;
}

.content-text p:last-child {
  margin-bottom: 0;
}

.content-images img {
  max-width: 100%;
}

.content-images figcaption {
  font-size: 0.8em;
  color: #555;
  line-height: 1.4em;
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#lightbox img {
  max-width: 85%;
  max-height: 85%;
  cursor: zoom-out;
}

.cv-sections p {
  font-size: 0.8em;
}

.cv-heading {
  text-decoration: underline;
}

.cv-heading-row:hover {
  color: dodgerblue;
}

.cv-arrow {
  text-decoration: none;
}

.cv-sections p:first-of-type {
  margin-top: 0;
}

.cv-sections {
  list-style: none;
  padding: 0;
}

.cv-sections li {
  font-size: 0.8em;
  margin-bottom: 2em;
  line-height: 1.4;
  margin-left: 0.8em;
}

.cv-image img {
  border: 1px solid black;
  padding: 10px;
  max-width: 100%;
  display: block;
  margin-bottom: 1em;
}

.content-images:not(.cv-image) img {
  border: none;
  padding: 0;
}

.content-text {
  padding-top: 0; 
}

 .content-text a{
    text-decoration: underline;
  }

.carousel-item {
  display: none;
}

.carousel-item.active {
  display: block;
}

.cv-text a{
  color: black;
  text-decoration: none;
}

.cv-text a:hover{
  color: dodgerblue;
}

.cv-title {
  margin-top: 0;   /* Remove unintended top spacing */
  margin-bottom: 1.8em;
}

#work-experience-link:hover{
  color: dodgerblue;
}

#work-experience-link img{
  border: none;
}

.image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.image-row figure {
  margin: 0;
}

.menu-toggle {
  display: none;               /* shown only on mobile */
  position: fixed;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 10001;              /* above sidebar */
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin-bottom: 6px;
  background: black;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* X animation when open */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- MOBILE LAYOUT ---------- */
@media (max-width: 900px) {
  body {
    display: block;
  }

  .menu-toggle {
    display: block;           /* show hamburger on mobile */
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 50vw;
    background: white;
    padding-left: 23px;
    padding-top: 75px;
    transition: left 0.3s ease;
    z-index: 1500;
  }

  .sidebar.open {
    left: 0;
  }

  .content {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 75px;
    grid-template-columns: 1fr;
  }

  .content-images {
    margin-right: 0;
  }

  .content-text {
    position: static;          /* turns sticky OFF on mobile */
    border-left: none;
    border-top: 1px solid black;
    padding-left: 0;
    padding-top: 20px;
    margin-top: 20px;
  }
}