@font-face {
  font-family: "Romie";
  src:
    url("./fonts/Romie/Romie-Regular.sub.woff2?v=2") format("woff2"),
    url("./fonts/Romie/Romie-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Romie";
  src:
    url("./fonts/Romie/Romie-Italic.sub.woff2?v=2") format("woff2"),
    url("./fonts/Romie/Romie-Italic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Office Code Pro";
  src: url("./fonts/office-code-pro/officecodepro-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Office Code Pro";
  src: url("./fonts/office-code-pro/officecodepro-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-bg: #ffffff;
  --tab-text: #261818;
  --resume-accent-01: #c9d7ee;
  --resume-accent-02: #d9caea;
  --resume-accent-03: #e6cfcf;
  --resume-accent-04: #f3c8aa;
  --resume-accent-05: #d8e6d8;
  --resume-accent-06: #cec5e9;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--page-bg);
  color: var(--tab-text);
  font-family: "Office Code Pro", monospace;
  overflow: hidden;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.pixel-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at top left, rgba(7, 6, 8, 0.018), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff);
}

.pixel-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.page-content {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.resume-page__content {
  padding: 0;
}

/* Header: centred at the top of the viewport. */
.resume-page__topleft {
  position: fixed;
  top: clamp(0.9rem, 2.2vw, 1.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.resume-page__header {
  display: block;
  width: clamp(115px, 11vw, 158px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Back button + drag hint stacked at the bottom centre (button just above it). */
.resume-page__bottom {
  position: fixed;
  bottom: clamp(0.9rem, 3.2vh, 1.8rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.6rem, 1.4vh, 0.9rem);
  pointer-events: none;
}

/* The button is the one clickable thing in the bottom stack. */
.resume-page__bottom .resume-page__back {
  pointer-events: auto;
}

/* Pill button styled like the site's buttons. */
.resume-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(38, 24, 24, 0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--tab-text);
  font-family: "Office Code Pro", monospace;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.resume-page__back:hover,
.resume-page__back:focus-visible {
  color: var(--tab-text);
  border-color: var(--tab-text);
  background: rgba(38, 24, 24, 0.06);
  outline: none;
}

.resume-page__stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.resume-page__figure {
  position: absolute;
  inset: 0;
  z-index: 35;
}

.resume-page__hint {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(38, 24, 24, 0.4);
}

.resume-page__hint--below {
  margin: 0;
  max-width: min(520px, calc(100vw - 2rem));
  text-align: center;
  pointer-events: none;
}

.resume-flower {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 35;
}

/* ---- 3D dandelion (canvas) ---- */
.resume-flower__canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* Single-finger drag is handled in JS via pointer events; two-finger gestures
     are left to the browser for native pinch-zoom. */
  touch-action: pinch-zoom;
  cursor: grab;
}

.resume-flower.is-grabbing .resume-flower__canvas {
  cursor: grabbing;
}

.resume-flower__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.resume-flower__label3d {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "Romie", serif;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #261818;
  white-space: nowrap;
  opacity: 0;
  text-shadow: 0 0 6px #fff, 0 0 6px #fff, 0 0 5px #fff;
  transition: opacity 200ms ease;
}

.resume-flower__label3d.is-hot {
  text-decoration: none;
}

/* Sub-branch titles laid out as a readable column in profile view. */
.resume-flower__sublabel3d {
  position: absolute;
  padding: 0.2rem 0.5rem;
  font-family: "Office Code Pro", monospace;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--tab-text);
  white-space: nowrap;
  opacity: 0;
  text-shadow: 0 0 6px #fff, 0 0 6px #fff, 0 0 5px #fff;
  transition: opacity 240ms ease, border-color 240ms ease,
    background 240ms ease, color 240ms ease;
}

/* Every interactive item — expandable sub-branches AND actionable leaves
   (website, email, phone, socials) — shares ONE button style, matching the
   "Back to Website" button exactly. No extra colours or variants. */
.resume-flower__sublabel3d.is-interactive,
.resume-flower__sublabel3d.is-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(38, 24, 24, 0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--tab-text);
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  transition: color 240ms ease, border-color 240ms ease, background 240ms ease;
}

/* Hover — identical to .resume-page__back:hover. */
.resume-flower__sublabel3d.is-interactive.is-hot,
.resume-flower__sublabel3d.is-button:hover,
.resume-flower__sublabel3d.is-button:focus-visible {
  color: var(--tab-text);
  border-color: var(--tab-text);
  background: rgba(38, 24, 24, 0.06);
  outline: none;
}

/* Active / selected — same style, slightly darker fill. */
.resume-flower__sublabel3d.is-interactive.is-open,
.resume-flower__sublabel3d.is-button:active {
  color: var(--tab-text);
  border-color: var(--tab-text);
  background: rgba(38, 24, 24, 0.14);
}

/* Terminal rows are informational only — plain text, no button styling. */
.resume-flower__sublabel3d.is-terminal {
  border: none;
  background: none;
  color: rgba(38, 24, 24, 0.62);
  font-weight: 400;
}

/* A soft trailing annotation, e.g. the "*learning" after "Danish". */
.resume-flower__note {
  font-style: italic;
  opacity: 0.55;
}

/* Content sits directly on the canvas — no card, panel, or background. A soft
   white text glow keeps it legible over the flower. */
.resume-flower__detail3d {
  position: absolute;
  transform: translate(14px, -50%);
  /* Never wider than the viewport (keeps the paragraph on-page on mobile). */
  max-width: min(380px, 90vw);
  /* Never taller than the space between the logo and the bottom controls; a
     long entry (e.g. a role with many bullets) scrolls inside itself instead of
     running off the page or over the "Back to website" button. */
  max-height: calc(100dvh - 195px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  font-family: "Office Code Pro", monospace;
  font-size: 13px;
  line-height: 1.42;
  color: #261818;
  text-shadow: 0 0 5px #fff, 0 0 5px #fff, 0 0 4px #fff;
  /* Always laid out but invisible until opened, so it can fade in/out softly
     (display can't transition). */
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.resume-flower__detail3d.is-open {
  opacity: 1;
}

/* The content block itself stays click-through (so a tap anywhere on it still
   resets the view, and the "Back to website" button underneath stays tappable).
   ONLY a genuinely scrollable entry grabs pointer events, so it can be scrolled;
   its links opt back in regardless (see the anchor rule below). */
.resume-flower__detail3d.is-scrollable {
  pointer-events: auto;
}

/* Content hierarchy (Office Code Pro). Titles (job titles, degree) in Medium; the
   place/school in Medium but a touch smaller; body copy regular. Content only —
   never the sub-branch buttons. */
.resume-flower__detail3d p {
  margin: 0;
  color: #261818;
}

/* Tightened spacing between the title / place / body blocks. */
.resume-flower__detail3d p + p {
  margin-top: 0.12rem;
}

/* Job titles + "BA Graphic & Digital Design" — Office Code Pro Medium. */
.resume-flower__detail3d p.is-em {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  margin-top: 0.34rem;
}

/* Job place + school — Office Code Pro Medium, a little smaller. */
.resume-flower__detail3d p.is-place {
  font-weight: 500;
  font-size: 12.5px;
}

/* A new body paragraph (e.g. the second half of the Bio) — real paragraph gap. */
.resume-flower__detail3d p.is-para {
  margin-top: 0.7rem;
}

/* Bulleted responsibilities — hanging "•" so wrapped lines stay aligned. */
.resume-flower__detail3d p.is-bullet {
  position: relative;
  padding-left: 0.95em;
  margin-top: 0.2rem;
}
.resume-flower__detail3d p.is-bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  opacity: 0.6;
}

/* First bullet after the intro/place gets a touch more breathing room. */
.resume-flower__detail3d p:not(.is-bullet) + p.is-bullet {
  margin-top: 0.38rem;
}

/* An inline link inside the content (e.g. the case-study line). Clickable only
   while the content is open, so it never intercepts clicks while hidden. */
.resume-flower__detail3d p.is-link {
  margin-top: 0.5rem;
}
.resume-flower__detail3d a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: none;
}
.resume-flower__detail3d.is-open a {
  pointer-events: auto;
}

.resume-flower__detail3d p.is-em:first-child {
  margin-top: 0;
}

/* Portrait shown inside the About → Photo content. Black & white, with rounded
   corners echoing the pixel-grid background squares (radius 2 on 8px cells =
   ~25%). Fixed size keeps the accordion layout stable before the file loads. */
.resume-flower__portrait {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0.15rem 0;
  border-radius: 22%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  /* Header stays centred at the top, just smaller. */
  .resume-page__header {
    width: clamp(120px, 34vw, 175px);
  }

  .resume-page__back {
    padding: 0.42rem 0.85rem;
    font-size: 0.74rem;
  }

  .resume-page__hint {
    letter-spacing: 0.03em;
    font-size: 0.68rem;
  }
}
