@view-transition {
  navigation: auto;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --blue: #1E90FF;
    --blue-dark: #0051c3;
    --dark: #333333;
    --dark-light: #888;
    --gray-light: #f2f2f2;
    --gray-border: #ddd;
    --white: #fffffc;
    --header-color: #fafafa;
    --common-font: system-ui, sans-serif;
    --second-font: 'IBM Plex Mono', monospace;
    --wide: 800px;
}
body.dark, body[data-theme="dark"]{
    --blue: #1E90FF;
    --blue-dark: #f969e8;
    --dark: #EAEDF3;
    --dark-light: #888;
    --gray-light: #343F60;
    --gray-border: #343F60;
    --white: #212737;
    --header-color: #1A1B26;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth
}
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 14px;
    line-height: 1.4;
    color: var(--dark);
    background: var(--white);
    height: auto;
    scroll-behavior: smooth;
    font-family: var(--common-font);
    transition: background var(--transition-fast), color var(--transition-fast);
}
ul {list-style: none}
p {padding: 10px 0;}
a {text-decoration: none;color: var(--blue)}
a:visited {color: var(--blue)}
img, video {
    max-width: 100%;
    height: auto;
    width: auto;
}
blockquote {
    padding: 0 15px;
    border-left: 5px solid var(--gray-border);
    margin: 0;
    line-height: 1.8;
    font-family: var(--second-font)
}
blockquote p {
    padding: 5px 0!important;
    font-size: 15px!important
}
blockquote,q {quotes: none}
blockquote:before,blockquote:after,q:before,q:after {
    content: none
}
.shrink-0 {
    flex-shrink: 0;
}
/* SIZES */
.wide {max-width: var(--wide); margin: 0 auto; width: 100%;padding: 0 10px;}

/* FLEXES */
.flex-horizontal {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
}
.flex-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* Header */
.header {
    height: 70px;
    width: 100%;
    display: flex;
    background-color: var(--header-color);
}
.header-block  {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header .logo-container a {
    display: block;
    height: 48px;
    margin: 0;
    width: 48px;
    background-image: url('/img/logo.webp');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    position: relative;
    border-radius: 5px;
    overflow: visible; /* Cambiado de hidden a visible para mostrar el mensaje pequeño trick */
}
.header .logo-container img
    {
        border-radius: 5px;
        display: flex;
    }

.header .logo-container a::before {
    content: 'Home';
    position: absolute;
    left: calc(100% + 10px); /* 10px a la derecha del logo para que ya sabes */
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    pointer-events: none;
}

.header .logo-container a:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    padding: 0 10px;
    transition: color 0.3s;
}
.nav a:hover {
    color: var(--blue);
    transition: ease-in-out 0.3s;
}
#theme-toggle {
  color: var(--text-color);
  text-decoration: none;
  font-family: var(--common-font);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.3s, text-shadow 0.3s, transform 0.2s;
}

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-direction: row;
}
.main {
    display: flex;
    flex-direction: column;
    z-index: 1;
    position: relative;
    border-radius: 5px;
    padding: 20px 0;
    gap: 25px;
}

