:root {
  --bg: #0c0b0a;
  --bg-soft: #151311;
  --ink: #f0ecdf;
  --muted: #aca495;
  --accent: #8a2331;
  --accent-bright: #b53042;
  --line: rgba(232, 227, 214, 0.16);
  --line-strong: rgba(232, 227, 214, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.58;
  min-height: 100vh;
  background-image:
    linear-gradient(180deg, rgba(12,11,10,0.1) 0%, rgba(12,11,10,0.42) 18%, rgba(12,11,10,0.9) 45%, rgba(12,11,10,0.88) 74%, rgba(12,11,10,0.5) 88%, rgba(12,11,10,0.22) 100%),
    linear-gradient(90deg, rgba(12,11,10,0.68) 0%, rgba(12,11,10,0.86) 43%, rgba(12,11,10,0.95) 100%),
    url('books_bg.jpg');
  background-image:
    linear-gradient(180deg, rgba(12,11,10,0.1) 0%, rgba(12,11,10,0.42) 18%, rgba(12,11,10,0.9) 45%, rgba(12,11,10,0.88) 74%, rgba(12,11,10,0.5) 88%, rgba(12,11,10,0.22) 100%),
    linear-gradient(90deg, rgba(12,11,10,0.68) 0%, rgba(12,11,10,0.86) 43%, rgba(12,11,10,0.95) 100%),
    -webkit-image-set(url('books_bg.webp') type('image/webp'), url('books_bg.jpg') type('image/jpeg'));
  background-image:
    linear-gradient(180deg, rgba(12,11,10,0.1) 0%, rgba(12,11,10,0.42) 18%, rgba(12,11,10,0.9) 45%, rgba(12,11,10,0.88) 74%, rgba(12,11,10,0.5) 88%, rgba(12,11,10,0.22) 100%),
    linear-gradient(90deg, rgba(12,11,10,0.68) 0%, rgba(12,11,10,0.86) 43%, rgba(12,11,10,0.95) 100%),
    image-set(url('books_bg.webp') type('image/webp'), url('books_bg.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* icons */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  stroke-width: 2;
}

img { max-width: 100%; display: block; }

/* hero */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  min-width: 0;
}

.avatar {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(240, 236, 223, 0.34);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

h1 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 4.6vw, 3.45rem);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 0.98;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.mark { color: var(--accent); }

.role {
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin: 0.6rem 0 0;
  color: var(--ink);
  opacity: 0.9;
}

.hook {
  color: var(--muted);
  margin: 0.35rem 0 0;
  max-width: 420px;
  font-size: 0.95rem;
}

.language-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 14, 13, 0.62);
}

.language-toggle a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 1.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.language-toggle a:hover {
  color: var(--ink);
  background: rgba(232, 227, 214, 0.06);
}

.language-toggle a[aria-current="page"] {
  color: var(--ink);
  background: rgba(138, 35, 49, 0.82);
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(19, 18, 17, 0.58);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.socials a:hover {
  color: var(--ink);
  border-color: rgba(181, 48, 66, 0.74);
  background: rgba(138, 35, 49, 0.2);
  transform: translateY(-1px);
}

.socials .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.brand-icon {
  width: 1.05rem;
  height: 1.05rem;
  filter: invert(59%) sepia(8%) saturate(393%) hue-rotate(4deg) brightness(89%) contrast(87%);
}

.socials a:hover .brand-icon {
  filter: invert(93%) sepia(17%) saturate(200%) hue-rotate(2deg) brightness(98%) contrast(87%);
}

/* content */
main {
  width: min(1180px, 100%);
  flex: 1 0 auto;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(1.35rem, 3.8vh, 3rem) 1.5rem clamp(1rem, 2.8vh, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.1rem, 2.8vh, 2rem);
  position: relative;
}

main::before {
  content: "";
  position: absolute;
  inset: clamp(0.8rem, 2vw, 1.5rem) 0;
  z-index: -1;
  border-block: 1px solid rgba(232, 227, 214, 0.06);
  background:
    linear-gradient(90deg, rgba(12, 11, 10, 0.7), rgba(12, 11, 10, 0.48) 50%, rgba(12, 11, 10, 0.76));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.94fr) minmax(330px, 1.1fr) minmax(290px, 0.86fr);
  gap: clamp(1.35rem, 2.8vw, 2.5rem);
  align-items: start;
}

.intro,
.services,
.contact {
  min-width: 0;
}

section { margin-bottom: 0; }

