/* hocthui.xyz: the same desk and composition notebook as thivao10eng and Study Practice.
   Black, white and one pastel red. Black acts, red speaks. Light only. */
:root {
  --bg: #f1eeea;
  --bg-dot: rgb(27 26 25 / 0.09);
  --glow: rgb(244 163 160 / 0.38);
  --surface: #ffffff;
  --fg: #1b1a19;
  --fg-soft: #5d5955;
  --border: #e6e1db;
  --accent: #f4a3a0;
  --accent-soft: #fde8e6;
  --accent-ink: #b5383a;
  --paper: #fffdf9;
  --rule: rgb(86 133 204 / 0.34);
  --margin-rule: rgb(226 92 92 / 0.7);
  --cover: #fbfaf8;
  --cover-red: #f6b3b0;
  --shadow: rgb(40 28 24 / 0.34);
  --line: 32px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  --font-hand: "Shantell Sans", "Comic Sans MS", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { padding: 0; list-style: none; }

body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 12% -8%, var(--glow), transparent 70%),
    radial-gradient(var(--bg-dot) 1px, transparent 1.5px);
  background-size: auto, 22px 22px;
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

::selection { background: var(--accent); color: #1b1a19; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }

/* Two languages in the page; the html data-lang picks one. */
[data-lang="vi"] [data-l="en"],
[data-lang="en"] [data-l="vi"] { display: none; }

/* ---------- Frame ---------- */

.top, main, .foot {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-inline: 24px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.wordmark {
  font-family: var(--font-hand);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.wordmark b { color: var(--accent-ink); font-weight: 700; }
.wordmark-small { font-size: 20px; }

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* ---------- Type ---------- */

.kicker {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title {
  margin-top: 8px;
  font-family: var(--font-hand);
  font-size: 58px;
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
}

.heading {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 600;
  line-height: var(--line);
}

.hl {
  padding: 0 0.18em;
  border-radius: 0.3em 0.12em 0.34em 0.1em;
  background: linear-gradient(100deg, var(--accent-soft), var(--accent) 22%, var(--accent) 80%, var(--accent-soft));
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #1b1a19;
}

.lead {
  max-width: 46ch;
  margin-top: 20px;
  color: var(--fg-soft);
  font-size: 18px;
  line-height: 1.7;
}

.soft { color: var(--fg-soft); }

.note {
  display: inline-block;
  color: var(--accent-ink);
  font-family: var(--font-hand);
  font-size: 23px;
  font-weight: 500;
  line-height: var(--line);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}
.note-sign {
  display: block;
  padding-left: 8ch;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

/* ---------- Controls ---------- */

.btn {
  display: inline-flex;
  height: 48px;
  align-items: center;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--fg);
  box-shadow: 0 8px 18px -8px var(--shadow);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease-out);
}
.btn:hover { box-shadow: 0 14px 24px -10px var(--shadow); transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-small { height: 40px; padding: 0 20px; font-size: 15px; }

.link {
  color: var(--fg-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link:hover { color: var(--accent-ink); }
.lang-switch { font-size: 15px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.chip {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1a19;
  font-size: 12.5px;
  font-weight: 600;
}
.chip-open { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: min(620px, 78dvh);
  padding-block: 32px 64px;
}

/* the tilted notebooks may lean past the edge; never let them widen the page */
main { overflow-x: clip; }

/* two notebooks lying on the desk, a pencil across them */
.stack {
  position: relative;
  justify-self: center;
  width: min(340px, 100%);
  aspect-ratio: 3 / 4;
  filter: drop-shadow(0 26px 30px var(--shadow));
}
.stack .cover { position: absolute; inset: 0; }
.cover-back { transform: translate(14%, 6%) rotate(9deg); }
.cover-front { transform: rotate(-4deg); }
.cover-front .label { width: 64%; padding: 22px 22px 20px; }
.cover-front .label-title { font-size: 34px; }
.pencil {
  position: absolute;
  right: -12%;
  bottom: 9%;
  width: 70%;
  height: 14px;
  border-radius: 2px 7px 7px 2px;
  background:
    linear-gradient(90deg, #f6b3b0 0 9%, #c9c4be 9% 14%, #1b1a19 14% 86%, #e7d3b5 86% 96%, #1b1a19 96%);
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
  transform: rotate(-28deg);
  transform-origin: right center;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-front { animation: settle 0.9s var(--ease-out) 0.15s both; }
  .cover-back { animation: settle-back 1s var(--ease-out) both; }
  @keyframes settle { from { transform: translateY(-18px) rotate(-9deg); opacity: 0; } }
  @keyframes settle-back { from { transform: translate(14%, -4%) rotate(16deg); opacity: 0; } }
}

/* ---------- Composition cover (as in thivao10eng) ---------- */

.cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0 10px 10px 0;
  background-color: var(--cover);
  background-image: url("/marble.svg");
  background-size: 300px;
}
.cover[data-tone="red"] { background-color: var(--cover-red); }
.cover::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 9%;
  min-width: 14px;
  background: linear-gradient(90deg, #0d0c0c, #2a2826 55%, #151414);
  content: "";
}
.cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgb(255 255 255 / 0.42), transparent 34%, transparent 62%, rgb(0 0 0 / 0.2));
  content: "";
  pointer-events: none;
}
.label {
  position: relative;
  z-index: 1;
  width: 66%;
  margin-left: 9%;
  padding: 12px 14px 14px;
  border: 2px solid #1b1a19;
  border-radius: 4px;
  outline: 1px solid #1b1a19;
  outline-offset: -6px;
  background: #fffdf9;
  color: #1b1a19;
  text-align: center;
}
.label-kicker { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.label-title { display: block; margin-top: 4px; font-family: var(--font-hand); font-size: 22px; font-weight: 600; line-height: 1.2; }
.label-rule { display: block; margin-top: 8px; padding-top: 4px; border-top: 1px solid #1b1a19; font-size: 13px; }

/* ---------- About: a ruled notebook page ---------- */

.about { padding-block: 32px 72px; }

.page {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--line) * 2) 48px calc(var(--line) * 2) 92px;
  border-radius: 6px;
  background-color: var(--paper);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% var(--line);
  background-position: 0 -1px;
  box-shadow: 0 1px 0 var(--border), 0 18px 34px -22px var(--shadow);
  font-size: 17px;
  line-height: var(--line);
  transform: rotate(-0.6deg);
}
.page::before {
  position: absolute;
  inset: 0 auto 0 66px;
  width: 2px;
  background: var(--margin-rule);
  content: "";
}
.page .heading { margin-bottom: var(--line); }
.page p { max-width: 54ch; }
.page p + p { margin-top: var(--line); }
.page .note { margin-top: var(--line); }

/* ---------- Sites ---------- */

.sites { padding-block: 32px 96px; }
.sites > .heading { margin-bottom: 32px; }

.site-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.site {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.3s var(--spring), border-color 0.2s;
}
.site:hover { transform: translateY(-3px); border-color: var(--accent); }

.cover-small {
  aspect-ratio: 4 / 3;
  filter: drop-shadow(0 12px 14px var(--shadow));
}
.cover-small .label { width: 52%; }

.site-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.site-body .soft { flex: 1; font-size: 15px; }
.site-body .btn { margin-top: 8px; }
.site-title { font-family: var(--font-hand); font-size: 24px; font-weight: 600; line-height: 1.25; }

.site-soon { border-style: dashed; background: transparent; }
.site-soon:hover { transform: none; border-color: var(--border); }
.slot {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 2px dashed var(--border);
  border-radius: 0 10px 10px 0;
  color: var(--fg-soft);
  font-family: var(--font-hand);
  font-size: 48px;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; padding-block: 16px 48px; }
  .stack { width: min(260px, 70%); }
  .title { font-size: 44px; }
  .site-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .top, main, .foot { padding-inline: 16px; }
  .title { font-size: 38px; }
  .stack { width: 190px; margin-bottom: 8px; }
  .cover-front .label { width: 76%; padding: 12px 8px; }
  .cover-front .label-title { font-size: 21px; }
  .cover-front .label-kicker { font-size: 9px; }
  .cover-front .label-rule { font-size: 11px; }
  .lead { font-size: 16.5px; }
  .page { padding: calc(var(--line) * 1.5) 20px calc(var(--line) * 1.5) 44px; transform: none; font-size: 16px; }
  .page::before { left: 30px; }
  .site-list { grid-template-columns: 1fr; }
  .cover-small { aspect-ratio: 16 / 9; }
  .slot { aspect-ratio: 16 / 9; }
}
