@font-face {
  font-family: "Inter";
  src: url("assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f8f3ff;
  --background-deep: #ecfaff;
  --ink: #34284d;
  --muted: #685b7f;
  --accent-dark: #4c3474;
  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .82);
  --shadow: 0 18px 48px rgba(79, 54, 117, .12);
  --radius: 34px;
  --section-gap: clamp(64px, 9vw, 104px);
  --content-gap: clamp(30px, 4vw, 48px);
  --summer-lavender: #b993f0;
  --summer-yellow: #ffe76d;
  --summer-lime: #b9f269;
  --summer-coral: #ff5b38;
  --summer-blue: #7ddaf4;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 95% 16% at 16% 5%, color-mix(in srgb, var(--summer-lavender) 76%, transparent), transparent 85%),
    radial-gradient(ellipse 84% 18% at 92% 24%, color-mix(in srgb, var(--summer-yellow) 80%, transparent), transparent 85%),
    radial-gradient(ellipse 84% 19% at 4% 43%, color-mix(in srgb, var(--summer-lime) 76%, transparent), transparent 85%),
    radial-gradient(ellipse 88% 20% at 96% 64%, color-mix(in srgb, var(--summer-coral) 60%, transparent), transparent 86%),
    radial-gradient(ellipse 90% 22% at 12% 86%, color-mix(in srgb, var(--summer-blue) 78%, transparent), transparent 87%),
    linear-gradient(180deg, var(--background), #fffaf0 30%, #f7ffed 52%, #fff5ed 72%, var(--background-deep));
  font: 400 1rem/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  z-index: 4;
}

body::after {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 32% 40% at 20% 18%, color-mix(in srgb, var(--summer-lavender) 88%, transparent), transparent 82%),
    radial-gradient(ellipse 34% 42% at 78% 20%, color-mix(in srgb, var(--summer-yellow) 90%, transparent), transparent 82%),
    radial-gradient(ellipse 34% 42% at 24% 58%, color-mix(in srgb, var(--summer-lime) 88%, transparent), transparent 82%),
    radial-gradient(ellipse 32% 42% at 78% 76%, color-mix(in srgb, var(--summer-coral) 74%, transparent), transparent 82%),
    radial-gradient(ellipse 36% 44% at 48% 94%, color-mix(in srgb, var(--summer-blue) 90%, transparent), transparent 82%);
  opacity: .62;
  will-change: transform;
  animation: summer-drift 18s ease-in-out infinite alternate;
}

a { color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6950a5; outline-offset: 4px; }
[hidden] { display: none !important; }

