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

:root {
    --border:      #d0cec0;
    --panel:       #fff;
    --panel2:      #F0EEE5;
    --text:        #1a1a1a;
    --footer:      #333230;
    --muted:       #6e6d69;
    --accent:      #8e8c84;
    --note-bg:     #fafafa;
    --col-left:    240px;
    --col-right:   240px;
    --col-gap:     40px;
    --nav-h:       52px;
}

html { scroll-behavior: smooth; }

body {
    font-family: Sohne, system-ui, sans-serif;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    background: #fafaf6;
}

video {
  width: 100%;
  clip-path: inset(1px 1px);
  border-radius: 12px;
}

@font-face {
    font-family: Sohne;
    src: url(SohneRegular.otf);
    font-weight: 400;
}

@font-face {
    font-family: Sohne;
    src: url(SohneMedium.otf);
    font-weight: 500;
}

@font-face {
    font-family: Tiempos;
    src: url(TiemposTextRegular.otf);
    font-weight: 400;
}

@font-face {
    font-family: Tiempos;
    src: url(TiemposTextMedium.otf);
    font-weight: 500;
}

@font-face {
    font-family: Tiempos;
    src: url(TiemposTextMediumItalic.otf);
    font-style: italic;
}

img {
    width: 100%; border-radius: 12px;
}

a {
    color: var(--text);
    transition: color 0.3s;
    text-decoration: none;
}

/* ── PROGRESS ── */
.progress-bar {
    position: fixed; top: 0; left: 0;
    height: 4px; background: var(--accent);
    z-index: 999; transition: width .1s linear;
}

/* ── NAVIGATION ── */
.topnav {
    position: sticky; top: 0; z-index: 100;
    background: #fafaf6; padding: 0 32px; height: 52px;
    display: flex; align-items: center;
    justify-content: space-between;
}

.logo { width: 20px; }

.nav-link {
    font-size: 14px; font-weight: 500;
    color: var(--text); text-decoration: none;
    transition: color 0.3s;
}
.nav-link:hover, a:hover { color: var(--muted); }

.nav-right, .nav-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-left { gap: 12px; }

.nav-btn {
    padding: 6px 12px; background: var(--text); border-radius: 12px;
    color: #fafaf6; font-size: 13px;
}

/* ── START ── */
.project-hero {
  padding: 48px 32px 0px;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  font-weight: 400; line-height: 1.08; font-family: Tiempos;
  max-width: 1200px; margin-bottom: 40px;
}

.hero-meta {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 14px;
}

.project-logo { width: 32px; height: 32px; border-radius: 4px; }

/* ── 3-COL LAYOUT ── */
.page-wrap {
    margin: 0 auto;
    padding: 48px 32px 120px;
    display: grid;
    grid-template-columns: var(--col-left) 1fr var(--col-right);
    gap: var(--col-gap);
    align-items: start;
}

/* ── LEFT SIDEBAR ── */
.sidebar-left {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    display: flex; flex-direction: column;
}

.toc-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.toc-list a {
    font-size: 14px; color: var(--muted);
    text-decoration: none; display: block;
    border-bottom: 1px solid var(--border); padding: 8px 0;
}
.toc-list li:last-child a{ border-bottom: none; }
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--text); border-left-color: var(--text); font-weight: 500; }

/* ── MAIN CONTENT ── */
.main-content { max-width: 1000px; margin: auto; }

.cs-section { scroll-margin-top: calc(var(--nav-h) + 24px); }

.start-text {
    font-size: 19px; font-family: Tiempos;
    font-weight: 400;
}

.meta-label {
    font-size: 12px; color: var(--muted); font-weight: 600;
    text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.07em;
}

.divider { border: none; border-top: 1px solid var(--border); margin: 120px 0; }

.section-label {
    font-size: 12px; color: var(--accent); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 12px;
}

.main-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 500;
    line-height: 1.1; letter-spacing: -.02em;
}

.main-content h3 {
    font-size: clamp(1.5rem, 3vw, 1.75rem); font-weight: 500;
    line-height: 1.2; margin-bottom: 20px;
    scroll-margin-top: calc(var(--nav-h) + 24px);
}

.main-content h4 {
    font-weight: 500; font-size: 18px; margin-bottom: 4px;
}

.prose p {
    font-size: 19px; line-height: 1.5;
    margin-bottom: 20px; font-family: Tiempos;
}
.prose p:last-child { margin-bottom: 0; }

.small-container { max-width: 740px; margin: auto; }

