:root {
  --espresso: #3b251d;
  --coffee: #654230;
  --walnut: #8b5f42;
  --caramel: #c98b45;
  --cream: #f4ead7;
  --paper: #fff3d6;
  --sage: #728b72;
  --moss: #4f6d5f;
  --rain: #607c8b;
  --berry: #8f4f58;
  --ink: #2f2925;
  --shadow: 0 24px 70px rgba(45, 31, 25, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(114, 139, 114, 0.24), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(201, 139, 69, 0.22), transparent 30%),
    linear-gradient(145deg, #ead5af 0%, #cda877 52%, #9f7456 100%);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.portfolio-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-bottom: 20px;
}

.intro h1 {
  margin: 0;
  color: #31231f;
  font-family: Lora, Georgia, serif;
  font-size: clamp(2.8rem, 5.8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p {
  margin: 0;
  max-width: 760px;
  color: #4c3a31;
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.55;
}

.intro .eyebrow {
  margin: 0;
  color: #5b6e58;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shop-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(71, 51, 40, 0.18);
  border-radius: 8px;
  background: rgba(250, 238, 213, 0.5);
  box-shadow: var(--shadow);
  transform-origin: center center;
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 420ms ease;
}

.panel-open .shop-stage {
  opacity: 0.3;
  pointer-events: none;
}

.opening-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: #3b251d;
  animation: lights-on 1600ms 180ms ease forwards;
}

.explore-hint {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(85, 62, 47, 0.2);
  border-radius: 999px;
  color: #4c392f;
  background: rgba(255, 245, 220, 0.9);
  box-shadow: 0 10px 28px rgba(63, 43, 32, 0.14);
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  animation: hint-in 600ms 1750ms ease forwards, hint-float 2400ms 2400ms ease-in-out infinite;
}

.image-scene {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 800 / 506;
  background: #ead2a8;
}

.cafe-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 44%, transparent 0 32%, rgba(54, 36, 26, 0.08) 76%),
    linear-gradient(180deg, rgba(255, 242, 205, 0.1), rgba(75, 45, 30, 0.08));
}

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 8px;
  border: 2px solid rgba(255, 230, 165, 0.1);
  border-radius: 8px;
  color: #fff5d7;
  background: rgba(70, 45, 34, 0.02);
  cursor: pointer;
  outline: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.hotspot:hover,
.hotspot:focus-visible {
  border-color: rgba(255, 226, 145, 0.84);
  background: rgba(255, 217, 134, 0.14);
  box-shadow: 0 0 0 5px rgba(255, 211, 120, 0.14), 0 0 26px rgba(255, 198, 91, 0.42);
  transform: translateY(-2px);
}

.hotspot-label,
.hotspot-sublabel {
  display: block;
  width: max-content;
  max-width: 100%;
  text-align: center;
  text-shadow: 0 2px 6px rgba(39, 26, 20, 0.36);
  pointer-events: none;
}

.hotspot-label {
  font-family: "Patrick Hand", cursive;
  font-size: clamp(0.9rem, 2vw, 1.65rem);
  line-height: 1;
}

