/* Angela von Rotz — shared styles for all pages */
:root {
    --bg: #F1ECE2;   /* Linen. Previous: #F5F3EE (warm paper). Others to try: #F6ECE8 blush, #EEF1F4 mist blue, #EEF0E8 sage, #EDE6DA oat */
    --fg: #312620;
    --serif: "EB Garamond", Garamond, Georgia, serif;
    --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* FOOTER LINE SWITCH (applies to all pages):
       1    = now (as designed)
       0.15 = fainter
       0    = no line (spacing stays the same) */
    --footer-line: 0;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    overflow-x: hidden;
}

a { color: var(--fg); transition: opacity 0.4s ease; }
a:hover { opacity: 0.5; }

/* small uppercase labels: menu, "Hi there, I am", footer, contact row names */
.label, nav a, .footer-content {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ---- Header ---- */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 48px 4vw;
    display: flex;
    justify-content: flex-end;
    z-index: 100;
}
nav { display: flex; gap: 40px; }
nav a { text-decoration: none; }
nav a[aria-current="page"] { border-bottom: 1px solid var(--fg); padding-bottom: 3px; }

/* ---- Two halves ---- */
main { display: flex; height: 100vh; width: 100%; }

.left-half {
    flex: 0 0 50%;
    min-width: 0;
    height: 100%;
    padding: 10vh 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
/* About: a bit more top padding so the drawing (which fades at the bottom) sits at the vertical center */
.page-about .left-half { padding: 8.33vh 20px 11.67vh 20px; }

.right-half {
    flex: 0 0 50%;
    min-width: 0;
    height: 100%;
    /* text starts at the same height on every page (270px of 900 on the design) */
    padding: 30vh 9.7vw 10vh 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    scrollbar-width: none;
}
.right-half::-webkit-scrollbar { display: none; }

.content-section { position: relative; max-width: 460px; }
.content-section > .label {
    position: absolute;
    left: 0;
    bottom: calc(100% + 20px);
    white-space: nowrap;
    opacity: 0.7;
}

h1 {
    margin: 0 0 28px 0;
    font-family: var(--serif);
    font-size: 56px;
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.bio-text { font-size: 17px; line-height: 1.65; }
.bio-text + .bio-text { margin-top: 16px; }
/* Projects page: one block per project */
.project + .project { margin-top: 28px; }
.project h2 { margin: 0 0 8px 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; font-weight: 400; letter-spacing: -0.005em; }
.project .bio-text { font-size: 16px; line-height: 1.6; }
.cta { display: inline-block; margin-top: 28px; font-size: 17px; text-decoration: none; border-bottom: 1px solid rgba(49, 38, 32, 0.3); padding-bottom: 2px; }

/* ---- Visuals ---- */
.portrait { width: min(680px, 100%); }
.artwork { display: block; width: min(600px, 100%); height: auto; aspect-ratio: 1200 / 902; object-fit: contain; }
.letter { display: block; height: min(558px, 62vh); width: auto; aspect-ratio: 471 / 610; object-fit: contain; }

/* ---- Contact rows ---- */
.contact-rows { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 24px; align-items: baseline; }
.contact-row .label { width: 80px; flex-shrink: 0; opacity: 0.7; }
.contact-row a { font-size: 17px; text-decoration: none; border-bottom: 1px solid rgba(49, 38, 32, 0.3); }

/* ---- Footer ---- */
footer {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    padding: 0 4vw 40px 4vw;
    z-index: 100;
}
.footer-line {
    width: 100%;
    height: 0.5px;
    background-color: var(--fg);
    margin-bottom: 24px;
    opacity: var(--footer-line);
}
.footer-content { display: flex; justify-content: space-between; align-items: flex-end; font-size: 10px; }
.footer-switches { display: flex; align-items: center; }

/* ---- Phone layout (matches the phone artboards) ---- */
@media (max-width: 820px) {
    body { min-height: 100svh; display: flex; flex-direction: column; padding: 0 32px; }
    header { position: static; padding: 28px 0 0 0; }
    nav { gap: 24px; }
    main { flex-direction: column; height: auto; }
    /* same-height visual box on every page, so the text below starts at the same spot */
    .left-half, .page-about .left-half { flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 0; margin-top: 36px; overflow: hidden; }
    .right-half { flex: none; width: 100%; height: auto; padding: 0; margin-top: 28px; overflow: visible; }
    .content-section { max-width: none; }
    .content-section > .label { position: static; display: block; margin-bottom: 14px; }
    h1 { font-size: 42px; margin-bottom: 20px; }
    .bio-text, .contact-row a, .cta { font-size: 16px; }
    .bio-text + .bio-text { margin-top: 14px; }
    .project + .project { margin-top: 24px; }
    .project h2 { font-size: 24px; }
    .bio-text { line-height: 1.6; }
    .portrait { width: 100%; }
    .artwork { width: 100%; height: auto; }
    .letter { width: auto; height: 100%; margin: 0 auto; }
    .contact-rows { margin-top: 28px; gap: 12px; }
    .contact-row { gap: 16px; }
    .contact-row .label { width: 72px; }
    footer { position: static; margin-top: auto; padding: 48px 0 28px 0; }
    .footer-line { margin-bottom: 18px; }
}

/* ---- Animated portrait (from portrait_landing) ---- */
.portrait {
  position: relative;
  display: block;
  width: 100%;
  max-width: 960px;
  font: inherit;
  aspect-ratio: 4 / 3;
  padding: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.portrait:focus-visible { outline: 1px solid var(--fg); outline-offset: 6px; }
.portrait-art {
  position: absolute;
  inset: 0;
  /* Fade the combined portrait once, preserving the face masks and focus ring. */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,.93) 80%, rgba(0,0,0,.6) 88%, rgba(0,0,0,.18) 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,.93) 80%, rgba(0,0,0,.6) 88%, rgba(0,0,0,.18) 96%, transparent 100%);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms cubic-bezier(.22, 1, .36, 1);
}
.portrait img[data-frame="front"] { opacity: 1; visibility: visible; }
.portrait img:is([data-frame="up"], [data-frame="down"], [data-frame="wink"]) {
  /* Only blend the expression into the existing face, never the generated hair.
     The original alpha is a second mask so no pixels can extend its silhouette. */
  --face-mask: radial-gradient(ellipse 16% 28% at 51% 41%, #000 76%, transparent 100%);
  -webkit-mask-image: url("assets/portrait/front.webp"), var(--face-mask);
  mask-image: url("assets/portrait/front.webp"), var(--face-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.portrait img[data-frame="wink"] {
  transition-duration: 60ms;
  --face-mask: radial-gradient(ellipse 7% 9% at 46% 34%, #000 70%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) {
  .portrait img { transition: none; }
}
.portrait-fallback { position: absolute; inset: 0; display: grid; place-content: center; font: 13px system-ui; }
.portrait[data-ready="true"] .portrait-fallback { visibility: hidden; }


/* ---- Optional: blend the portrait's whites into the page color ----
   Switched on by the class "tint-portrait" on <body> in index.html.
   To revert, just remove "tint-portrait" from that class list. */
.tint-portrait .portrait { background: var(--bg); }
.tint-portrait .portrait-art { mix-blend-mode: multiply; }

/* ---- Blouse color dots (About page footer) ---- */
.shirt-switch { display: flex; align-items: center; gap: 8px; }
.color-dot {
    width: 9px; height: 9px; padding: 0; border: 1px solid var(--fg); border-radius: 50%;
    cursor: pointer; opacity: 0.45; transition: opacity 0.25s ease, transform 0.25s ease;
}
.color-dot:hover, .color-dot[aria-pressed="true"] { opacity: 1; }
.color-dot[aria-pressed="true"] { transform: scale(1.2); }
.color-dot-sage { background: #A9B7A2; }
.color-dot-white { background: #FFF; }
.color-dot:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