.center-container {
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
}

.two-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.three-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}

.four-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px;
}

.grid-panel {
    background: var(--panel); border-radius: 12px;
    border: 1px solid var(--border);
}
.grid-panel img { border-radius: 12px 12px 0 0; }

.grid-panel-details { padding: 16px 20px 20px 20px; }
.grid-panel-details p, .grid-panel-2 p { font-size: 14px; color: var(--muted); line-height: 1.5; }

.grid-panel-2 {
    border-right: 1px solid var(--border);
    padding-right: 12px;
}
.grid-panel-2:last-child { border-right: none; padding-right: 0px; }

.grid-panel-2 img {
    width: 40px;
    margin-bottom: 20px;
    border-radius: 0px;
}

.grid-panel-3 {
    border-radius: 12px; background: var(--panel2);
    padding: 24px;
}

.img-wrapper {
  position: relative; display: inline-block;
}

.img-caption {
  position: absolute; bottom: 24px; right: 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  background-color: rgba(168, 160, 147, 0.15);
  padding: 4px 8px; border-radius: 4px;
}

.img-caption-light {
  position: absolute; bottom: 24px; right: 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: #fff;
  background-color: rgb(255, 255, 255, 0.25);
  padding: 4px 8px; border-radius: 4px;  
}

.thank-you {
    border-left: 3px solid var(--text);
    padding-left: 16px;
    font-weight: 500; font-size: 18px;
}

.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reach-out {
    font-size: 14px; color: var(--muted);
}

/* ── SIZING ── */
.top-xl { margin-top: 144px; }

.top-l { margin-top: 96px; }

.top-m { margin-top: 64px; }

.top-s { margin-top: 24px; }

.top-xs { margin-top: 12px; }

.top-xxs { margin-top: 4px; }

/* ── FOOTER ── */
.footer {
  margin-top: 64px; background-color: var(--footer); color: var(--border); padding: 32px; font-size: 14px;
}

.email {
    display: flex; align-items: center; gap: 12px; width: auto;
    background-color: rgba(122, 119, 113, 0.5); padding: 8px 8px 8px 12px;
    border-radius: 100px; margin-top: 48px; justify-self: start;
}

.email-btn {
    padding: 8px 12px; border-radius: 100px;
    font-weight: 500; border: none; background-color: var(--border);
    color: var(--footer); transition: 0.3s all;
}

.email-btn:hover {
    color: var(--text);
    background-color: #bdbbb1;
}

.footer-container {
    max-width: 1300px; margin: auto; padding: 32px 0px;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px; align-items: center;
}

.footer-links { text-align: right; }

.footer-links a { color: var(--border); display: block; }
.footer-links a:hover { color: var(--accent); }

.footer-text {
    font-size: 24px; font-weight: 500; font-family: tiempos;
}

.footer-update {
    border-top: 1px solid var(--border); padding-top: 12px; padding-left: 36px;
    justify-self: start; float: right;
}

/* ══════════════════════════════════════════
    HOME PAGE
    ══════════════════════════════════════════ */

.home-page {
    padding: 32px;
}

.home-page h1 {
    font-weight: 400; font-size: 36px; margin-top: 12px;
    font-family: Tiempos; letter-spacing: -0.02em;
}

.home-hero {
    line-height: 1.25; text-align: center;
    max-width: 780px; margin: auto;
}

.home-hero h2 {
    font-size: 18px; font-weight: 400; text-align: center;
    max-width: 680px; margin: 20px auto;
}

.home-hero a {
    color: var(--accent);
}

.home-hero a:hover {
    color: var(--text);
}

.inline-img {
    display: inline-block;
    width: 36px;
    height: 36px;
    object-fit: cover;
    vertical-align: middle;
    margin: 0 6px;
}

.home-grid {
    display: block; /* replace your grid with block */
}

.home-grid > div {
    width: calc(33.333% - 16px); /* 3 columns */
    float: left;
    margin-bottom: 48px;
}

.home-page h3 {
    font-size: 24px; font-weight: 500; font-family: tiempos;
}

.home-page h4 {
    font-weight: 400; font-size: 15px; color: var(--muted);
}

.construction {
    font-size: 11px; background: #e2e1d4; font-weight: 500;
    max-width: 210px; margin: auto; padding: 8px 12px;
    border-radius: 120px; text-transform: uppercase;
}

/* ══════════════════════════════════════════
    ABOUT PAGE
    ══════════════════════════════════════════ */


