@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Jua&display=swap');

:root {
  /* Pink palette: base #F3C0D2, with light and dark variations. */
  --bg: #FCEAF1;
  --card: #FFF4F8;
  --white: #FFFDFE;
  --line: #D887A5;
  --line-dark: #B5537C;
  --pink: #E89CB8;
  --pink-dark: #C6648D;
  --text: #131313;
  --soft-text: #A86580;
  --shadow: rgba(112, 51, 76, .22);
  --site-width: 700px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    url("images/happy days.png") center / cover fixed,
    var(--bg);
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 13px;
  letter-spacing: -.02em;
}

/* Individually sized cloud cutouts drift at different heights and speeds. */
.cloud-layer {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-cloud {
  position: absolute;
  top: var(--cloud-top);
  left: var(--cloud-start);
  width: var(--cloud-size);
  min-width: 68px;
  height: auto;
  opacity: var(--cloud-opacity);
  animation: floating-cloud-drift var(--cloud-speed) linear infinite;
  animation-delay: var(--cloud-delay);
}

@keyframes floating-cloud-drift {
  from {
    transform: translateX(-12vw) scaleX(var(--cloud-flip));
  }
  to {
    transform: translateX(175vw) scaleX(var(--cloud-flip));
  }
}

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

button {
  font: inherit;
}

.page-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, var(--site-width));
  margin: 0 auto;
  padding: 0 14px 28px;
}

@media (prefers-reduced-motion: reduce) {
  .floating-cloud {
    animation: none;
  }

  .splash-title span {
    animation: none;
  }
}

.top-decoration {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink-dark);
  font-size: 17px;
  letter-spacing: 7px;
  opacity: .95;
  transform: rotate(-3deg);
  transition: transform .15s ease, color .15s ease;
}

.top-decoration:hover,
.top-decoration:focus-visible {
  color: var(--pink);
  transform: rotate(0deg) translateY(-1px);
}

.site-card {
  background: rgba(255, 244, 248, .90);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 25px 22px 20px;
  box-shadow:
    0 7px 18px var(--shadow),
    inset 0 1px 0 rgba(255,255,255,.85);
}

.browser {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow:
    0 1px 0 white inset,
    0 3px 8px var(--shadow);
}

/* ---------------- Tabs ---------------- */

.tabs {
  display: flex;
  height: 30px;
  border-bottom: 1px solid var(--line);
  padding-left: 0;
  background: linear-gradient(var(--white), var(--card));
}

.tab {
  min-width: 79px;
  padding: 8px 10px 6px;
  border-right: 1px solid var(--line);
  text-align: center;
  color: var(--soft-text);
  font-size: 10px;
  transition: .2s ease;
}

.tab:first-child {
  border-left: 0;
}

.tab:hover,
.tab.active {
  background: #F9E0EA;
  color: var(--pink-dark);
}

/* ---------------- Browser bar ---------------- */

.browser-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.browser-buttons {
  display: flex;
  gap: 5px;
}

.browser-buttons button {
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--line-dark);
  line-height: 15px;
  cursor: default;
}

.address {
  flex: 1;
  height: 20px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--soft-text);
  font-size: 9px;
  text-align: right;
  background: white;
}

/* ---------------- Main content ---------------- */

.home-banner {
  display: flex;
  justify-content: center;
  padding: 24px 25px 0;
}

