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

:root {
  --yellow:    #fdcb35;
  --ink:       #111;
  --muted:     rgba(0,0,0,.35);
  --divide:    rgba(0,0,0,.4);
  --font:      'Courier New', Courier, monospace;
  --left-w:    320px;
  --pad:       32px;
}

html, body { height: 100%; margin: 0; }

body {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; cursor: pointer; }

/* ── Views ── */
.view { display: none; }
.view.active { display: block; }

/* ══════════════════════
   LANDING
══════════════════════ */
#view-landing {
  display: none;
  height: 100vh;
}
#view-landing.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-inner { display: flex; flex-direction: column; gap: 20px; }
.landing-name  { font-size: 15px; font-weight: bold; letter-spacing: .03em; }
.landing-nav   { display: flex; flex-direction: column; gap: 4px; }
.landing-nav a {
  font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; opacity: .5; display: block;
}
.landing-nav a:hover { opacity: 1; }

/* ══════════════════════
   WORK
══════════════════════ */
#view-work { display: none; }
#view-work.active { display: block; }

/* Fixed left panel */
.work-left {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-550px); /* half of max 1100px */
  width: var(--left-w);
  height: 100vh;
  padding: 40px var(--pad);
  /* dashed line on right edge */
  border-right: 1px dashed var(--divide);
  overflow: hidden;
}

.work-left .name {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: .03em;
  margin-bottom: 10px;
  cursor: pointer;
  display: inline-block;
}

.work-left .nav {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

/* Scrolling right panel */
.work-right {
  position: fixed;
  top: 0;
  left: calc(50% - 550px + var(--left-w) + 1px);
  right: 0;
  bottom: 0;
  padding: 40px 32px 80px 48px;
  overflow-y: auto;
  scrollbar-width: none;
  max-width: calc(1100px - var(--left-w));
}

.work-right::-webkit-scrollbar { display: none; }

/* ── Archive ── */
.archive-group {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  margin-bottom: 2px;
}

.yr { color: var(--muted); font-size: 11px; padding-top: 1px; white-space: nowrap; user-select: none; }
.yr.hidden { visibility: hidden; }

.proj { cursor: pointer; padding: 1px 0; }
.proj:hover { text-decoration: underline; }
.proj.active::before { content: '[ '; }
.proj.active::after  { content: ' ]'; }

.archive-spacer { height: 12px; }

/* ── Project content ── */
.project-title { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.project-meta  { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.project-desc  { font-size: 12px; line-height: 1.85; max-width: 520px; color: rgba(0,0,0,.75); margin-bottom: 28px; }
.project-images { display: flex; flex-direction: column; gap: 16px; }
.project-images img { display: block; max-width: 640px; width: 100%; height: auto; }

/* ══════════════════════
   SHARED HEADER (CV + Contact)
══════════════════════ */
.name {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: .03em;
  margin-bottom: 10px;
  cursor: pointer;
  display: inline-block;
}

.nav { display: flex; gap: 24px; }
.nav a { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .5; }
.nav a:hover { opacity: 1; }
.nav a.active { opacity: 1; text-decoration: underline; }

/* ══════════════════════
   CV + CONTACT (normal scroll pages)
══════════════════════ */
#view-cv, #view-contact { display: none; }
#view-cv.active, #view-contact.active { display: block; }

#view-cv .page,
#view-contact .page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px var(--pad) 60px;
}

.header { margin-bottom: 40px; }

.cv-layout { display: flex; }

.cv-sidebar {
  width: var(--left-w);
  flex-shrink: 0;
  border-right: 1px dashed var(--divide);
  padding-right: 28px;
  padding-top: 4px;
}

.cv-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cv-content { flex: 1; padding-left: 48px; padding-top: 4px; }
.cv-block { margin-bottom: 24px; }

.cv-entry {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.7;
}

.cv-year       { color: var(--muted); font-size: 11px; padding-top: 1px; white-space: nowrap; }
.cv-entry-name { color: rgba(0,0,0,.85); }
.cv-sub        { color: var(--muted); font-size: 11px; }
.cv-divider    { border: none; border-top: 1px dashed var(--divide); margin: 20px 0; }

.contact-top {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  max-width: 860px;
  margin-bottom: 48px;
}

.contact-photo     { width: 160px; flex-shrink: 0; }
.contact-photo img { display: block; width: 100%; height: auto; }
.contact-info { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }

.contact-entry {
  display: grid;
  grid-template-columns: 84px 1fr;
  column-gap: 16px;
  font-size: 12px;
  line-height: 1.9;
}

.contact-label { color: var(--muted); font-size: 11px; letter-spacing: .04em; padding-top: 2px; }
.contact-value a { border-bottom: 1px solid rgba(0,0,0,.25); padding-bottom: 1px; }
.contact-value a:hover { border-bottom-color: var(--ink); }
.contact-value span { color: rgba(0,0,0,.8); }

.contact-bottom {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 860px;
  border-top: 1px dashed var(--divide);
  padding-top: 40px;
}

.contact-kid-photo     { width: 220px; flex-shrink: 0; }
.contact-kid-photo img { display: block; width: 100%; height: auto; }

.contact-tagline {
  font-size: 12px;
  line-height: 1.85;
  color: rgba(0,0,0,.75);
  max-width: 360px;
  padding-top: 4px;
}

/* ══════════════════════
   MOBILE BACK BUTTON
══════════════════════ */
.back-btn {
  display: none;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
  cursor: pointer;
  margin-bottom: 24px;
}
.back-btn::before { content: '← '; }
.back-btn:hover { opacity: 1; }

/* ══════════════════════
   MOBILE
══════════════════════ */
@media (max-width: 700px) {

  .work-left {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px dashed var(--divide);
    padding: 28px 20px 20px;
  }

  .work-right {
    margin-left: 0;
    max-width: 100%;
    padding: 24px 20px 48px;
    display: none;
  }

  .work-right.project-open { display: block; }
  .work-right.project-open .back-btn { display: block; }
  .work-left.project-open { display: none; }

  #view-cv .page,
  #view-contact .page { padding: 28px 20px 48px; }

  .cv-layout { display: block; }

  .cv-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px dashed var(--divide);
    padding-right: 0;
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 24px;
  }

  .cv-label { margin-top: 0 !important; }
  .cv-content { padding-left: 0; }

  .contact-top    { flex-direction: column; gap: 24px; }
  .contact-bottom { flex-direction: column; gap: 24px; }
  .contact-kid-photo { width: 160px; }
  .project-images img { max-width: 100%; }
}

/* ── Prevent page from scrolling (right panel handles it) ── */
html, body {
  overflow: hidden;
}

/* CV links */
.cv-entry-name a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cv-entry-name a:hover {
  opacity: .6;
}
