@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

:root {
  color-scheme: dark;
  --bg: #050814;
  --fg: #d5def0;
  --muted: #8b97b3;
  --accent: #7ee7ff;
  --link: #8b7cff;
  --line: rgba(126, 231, 255, 0.25);
  --glass: #060915;
  --code-bg: #0c1224;
  --code-border: rgba(139, 124, 255, 0.45);
  --sans: "Share Tech Mono", ui-monospace, monospace;
  --mono: "Share Tech Mono", ui-monospace, monospace;
}

html,
html.dark,
button,
input,
select,
textarea {
  color: var(--fg);
}

body,
html.dark body {
  font-family: var(--sans);
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(139, 124, 255, 0.16), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(126, 231, 255, 0.08), transparent 40%);
  background-attachment: fixed;
}

::selection,
html.dark ::selection,
::-moz-selection,
html.dark ::-moz-selection {
  background: #3a2f86;
  color: #f4f7ff;
  text-shadow: none;
}

hr,
html.dark hr {
  border-color: var(--line);
}

h1, h2, h3, h4, h5, h6,
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 400;
}

a,
html.dark a,
html.dark a:hover {
  color: var(--link);
  text-decoration: none;
}

a:hover,
html.dark a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

blockquote,
html.dark blockquote {
  border-color: var(--link);
  color: var(--fg);
}

.container,
.container-wide {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.75rem 2rem;
}

.header .site-title {
  line-height: 1.2;
}

.avatar-home,
.site-title-home {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.site-title-home {
  font-family: var(--sans);
  letter-spacing: 0.04em;
}

#site-title-text {
  background: linear-gradient(90deg, var(--accent), var(--link));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-title-home:hover {
  opacity: 0.85;
}

.site-title-home.is-settled .site-title-caret {
  display: none;
}

.site-title-caret {
  display: inline-block;
  width: 0.55ch;
  height: 0.85em;
  margin-left: 0.12em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: site-title-caret 1s steps(1) infinite;
}

@keyframes site-title-caret {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-title-caret {
    animation: none;
  }
}

.header nav,
html.dark .header nav,
.footer,
html.dark .footer {
  border-color: var(--line);
}

.header nav a,
.header nav.social a,
.footer,
.footer a {
  color: var(--fg);
}

.header nav.social a:hover,
.header nav a:hover,
.footer a:hover {
  color: var(--accent);
}

.header .avatar img {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.35);
}

.post,
.recent-posts .posts .post {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.post-header .meta .date .day,
.post-header .meta .date .rest,
code,
pre,
.footer,
.post .tags a {
  font-family: var(--mono);
}

.post-header .meta .date .day {
  line-height: 1;
  margin-bottom: 0.35rem;
  color: var(--accent);
}

.post-header .meta .date .rest,
.section .section-header,
.post .title.small.smaller {
  color: var(--muted);
}

.post .tags a,
.tags a,
html.dark .post-tags .tags a,
html.dark .post .tags a {
  border-color: var(--link);
  color: var(--link);
  background: rgba(139, 124, 255, 0.1);
}

.post .draft-label {
  color: var(--bg);
  background: var(--link);
}

code:not(pre *),
html.dark code:not(pre *) {
  color: var(--accent);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.highlight,
html.dark .highlight {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
}

td pre code,
html.dark td pre code {
  color: inherit;
}

table th,
table td {
  border-color: var(--line);
}

table th {
  background: #121833;
  color: var(--accent);
}

table tbody tr:nth-of-type(even),
html.dark table tbody tr:nth-of-type(even) {
  background: rgba(126, 231, 255, 0.05);
}

.section-nav li.active > a,
html.dark .section-nav li.active > a {
  color: var(--accent);
}

.cv-lang-btn,
.cv-download-btn,
.cv-lang-btn.active {
  font-family: var(--mono);
}

.cv-lang-btn.active {
  text-decoration-color: var(--accent);
}

@media (max-width: 768px) {
  body,
  html.dark body {
    background-attachment: scroll;
  }

  .container,
  .container-wide {
    padding: 1rem;
  }
}
