@font-face {
  font-family: "VICTORMONO";
  src: url("fonts/VictorMono-BoldItalic.woff"),
       url("fonts/VictorMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBMSERIF";
  src: url("fonts/VictorMono-Medium.woff2") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "vmd";
  src: url("fonts/VictorMono-SemiBoldItalic.woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}



:root {
  --text: #000;
  --background: #fff;
  --muted: #555;
  --border: #ccc;
  --accent: #000;
}

:root[data-force-color-mode="dark"] {
  --text: #fff;
  --background: #000000e3;
  --muted: #ccc;
  --border: #444;
  --accent: #fff;
}



body.index {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "IBMSERIF", serif;
}


a {
  color: var(--text);
  text-decoration: none;
  position: relative;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--text);
  opacity: 0.3;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}



.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-family: "vmd";
  letter-spacing: 0.05em;
  margin: 0;
}



.book-info {
  max-width: 640px;
  margin: 5rem auto 4rem;
  padding: 0 2rem;
  text-align: center;
}



.preface {
  max-width: 680px;
  margin: 4rem auto;
  padding: 0 2rem;
}



body.index main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 3rem;
}



h2,
h3 {
  margin: 0 0 2rem;
}


h2 {
  max-width: 720px;
  margin: 6rem auto 2rem;
  padding-left: 3.5rem;  
}


h3 {
  font-family: "vmd";
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 6rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-left: 2.5rem;
}

h3::before {

  position: absolute;
  left: 0;
  opacity: 0.3;
  padding-left: 10rem;
  text-wrap: balance;
  max-width: 20em;
}



ul {
  margin: 0 auto 4rem;
  padding: 0;
  max-width: 720px;
}

ul li {
  list-style: none;
  padding: 0.6rem 0 0.6rem 3.5rem;
  border-left: 1px solid var(--border);
}

ul li span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

ul li:hover {
  border-left-color: var(--accent);
}


.tags-link {
  max-width: 720px;
  margin: 3rem auto 0;
  text-align: center;
  font-family: "vmd";
  letter-spacing: 0.04em;
}

.tags-link a {
  font-size: 0.95rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.tags-link a:hover {
  opacity: 1;
}



footer {
  padding: 4rem 2rem;
  display: flex;
  justify-content: center;
}

.theme {
  font-family: "vmd";
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

.theme input {
  display: none;
}

.theme label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.theme label:hover {
  opacity: 1;
  border-color: var(--accent);
}



#typing-title {
  font-family: "vmd";
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--text);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0% { border-color: transparent; }
  50% { border-color: var(--text); }
  100% { border-color: transparent; }
}



@media (max-width: 768px) {
  body.index main {
    padding: 2rem 1.5rem;
  }

  h2 {
    padding-left: 2rem;
  }

  ul li {
    padding-left: 2rem;
  }

  h3 {
    padding-left: 1.5rem;
  }
}