.home-banner img {
  display: block;
  width: min(100%, 570px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 8px var(--shadow);
}

/* ---------------- Splash screen ---------------- */

.splash-screen {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 13px;
  padding: 26px 14px;
  text-align: center;
  background: transparent;
  color: var(--text);
  font-family: "DM Mono", monospace;
  transition: opacity .5s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-title {
  margin: 0;
  font-family: "Jua", sans-serif;
  font-size: clamp(40px, 8.5vw, 78px);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1;
  white-space: nowrap;
}

/* A small, hand-drawn-looking wobble without moving the title far from center. */
.splash-title span {
  display: inline-block;
  -webkit-text-stroke: clamp(10px, .65vw, 7px) white;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(111, 87, 91, .18);
  animation: splash-letter-wave 1.9s ease-in-out infinite;
  animation-delay: var(--wave-delay);
}

@keyframes splash-letter-wave {
  0%, 100% {
    transform: translateY(var(--letter-y)) rotate(var(--letter-tilt));
  }
  50% {
    transform: translateY(calc(var(--letter-y) - 6px)) rotate(var(--letter-tilt));
  }
}

.splash-title span:nth-child(-n + 5) { color: #f5a1bf; }
.splash-title span:nth-child(n + 6):nth-child(-n + 9) { color: #ffd991; }
.splash-title span:nth-child(10) { color: #b8da77; }
.splash-title span:nth-child(n + 11) { color: #9dcef1; }

.splash-title span:nth-child(5),
.splash-title span:nth-child(9) {
  margin-right: .09em;
}

.splash-title span:nth-child(1)  { --letter-y: 1px;  --letter-tilt: -3deg; --wave-delay: 0s; }
.splash-title span:nth-child(2)  { --letter-y: -3px; --letter-tilt: 2deg;  --wave-delay: .07s; }
.splash-title span:nth-child(3)  { --letter-y: 2px;  --letter-tilt: -2deg; --wave-delay: .14s; }
.splash-title span:nth-child(4)  { --letter-y: -1px; --letter-tilt: 3deg;  --wave-delay: .21s; }
.splash-title span:nth-child(5)  { --letter-y: 3px;  --letter-tilt: -2deg; --wave-delay: .28s; }
.splash-title span:nth-child(6)  { --letter-y: -2px; --letter-tilt: 2deg;  --wave-delay: .35s; }
.splash-title span:nth-child(7)  { --letter-y: 1px;  --letter-tilt: -3deg; --wave-delay: .42s; }
.splash-title span:nth-child(8)  { --letter-y: -3px; --letter-tilt: 2deg;  --wave-delay: .49s; }
.splash-title span:nth-child(9)  { --letter-y: 2px;  --letter-tilt: -1deg; --wave-delay: .56s; }
.splash-title span:nth-child(10) { --letter-y: 4px;  --letter-tilt: 2deg;  --wave-delay: .63s; }
.splash-title span:nth-child(11) { --letter-y: -2px; --letter-tilt: -3deg; --wave-delay: .70s; }
.splash-title span:nth-child(12) { --letter-y: 2px;  --letter-tilt: 2deg;  --wave-delay: .77s; }
.splash-title span:nth-child(13) { --letter-y: -3px; --letter-tilt: -2deg; --wave-delay: .84s; }
.splash-title span:nth-child(14) { --letter-y: 1px;  --letter-tilt: 3deg;  --wave-delay: .91s; }
.splash-title span:nth-child(15) { --letter-y: -1px; --letter-tilt: -2deg; --wave-delay: .98s; }
.splash-title span:nth-child(16) { --letter-y: 2px;  --letter-tilt: 2deg;  --wave-delay: 1.05s; }

.splash-welcome {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 9px;
}

.splash-enter {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 254, .72);
  color: var(--line-dark);
  font-size: 9px;
  box-shadow: 0 1px 1px var(--shadow);
}

.splash-enter:hover,
.splash-enter:focus-visible {
  background: var(--white);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px;
  gap: 30px;
  padding: 38px 25px 26px;
}

.profile {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.avatar {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 48%, var(--white) 0 42%, transparent 43%),
    var(--card);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about h1 {
  margin: 0 0 8px;
  color: var(--line-dark);
  font-size: 13px;
  font-weight: 500;
}

.about p {
  margin: 0;
  max-width: none;
  color: var(--soft-text);
  line-height: 1.55;
  font-size: 11px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0 9px;
  color: var(--line-dark);
  font-size: 10px;
}

.quick-links a:hover {
  text-decoration: underline;
}

.commission {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--line-dark);
  font-size: 10px;
  box-shadow: 0 1px 1px var(--shadow);
}

.commission:hover {
  background: #F9E0EA;
}

/* ---------------- Thoughts menu ---------------- */

.thoughts {
  align-self: start;
  border: 1px solid var(--line);
  background: var(--white);
}

.thought-title {
  padding: 6px 7px;
  background: var(--pink-dark);
  color: white;
  font-size: 10px;
  white-space: nowrap;
}

.thoughts a {
  display: block;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--soft-text);
  font-size: 10px;
  background: var(--white);
}

.thoughts a:last-child {
  border-bottom: 0;
}

.thoughts a:hover {
  background: #F9E0EA;
  color: var(--line-dark);
}

/* ---------------- Home FAQ ---------------- */

.home-faq {
  padding: 0 25px 30px;
}

.home-faq h2 {
  margin: 0 0 10px;
  color: var(--line-dark);
  font-size: 12px;
  font-weight: 500;
}

.faq-item {
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 254, .76);
}

.faq-item summary {
  padding: 9px 11px;
  color: var(--line-dark);
  font-size: 10px;
  cursor: pointer;
}

.faq-item summary::marker {
  color: var(--pink-dark);
}

.faq-item > p {
  margin: 0;
  padding: 0 11px 10px;
  color: var(--soft-text);
  font-size: 9px;
  line-height: 1.7;
}

.faq-content {
  padding: 0 11px 11px;
  color: var(--soft-text);
  font-size: 9px;
  line-height: 1.65;
}

.faq-content h3 {
  margin: 4px 0 5px;
  color: var(--line-dark);
  font-size: 9px;
  font-weight: 500;
}

.faq-content p {
  margin: 9px 0;
}

.faq-content ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-content li::before {
  content: "❏ ";
  color: var(--pink-dark);
}

.faq-item[open] summary {
  padding-bottom: 6px;
}

/* ---------------- Social icons ---------------- */

.socials {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 22px 12px;
  color: var(--pink-dark);
  font-size: 11px;
}

.socials a {
  transition: transform .15s ease;
}

.socials a:hover {
  transform: translateY(-2px);
}

/* ---------------- Socials page ---------------- */

.social-page {
  padding: 38px 30px 34px;
  text-align: center;
}

.social-page h1 {
  margin: 0 0 7px;
  color: var(--line-dark);
  font-size: 13px;
  font-weight: 400;
}

.social-page > p {
  margin: 0;
  color: var(--soft-text);
  font-size: 9px;
}

.social-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 21px;
}

.social-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--line-dark);
  font-size: 8px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.social-list a i {
  font-size: 12px;
}

.social-list a:hover {
  background: #F9E0EA;
  color: var(--line-dark);
  transform: translateY(-1px);
}

.placeholder-page {
  padding: 70px 30px;
  text-align: center;
}

.placeholder-page h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}

