@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100;0,300;0,400;0,500;1,300;1,400&display=swap');

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

:root {
  --font: 'Archivo', sans-serif;
  --black: #141414;
  --mid: #888;
  --bg: #f9f8f6;
  --dark-bg: #0a0a0a;
  --t-label: 9px;
  --t-title: 15px;
  --t-body:  12px;
  --ls-label: 0.18em;
  --ls-title: 0.14em;
  --ls-body:  0.04em;
}

html, body {
  width: 100%; height: 100%;
  font-family: var(--font);
  font-weight: 300;
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }

/* ── DESKTOP NAV ── */
.nav {
  position: fixed; top: 22px; right: 28px; z-index: 999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
}
.nav a {
  font-family: var(--font);
  font-size: var(--t-label);
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: #999;
  line-height: 2.2;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav a:hover   { color: var(--black); }
.nav a.home    { color: #666; margin-bottom: 6px; }
.nav a.active  { color: var(--black); }
.nav hr        { display: none; }

.nav.dark a        { color: #333; }
.nav.dark a:hover  { color: #aaa; }
.nav.dark a.home   { color: #333; }
.nav.dark a.active { color: #bbb; }

/* ── SHARED LEFT PANEL (desktop) ── */
.proj-left {
  height: 100vh;
  overflow-y: auto;
  padding: 32px 24px 60px 28px;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  width: 260px;
}
.proj-left::-webkit-scrollbar { display: none; }

.proj-label {
  font-size: var(--t-label);
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: #555;
  margin-bottom: 14px;
}
.proj-title {
  font-size: var(--t-title);
  font-weight: 300;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: #ccc;
  line-height: 1.55;
  margin-bottom: 24px;
}
.proj-desc {
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: var(--ls-body);
  color: #555;
  margin-bottom: 14px;
}
.proj-desc a {
  color: #666;
  border-bottom: 0.5px solid #444;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.proj-desc a:hover { color: #aaa; border-color: #666; }

/* m-panel: only visible on mobile */
.m-panel { display: none; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .m-panel { display: block; }

  /* nav becomes top bar, links only show pages not home */
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 9px 14px;
    background: rgba(249,248,246,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
  }
  .nav.dark {
    background: rgba(10,10,10,0.97);
    border-bottom: none;
  }
  .nav a        { font-size: 7.5px; letter-spacing: 0.1em; line-height: 1; padding: 3px 6px; color: #888; }
  .nav a.home   { display: none; }
  .nav a.active { color: var(--black); }
  .nav.dark a         { color: #555; }
  .nav.dark a.active  { color: #ccc; }

  /* hide desktop left panel */
  .proj-left { display: none; }

  /* ── mobile overlay panel ── */
  .m-panel {
    position: fixed;
    top: 34px; left: 0; right: 0;
    z-index: 80;
    padding: 0 16px;
    pointer-events: none;
  }
  .m-panel-inner {
    pointer-events: auto;
  }
  .m-panel-head {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 9px 0 7px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .m-label {
    font-size: 7px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #777;
    flex-shrink: 0;
  }
  .m-title {
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #bbb;
    line-height: 1.3;
    flex: 1;
  }
  .m-arrow {
    font-size: 7px;
    color: #555;
    flex-shrink: 0;
    transition: transform 0.25s;
  }
  .m-arrow.open { transform: rotate(180deg); }

  .m-panel-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
  }
  .m-panel-body.open { max-height: 50vh; overflow-y: auto; }
  .m-panel-body p {
    font-size: 9px;
    font-weight: 300;
    line-height: 1.8;
    letter-spacing: 0.03em;
    color: #999;
    margin-bottom: 10px;
    padding-bottom: 2px;
  }
  .m-panel-body a { color: #888; border-bottom: 0.5px solid #555; }
}