/* Descripcion en el Index*/
.description {
    font-family: var(--second-font);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.description a {
    font-weight: 700;
    border-bottom: 1px dashed var(--blue);
    color: var(--blue-dark);
}
.post-content {
    font-family: var(--second-font);
    font-weight: 400;
    color: var(--dark);
}
.post-content p {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.2px;
}
.section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
}
.section-title a {
    font-weight: 500;
    color: var(--dark);
    font-size: 16px;
}
.list {
    width: 100%;
}
.list .date {
    width: 150px;
    text-transform: uppercase;
}
.list ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px 0;
}
.list ul li {
    font-size: 16px;
    line-height: 1.4;
    border-top: 1px solid var(--gray-border);
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.list ul li a {
    font-weight: 500;
    color: var(--dark);
}
.list ul li a:hover {
    color: var(--blue-dark);
    transition: ease-in-out 0.3s;
}
/* Footer */
.footer {
    background-color: var(--header-color);
    color: var(--text-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}
.footer a {
    color: var(--dark);
}
.footer .social {
    display: flex;
    flex-direction: row;
    gap: 15px;
}
.footer .social a:hover {
    color: var(--blue);
    transition: ease-in-out 0.3s;
}
/* Archive */
.archive {
    padding-top: 20px;
    padding-bottom: 20px;
}
.archive h1 {
    background: var(--gray-light);
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    font-size: 18px;
    justify-content: center;
    margin: 0 0 20px;
}
/* Main */
.main-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.main-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .5));
    z-index: 2;
}
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 1;
}
.message {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.message .sub {
    background-color: white;
    color: black;
    padding: 8px 15px; 
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 13px;
}
.message h1 {
    color: white;
    text-align: center;
    font-size: 38px;
    line-height: 46px;
    line-height: 1.5;
    text-shadow: 5px 5px 5px BLACK;
}

/* Post */
.post {
    display: flex; 
    flex-direction: column;
    gap: 20px;
    padding-top: 30px;
    padding-bottom: 30px;
}
.post header {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.post header .flex-horizontal {
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-border);
    padding: 15px 0;
    margin: 0;
}
.post h1, .post h2, .post h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--dark);
}
.post h1 {
    font-size: 36px;
    line-height: 1.3;
}
.post .post-excerpt {
    font-size: 20px;
    line-height: 1.4;
    color: var(--dark-light);
    font-weight: 500;
    padding: 10px 0 0;
}
.post h2 {
    font-size: 26px;
    line-height: 1.3;
    padding: 10px 0;
}
.post h3 {
    font-size: 22px;
    line-height: 1.3;
    padding: 10px 0;
}
.post h1 {
    font-size: 36px;
    line-height: 1.3;
}   
.post-date {
    font-size: 14px;
    color: var(--dark);
    text-transform: uppercase;
    font-weight: 500;
}
.post a {
    font-weight: 600;
    border-bottom: 1px dashed var(--blue-dark);
    color: var(--blue-dark);
}
.post-tags {
    text-transform: uppercase;
    padding: 0 0 10px;
    display: flex;
    gap: 10px;
}
.post-tags a {
    border: 0;
    background-color: var(--gray-light);
    border-radius: 5px;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
}
.post-figure {
    margin: 15px 0;
    padding: 0;
    text-align: center;
}
.post-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
    font-style: italic;
}
.post ul, ol {
    margin-bottom: 1.5em; 
    padding-left: 20px; 
    font-size: 16px;
}
.post li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}
.post ul ul, ol ol {
    margin-top: 0.5em;
    margin-bottom: 0;
}
.post ul {
    list-style-type: none;
    padding-left: 1.5em;
}
.post ul li {
    position: relative; 
}
.post ul li::before {
    content: "•";
    color: var(--color-secondary, #007bff);
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}
.post ol {
    list-style-type: decimal;
    padding-left: 1.5em;
}
.post ol li {
    padding-left: 0.3em;
}
code {
    background-color: var(--gray-border);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}
/* Video FIX - Esto si es copiado lo admito -*/
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 10px 0;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.share-block {
    position: relative;
    display: inline-block;
}
.share-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
.share-btn:hover {
    background-color: color-mix(in srgb, black 30%, var(--blue));;
    transition: background-color 0.4s;
}
.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    padding: 10px 15px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-width: 180px;
    z-index: 10;
}
.share-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    color: var(--dark);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px dashed var(--gray-border);
    transition: color 0.2s;
}
.share-dropdown a:last-of-type {
    border-bottom: none;
}
.share-dropdown a:hover {
    color: var(--blue);
}
.hidden {
    display: none;
}

/* Notes List */
.list-post {
    width: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--second-font);
}
.list-post-single {
    border-top: 1px solid var(--gray-border);
    padding: 15px 0;
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
}
.list-post-single:first-of-type {
    border-top: none;
}
.list-post .list-thumb {
    width: 350px;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    overflow: hidden;
}
.list-post .title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
    width: 100%;
}
.list-post .title a {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--common-font);
    color: var(--dark);
}
.hate {
    padding: 20px 0;
    border-top: 1px solid var(--gray-border);
    list-style: none;
    line-height: 1.7;
}

/* Particle Styles */
.particle-wrapper {
    position: absolute;
    z-index: 2;
}
.particle {
    width: 10px;
    height: 10px;
    background-color: #B8DFF0;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    animation-name: animateParticle;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    transform-origin: center center;
}
@keyframes animateParticle {
    0% {
        transform: translate(var(--tx-start, 0px), var(--ty-start, 0px)) scale(0.4);
        opacity: 0;
    }
    15% {
        transform: translate(
            calc(var(--tx-start, 0px) + var(--tx-end) * 0.15),
            calc(var(--ty-start, 0px) + var(--ty-end) * 0.15)
        ) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(
            calc(var(--tx-start, 0px) + var(--tx-end) * 0.85),
            calc(var(--ty-start, 0px) + var(--ty-end) * 0.85)
        ) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx-end), var(--ty-end)) scale(0.4);
        opacity: 0;
    }
}

/* Media Queries */
@media screen and (max-width: 800px){
  .main-container {
    height: 220px;
  }
  .message h1 {
    font-size: 30px;
    line-height: 38px;
    line-height: 1.5;
    }
}
@media screen and (max-width: 600px) {
    .description,
    .post-content p {
        font-size: 16px;
    }
    .list ul li {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
    }
    .footer .flex-horizontal {
    display: flex;
    flex-direction: column-reverse;
    text-align: center;
    }
    .post h1 {
    font-size: 32px;
    line-height: 1.2;
    }
    .post h2 {
    font-size: 22px;
    line-height: 1.2;
    }
    .list-post-single {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    }
    .list-post .list-thumb {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    overflow: hidden;
    }
}