.site-shell { position: relative; z-index: 1; width: min(100% - 36px, 1160px); margin-inline: auto; }
.glass {
  --shine-x: 50%;
  --shine-y: 0%;
  --shine-opacity: .27;
  position: relative;
  background:
    radial-gradient(230px circle at var(--shine-x) var(--shine-y), rgb(255 255 255 / var(--shine-opacity)), transparent 75%),
    linear-gradient(140deg, rgba(255,255,255,.65), var(--glass) 55%, rgba(255,255,255,.3));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.92), inset 1px 0 0 rgba(255,255,255,.3);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.glass.is-lit { border-color: rgba(255,255,255,.96); box-shadow: 0 22px 54px rgba(79,54,117,.18), inset 0 1px 0 #fff, inset 0 0 20px rgba(255,255,255,.26); }

.hero { padding: var(--section-gap) 0 0; }
.identity { display: flex; align-items: center; gap: 16px; }
.artist-logo { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 20px rgba(75,48,116,.15); }
h1, h2, h3 { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-weight: 720; }
h1 { margin: 0; font-size: clamp(3rem, 12vw, 8rem); line-height: .96; letter-spacing: -.065em; }
.artist-email { margin: 12px 0 0; width: fit-content; color: var(--accent-dark); font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; user-select: text; cursor: text; }

section { scroll-margin-top: 25px; }
.links-section { padding: var(--content-gap) 0 var(--section-gap); }
.diary-section { padding: 0 0 90px; }
h2 { margin: 0; font-size: clamp(2.4rem, 8vw, 4.1rem); line-height: 1.05; letter-spacing: -.05em; }
.diary-section h2 { margin-bottom: var(--content-gap); }
.link-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.link-card { display: flex; align-items: center; min-height: 98px; gap: 15px; padding: 16px; border-radius: 28px; text-decoration: none; transition: transform .22s, background .22s, box-shadow .22s; }
a.link-card:hover { transform: translateY(-3px); background: var(--glass-strong); box-shadow: 0 23px 42px rgba(79,54,117,.15); }
.link-icon { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; background: #fff; color: var(--accent-dark); font-size: 1.5rem; }
.brand-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-x .link-icon { background: #000; }
.brand-x .brand-image { width: 63%; height: 63%; }
.brand-instagram .brand-image { width: 76%; height: 76%; }
.brand-gumroad .brand-image { width: 90%; height: 90%; }
.brand-artstation .link-icon { background: #171717; }
.link-text { display: grid; min-width: 0; overflow-wrap: anywhere; }
.link-text strong { font-size: 1.04rem; letter-spacing: -.018em; line-height: 1.3; }
.link-text small { font-size: .83rem; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.link-end { margin-left: auto; color: var(--accent-dark); font-size: 1.2rem; white-space: nowrap; }
.link-placeholder .link-end { padding: 5px 8px; border-radius: 99px; background: rgba(238,226,250,.75); color: var(--muted); font-size: .875rem; font-weight: 700; }
.info-card { grid-column: 1 / -1; overflow: hidden; border-radius: 28px; }
.info-summary { cursor: pointer; list-style: none; }
.info-summary::-webkit-details-marker { display: none; }
.info-summary:hover { background: var(--glass-strong); }
.news-icon { background: color-mix(in srgb, var(--summer-yellow) 28%, white); }
.bio-icon { background: rgba(255,255,255,.58); }
.news-icon, .bio-icon { font-weight: 800; }
.info-end { padding: 5px 10px; border-radius: 99px; background: rgba(238,226,250,.75); font-size: .875rem; font-weight: 700; }
.info-end::after { content: "Apri"; }
.info-card[open] .info-end::after { content: "Chiudi"; }
.info-body { margin: 0 18px 20px; padding: 15px 3px 0; border-top: 1px solid rgba(101,77,139,.16); color: var(--ink); font-size: .97rem; line-height: 1.65; overflow-wrap: anywhere; }
.bio-body { white-space: pre-line; }
.news-list { display: grid; gap: 16px; }
.news-item h3 { margin: 0; font-size: .98rem; font-weight: 720; line-height: 1.45; }
.news-item time { color: var(--accent-dark); }
.news-item p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; white-space: pre-line; }
.news-empty { margin: 0; color: var(--muted); font-size: .9rem; }

.post-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.post-card { overflow: hidden; border-radius: var(--radius); }
.post-image-wrap { aspect-ratio: 16 / 9; overflow: hidden; background: #cbb7e7; }
.post-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-image { transform: scale(1.035); }
.post-content { padding: 18px 20px 20px; overflow-wrap: anywhere; }
.post-date { color: var(--accent-dark); font-size: .79rem; font-weight: 750; letter-spacing: .03em; }
.post-content h3 { margin: 10px 0 8px; font-size: 1.65rem; line-height: 1.08; letter-spacing: -.045em; }
.post-thought { border-top: 1px solid rgba(101,77,139,.16); margin-top: 21px; padding-top: 15px; }
.post-thought summary { width: fit-content; color: var(--accent-dark); font-weight: 750; font-size: .9rem; cursor: pointer; list-style: none; }
.post-thought summary::-webkit-details-marker { display: none; }
.post-thought summary::after { content: "+"; display: inline-block; margin-left: 9px; font-size: 1.1rem; line-height: .8; }
.post-thought[open] summary::after { content: "−"; }
.post-thought[open] .thought-body { animation: thought-open .32s ease-out both; }
.thought-body { padding-top: 8px; color: var(--ink); }
.thought-body p { margin: 12px 0 0; font-size: .94rem; line-height: 1.65; }
.diary-image { margin: 18px 0; overflow: hidden; border-radius: 20px; background: rgba(215,195,236,.58); }
.diary-image-media { aspect-ratio: 16 / 9; overflow: hidden; }
.diary-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.empty-state { padding: 32px; border-radius: var(--radius); text-align: center; }
.post-count { margin: 26px auto 0; color: var(--muted); text-align: center; font-size: .9rem; font-weight: 650; }
.load-more { display: block; min-width: 180px; margin: 16px auto 0; padding: 16px 26px; border-radius: 999px; color: var(--accent-dark); font: 750 1rem/1 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; cursor: pointer; }
.load-more:hover { transform: translateY(-3px); }

.footer { display: flex; flex-direction: column; align-items: center; padding: 8px 0 42px; }
.back-to-top { display: grid; place-items: center; width: 260px; height: 68px; color: var(--accent-dark); transition: transform .22s ease; }
.back-to-top svg { display: block; width: 175px; height: 42px; }
.back-to-top:hover { transform: translateY(-4px); }
.footer-notice { width: 100%; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(101,77,139,.18); color: var(--muted); text-align: center; }
.footer-notice small { display: block; max-width: 720px; margin-inline: auto; font-size: .74rem; line-height: 1.55; }
.no-script { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9; margin: 0; padding: 12px; text-align: center; background: #fff; }

@keyframes summer-drift {
  from { transform: translate3d(-5%, 2%, 0) rotate(-2deg) scale(1.03); }
  to { transform: translate3d(5%, -3%, 0) rotate(2deg) scale(1.12); }
}
@keyframes thought-open { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 700px) {
  .site-shell { width: min(100% - 64px, 1160px); }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1050px) {
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .site-shell { width: min(100% - 28px, 1160px); }
  .link-card { gap: 10px; padding: 13px; }
  .link-icon { width: 46px; height: 46px; }
  .link-text strong { font-size: .96rem; }
  .link-text small { font-size: .76rem; }
  .link-placeholder .link-end { padding: 4px 6px; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none !important; transform: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
