:root {
  --board: #101816;
  --board-deep: #07100f;
  --chalk: #f7f2df;
  --chalk-soft: rgba(247, 242, 223, 0.78);
  --chalk-dim: rgba(247, 242, 223, 0.58);
  --yellow: #f0c95a;
  --cyan: #56c7d4;
  --coral: #cc5f55;
  --paper: #e5d6b6;
  --paper-dark: #b99d70;
  --green: #6fab73;
  --blue: #4f8bc6;
  --shadow: rgba(0, 0, 0, 0.38);
  --max-width: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--chalk);
  font-family: "Comic Sans MS", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(86, 199, 212, 0.08), transparent 24rem),
    radial-gradient(circle at 82% 18%, rgba(240, 201, 90, 0.07), transparent 22rem),
    linear-gradient(145deg, var(--board), var(--board-deep));
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  opacity: 0.16;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      2deg,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px 6px
    );
  mix-blend-mode: screen;
  opacity: 0.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.chalk-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 55%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px);
  background-size: 13px 17px, 19px 23px;
  opacity: 0.42;
}

.site-header,
main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.top-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 10px;
}

.brand-mark {
  display: inline-flex;
  width: 58px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(240, 201, 90, 0.9);
  border-radius: var(--radius);
  transform: rotate(-1deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.brand-mark:hover {
  border-color: var(--chalk);
  transform: translateY(-2px) rotate(1deg);
}

.folder-icon {
  position: relative;
  width: 34px;
  height: 24px;
  border: 3px solid var(--yellow);
  border-radius: 3px;
}

.folder-icon::before {
  position: absolute;
  top: -10px;
  left: -3px;
  width: 18px;
  height: 9px;
  content: "";
  border: 3px solid var(--yellow);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a {
  position: relative;
  padding: 9px 12px;
  color: var(--chalk-soft);
}

.nav-links a::after {
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 2px;
  content: "";
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: end;
  padding: 42px 0 34px;
}

.hero-board::after {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 2px;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(247, 242, 223, 0.75), transparent);
  opacity: 0.8;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chalk-title {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--chalk);
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.14),
    -1px 0 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(247, 242, 223, 0.08);
  animation: chalkWrite 900ms ease both, chalkFlicker 3.8s ease-in-out 1s infinite;
}

.chalk-title::after {
  position: absolute;
  right: 3%;
  bottom: -14px;
  left: 24%;
  height: 5px;
  content: "";
  background: var(--cyan);
  border-radius: 99px;
  transform: rotate(-1deg) scaleX(0);
  transform-origin: left;
  animation: underlineSketch 720ms ease 560ms both;
}

.hero-note {
  max-width: 640px;
  margin: 30px 0 0;
  color: var(--chalk-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 150px;
  padding: 22px;
  border: 2px dashed rgba(247, 242, 223, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 36px var(--shadow);
  transform: rotate(1deg);
  animation: cardIn 560ms ease 200ms both;
}

.tape {
  position: absolute;
  width: 72px;
  height: 22px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.22), transparent),
    var(--paper);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.82;
}

.tape-left {
  top: -12px;
  left: 28px;
  transform: rotate(-5deg);
}

.profile-avatar {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  color: var(--board);
  font-size: 2rem;
  font-weight: 800;
  background: var(--yellow);
  border: 3px solid var(--chalk);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.profile-label {
  margin: 0;
  color: var(--coral);
}

.profile-card h2 {
  margin: 2px 0 5px;
  font-size: 2rem;
}

.profile-card p:last-child {
  margin: 0;
  color: var(--chalk-soft);
}

.control-board {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 0 8px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 2px solid rgba(247, 242, 223, 0.8);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.14);
  transition: border-color 180ms ease, transform 180ms ease;
}

.search-wrap:focus-within {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.search-wrap svg {
  width: 26px;
  height: 26px;
  margin-left: 18px;
  fill: none;
  stroke: var(--chalk);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  padding: 16px 18px 16px 12px;
  color: var(--chalk);
  border: 0;
  outline: 0;
  background: transparent;
}

.search-wrap input::placeholder {
  color: var(--chalk-dim);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.filter-chip {
  position: relative;
  min-width: 92px;
  padding: 12px 18px;
  color: var(--chalk);
  border: 2px solid rgba(247, 242, 223, 0.75);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.filter-chip::after {
  position: absolute;
  right: 18px;
  bottom: 5px;
  left: 18px;
  height: 3px;
  content: "";
  background: var(--yellow);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--yellow);
  border-color: var(--yellow);
  transform: translateY(-2px) rotate(-1deg);
}

.filter-chip.is-active::after {
  transform: scaleX(1);
}

.filter-chip.pulse {
  animation: chalkPulse 420ms ease;
}

.section-block {
  margin: 36px 0 54px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.section-heading h2::after {
  position: absolute;
  right: -6px;
  bottom: -7px;
  left: 8px;
  height: 4px;
  content: "";
  background: var(--yellow);
  border-radius: 99px;
  transform: rotate(-1deg);
}

.works-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.result-count {
  margin: 0 0 7px;
  color: var(--chalk-soft);
}

.featured-slot .work-card {
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1fr);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.work-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 2px solid rgba(247, 242, 223, 0.7);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  transform: translateY(12px);
  opacity: 0;
  animation: cardIn 520ms ease var(--card-delay, 0ms) both;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.work-card::before {
  position: absolute;
  top: -11px;
  left: 38px;
  width: 70px;
  height: 20px;
  content: "";
  background: var(--paper);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
  opacity: 0.82;
  transform: rotate(-4deg);
}

.work-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  transform: translateY(-5px) rotate(-0.5deg);
}

.thumb-wrap {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 2px solid rgba(247, 242, 223, 0.42);
  border-radius: var(--radius);
  background: rgba(229, 214, 182, 0.08);
}

.thumb-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}

.type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 13px;
  color: var(--chalk);
  border: 2px solid rgba(247, 242, 223, 0.58);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.type-pdf {
  background: var(--coral);
}

.type-image {
  background: var(--green);
}

.card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.card-copy h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.card-copy p {
  margin: 0;
  color: var(--chalk-soft);
  line-height: 1.5;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--chalk-soft);
  font-size: 0.95rem;
}

.meta-line svg,
.chalk-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 9px;
  color: var(--board);
  background: var(--paper);
  border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.card-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.chalk-button {
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  color: var(--chalk);
  border: 2px solid rgba(247, 242, 223, 0.75);
  border-radius: var(--radius);
  background: var(--coral);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.chalk-button:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.2);
}

