/* ---------- Tokens: change colors and fonts here ---------- */
:root {
  --paper: #eef0ec;
  --ink: #3d3d3d;
  --muted: #5d6a63;
  --line: #b9c2bb;
  --accent: #ff0000;
  --dot: 1.1rem;
  --year-w: 3.5rem;      /* width of the year column */
  --col-gap: 1rem;       /* space between year and title */
  --title-offset: calc(var(--dot) + 1.5rem + var(--year-w) + var(--col-gap));
}
    

a,
.timeline-intro h1 {
  font-size: var(--title-size);
}
    

html {
scrollbar-gutter: stable;
}

* { box-sizing: border-box; }

body {
  color: var(--ink);
  height: 100%; 
}


img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header ---------- */
.timeline-intro {
  list-style: none;
  padding: 3rem 0 2rem calc(var(--dot) + 1.5rem + 4rem);  /* same left offset as the projects */
}

.timeline-intro h1 {
  font-family: sans-serif;
  color: rgb(220, 220, 220);
  text-shadow: 0px 0px 8px rgb(94, 93, 92);
  font-size: var(--title-size);
  font-weight: normal;
  margin: 0 0 1rem;
}

.timeline-intro p {
  max-width: 60rem;
  color: var(--muted);
  margin: 0;
list-style: none;
  padding: 3rem 0 2rem var(--title-offset);
}
/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 4rem;
  position: relative;
}

/* the vertical line */
.timeline::before {
  content: "";
  position: absolute;
  top: 6rem;
  bottom: 2rem;
  left: calc(var(--dot) / 2 - 1px);
  width: 2px;
  background: var(--line);
}

.project {
  position: relative;
  padding-left: calc(var(--dot) + 1.5rem);
  margin-bottom: 0.5rem;
}

/* ---------- Clickable title row ---------- */
.project summary {
  list-style: none;           /* hides default arrow */
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.8rem var(--col-gap);
  flex-wrap: wrap;
  padding: 0.6rem 0;
  position: relative;
}
.project summary::-webkit-details-marker { display: none; }

/* the dot on the line */
.project summary::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: calc(-1 * (var(--dot) + 1.5rem));
  top: 50%;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: rgb(220, 220, 220);          
  border: 2px solid rgb(220, 220, 220);
  transform: translateY(-50%); 
  
    
  box-shadow:
    0 0 4px 1px rgba(94, 93, 92, 0.9),    /* tight outline */
    0 0 12px 3px rgba(94, 93, 92, 0.5),   /* soft glow */
    0 0 24px 8px rgba(94, 93, 92, 0.2);   /* wide, faint halo */
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

/* hover and open: stronger glow in the accent color */
.project summary:hover::before,
.project[open] summary::before {
 transform: translateY(-50%) scale(1.15);
  box-shadow:
    0 0 4px 1px rgba(255, 0, 0, 0.9),
    0 0 12px 3px rgba(255, 0, 0, 0.5),
    0 0 24px 8px rgba(255, 0, 0, 0.25);
}



.project summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.year {
  flex: none;            /* never shrink */
  white-space: nowrap;   /* never break or clip the digits */
  font-size: 0.9rem;
  color: var(--muted);
  min-width: var(--year-w);

}

.project-title {
  font-family: inherit;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  line-height: 1.2;
}
.project summary:hover .project-title { color: var(--accent); }

/* plus / minus indicator */
.project summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}
.project[open] summary::after { content: "–"; }

/* ---------- Unfolded content ---------- */
.project-body {
  padding: 1rem 0 3rem;
  animation: unfold 0.35s ease-out;
}

@keyframes unfold {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.project-body > p {
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ---------- Responsive photo grid ---------- */
/* ---------- Photo gallery: mixed landscape + portrait ---------- */
.gallery {
  column-width: 240px;      /* browser fits as many columns as possible */
  column-gap: 1.25rem;
}

.gallery figure {
  margin: 0 0 1.25rem;
  break-inside: avoid;      /* keeps photo and caption together */
}

.gallery img {
  width: 100%;
  height: auto;             /* keeps the photo's own proportions */
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* optional: a hero photo spanning all columns */
@media (min-width: 700px) {
  .gallery .wide {
    column-span: all;
    max-width: 720px;   /* change this to make it bigger or smaller */
  }
}

/* placeholder boxes, only needed until you add real photos */
.ph {
  display: grid;
  place-items: center;
  background: var(--placeholder);
  color: var(--muted);
  font-size: 0.85rem;
  aspect-ratio: 3 / 2;
}
.ph.portrait { aspect-ratio: 2 / 3; }


/* ---------- Footer ---------- */
footer { padding: 2rem 0 4rem; color: var(--muted); font-size: 0.9rem; }
footer a { color: var(--accent); }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .project-body { animation: none; }
  .project summary::before { transition: none; }
}
@media (max-width: 600px) {
  .project summary {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 0.5rem;
    align-items: center;
      
.timeline-intro {
  padding-left: calc(var(--dot) + 1.5rem);
}
  }

  .year,
  .project-title {
    grid-column: 1;
  }

  .project summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;   /* centered next to both lines */
  }
}