:root {
  color-scheme: light;
  --bg: #efe4d0;
  --paper: rgba(255, 249, 238, 0.78);
  --paper-strong: #fff8eb;
  --ink: #251910;
  --muted: #766553;
  --soft: #a89074;
  --line: rgba(58, 39, 23, 0.14);
  --coffee: #6b4528;
  --cocoa: #3a2717;
  --cream: #fff4dc;
  --sage: #697b4f;
  --blue: #315f7d;
  --clay: #bc6f4a;
  --gold: #d49a3d;
  --shadow: 0 26px 80px rgba(67, 43, 21, 0.16);
}

:root[data-mode="quiet"] {
  color-scheme: dark;
  --bg: #100b06;
  --paper: rgba(24, 16, 8, 0.88);
  --paper-strong: #1c1108;
  --ink: #ede0cc;
  --muted: #a08a70;
  --soft: #6e5840;
  --line: rgba(240, 220, 190, 0.1);
  --coffee: #d4a055;
  --cocoa: #f0dbb8;
  --cream: #1c1108;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
}

:root[data-mode="quiet"] body {
  background:
    radial-gradient(circle at 13% 8%, rgba(180, 110, 30, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(80, 100, 50, 0.12), transparent 26%),
    linear-gradient(180deg, #130d07 0%, #100b06 45%, #0d0905 100%);
}

:root[data-mode="quiet"] body::before {
  background-image:
    linear-gradient(rgba(240, 220, 190, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 220, 190, 0.03) 1px, transparent 1px);
}

:root[data-mode="quiet"] canvas {
  opacity: 0.5;
}

:root[data-mode="quiet"] .pixel-note {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    repeating-linear-gradient(0deg, rgba(240, 220, 190, 0.05) 0 1px, transparent 1px 10px),
    #1a1108;
  border-color: rgba(240, 220, 190, 0.08);
}

:root[data-mode="quiet"] .pixel-note::after {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(240, 220, 190, 0.08);
}

:root[data-mode="quiet"] .polaroid {
  background: #1a1108;
  border-color: rgba(240, 220, 190, 0.08);
}

:root[data-mode="quiet"] .eth-card,
:root[data-mode="quiet"] .desk-card {
  background: rgba(24, 16, 8, 0.92);
  border-color: rgba(240, 220, 190, 0.1);
}

:root[data-mode="quiet"] .site-header {
  background: rgba(16, 11, 6, 0.88);
  border-bottom-color: rgba(240, 220, 190, 0.08);
}

:root[data-mode="quiet"] .skill-cloud span,
:root[data-mode="quiet"] .tag-row span {
  background: rgba(240, 220, 190, 0.06);
  border-color: rgba(240, 220, 190, 0.1);
  color: var(--muted);
}

:root[data-mode="quiet"] .button.primary {
  background: var(--coffee);
  color: #100b06;
}

:root[data-mode="quiet"] .button.secondary {
  border-color: rgba(240, 220, 190, 0.18);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 13% 8%, rgba(212, 154, 61, 0.25), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(105, 123, 79, 0.18), transparent 26%),
    linear-gradient(180deg, #f4ead8 0%, var(--bg) 45%, #eadcc6 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
}

body::before {
  background-image:
    linear-gradient(rgba(58, 39, 23, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 39, 23, 0.045) 1px, transparent 1px);
  background-size: 74px 74px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

#field {
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(239, 228, 208, 0.72);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(18px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand,
nav,
.hero-actions,
.tag-row,
.contact-card,
.skill-cloud,
.metric-stack {
  align-items: center;
  display: flex;
}

.brand {
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  background: var(--cocoa);
  border-radius: 50%;
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}

.brand-name {
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}

nav {
  gap: clamp(14px, 3vw, 30px);
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

nav a:hover,
.work-card a:hover,
.contact-card a:hover {
  color: var(--coffee);
}

.mode-button {
  background: rgba(255, 249, 238, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  height: 36px;
  padding: 4px;
  width: 64px;
}

.mode-button span {
  background: var(--coffee);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(107, 69, 40, 0.24);
  display: block;
  height: 26px;
  transition: transform 180ms ease, background 180ms ease;
  width: 26px;
}

:root[data-mode="quiet"] .mode-button span {
  background: var(--sage);
  transform: translateX(26px);
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(32px, 6vw, 78px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  min-height: calc(100vh - 68px);
  padding: clamp(34px, 6vw, 82px) clamp(18px, 6vw, 86px) clamp(34px, 6vw, 74px);
}

.eyebrow,
.project-type,
.stamp {
  color: var(--sage);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: 24px;
  max-width: 980px;
}

h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(38px, 5vw, 78px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.96;
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-text,
.section-heading p,
.work-card p,
.signal-panel p,
.internship-card p,
.life-card p,
.contact-section p,
.map-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.68;
}

.hero-text {
  max-width: 720px;
}

.hero-actions,
.tag-row,
.contact-card,
.skill-cloud,
.metric-stack {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  min-height: 46px;
  padding: 13px 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--cocoa);
  color: var(--cream);
}

.button.secondary {
  background: rgba(255, 249, 238, 0.62);
  color: var(--ink);
}

.student-desk {
  min-height: min(560px, calc(100vh - 150px));
  perspective: 1200px;
  position: relative;
  touch-action: none;
}

.student-desk::before {
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 248, 235, 0.74), transparent 24%),
    radial-gradient(circle at 76% 68%, rgba(105, 123, 79, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
  border-radius: 50%;
  box-shadow: var(--shadow);
  content: "";
  filter: blur(2px);
  height: min(86vw, 520px);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(86vw, 520px);
}

.student-desk::after {
  background:
    linear-gradient(135deg, rgba(255, 248, 235, 0.7), rgba(255, 248, 235, 0.2)),
    repeating-linear-gradient(135deg, rgba(58, 39, 23, 0.08) 0 1px, transparent 1px 18px);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: 0 20px 70px rgba(67, 43, 21, 0.12);
  content: "";
  height: 250px;
  left: 28%;
  position: absolute;
  top: 27%;
  transform: rotate(-7deg);
  width: 320px;
}

.desk-card,
.signal-panel,
.work-card,
.map-card,
.internship-card,
.life-card,
.contact-card {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.desk-card {
  border-radius: 26px;
  position: absolute;
  z-index: 2;
}

.profile-card {
  left: 28px;
  padding: 24px;
  top: 72px;
  width: min(82%, 360px);
}

.profile-card h2 {
  font-size: clamp(38px, 5vw, 58px);
}

.eth-card {
  background: rgba(255, 248, 235, 0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(67, 43, 21, 0.12);
  display: grid;
  gap: 2px;
  padding: 16px;
  position: absolute;
  right: 28px;
  top: 98px;
  width: 150px;
  z-index: 2;
}

.eth-card strong {
  color: var(--cocoa);
  font-size: 28px;
  line-height: 1;
}

.eth-card small {
  color: var(--muted);
  font-weight: 800;
}

.listen-card {
  align-items: center;
  bottom: 36px;
  display: grid;
  gap: 18px;
  grid-template-columns: 94px 1fr;
  padding: 18px;
  right: 0;
  width: min(88%, 430px);
}

.record {
  animation: spin 10s linear infinite;
  aspect-ratio: 1;
  background:
    radial-gradient(circle, var(--cream) 0 12%, transparent 13%),
    repeating-radial-gradient(circle, rgba(37, 25, 16, 0.16) 0 1px, transparent 1px 8px),
    conic-gradient(from 80deg, var(--coffee), var(--gold), var(--sage), var(--blue), var(--coffee));
  border-radius: 50%;
}

.listen-card strong {
  display: block;
  font-size: 22px;
}

.float-bubble {
  align-items: center;
  animation: drift 5.8s ease-in-out infinite;
  background: rgba(255, 248, 235, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(67, 43, 21, 0.12);
  color: var(--coffee);
  cursor: grab;
  display: flex;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  position: absolute;
  user-select: none;
  width: 64px;
  z-index: 4;
}

.float-bubble:active,
.float-bubble.dragging {
  animation-play-state: paused;
  cursor: grabbing;
  transform: scale(1.08);
}

.float-bubble::after {
  background: var(--cocoa);
  border-radius: 999px;
  color: var(--cream);
  content: attr(data-bubble);
  font-size: 11px;
  left: 50%;
  opacity: 0;
  padding: 6px 8px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.float-bubble:hover::after,
.float-bubble:focus-visible::after,
.float-bubble.dragging::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bubble-one {
  left: 67%;
  top: 8%;
}

.bubble-two {
  animation-delay: -1.8s;
  left: 8%;
  top: 58%;
}

.bubble-three {
  animation-delay: -3.2s;
  left: 69%;
  top: 48%;
}

.bubble-four {
  animation-delay: -4.4s;
  left: 35%;
  top: 7%;
}

.drag-hint {
  background: rgba(255, 248, 235, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  left: 50%;
  padding: 8px 10px;
  position: absolute;
  top: 26px;
  transform: translateX(-50%);
  z-index: 4;
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-3deg);
  }

  50% {
    transform: translate3d(0, -18px, 0) rotate(4deg);
  }
}

.section {
  padding: clamp(62px, 8vw, 118px) clamp(18px, 6vw, 86px);
}

.section-heading {
  margin-bottom: 34px;
  max-width: 980px;
}

.note-wall,
.work-grid,
.life-grid {
  display: grid;
  gap: 18px;
}

.note-wall {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.signal-panel,
.work-card,
.life-card,
.map-card {
  border-radius: 30px;
  padding: clamp(22px, 4vw, 34px);
}

.pixel-note {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(0deg, rgba(58, 39, 23, 0.08) 0 1px, transparent 1px 10px),
    #fff7e9;
  border: 1px solid rgba(58, 39, 23, 0.16);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(67, 43, 21, 0.12);
  min-height: 230px;
  padding: 20px;
  position: relative;
  transform: rotate(-1deg);
}

.pixel-note:nth-child(2) {
  transform: rotate(1.4deg);
}

.pixel-note:nth-child(3) {
  transform: rotate(-0.6deg);
}

.pixel-note span {
  color: var(--sage);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.pixel-note p {
  color: var(--cocoa);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  font-style: italic;
  font-weight: 400;
  image-rendering: pixelated;
  line-height: 1.05;
  margin: 18px 0 0;
  text-shadow:
    1px 0 rgba(58, 39, 23, 0.18),
    0 1px rgba(58, 39, 23, 0.12);
}

.pixel-note::after {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(58, 39, 23, 0.1);
  content: "";
  height: 28px;
  left: 50%;
  position: absolute;
  top: -14px;
  transform: translateX(-50%) rotate(2deg);
  width: 88px;
}

.panel-top {
  align-items: center;
  color: var(--sage);
  display: flex;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  text-transform: uppercase;
}

.live-dot {
  animation: pulse 1.8s ease-in-out infinite;
  background: var(--sage);
  border-radius: 50%;
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(105, 123, 79, 0.32); }
  50% { box-shadow: 0 0 0 10px rgba(105, 123, 79, 0); }
}

.live-body {
  align-items: center;
  display: flex;
  gap: 18px;
  margin-top: 16px;
}

.album-art {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 39, 23, 0.22);
  flex-shrink: 0;
  height: 110px;
  object-fit: cover;
  width: 110px;
}

.album-art[src=""] {
  background: linear-gradient(135deg, var(--coffee), var(--cocoa));
  opacity: 0.3;
}

.live-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.live-text h3 {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-text p {
  margin: 0;
}

.now-list {
  color: var(--muted);
  line-height: 1.9;
  margin: 0;
  padding-left: 20px;
}

.now-list strong {
  color: var(--ink);
}

.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-card {
  min-height: 520px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 160ms ease, border-color 160ms ease;
}

.work-card:hover {
  border-color: rgba(107, 69, 40, 0.35);
}

.work-number {
  color: var(--coffee);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.image-filler {
  align-items: end;
  aspect-ratio: 1.35;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08)),
    var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: flex;
  margin-bottom: 24px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.image-filler::before {
  content: "";
  inset: 18px;
  position: absolute;
}

.image-filler span {
  background: rgba(255, 248, 235, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cocoa);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  position: relative;
  z-index: 1;
}

.filler-gitswipe {
  background:
    radial-gradient(circle at 26% 34%, #fff8eb 0 10%, transparent 11%),
    linear-gradient(135deg, #dfe8cf, #ead4c5);
}

.filler-gitswipe::before {
  background:
    linear-gradient(135deg, transparent 48%, rgba(58,39,23,0.22) 49% 51%, transparent 52%),
    repeating-linear-gradient(0deg, rgba(58,39,23,0.16) 0 2px, transparent 2px 14px);
  border-radius: 18px;
}

.filler-basel {
  background:
    radial-gradient(circle at 72% 24%, rgba(212, 154, 61, 0.42), transparent 20%),
    linear-gradient(135deg, #fff4dc, #e5d2b4);
}

.filler-basel::before {
  background:
    linear-gradient(90deg, rgba(58,39,23,0.16) 1px, transparent 1px),
    linear-gradient(rgba(58,39,23,0.16) 1px, transparent 1px);
  background-size: 22px 22px;
}

.filler-serial {
  background:
    radial-gradient(circle at 22% 24%, #697b4f 0 8%, transparent 9%),
    radial-gradient(circle at 72% 62%, #bc6f4a 0 10%, transparent 11%),
    linear-gradient(135deg, #dce9ee, #f1d591);
}

.filler-serial::before {
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(58,39,23,0.24) 22% 24%, transparent 24% 56%, rgba(58,39,23,0.24) 56% 58%, transparent 58%),
    linear-gradient(0deg, transparent 0 48%, rgba(58,39,23,0.24) 48% 51%, transparent 51%);
}

.tag-row {
  margin: 22px 0;
}

.tag-row span,
.skill-cloud span,
.metric-stack span {
  background: rgba(255, 249, 238, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}

.work-card a {
  bottom: 28px;
  color: var(--coffee);
  font-weight: 900;
  position: absolute;
  text-decoration: none;
}

.photo-board {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.1fr 0.8fr 0.8fr;
}

.photo-placeholder {
  align-items: end;
  aspect-ratio: 1.1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(135deg, rgba(58, 39, 23, 0.08) 0 2px, transparent 2px 16px),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  margin: 0;
  min-height: 260px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.photo-placeholder::before {
  background:
    radial-gradient(circle at 30% 32%, rgba(255, 248, 235, 0.9), transparent 12%),
    linear-gradient(135deg, transparent 0 50%, rgba(105, 123, 79, 0.18) 50% 100%);
  content: "";
  inset: 24px;
  position: absolute;
}

.photo-placeholder.tall {
  aspect-ratio: auto;
  grid-row: span 2;
}

.photo-placeholder.wide {
  aspect-ratio: auto;
  grid-column: span 2;
  min-height: 220px;
}

.photo-placeholder span,
.photo-placeholder figcaption {
  background: rgba(255, 248, 235, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cocoa);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  position: relative;
  z-index: 1;
}

.internship-card {
  align-items: start;
  border-radius: 34px;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  padding: clamp(24px, 5vw, 44px);
}

.metric-stack {
  align-items: stretch;
  flex-direction: column;
}

.metric-stack strong {
  color: var(--ink);
}

.life-grid {
  grid-template-columns: 0.9fr 0.9fr 1fr;
}

.contact-section {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contact-card {
  border-radius: 30px;
  flex-direction: column;
  padding: 24px;
}

.contact-card a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

/* ── Photo strip ── */
.photos-section {
  overflow: hidden;
}

.strip-wrapper {
  align-items: center;
  display: flex;
  gap: 12px;
  position: relative;
}

.strip-arrow {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(58, 39, 23, 0.12);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  height: 42px;
  line-height: 1;
  transition: background 150ms, transform 150ms;
  width: 42px;
}

.strip-arrow:hover {
  background: var(--cream);
  transform: scale(1.08);
}

.photo-strip {
  display: flex;
  flex: 1;
  gap: 24px;
  overflow-x: auto;
  padding: 24px 8px 36px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.polaroid {
  background: #fffdf6;
  border: 1px solid rgba(58, 39, 23, 0.1);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(58, 39, 23, 0.14);
  flex-shrink: 0;
  margin: 0;
  padding: 10px 10px 36px;
  scroll-snap-align: start;
  transition: transform 220ms ease, box-shadow 220ms ease;
  width: 300px;
}

.polaroid:nth-child(odd)  { transform: rotate(-1.4deg); }
.polaroid:nth-child(even) { transform: rotate(1.2deg); }

.polaroid:hover {
  box-shadow: 0 18px 52px rgba(58, 39, 23, 0.22);
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  z-index: 2;
}

.polaroid img {
  border-radius: 2px;
  display: block;
  height: 190px;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

/* EXIF orientation=6 → rotate 90° CW baked into CSS */
.polaroid:nth-child(3) img,
.polaroid:nth-child(4) img,
.polaroid:nth-child(5) img,
.polaroid:nth-child(6) img {
  object-position: center;
}

.polaroid figcaption {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 12px;
  text-align: center;
  text-transform: uppercase;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 6vw, 86px);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .work-grid,
  .photo-board,
  .internship-card,
  .life-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .work-card {
    min-height: auto;
  }

  .work-card a {
    bottom: auto;
    display: inline-block;
    margin-top: 10px;
    position: static;
  }

  .photo-placeholder.tall,
  .photo-placeholder.wide {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .student-desk {
    min-height: 430px;
  }

  .student-desk::before {
    height: min(82vw, 360px);
    width: min(82vw, 360px);
  }

  .student-desk::after {
    height: 190px;
    left: 20%;
    top: 22%;
    width: 260px;
  }

  .profile-card {
    left: 0;
    top: 62px;
    width: min(74%, 330px);
  }

  .listen-card {
    bottom: 20px;
    width: min(86%, 380px);
  }

  .bubble-one {
    left: 78%;
    top: 5%;
  }

  .bubble-two {
    left: 4%;
    top: 55%;
  }

  .bubble-three {
    left: 72%;
    top: 48%;
  }

  .bubble-four {
    left: 35%;
    top: 3%;
  }
}

@media (max-width: 980px) {
  .note-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: start;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    width: 100%;
  }

  .mode-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  h1 {
    font-size: clamp(48px, 16vw, 76px);
  }

  .student-desk {
    min-height: 420px;
  }

  .profile-card,
  .listen-card {
    left: 0;
    right: auto;
    width: 100%;
  }

  .profile-card {
    top: 118px;
  }

  .eth-card {
    right: 8px;
    top: 8px;
    width: 132px;
    z-index: 5;
  }

  .bubble-one {
    left: 58%;
    top: 5%;
  }

  .bubble-two {
    left: 7%;
    top: 55%;
  }

  .bubble-three {
    left: 72%;
    top: 50%;
  }

  .bubble-four {
    left: 36%;
    top: 12%;
  }

  .listen-card {
    bottom: 0;
    grid-template-columns: 82px 1fr;
  }

  .photo-placeholder {
    min-height: 220px;
  }

  .note-wall {
    grid-template-columns: 1fr;
  }
}

/* ── Custom cursor ── */
.cursor-dot,
.cursor-ring {
  border-radius: 50%;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  z-index: 9999;
  transition: opacity 200ms ease;
}

.cursor-dot {
  background: var(--coffee);
  height: 6px;
  margin: -3px 0 0 -3px;
  width: 6px;
}

.cursor-ring {
  border: 1.5px solid rgba(107, 69, 40, 0.4);
  height: 36px;
  margin: -18px 0 0 -18px;
  transition: width 200ms ease, height 200ms ease, margin 200ms ease,
              border-color 200ms ease, opacity 200ms ease;
  width: 36px;
}

.cursor-ring.hovering {
  border-color: rgba(107, 69, 40, 0.65);
  height: 54px;
  margin: -27px 0 0 -27px;
  width: 54px;
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ── World map ── */
.world-map-wrap {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 28px;
}

#world-map {
  height: 420px;
  width: 100%;
}

/* suppress amCharts logo */
.am5-layer-30 { display: none !important; }

/* ── Timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.timeline-entry {
  display: grid;
  gap: 32px;
  grid-template-columns: 160px 1fr;
  padding: 36px 0;
  position: relative;
}

.timeline-entry:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.timeline-meta {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.timeline-dot {
  background: var(--coffee);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.timeline-body h3 {
  margin-bottom: 10px;
}

/* ── Thoughts form ── */
.thoughts-section {
  text-align: center;
}

.thoughts-section .section-heading {
  max-width: 100%;
}

.thoughts-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: 640px;
}

.thoughts-form textarea {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.6;
  min-height: 160px;
  outline: none;
  padding: 22px 26px;
  resize: none;
  transition: border-color 160ms ease;
  width: 100%;
}

.thoughts-form textarea:focus {
  border-color: rgba(107, 69, 40, 0.4);
}

.thoughts-form textarea::placeholder {
  color: var(--soft);
}

.thoughts-form .button {
  align-self: center;
}

.thoughts-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  min-height: 20px;
  text-align: center;
}

@media (max-width: 700px) {
  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-dot {
    display: none;
  }

  #world-map {
    height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