.chalk-button:active,
.chalk-button.is-downloading {
  transform: translateY(2px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

.chalk-button.is-downloading::after {
  position: absolute;
  inset: -8px;
  content: "";
  border: 2px dashed var(--yellow);
  border-radius: var(--radius);
  animation: dustRing 620ms ease-out;
}

.chalk-button.ghost {
  background: rgba(255, 255, 255, 0.025);
}

.empty-state,
.empty-inline {
  padding: 28px;
  color: var(--chalk-soft);
  border: 2px dashed rgba(247, 242, 223, 0.68);
  border-radius: var(--radius);
}

.empty-state p {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 1.4rem;
}

.empty-state span {
  color: var(--chalk-soft);
}

.about-section {
  padding-top: 6px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.info-note {
  position: relative;
  min-height: 118px;
  padding: 18px;
  color: #20180f;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.18), transparent 45%),
    var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
  transform: rotate(var(--note-tilt, -1deg));
}

.info-note:nth-child(2n) {
  --note-tilt: 1deg;
}

.info-note:nth-child(3n) {
  --note-tilt: -2deg;
}

.info-note span {
  display: block;
  margin-bottom: 10px;
  color: rgba(32, 24, 15, 0.65);
}

.info-note strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.18rem;
}

.contact-copy {
  max-width: 760px;
  margin: 0;
  color: var(--chalk-soft);
  font-size: 1.1rem;
  line-height: 1.7;
}

.contact-copy strong {
  color: var(--yellow);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  grid-template-rows: auto minmax(280px, 1fr) auto;
  gap: 16px;
  padding: 22px;
  border: 2px solid rgba(247, 242, 223, 0.84);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
    var(--board);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal.is-open .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.icon-button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--chalk);
  border: 2px solid rgba(247, 242, 223, 0.7);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.preview-body {
  min-height: 280px;
  overflow: hidden;
  border: 2px dashed rgba(247, 242, 223, 0.52);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.preview-body iframe,
.preview-image {
  display: block;
  width: 100%;
  height: min(58vh, 520px);
  border: 0;
}

.preview-image {
  object-fit: contain;
  padding: 16px;
}

@keyframes chalkWrite {
  from {
    opacity: 0;
    filter: blur(5px);
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes underlineSketch {
  to {
    transform: rotate(-1deg) scaleX(1);
  }
}

@keyframes chalkFlicker {
  0%,
  100% {
    opacity: 1;
  }
  48% {
    opacity: 0.96;
  }
  52% {
    opacity: 1;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-0.6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes chalkPulse {
  0% {
    box-shadow: 0 0 0 rgba(240, 201, 90, 0);
  }
  55% {
    box-shadow: 0 0 0 7px rgba(240, 201, 90, 0.2);
  }
  100% {
    box-shadow: 0 0 0 rgba(240, 201, 90, 0);
  }
}

@keyframes dustRing {
  from {
    opacity: 1;
    transform: scale(0.92);
  }
  to {
    opacity: 0;
    transform: scale(1.12);
  }
}

@media (max-width: 900px) {
  .hero-board,
  .control-board,
  .featured-slot .work-card {
    grid-template-columns: 1fr;
  }

  .profile-card {
    max-width: 420px;
  }

  .filter-row {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 22px, var(--max-width));
  }

  .top-rail {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
  }

  .nav-links a {
    padding: 7px 8px;
  }

  .hero-board {
    padding-top: 26px;
  }

  .chalk-title {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .hero-note {
    margin-top: 24px;
    font-size: 1rem;
  }

  .search-wrap {
    min-height: 54px;
  }

  .filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .filter-chip {
    min-width: 0;
    padding-inline: 8px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .works-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .thumb-wrap,
  .thumb-wrap img {
    min-height: 190px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }
}

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