.about {
    margin: auto 20px;
}

.about-section {
  margin: 84px auto 0;
  padding: 48px;
  max-width: 840px;
  background: var(--panel);
}

.about-section p {
    font-size: 16px; margin-bottom: 20px; font-family: Tiempos;
}

.me-image {
    margin: -84px 0 24px 12px; width: 240px; float: right; height: auto;
    padding: 24px 24px 12px 24px; background: var(--panel2);
}
.me-image img { border-radius: 0px; }
.me-image p {
    text-align: center; line-height: 1; margin-top: 12px;
    font-family: Cedarville Cursive;
}

.signature {
    font-family: Cedarville Cursive; font-size: 24px;
}

.about-section h1 {
  margin: 0 0 24px 0;
  letter-spacing: -1px;
  font-size: 36px;
  font-weight: 500;
}

.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    max-width: 840px; margin: 64px auto 0 auto;
}

.about-grid h2 {
    font-size: 20px; font-weight: 500;
}

.about-flex {
    display: flex; gap: 24px;
}

.about-grid ol {
    padding-left: 12px;
}

.about-grid li {
    padding-left: 6px; font-size: 14px; color: var(--muted);
}

.resume-label { color: var(--text); font-size: 14px; font-weight: 500; }

/* ══════════════════════════════════════════
    SIDENOTE SYSTEM
    ══════════════════════════════════════════ */

/* The right column is a relative container;
    sidenotes are positioned absolute inside it */
.notes-col {
    position: relative;
    /* height is managed by JS — column stretches naturally */
}

.sidenote {
    position: absolute; left: 0; right: 0;
    /* top is set by JS to align with anchor */
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
}
.sidenote.visible {
    opacity: 1;
    transform: translateY(0);
}

.sidenote-inner {
    border-left: 2px solid var(--border);
    padding-left: 8px;
}
.sidenote-inner p {
    font-size: 13px; line-height: 1.5; 
    color: #666;
}

/* connector dot on the anchor element */
.has-note {
    position: relative;
}
.has-note::after {
    content: '';
    position: absolute;
    right: -calc(var(--col-gap) / 2 + 4px);
    top: 50%; transform: translateY(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--border);
    pointer-events: none;
    /* hidden by default, shown on ≥md */
    display: none;
}

/* ── INLINE NOTE (mobile fallback) ── */
/* On small screens, sidenotes collapse inline below their anchor */
.inline-note {
    display: none; /* hidden on desktop */
    border-left: 2px solid var(--border);
    padding-left: 16px;
    margin: 16px 0 16px;
}
.inline-note p {
    font-size: 17px; line-height: 1.5; color: var(--muted); font-weight: 500;
}

/* stat row */
.stat-row {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 10px; margin: 20px 0;
}
.stat-card {
    border: 1px solid var(--border);
    border-radius: 4px; padding: 18px 14px; text-align: center;
    transition: border-color .2s;
}
.stat-card:hover { border-color: var(--border); }
.stat-num { font-size: 28px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ── RESPONSIVE ── */

/* tablet: hide notes col, show inline notes */
@media (max-width: 1024px) {
    :root { --col-right: 0px; --col-gap: 48px; }
    .page-wrap {
    grid-template-columns: var(--col-left) 1fr;
    }
    .notes-col { display: none; }
    .inline-note { display: block; }
}

@media (max-width: 1040px) {
    .home-grid > div {
      width: calc(50% - 12px); /* 2 columns */
    }
}

@media (max-width: 900px) {
    .page-wrap {
        grid-template-columns: 1fr; padding: 20px 20px 80px; gap: 24px;
        }

    .sidebar-left { display: none; }
}

/* mobile: single column */
@media (max-width: 740px) {
    .page-wrap {
    grid-template-columns: 1fr; padding: 20px 20px 80px; gap: 24px;
    }

    .topnav { padding: 0 20px; }
    .sidebar-left { display: none; }

    .three-grid { grid-template-columns: 1fr; }
    .four-grid { grid-template-columns: 1fr 1fr; }
    .two-grid { display: flex; flex-direction: column; }

    h1.section-title { font-size: 26px; }
    .prose p { font-size: 16px; }
    .footer-container { grid-template-columns: 1fr; }

    .home-grid > div { width: 100%; float: none; }
    .about-grid { grid-template-columns: 1fr; }
    .grid-panel-2 { border-right: none; padding-right: 0px; }
}

/* ── IMAGE CAROUSEL ── */