/* ======================================================
   VARIABLES
====================================================== */

:root {
    --bg: #0b1529;
    --bgSoft: #1f3050;

    /*--text: #dee4eb;*/
    --text: #ffffff;
    --textSoft: #cbd2d9;

    --accent: #f59e0b;

    --surface: #16233f;
    --border: #2c3e63;
}

/* ======================================================
   BASE
====================================================== */

* {
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: sans-serif;
}

@font-face {
    font-family: '';
    src: url(/static/fonts/) format('woff2');
    font-weight: normal;
    font-style: normal;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

/* ======================================================
   LAYOUT
====================================================== */

.container {
    max-width: 850px;
    margin: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ======================================================
   HEADER
====================================================== */

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 20px;
    padding-bottom: 50px;
    position: relative;  
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.logo img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.links ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding-left: 10px;
    list-style: none;
    margin: 0;
}

/* ======================================================
   PAGE SECTIONS
====================================================== */

.homepage,
.single {
    margin: 0 20px;
}

.list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 20px;
    margin-top: 2.5rem;
}

.listItem {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 0.4rem;
    color: var(--accentSoft);
}

.listItem:not(:last-child) {
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.footer {
    margin: 20px;
    padding-top: 50px;
    margin-top: auto;
}

/* ===============================
   Obsidian-style Markdown Tasks
   =============================== */

li:has(input[type="checkbox"]) {
  list-style: none;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  display: inline-grid;
  place-content: center;
  margin-right: 0.5rem;
  background-color: transparent;
  cursor: default;
  vertical-align: middle;
  transition: background-color 120ms ease-in-out,
              border-color 120ms ease-in-out;
}

input[type="checkbox"]::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  transform: scale(0);
  transition: transform 120ms ease-in-out;
  box-shadow: inset 1em 1em white;
  clip-path: polygon(
    14% 44%, 
    0 65%, 
    50% 100%, 
    100% 16%, 
    80% 0%, 
    43% 62%
  );
}

input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

li:has(input[type="checkbox"]:checked) {
  opacity: 0.6;
}

li input[type="checkbox"] {
  position: relative;
  top: -1px;
}

/* ======================================================
   CONTENT
====================================================== */

.content {
    line-height: 1.75;
    font-size: 1rem;
}

.content a {
    color: var(--text);            
    text-decoration: underline; 
    text-underline-offset: 2px; 
    transition: color 0.2s ease;
}

.content a:hover {
    color: var(--accent);
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.content h2 {
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
    color: var(--accentSoft);
}

.content p {
    margin: 1.25rem 0;
}

.content li {
    margin: 0.5rem -0.6rem;
}

.content blockquote {
    position: relative;
    background: var(--surface);
    padding: 0.6rem 1.25rem;   
    margin: 1rem 0;            
    color: var(--textSoft);
    border-radius: 8px;
    overflow: hidden;
}

.content blockquote::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent);
    border-radius: 8px 0 0 8px;
}

.content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

.content code {
    background: var(--surface);
    padding: 0.2em 0.45em;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--accentSoft);
}

.content pre {
    background: #0f1b33;
    color: #e6edf3;
    padding: 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.75rem 0;
    border: 1px solid var(--border);
}

.content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.content th,
.content td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.content th {
    background: var(--bgSoft);
    text-align: left;
    font-weight: 600;
    color: var(--accent);
}

.content tr:nth-child(even) {
    background: var(--surface);
}

.content strong {
    font-weight: 600;
    color: var(--text);
}

.content em {
    font-style: italic;
    color: var(--textSoft);
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1536px) {
    .container { max-width: 850px; }
}

@media (max-width: 1366px) {
    .container { max-width: 850px; }
}

@media (max-width: 1280px) {
    .container { max-width: 850px; }
}

@media (max-width: 1024px) {
    .container { max-width: 768px; }
}

@media (max-width: 768px) {
    .container { max-width: 640px; }
}

@media (max-width: 640px) {
    .container { max-width: 475px; }

    .logo { gap: 0.5rem; }

    .logo img {
        width: 48px;
        height: 48px;
    }
}