/* Carolina Barbosa — Personal Archive
   Typography: Garamond across the whole website. White, crisp page background.
   Most spacing and colour can be adjusted from the variables below. */
:root {
  --paper: #ffffff;
  --soft: #f4f4f1;
  --soft-2: #ecece7;
  --ink: #191919;
  --muted: #6f6f6b;
  --line: #d9d9d4;
  --wood-shadow: rgba(20, 17, 13, .26);
  --accent: #7a573b;
  --gutter: clamp(1.1rem, 4vw, 4.2rem);
  --typeface: "Garamond", "Apple Garamond", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--typeface);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body, button, input, textarea, select { font-family: var(--typeface); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.site-header {
  min-height: 64px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.wordmark { font-size: 1.12rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: clamp(1rem, 2.6vw, 2.8rem); }
.site-header nav a, .site-footer a, .page-end-nav a { transition: opacity 180ms ease; }
.site-header nav a:hover, .site-footer a:hover, .page-end-nav a:hover { opacity: .56; }

/* HOME / CABINET */
.landing {
  min-height: max(620px, min(760px, calc(100svh - 64px))); position: relative; overflow: hidden; }
.intro-panel {
  position: absolute; z-index: 2;
  top: clamp(7rem, 16vh, 10.5rem); left: clamp(2rem, 5.5vw, 6rem);
  width: min(17rem, 23vw); font-size: 1.04rem; line-height: 1.42;
}
.archive-stamp { display: inline-block; margin: 0 0 1rem; padding: .25rem .43rem; border: 1px solid var(--line); font-size: .88rem; letter-spacing: .035em; }
.intro-copy { margin: 0; max-width: 17rem; }
.intro-rule { display: block; width: 2.7rem; height: 1px; margin-top: 1.6rem; background: var(--ink); opacity: .65; }
.cabinet-stage {
  position: absolute;
  left: 58%;
  top: 58%;
  transform: translate(-50%, -47%);
  width: min(43vw, 610px);
  aspect-ratio: 710 / 650;
  perspective: 1200px;
  overflow: visible; }

.cabinet-frame { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; pointer-events: none; }
.drawer { position: absolute; display: block; left: 10.7042%; width: 80.4225%; z-index: 1; transform: translate3d(0,0,0) scale(1); transform-origin: center; transition: transform 360ms cubic-bezier(.2,.72,.22,1), filter 360ms ease; -webkit-tap-highlight-color: transparent; }
.drawer img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.drawer-one { top: 10%; height: 26.3077%; }
.drawer-two { top: 35.8462%; height: 26.3077%; }
.drawer-three { top: 61.8462%; height: 26.7692%; }
.drawer:hover, .drawer:focus-visible { z-index: 10; transform: translate3d(2.2%, 2.4%, 28px) scale(1.014); filter: drop-shadow(0 9px 7px var(--wood-shadow)); outline: none; }
/* Label text is centred on the physical plates. These values can be tuned later. */
.drawer-label { position: absolute; left: 32.1%; top: 23.5%; width: 37.8%; height: 28%; display: flex; align-items: center; justify-content: center; color: #28221b; font-size: clamp(.8rem, 1.12vw, 1.1rem); line-height: 1; text-align: center; white-space: nowrap; pointer-events: none; }
.drawer-three .drawer-label { font-size: clamp(.61rem, .78vw, .88rem); letter-spacing: -.025em; }
.landing-note { position: absolute; right: var(--gutter); bottom: 1.4rem; margin: 0; color: var(--muted); font-size: .82rem; }
.about-section, .contact-section { display: grid; grid-template-columns: minmax(150px,.55fr) 1.45fr; gap: 2rem; padding: clamp(4rem,9vw,8rem) var(--gutter); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.about-section h2, .contact-section h2 { max-width: 950px; margin: 0; font-size: clamp(2.6rem,6.5vw,6.5rem); line-height: .92; font-weight: 400; letter-spacing: -.04em; }
.about-section div > p:not(.section-kicker) { max-width: 38rem; margin-top: 2rem; font-size: clamp(1.1rem,1.6vw,1.4rem); line-height: 1.55; }
.section-kicker, .record-id { margin: 0 0 1rem; color: var(--muted); font-size: .88rem; letter-spacing: .035em; }
.contact-content > a { display: inline-block; margin-top: 2rem; padding-bottom: .3rem; border-bottom: 1px solid currentColor; font-size: clamp(1.2rem,2vw,1.7rem); }
.section-note { max-width: 28rem; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* SHARED ARCHIVE PAGE INTRO */
.archive-page main { padding-bottom: clamp(2rem,5vw,5rem); }
.page-intro { padding: clamp(2rem,4vw,3rem) var(--gutter) 0; }
.page-index-line, .collection-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .86rem; }
.page-index-line { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: clamp(2rem,4vw,3.6rem) 0 clamp(2rem,4vw,3.6rem); }
.collection-heading h1 { margin: 0; font-size: clamp(2rem, 3.2vw, 3.4rem); font-weight: 400; line-height: .95; letter-spacing: -.035em; }
.collection-heading p { max-width: 25rem; margin: 0; color: var(--muted); font-size: 1.12rem; line-height: 1.35; }
.collection-meta { padding: .85rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.collection-meta span:nth-child(2) { text-align: center; }

/* THINGS I SEE — photographic grid with no captions or description panels */
.photo-collection { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); align-items: start; gap: clamp(1rem,2.2vw,2rem); padding: clamp(1.5rem,3vw,2.6rem) var(--gutter) clamp(3rem,6vw,5rem); }
.photo-record { grid-column: span 4; position: relative; min-width: 0; margin: 0; overflow: hidden; background: var(--soft); }
.photo-record--tall .photo-art { aspect-ratio: 4 / 5; }
.photo-record--square .photo-art { aspect-ratio: 1 / 1; }
.photo-record--wide { grid-column: span 8; }
.photo-record--wide .photo-art { aspect-ratio: 1.75 / 1; }
.photo-art { display: grid; place-items: center; position: relative; overflow: hidden; background: #f3f3f1; isolation: isolate; transition: background 250ms ease; }
.photo-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tile-tone, #f2f2f0); transition: transform 400ms ease; }
.photo-record:hover .photo-art::before { transform: scale(1.025); }
.photo-art--01 { --tile-tone: #f0f0ed; }
.photo-art--02 { --tile-tone: #f5f5f2; }
.photo-art--03 { --tile-tone: #eaeae6; }
.photo-art--04 { --tile-tone: #f3f3f0; }
.photo-art--05 { --tile-tone: #efefeb; }
.photo-art--06 { --tile-tone: #f6f6f4; }
.photo-art--07 { --tile-tone: #ebebe7; }
.photo-art--08 { --tile-tone: #f2f2ef; }
.photo-number { position: absolute; top: .7rem; left: .75rem; font-size: .95rem; }
.photo-placeholder { color: #9b9b94; font-size: .95rem; font-style: italic; opacity: .8; }
/* Replace each .photo-art placeholder with an <img> once you have your photographs. */
.photo-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-record:hover .photo-number { transform: translateY(-2px); }

/* THINGS I MAKE — one grid mixing personal projects, campaigns, and collaborations */
.work-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(2rem,3vw,3.4rem) clamp(1rem,1.8vw,2rem); padding: clamp(2rem,4vw,3.5rem) var(--gutter) 2rem; }
.work-card { display: block; min-width: 0; }
.work-art { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 4.3; background: #f0f0ee; transition: background 200ms ease; }
.work-art::before { content: ""; position: absolute; inset: 0; border: 1px solid rgba(20,20,20,.035); pointer-events: none; }
.work-card:hover .work-art { background: #e9e9e5; }
.work-art--01 { background: #f0f0ed; }
.work-art--02 { background: #f4f4f1; }
.work-art--03 { background: #ebebe8; }
.work-art--04 { background: #f5f5f2; }
.work-number, .work-corner { position: absolute; top: .8rem; font-size: .85rem; }
.work-number { left: .8rem; }
.work-corner { right: .8rem; color: var(--muted); font-size: .8rem; }
.work-placeholder { color: #999991; font-size: 1rem; font-style: italic; }
.work-card-caption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding-top: .8rem; }
.work-name { font-size: 1.22rem; }
.work-kind { color: var(--muted); font-size: .9rem; }
.work-card:hover .work-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.placeholder-notice { margin: 1.5rem var(--gutter) 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }

/* INDIVIDUAL PROJECT RECORDS — image and text together, editorial-spread feel */
.project-intro { padding: clamp(2rem,4vw,3rem) var(--gutter) 0; }
.project-heading { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(240px,.7fr); gap: clamp(2rem,6vw,6rem); align-items: end; padding: clamp(2.5rem,6vw,5rem) 0 2rem; }
.project-heading h1 { margin: 0; max-width: 850px; font-size: clamp(3.2rem,7.5vw,7.8rem); font-weight: 400; line-height: .9; letter-spacing: -.045em; }
.project-heading .section-kicker { margin-bottom: 1rem; }
.project-deck { max-width: 31rem; margin: 0 0 .3rem; font-size: clamp(1.15rem,1.8vw,1.55rem); line-height: 1.35; }
.project-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.project-facts div { padding: .85rem .6rem .9rem 0; }
.project-facts dt { color: var(--muted); font-size: .86rem; margin-bottom: .3rem; }
.project-facts dd { margin: 0; font-size: 1rem; }
.project-documentation { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: clamp(.7rem,1.5vw,1.5rem); padding: clamp(2rem,4vw,3.5rem) var(--gutter); }
.document-image { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-width: 0; margin: 0; padding: .8rem; aspect-ratio: 4 / 5; background: #f1f1ee; color: #999992; font-size: .9rem; font-style: italic; }
.document-image span { font-style: normal; color: #666660; }
.document-image figcaption { font-size: .88rem; }
.document-image--large { grid-column: span 6; aspect-ratio: 1.25 / 1; }
.document-image--small { grid-column: span 3; aspect-ratio: 4 / 5; }
.document-image--wide { grid-column: span 6; aspect-ratio: 1.5 / 1; }
.document-image--portrait { grid-column: span 3; aspect-ratio: 4 / 5; }
.project-text-grid { display: grid; grid-template-columns: minmax(150px,.55fr) 1.45fr; gap: 2rem; padding: clamp(2.5rem,5vw,4.5rem) var(--gutter); border-top: 1px solid var(--line); }
.project-text-content { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.5rem,3vw,3rem); }
.project-text-content h2 { margin: 0 0 .75rem; font-size: 1.5rem; font-weight: 400; }
.project-text-content p { margin: 0; color: #4e4e49; font-size: 1rem; line-height: 1.55; }

/* THINGS I THINK — paper slips lift out of an index tray on hover/focus */
.thought-archive { padding: clamp(2rem,4vw,3.5rem) var(--gutter) 0; }
.thought-index-label { margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.thought-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem,2vw,2rem); padding-bottom: clamp(8rem,16vw,13rem); }
.thought-card { position: relative; display: block; width: 100%; height: 370px; min-width: 0; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; perspective: 900px; z-index: 0; }
.thought-folder { position: absolute; inset: 0 0 0; top: 17%; border: 1px solid #cfcfc9; background: #f4f4f0; }
.thought-folder::before { content: ""; position: absolute; top: -19px; left: 0; width: 42%; height: 20px; background: #f4f4f0; border: 1px solid #cfcfc9; border-bottom: 0; clip-path: polygon(0 0,84% 0,100% 100%,0 100%); }
.thought-paper { position: absolute; z-index: 1; left: 4%; right: 4%; top: 0; display: flex; flex-direction: column; min-height: 320px; padding: 1.2rem; border: 1px solid #cfcfc9; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.035); transform: translateY(208px) rotate(var(--paper-tilt,0deg)); transform-origin: bottom center; transition: transform 420ms cubic-bezier(.2,.72,.2,1), box-shadow 300ms ease; }
.thought-card--one { --paper-tilt: -.8deg; }
.thought-card--two { --paper-tilt: .7deg; }
.thought-card--three { --paper-tilt: -0.4deg; }
.thought-card--four { --paper-tilt: .5deg; }
.thought-card--five { --paper-tilt: -.6deg; }
.thought-card--six { --paper-tilt: .8deg; }
.thought-number { margin: 0 0 1.4rem; color: var(--muted); font-size: .86rem; letter-spacing: .035em; }
.thought-title { display: block; margin-bottom: .8rem; font-size: clamp(1.35rem,2vw,2rem); line-height: 1.05; }
.thought-excerpt { display: block; color: #5f5f59; font-size: 1rem; line-height: 1.4; }
.thought-date { display: block; margin-top: auto; padding-top: 1.2rem; color: var(--muted); font-size: .85rem; }
.thought-action { display: block; margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .7rem; font-size: .95rem; }
.thought-card:hover, .thought-card:focus-visible, .thought-card:focus-within { z-index: 10; }
.thought-card:hover .thought-paper, .thought-card:focus-visible .thought-paper, .thought-card:focus-within .thought-paper { transform: translateY(-4px) rotate(0); box-shadow: 0 16px 32px rgba(0,0,0,.12); }
.thought-card:hover .thought-folder, .thought-card:focus-visible .thought-folder, .thought-card:focus-within .thought-folder { background: #ededE8; }
.thought-instruction { margin: -5rem 0 3rem; color: var(--muted); font-size: .92rem; }
.thought-dialog { width: min(760px, calc(100% - 2rem)); max-height: min(84vh, 900px); padding: clamp(1.5rem,4vw,3.5rem); border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.thought-dialog::backdrop { background: rgba(20,20,18,.42); }
.dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.dialog-top .thought-number { margin: .2rem 0; }
.dialog-close { border: 0; background: transparent; padding: .2rem; cursor: pointer; font-size: 1rem; }
.thought-dialog > .thought-date { margin: 1.5rem 0 .7rem; }
.thought-dialog h2 { margin: 0 0 1.8rem; font-size: clamp(2rem,5vw,3.4rem); font-weight: 400; line-height: .98; }
.thought-full-text { max-width: 52ch; white-space: pre-line; font-size: 1.2rem; line-height: 1.7; }

.page-end-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin: 0 var(--gutter); padding: 1.1rem 0; border-top: 1px solid var(--ink); font-size: .95rem; }

@media (max-width: 900px) {
  .landing { min-height: 800px; }
  .intro-panel { top: 4.5rem; left: var(--gutter); width: min(16rem,40vw); }
  .cabinet-stage { left: 57%; top: 59%; width: min(66vw,560px); }
  .landing-note { bottom: .8rem; }
  .collection-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .photo-record { grid-column: span 6; }
  .photo-record--wide { grid-column: span 12; }
  .work-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-text-content { grid-template-columns: 1fr; gap: 1.7rem; }
  .thought-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .thought-instruction { margin-top: -4rem; }
}
@media (max-width: 600px) {
  :root { --gutter: 1.05rem; }
  .site-header { min-height: 58px; font-size: .95rem; }
  .site-header nav { gap: .9rem; }
  .wordmark { font-size: 1rem; }
  .landing { min-height: 760px; }
  .intro-panel { top: 3rem; left: var(--gutter); width: min(17rem,74vw); font-size: 1rem; }
  .archive-stamp { margin-bottom: .65rem; }
  .cabinet-stage { left: 50%; top: 58%; width: min(94vw,500px); }
  .landing-note { font-size: .78rem; }
  .drawer-label { font-size: clamp(.7rem,2.8vw,.9rem); }
  .drawer-three .drawer-label { font-size: clamp(.52rem,2vw,.72rem); }
  .about-section, .contact-section { grid-template-columns: 1fr; gap: 1.2rem; padding: 3.5rem var(--gutter); }
  .page-intro { padding-top: 1.5rem; }
  .page-index-line { font-size: .8rem; }
  .collection-heading h1 { font-size: 2.7rem; }
  .collection-heading p { font-size: 1.05rem; }
  .collection-meta { align-items: start; flex-direction: column; gap: .4rem; }
  .collection-meta span:nth-child(2) { text-align: left; }
  .photo-collection { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; padding: 1.1rem var(--gutter) 3rem; }
  .photo-record, .photo-record--wide { grid-column: span 1; }
  .photo-record--wide .photo-art { aspect-ratio: 4 / 5; }
  .photo-placeholder { font-size: .8rem; }
  .work-grid { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.4rem; }
  .work-art { aspect-ratio: 1.05 / 1; }
  .project-heading h1 { font-size: clamp(3rem,15vw,5rem); }
  .project-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-documentation { grid-template-columns: repeat(6,minmax(0,1fr)); padding: 1.4rem var(--gutter); gap: .7rem; }
  .document-image--large, .document-image--wide { grid-column: span 6; }
  .document-image--small, .document-image--portrait { grid-column: span 3; }
  .project-text-grid { grid-template-columns: 1fr; gap: .5rem; padding: 2.5rem var(--gutter); }
  .thought-grid { grid-template-columns: 1fr; gap: .6rem; padding-bottom: 7rem; }
  .thought-card { height: 310px; }
  .thought-paper { min-height: 285px; transform: translateY(190px) rotate(var(--paper-tilt,0deg)); }
  .thought-title { font-size: 1.45rem; }
  .thought-instruction { margin: -4.5rem 0 2.5rem; }
  .page-end-nav { align-items: start; flex-direction: column; gap: .7rem; }
  .site-footer { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* LANDING PAGE: cabinet size and page proportions */

@media (min-width: 901px) {
  .landing { min-height: clamp(680px, 86svh, 780px); }

  .cabinet-stage { width: min(53vw, 720px); }
}

/* Keep the cabinet inside shorter browser windows */

@media (min-width: 901px) and (max-height: 860px) {
  .landing { min-height: 680px; }

  .cabinet-stage { width: min(53vw, 650px);}
}

/* LANDING PAGE — compact layout test */

@media (min-width: 901px) {
  .landing { min-height: 620px; overflow: visible; }

  .cabinet-stage { left: 58%; top: 65%; }
}

/* LANDING PAGE — reposition the introduction */

@media (min-width: 901px) {
  .intro-panel {
    top: 80%;
    left: 27%;
    width: min(20rem, 26vw);
  }
}

/* DRAGGABLE CABINET */

.cabinet-stage {
  translate: var(--cabinet-drag-x, 0px) var(--cabinet-drag-y, 0px);
  cursor: default;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cabinet-stage.is-dragging {
  cursor: default;
  z-index: 100;
}

.cabinet-stage img {
  -webkit-user-drag: none;
  user-select: none;
}
/* Keep the normal arrow cursor over the draggable cabinet and its clickable drawers. */
.cabinet-stage .drawer { cursor: default; }