.placeholder-page p {
  margin: 10px 0 14px;
  font-size: 9px;
  line-height: 1.7;
}

/* ---------------- Gallery and mini blog ---------------- */

.gallery-page,
.miniblog-page,
.projects-page,
.fun-page {
  padding: 34px 30px 38px;
}

.page-heading {
  margin-bottom: 22px;
  text-align: center;
}

.page-heading h1 {
  margin: 0 0 7px;
  color: var(--line-dark);
  font-size: 13px;
  font-weight: 400;
}

.page-heading p {
  margin: 0;
  color: var(--soft-text);
  font-size: 9px;
}

.gallery-grid {
  column-count: 3;
  column-gap: 14px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: -4px 0 20px;
}

.gallery-filter {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--soft-text);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-filter.active {
  background: rgba(255, 253, 254, .7);
  color: var(--line-dark);
  transform: translateY(-1px);
}

.gallery-card {
  display: inline-block;
  width: 100%;
  margin: 0;
  margin-bottom: 14px;
  break-inside: avoid;
  transition: opacity .18s ease, transform .18s ease;
}

.gallery-card.is-filtered {
  opacity: 0;
  transform: translateY(7px) scale(.97);
  pointer-events: none;
}

.gallery-card[hidden] {
  display: none;
}

.gallery-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-image-button img {
  transition: opacity .2s ease, transform .25s ease;
}