.intro {
  margin-top: 0;
}

main section p {
  font-size: clamp(0.93rem, 1vw, 1rem);
  margin: 0;
  color: rgba(240, 236, 223, 0.94);
}

main section p + p { margin-top: 0.7rem; }

.note {
  display: block;
  color: var(--muted);
  font-size: 0.95em;
  margin-top: 0.6rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--accent);
}

h2 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-weight: 400;
  font-size: 1.34rem;
  line-height: 1.15;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.62rem;
  margin: 0 0 0.9rem;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3.1rem;
  height: 1px;
  background: var(--accent-bright);
}

.service-list {
  display: grid;
  gap: 0.72rem;
}

.service-card {
  padding: 0.85rem 0.92rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 14, 13, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.service-tag {
  color: var(--accent-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.service-card h3 {
  color: var(--ink);
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.42rem;
}

.service-card p:not(.service-tag) {
  color: rgba(240, 236, 223, 0.82);
  font-size: 0.88rem;
  line-height: 1.48;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-size: 0.85rem;
  color: rgba(240, 236, 223, 0.72);
  margin-top: 0.68rem;
}

input, textarea {
  background: rgba(21, 19, 17, 0.86);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.72rem 0.8rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 6.7rem;
  resize: vertical;
}

input:hover, textarea:hover {
  border-color: var(--line-strong);
}

input:focus, textarea:focus {
  border-color: rgba(181, 48, 66, 0.88);
  background: rgba(17, 15, 14, 0.94);
  box-shadow: 0 0 0 3px rgba(138, 35, 49, 0.2);
  outline: none;
}

button:focus {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.82rem;
  background: var(--accent);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.76rem 1.16rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button[type="submit"]:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

.form-status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0.6rem 0 0;
}

.direct {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.direct a {
  color: var(--ink);
  text-decoration-color: rgba(181, 48, 66, 0.65);
  text-underline-offset: 0.2em;
}

.direct a:hover { color: #fff7e7; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.3rem 0.4rem;
  margin: -0.3rem -0.4rem;
  border-radius: 4px;
  font-family: inherit;
}

.copy-btn:hover { color: var(--ink); background: rgba(232, 227, 214, 0.06); }

footer {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(232, 227, 214, 0.08);
  padding: 0.65rem 1.5rem;
  background: rgba(12, 11, 10, 0.42);
}

footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.82fr);
  }

  .contact {
    grid-column: 2;
    grid-row: 1;
  }

  .services {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .service-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  body {
    background-attachment: scroll;
    background-image:
      linear-gradient(180deg, rgba(12,11,10,0.38) 0%, rgba(12,11,10,0.86) 20%, rgba(12,11,10,0.97) 45%, rgba(12,11,10,0.92) 76%, rgba(12,11,10,0.55) 100%),
      url('books_bg.jpg');
    background-image:
      linear-gradient(180deg, rgba(12,11,10,0.38) 0%, rgba(12,11,10,0.86) 20%, rgba(12,11,10,0.97) 45%, rgba(12,11,10,0.92) 76%, rgba(12,11,10,0.55) 100%),
      -webkit-image-set(url('books_bg.webp') type('image/webp'), url('books_bg.jpg') type('image/jpeg'));
    background-image:
      linear-gradient(180deg, rgba(12,11,10,0.38) 0%, rgba(12,11,10,0.86) 20%, rgba(12,11,10,0.97) 45%, rgba(12,11,10,0.92) 76%, rgba(12,11,10,0.55) 100%),
      image-set(url('books_bg.webp') type('image/webp'), url('books_bg.jpg') type('image/jpeg'));
    background-position: 42% center;
  }

  main {
    min-height: 0;
    display: block;
    max-width: 620px;
    padding: 1.8rem 1.25rem 2.15rem;
  }

  main::before {
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 11, 10, 0.38), rgba(12, 11, 10, 0.88) 32%, rgba(12, 11, 10, 0.78));
  }

  .hero,
  .hero-inner {
    align-items: flex-start;
  }

  .hero {
    position: relative;
  }

  .language-toggle {
    position: absolute;
    right: 0;
    top: 0;
  }

  .hero-inner {
    flex-direction: column;
    gap: 0.95rem;
  }

  .layout {
    display: block;
    margin-top: 1.85rem;
  }

  .services,
  .contact {
    margin-top: 2.25rem;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 10.5vw, 2.7rem);
  }

  button[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .direct {
    align-items: flex-start;
  }
}