.hotspot-sublabel {
  margin-top: 2px;
  font-size: clamp(0.54rem, 0.85vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.left-board {
  left: 15.5%;
  top: 9.2%;
  width: 20.5%;
  height: 20.6%;
  color: #f5e8c9;
}

.right-board {
  left: 67%;
  top: 9.1%;
  width: 20.8%;
  height: 20.8%;
  color: #f5e8c9;
}

.pastry-case-hotspot {
  left: 1.2%;
  top: 47%;
  width: 35%;
  height: 40%;
  align-items: end;
  padding-bottom: 18px;
  color: #5b3829;
  background: rgba(255, 246, 221, 0.03);
}

.pastry-case-hotspot .hotspot-label,
.pastry-case-hotspot .hotspot-sublabel,
.barista-hotspot .hotspot-label,
.barista-hotspot .hotspot-sublabel {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 243, 215, 0.82);
  box-shadow: 0 8px 18px rgba(65, 42, 31, 0.14);
}

.barista-hotspot {
  left: 39%;
  top: 20%;
  width: 29%;
  height: 69%;
  align-items: end;
  padding-bottom: 24px;
  color: #5d382d;
}

.machine-hotspot {
  left: 78.5%;
  top: 38%;
  width: 20.5%;
  height: 46%;
  color: #ddf3d1;
}

.machine-hotspot .hotspot-label {
  opacity: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(31, 42, 37, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.58rem, 0.95vw, 0.82rem);
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.machine-hotspot::after {
  content: "";
  position: absolute;
  right: 42%;
  top: 31%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #96c56c;
  box-shadow: 0 0 14px rgba(150, 197, 108, 0.9);
}

.machine-hotspot:hover .hotspot-label,
.machine-hotspot:focus-visible .hotspot-label {
  opacity: 1;
  transform: translateY(0);
}

.content-panel {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  max-height: min(86vh, 790px);
  padding: 22px;
  color: var(--ink);
  background: rgba(248, 237, 216, 0.96);
  border-top: 1px solid rgba(75, 51, 38, 0.18);
  box-shadow: 0 -24px 70px rgba(50, 34, 27, 0.25);
  transform: translateY(110%);
  transition: transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

.content-panel[aria-hidden="false"] {
  transform: translateY(0);
}

.back-button {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(74, 52, 41, 0.18);
  border-radius: 999px;
  color: #f7ead1;
  background: #5b3a2c;
  cursor: pointer;
}

.panel-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 1040px;
  max-height: calc(min(86vh, 790px) - 84px);
  margin: 0 auto;
  padding-bottom: 12px;
}

.panel-kicker {
  margin: 0 0 6px;
  color: #637a62;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-scroll h2 {
  margin: 0 0 16px;
  color: #32231f;
  font-family: Lora, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.panel-scroll h3 {
  margin: 0 0 8px;
  font-family: Lora, Georgia, serif;
  font-size: 1.24rem;
}

.note-grid,
.project-grid,
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pin-card,
.project-card,
.job-card,
.order-card,
.receipt {
  border: 1px solid rgba(84, 61, 47, 0.14);
  border-radius: 8px;
  background: rgba(255, 246, 225, 0.74);
  box-shadow: 0 16px 38px rgba(65, 45, 35, 0.11);
}

.pin-card {
  padding: 18px;
}

.pin-card.handwritten {
  background: #fff1c8;
  font-family: "Patrick Hand", cursive;
  font-size: 1.35rem;
  line-height: 1.26;
  transform: rotate(-1deg);
}

.profile-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-line span,
.link-chip,
.stack-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(114, 139, 114, 0.16);
  color: #34463b;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.link-chip {
  background: rgba(201, 139, 69, 0.18);
  color: #6a4328;
}

.job-card,
.project-card {
  padding: 18px;
}

.drink-name {
  color: #5f765f;
  font-weight: 800;
}

.date {
  color: #7a6152;
  font-size: 0.9rem;
  font-weight: 700;
}

.job-card ul,
.project-card ul {
  margin: 12px 0 0;
  padding-left: 19px;
  line-height: 1.55;
}

.job-card li + li,
.project-card li + li {
  margin-top: 8px;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--accent, var(--sage));
}

.project-card p {
  line-height: 1.58;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.project-links,
.direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: start;
}

.order-card {
  padding: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(87, 61, 45, 0.22);
  border-radius: 8px;
  padding: 12px 13px;
  color: #342621;
  background: rgba(255, 250, 237, 0.9);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.send-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  color: #fff2d8;
  background: #617b62;
  font-weight: 900;
  cursor: pointer;
}

.receipt {
  display: none;
  padding: 20px;
  background:
    repeating-linear-gradient(0deg, #fff7df 0 18px, #f4e7c9 18px 19px);
  transform-origin: top center;
}

.receipt.visible {
  display: block;
  animation: receipt-print 720ms ease both;
}

.receipt strong {
  display: block;
  color: #547053;
  font-family: Lora, Georgia, serif;
  font-size: 1.5rem;
}

.coffee-terminal {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  width: min(440px, calc(100vw - 44px));
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(151, 210, 137, 0);
  border-radius: 8px;
  color: #dff7d9;
  background: rgba(31, 42, 37, 0);
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.coffee-terminal.visible {
  padding: 18px;
  border-color: rgba(151, 210, 137, 0.26);
  background: rgba(31, 42, 37, 0.96);
  box-shadow: 0 22px 55px rgba(35, 24, 19, 0.28);
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  padding: 11px 15px;
  border-radius: 999px;
  color: #fff0d4;
  background: rgba(65, 43, 33, 0.94);
  box-shadow: 0 16px 40px rgba(55, 36, 29, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes lights-on {
  0% {
    opacity: 0.92;
  }
  55% {
    opacity: 0.38;
  }
  100% {
    opacity: 0;
  }
}

@keyframes hint-in {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes hint-float {
  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

@keyframes door-unlock {
  0%,
  45% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

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

@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  45% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes rain-shift {
  50% {
    transform: translateY(7px);
  }
}

@keyframes receipt-print {
  from {
    opacity: 0;
    transform: scaleY(0.25);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (max-width: 820px) {
  .portfolio-shell {
    width: min(100% - 20px, 700px);
    padding-top: 18px;
  }

  .intro {
    display: block;
  }

  .intro .eyebrow {
    margin: 0 0 8px;
  }

  .intro h1 {
    margin-bottom: 12px;
  }

  .note-grid,
  .project-grid,
  .menu-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .content-panel {
    max-height: 92vh;
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .explore-hint {
    width: max-content;
    max-width: calc(100% - 24px);
    text-align: center;
  }

  .image-scene {
    width: 130%;
    margin-left: -15%;
  }

  .hotspot {
    border-radius: 6px;
    padding: 5px;
  }

  .hotspot-sublabel {
    display: none;
  }

  .panel-scroll h2 {
    font-size: 2rem;
  }
}

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