:root {
  --blue-soft: #cfe8ff;
  --blue-deep: #7aa7e6;
  --yellow-soft: #fff8ce;
  --yellow-deep: #ffdf7d;
  --pink-soft: #ffd7ec;
  --text-main: #374357;
  --text-muted: #6e7a8f;
  --bg-main: #fbfcff;
  --card-radius: 20px;
  --shadow-soft: 0 12px 28px rgba(120, 150, 200, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comic Neue", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, var(--yellow-soft), transparent 55%),
    radial-gradient(circle at bottom right, var(--blue-soft), transparent 55%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.logo-link {
  color: inherit;
  text-decoration: none;
}

.logo-link:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 2px dashed rgba(255, 240, 190, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.4rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: repeating-linear-gradient(
      135deg,
      var(--blue-soft),
      var(--blue-soft) 6px,
      var(--yellow-soft) 6px,
      var(--yellow-soft) 12px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #5a6a85;
  box-shadow: 0 4px 10px rgba(120, 150, 200, 0.4);
}

.logo-text {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(210, 220, 255, 0.9);
  transition: all 0.16s ease-out;
}

.main-nav a:hover,
.main-nav a:focus {
  background: var(--yellow-soft);
  border-color: rgba(255, 210, 140, 0.9);
  color: var(--text-main);
  box-shadow: 0 6px 12px rgba(180, 160, 120, 0.25);
  transform: translateY(-1px) rotate(-1deg);
}

.page {
  width: 100%;
  max-width: 1040px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.25rem;
  flex: 1;
}

.page-home {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.home-section {
  scroll-margin-top: 5.5rem;
}

.home-section-header {
  padding: 1.35rem 1.4rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px dashed rgba(207, 232, 255, 0.9);
  box-shadow: 0 10px 22px rgba(150, 170, 210, 0.14);
  margin-bottom: 1.25rem;
}

.home-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.home-section-lead {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.illustration-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.illustration-piece {
  margin: 0;
  border-radius: 16px;
  padding: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(201, 230, 255, 0.8),
    rgba(255, 246, 205, 0.8)
  );
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
}

.illustration-piece img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  cursor: zoom-in;
}

.illustration-piece figcaption {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--text-main);
}

.illustration-piece:hover,
.illustration-piece:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(150, 170, 210, 0.25);
}

.about-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

.about-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: min(100%, 42rem);
  min-width: 0;
}

.about-photo {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 2px dashed rgba(255, 230, 190, 0.9);
  box-shadow: 0 6px 14px rgba(150, 170, 210, 0.18);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.about-copy {
  margin: 0;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 0.85rem;
}

.hero {
  text-align: center;
  padding: 2.2rem 1.5rem 2rem;
  border-radius: 26px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 248, 206, 0.95),
      rgba(255, 248, 206, 0.95) 10px,
      rgba(207, 232, 255, 0.96) 10px,
      rgba(207, 232, 255, 0.96) 20px
    );
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: lowercase;
  position: relative;
  z-index: 1;
}

.hero-tag::before {
  content: "✶";
  font-size: 0.9rem;
  color: var(--blue-deep);
}

.hero-title {
  margin: 1.1rem 0 0.4rem;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--text-main);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  margin: 0;
  max-width: 30rem;
  margin-inline: auto;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.3rem;
  margin-top: 2.25rem;
}

.card {
  padding: 1.4rem 1.3rem;
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  border: 2px dashed rgba(255, 230, 190, 0.9);
  box-shadow: 0 6px 14px rgba(180, 170, 150, 0.16);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    background 0.16s ease-out;
}