.gallery-image-button:hover img,
.gallery-image-button:focus-visible img {
  opacity: .82;
  transform: scale(1.025);
}

.image-lightbox {
  width: min(92vw, 1000px);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.image-lightbox::backdrop {
  background: rgba(62, 27, 42, .65);
}

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -13px;
  right: -13px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--line-dark);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.gallery-card figcaption {
  display: block;
  padding: 8px 3px 2px;
}

.gallery-card h2 {
  margin: 0 0 5px;
  color: var(--line-dark);
  font-size: 9px;
  font-weight: 500;
}

.gallery-card p,
.journal-entry p {
  margin: 0;
  color: var(--soft-text);
  font-size: 8px;
  line-height: 1.7;
}

.gallery-card code {
  color: var(--line-dark);
  font-family: inherit;
  font-size: inherit;
}

.journal-list {
  display: grid;
  gap: 10px;
}

.journal-entry {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
}

.journal-entry time {
  display: block;
  margin-bottom: 7px;
  color: var(--line-dark);
  font-size: 9px;
}

.project-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
}

.project-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  color: var(--soft-text);
  font-size: 8px;
  text-align: left;
}

.project-table th,
.project-table td {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.project-table th:last-child,
.project-table td:last-child {
  border-right: 0;
}

.project-table th {
  color: white;
  font-weight: 400;
  background: var(--pink-dark);
}

.project-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.project-table td:first-child {
  width: 29%;
  color: var(--line-dark);
}

.project-table td:nth-child(2) {
  width: 22%;
}

.project-status {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--line-dark);
  background: var(--card);
  white-space: nowrap;
}

.fun-page {
  display: grid;
  gap: 12px;
}

.fun-page .page-heading {
  margin-bottom: 10px;
}

.fun-panel {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 254, .76);
}

.fun-panel h2 {
  margin: 0 0 7px;
  color: var(--line-dark);
  font-size: 9px;
  font-weight: 500;
}

.fun-panel p {
  margin: 0;
  color: var(--soft-text);
  font-size: 8px;
  line-height: 1.7;
}

.cbox {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

.fun-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fun-items span {
  padding: 5px 7px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--soft-text);
  font-size: 8px;
}

/* ---------------- Footer ---------------- */

footer {
  padding-top: 20px;
  text-align: center;
  color: var(--soft-text);
  font-size: 9px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  margin-bottom: 9px;
  color: var(--pink-dark);
  font-size: 12px;
}

.footer-socials a {
  transition: transform .15s ease, color .15s ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  color: var(--line-dark);
  transform: translateY(-2px);
}

footer a:hover {
  text-decoration: underline;
}

/* ---------------- Mobile ---------------- */

@media (max-width: 520px) {
  .site-card {
    padding: 17px 12px 16px;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    min-width: 70px;
  }

  .content {
    grid-template-columns: 1fr;
    padding: 28px 18px 20px;
  }

  .home-banner {
    padding: 20px 18px 0;
  }

  .home-faq {
    padding: 0 18px 24px;
  }

  .splash-screen {
    padding: 17px;
  }

  .profile {
    grid-template-columns: 105px 1fr;
    gap: 16px;
  }

  .avatar {
    width: 105px;
    height: 105px;
  }

  .thoughts {
    width: 100%;
  }

  .thoughts a {
    display: inline-block;
    width: 50%;
    border-bottom: 1px solid var(--line);
  }

  .thought-title {
    width: 100%;
  }

  .social-page {
    padding: 30px 18px 26px;
  }

  .gallery-page,
  .miniblog-page,
  .projects-page,
  .fun-page {
    padding: 30px 18px;
  }

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 360px) {
  .profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .avatar {
    margin: auto;
  }

  .about p {
    margin: auto;
  }

  .quick-links {
    justify-content: center;
  }

  .gallery-grid {
    column-count: 1;
  }
}
