@font-face {
    font-family: 'RobotoMono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/roboto-mono-v13-latin-regular.eot');
    src: local(''),
         url('/fonts/roboto-mono-v13-latin-regular.woff2') format('woff2'),
         url('/fonts/roboto-mono-v13-latin-regular.woff') format('woff'),
         url('/fonts/roboto-mono-v13-latin-regular.ttf') format('truetype'),
         url('/fonts/roboto-mono-v13-latin-regular.svg#RobotoMono') format('svg'),
         url('/fonts/roboto-mono-v13-latin-regular.eot?#iefix') format('embedded-opentype');
}
  
@font-face {
    font-family: 'RobotoMonoBold';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/roboto-mono-v13-latin-700.eot');
    src: local(''),
         url('/fonts/roboto-mono-v13-latin-700.woff2') format('woff2'),
         url('/fonts/roboto-mono-v13-latin-700.woff') format('woff'),
         url('/fonts/roboto-mono-v13-latin-700.ttf') format('truetype'),
         url('/fonts/roboto-mono-v13-latin-700.svg#RobotoMono') format('svg'),
         url('/fonts/roboto-mono-v13-latin-700.eot?#iefix') format('embedded-opentype');
}

:root {
    --light-bg: rgb(241, 238, 238);
    --accent-light: #202020;
    --link-light: #202020;
    --title-light: black;
    --subtitle-light: #3f3f3f;
    
    --dark-bg: rgb(24, 24, 24);
    --accent-dark: rgb(245, 245, 245);
    --link-dark: rgb(245,245,245);
    --title-dark: rgb(245, 245, 245);
    --subtitle-dark: #cfcfcf;
    --code-bg-color: black;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    
    --bg-color: var(--light-bg);
    --accent-color: var(--accent-light);
    --link-color: var(--link-light);
    --title-color: var(--title-light);
    --subtitle-color: var(--subtitle-light);
}

html:not(.style-scoped)[dark] {
    --bg-color: var(--dark-bg);
    --accent-color: var(--accent-dark);
    --link-color: var(--link-dark);
    --title-color: var(--title-dark);
    --subtitle-color: var(--subtitle-dark);
}

html, body {
    background-color: var(--bg-color);
    max-width: 100% !important;
    overflow-x: hidden !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    color: var(--title-color); 
}

.nav-bar {
    width: 60%;
    max-width: 800px;
    text-align: center;
    margin: 20px auto 10px auto;
}

.nav-bar nav {
    display: block; 
    margin-top: 10px;
}

.nav-bar nav a {
    font-family: 'RobotoMonoBold';
}

.nav-bar a:link, .nav-bar a:visited {
    text-decoration: none;
}

.nav-bar a {
    font-size: large;
    margin: 5px 10px;
    color: var(--title-color);
    display: inline-block;
    transition: opacity 0.2s ease;
}

.nav-bar a:hover {
    opacity: 0.7;
}

.nav-bar .posts-link {
    display: inline-block;
    font-size: medium;
    font-family: 'RobotoMonoBold';
    margin: 5px 10px;
}

.site-title {
    display: inline-block;
    font-size: large;
    font-family: 'RobotoMonoBold';
    color: var(--title-color);
    vertical-align: middle;
}