.card:hover,
.card:focus {
  transform: translateY(-2px) rotate(-1.2deg);
  box-shadow: 0 10px 22px rgba(180, 170, 150, 0.28);
  background: radial-gradient(circle at top left, var(--pink-soft), #ffffff);
}

.card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-wide {
  grid-column: 1 / -1;
}

.page-header {
  padding: 2rem 1.5rem 1.4rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px dashed rgba(207, 232, 255, 0.9);
  box-shadow: 0 10px 22px rgba(150, 170, 210, 0.18);
  margin-bottom: 1.75rem;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--yellow-soft);
  border: 1px dashed rgba(255, 210, 140, 0.9);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.back-home span {
  font-size: 0.9rem;
}

.back-home:hover,
.back-home:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(180, 160, 120, 0.28);
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.page-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 30rem;
}

.page-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.page-content.two-col {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
}

.note-card {
  padding: 1.3rem 1.2rem;
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(106, 155, 216, 0.4);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.note-card strong {
  color: var(--text-main);
}

.note-card.about-copy {
  font-size: 1.1rem;
  line-height: 1.6;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.coding-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.coding-card {
  border-radius: 16px;
  padding: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(201, 230, 255, 0.8),
    rgba(255, 246, 205, 0.8)
  );
}

.coding-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.coding-links {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.coding-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(210, 220, 255, 0.95);
  font-size: 0.82rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    background 0.12s ease-out;
}

.coding-links a:hover,
.coding-links a:focus {
  background: #fff;
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(150, 170, 210, 0.22);
}

.placeholder-tile {
  border-radius: 16px;
  padding: 1.1rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(201, 230, 255, 0.8),
    rgba(255, 246, 205, 0.8)
  );
  font-size: 0.85rem;
  color: var(--text-main);
}

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

.video-card {
  border-radius: 16px;
  padding: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(201, 230, 255, 0.8),
    rgba(255, 246, 205, 0.8)
  );
  cursor: pointer;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
}

.video-card:hover,
.video-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(150, 170, 210, 0.25);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #1a1f2a;
}

.video-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

.video-card:focus {
  outline: 2px solid var(--blue-deep);
  outline-offset: 3px;
}

.video-card:focus:not(:focus-visible) {
  outline: none;
}

.video-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 40, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

.video-modal.is-open {
  display: flex;
}

.video-modal-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
  background: #ffffff;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.video-modal video {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.video-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 40, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 1.5rem;
}

.image-modal.is-open {
  display: flex;
}

.image-modal-inner {
  position: relative;
  width: min(92vw, 1100px);
  max-height: 92vh;
  background: #ffffff;
  border-radius: 20px;
  padding: 0.85rem 0.85rem 1.05rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.image-modal img {
  width: 100%;
  max-height: calc(92vh - 5rem);
  object-fit: contain;
  display: block;
  border-radius: 14px;
}

.image-modal-close {
  position: absolute;
  top: 0.3rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.description-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 40, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 55;
  padding: 1.5rem;
}

.description-modal.is-open {
  display: flex;
}

.description-modal-inner {
  position: relative;
  width: min(92vw, 520px);
  max-height: min(85vh, 640px);
  overflow: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.description-modal-inner h3 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--text-main);
  padding-right: 2rem;
}

.description-modal-inner p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  white-space: pre-line;
}

.description-modal-inner p i,
.description-modal-inner p em {
  font-style: italic;
  color: var(--text-main);
}

.description-modal-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.description-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.description-modal-actions:empty {
  display: none;
  margin-top: 0;
}

.description-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--yellow-soft);
  border: 1px dashed rgba(255, 210, 140, 0.9);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.description-action-btn:hover,
.description-action-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(180, 160, 120, 0.28);
}

[data-artwork-box].coding-card,
[data-artwork-box].illustration-piece {
  cursor: pointer;
}

.placeholder-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.site-footer {
  padding: 1.3rem 1.5rem 1.6rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .page {
    margin-top: 1.1rem;
  }

  .hero {
    padding: 1.9rem 1.3rem 1.7rem;
  }

  .page-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .coding-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .about-home {
    grid-template-columns: minmax(0, 1fr);
  }
}