.site-title::after {
    content: "";
    display: inline-block;
    width: 9px;
    height: 20px;
    margin-bottom: -2px;
    margin-left: 5px;
    background-color: var(--accent-color);
    animation: blinker 1s ease-in-out infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.btn,
a[title="All posts"] {
    position: relative;      /* ВАЖНО: чтобы блик позиционировался относительно кнопки */
    overflow: hidden;        /* ВАЖНО: чтобы блик не выходил за границы кнопки */
    display: inline-block;
    padding: 6px 16px;                 
    border: 1px solid var(--accent-color);
    border-radius: 6px;                
    background-color: transparent;
    color: var(--title-color) !important;
    text-decoration: none !important;
    cursor: pointer;
    font-family: 'RobotoMonoBold';
    font-size: medium;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin: 10px 25px 40px 25px !important;
}

/* Исправлен hover для ссылки */
.btn:hover, 
a[title="All posts"]:hover {
    background-color: var(--title-color);
    color: var(--bg-color) !important; 
}

/* 2. Создаем сам блик (перелив) */
.btn::after,
a[title="All posts"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;            
    width: 50%;           
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    transform: skewX(-25deg);
    animation: shimmer 1.5s infinite; 
}

/* 3. Анимация движения блика */
@keyframes shimmer {
    0% { left: -100%; }      /* Старт слева за кадром */
    40% { left: 200%; }      /* Быстро пробегает вправо за кадр */
    100% { left: 200%; }     /* Оставшееся время (80%) ждет за кадром (создает паузу между переливами) */
}

/* --- Стили для кнопок с SVG (без изменений, кроме отключения блика) --- */

.btn:has(svg) {
    border: none !important; 
    padding: 0 !important;
    background-color: transparent !important; 
    margin: 15px 30px;
}

/* Отключаем блик для кнопок-иконок, чтобы он не перекрывал SVG */
.btn:has(svg)::after {
    display: none;
}

.btn:has(svg):hover {
    background-color: transparent !important;
    opacity: 0.6;                      
}

.btn svg {
    position: static;
    display: block;
    color: var(--title-color);
}

.hero {
    padding: 10px;
    font-family: 'RobotoMono';
    text-align: center;
    font-size: medium;
    margin: 10px auto 25px auto;
}

.hero .hero-title { 
    font-family: 'RobotoMonoBold'; 
    font-size: large; 
}

.hero img { 
    width: 15%; 
    min-width: 120px; 
    height: auto;
    border-radius: 10px; 
    object-fit: cover;
}

.posts {
    width: 60%;
    max-width: 800px;
    padding: 2px;
    font-family: 'RobotoMonoBold';
    font-size: large;
    margin: 0 auto;
    text-align: center; 
}

/* .posts a:link, .posts a:visited { text-decoration: none; }
.posts p { color: var(--subtitle-color); }
.posts a { color: var(--title-color); transition: opacity 0.2s ease; }
.posts a:hover { opacity: 0.7; }

.posts .summary, .posts .summary-date, .posts #summary-date {
    font-family: 'RobotoMono';
    font-size: medium;
    margin: 5px 0;
}
.posts .summary-date, .posts #summary-date { font-size: small; }
*/

.posts a, 
.posts p,
.posts .summary, 
.posts .summary-date, 
.posts #summary-date {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 6px 0 !important; 
}

.posts a {
    font-family: 'RobotoMonoBold' !important;
    color: var(--title-color);
    transition: opacity 0.2s ease;
    display: inline-block;
}

.posts .summary, 
.posts .summary-date, 
.posts #summary-date {
    font-family: 'RobotoMono' !important;
    font-weight: 400 !important;
    color: var(--subtitle-color) !important; 
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.content {
    font-family: 'RobotoMono';
    width: 60%;        
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2px;
    text-align: left;  
}

.content h1 {
    font-family: 'RobotoMonoBold';
    text-align: center;
}

.content a { 
    color: var(--link-color); 
    text-decoration-line: underline;
    text-decoration-style: solid;
}
.content strong { font-weight: bolder; }

.content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto; 
    border-radius: 6px;
}

code, pre {
    overflow-x: auto;
    font-family: monospace;
    padding: 5px;
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 4;
    font-size: 15px;
}

hr.solid { border: 1px solid var(--subtitle-color); width: 100%; }
hr.nav-solid { border: 1px solid var(--accent-color); width: 100%; }

footer {
    font-family: 'RobotoMono';
    font-size: small;
    text-align: center;
    margin: 25px auto;
}

footer .media-links p { 
    margin: 10px; 
    display: inline; 
}

footer a:hover, footer a:visited, footer a { 
    text-decoration: none; 
    color: var(--title-color); 
    transition: opacity 0.2s ease;
}
footer a:hover { opacity: 0.7; }

@media screen and (min-width: 600px) and (max-width: 900px) {
    .posts #summary-date { display: none; }
    .content, .nav-bar, .posts { width: 80%; }
    .nav-bar .posts-link { display: none; }
    .hero img { width: 20%; }
}

@media screen and (min-width: 400px) and (max-width: 600px) {
    #publisheddate { display: none; }
    .posts #summary-date { display: block; }
    .content, .nav-bar, .posts { width: 90%; font-size: small; }
    code, pre { font-size: medium; }
    .site-title { font-size: medium; }
    .posts p { margin: 5px; }
    .nav-bar a { margin: 5px 10px; }
    .nav-bar nav { display: none; }
    .nav-bar .posts-link { display: inline-block; }
    .hero img { width: 35%; }
}

@media screen and (max-width: 400px) {
    #publisheddate { display: none; }
    .posts #summary-date { display: block; }
    .nav-bar nav { display: none; }
    .site-title { font-size: 15px; }
    .nav-bar a { margin: 5px; } 
    .content, .nav-bar, .posts { width: 95%; font-size: small; }
    code, pre { font-size: small; } 
    .nav-bar .posts-link { display: inline-block; }
    .hero img { width: 45%; } 
}

