@font-face {
    font-family: "Tiempos";
    src: url("../fonts/StyreneBLC-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Tiempos";
    src: url("../fonts/TiemposText-Medium.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Copernicus";
    src: url("../fonts/Copernicus-Book.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
}

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

:root {
    /* Dark mode (default) */
    --bg-000: hsl(60, 2.1%, 18.4%);
    --bg-100: hsl(60, 2.7%, 14.5%);
    --bg-200: hsl(30, 3.3%, 11.8%);
    --bg-300: hsl(60, 2.6%, 7.6%);
    --bg-400: hsl(60, 3.4%, 5.7%);
    --text-000: hsl(48, 33.3%, 97.1%);
    --text-100: hsl(48, 33.3%, 97.1%);
    --text-200: hsl(50, 9%, 73.7%);
    --text-300: hsl(50, 9%, 73.7%);
    --text-400: hsl(48, 4.8%, 59.2%);
    --accent-main: #d5a3ac;
    --accent-main-hover: #c8919c;
    --border-100: hsla(51, 16.5%, 84.5%, 0.1);
    --blog-purple: #a855f7;
    --header-bg: #000;
}

html.light {
    /* Light mode */
    --bg-000: hsl(48, 33.3%, 97.1%);
    --bg-100: hsl(48, 33.3%, 97.1%);
    --bg-200: hsl(50, 9%, 93%);
    --bg-300: hsl(50, 9%, 88%);
    --bg-400: hsl(48, 33.3%, 100%);
    --text-000: hsl(60, 3.4%, 5.7%);
    --text-100: hsl(60, 3.4%, 5.7%);
    --text-200: hsl(60, 2.6%, 15%);
    --text-300: hsl(60, 2.6%, 15%);
    --text-400: hsl(60, 2.1%, 35%);
    --accent-main: #d5a3ac;
    --accent-main-hover: #c8919c;
    --border-100: hsla(51, 16.5%, 84.5%, 0.3);
    --blog-purple: #9333ea;
    --header-bg: #fff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-400);
    color: var(--text-200);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-100);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s, border-color 0.3s;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-000);
    font-family: "Tiempos", serif;
    text-decoration: none;
}

.logo-icon {
    color: #d5a3ac;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    display: inline-block;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-000);
}

nav a.active {
    color: var(--text-000);
    border-bottom: 2px solid var(--accent-main);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border-100);
    background: transparent;
    color: var(--text-400);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--text-000);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-400);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Blog List Styles */
.blog-list-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.blog-list-title {
    font-family: "Tiempos", serif;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-000);
    text-align: center;
}

.blog-list {
    list-style: none;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9375rem;
    line-height: 2;
}

.blog-item {
    display: grid;
    grid-template-columns: 120px 1fr 80px;
    gap: 2rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-100);
    transition: background-color 0.2s;
}

.blog-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.blog-date {
    color: var(--text-400);
    font-size: 0.875rem;
}

.blog-title {
    color: var(--text-200);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s, color 0.2s;
}

.blog-title:hover {
    text-decoration-color: var(--text-200);
    color: var(--text-000);
}

.blog-type {
    text-align: right;
    font-size: 0.875rem;
}

.blog-type.note {
    color: var(--text-300);
}

.blog-type.blog {
    color: var(--text-300);
}

/* Blog Post Styles */
.blog-post {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
    box-sizing: border-box;
}

.blog-post h1,
.blog-post h2,
.blog-post h3,
.blog-post p,
.blog-post ul,
.blog-post ol,
.blog-post li {
    max-width: 100%;
    box-sizing: border-box;
}

/* Certification Image */
.certification-image-container {
    margin: 2rem 0;
    display: flex;
    justify-content: flex-start;
}

.certification-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    border: 1px solid var(--border-100);
    transition: max-width 0.3s ease;
}

/* When sidebar is collapsed, make image larger */
.blog-post-container.sidebar-collapsed .certification-image {
    max-width: 500px;
}

/* Heading with Timeline */
.heading-with-timeline {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.heading-with-timeline h3 {
    margin: 0;
    flex-shrink: 0;
}

/* Horizontal Timeline */
.timeline-horizontal {
    position: relative;
    width: 400px;
    height: 80px;
    flex-shrink: 1;
}

.timeline-line-svg {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px;
    transform: translateY(-50%);
    pointer-events: none;
}

.timeline-event {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-date {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent-main);
    margin-bottom: 0.375rem;
    white-space: nowrap;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-main);
    border: 2px solid var(--bg-400);
    box-shadow: 0 0 0 2px var(--accent-main);
    transition: all 0.2s ease;
    margin-bottom: 0.375rem;
}

.timeline-event:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 3px var(--accent-main);
}

.timeline-description {
    font-family: "Tiempos", serif;
    font-size: 0.6875rem;
    color: var(--text-300);
    text-align: center;
    max-width: 100px;
    line-height: 1.3;
}

@media (max-width: 968px) {
    .heading-with-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .timeline-horizontal {
        width: 100%;
        max-width: 400px;
    }

    .timeline-description {
        font-size: 0.625rem;
        max-width: 90px;
    }
}

.blog-post-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: grid;
    grid-template-columns: 250px 1fr 200px;
    gap: 3rem;
    transition: grid-template-columns 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.blog-post-container.sidebar-collapsed {
    grid-template-columns: 50px 1fr 200px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    transition: width 0.3s ease;
    width: 250px;
}

.sidebar-toggle {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border-100);
    background: transparent;
    color: var(--text-400);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
    padding: 0;
}

.sidebar-toggle:hover {
    color: var(--text-000);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-400);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
}

.sidebar-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 50px;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    max-height: 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-000);
    margin-bottom: 0.75rem;
    transition: opacity 0.3s ease;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-400);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-000);
}

.sidebar-link.active {
    background-color: var(--bg-200);
    color: var(--text-000);
}

/* Table of Contents */
.toc {
    position: sticky;
    top: 120px;
    height: fit-content;
    padding-bottom: 6rem;
    margin-bottom: 2rem;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-400);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.375rem 0;
    color: var(--text-400);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
    line-height: 1.4;
}

.toc-link.toc-h3 {
    padding-left: 1rem;
}

.toc-link:hover {
    color: var(--text-000);
}

.breadcrumb {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-400);
    margin-bottom: 1rem;
}

h1 {
    font-family: "Copernicus", serif;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-000);
    line-height: 1.2;
}

.subtitle {
    font-family: "Tiempos", serif;
    font-size: 1.125rem;
    color: var(--text-300);
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-000);
    font-family: "Copernicus", serif;
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-100);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-000);
    font-family: "Tiempos", serif;
}

p {
    font-family: "Tiempos", serif;
    margin-bottom: 1.25rem;
    color: var(--text-300);
    line-height: 1.7;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.blog-post ul,
.blog-post ol {
    font-family: "Tiempos", serif;
    margin-bottom: 1.25rem;
    padding-left: 2rem;
    color: var(--text-300);
    line-height: 1.7;
}

.blog-post ul.no-bullets {
    list-style: none;
    padding-left: 0;
}

.blog-post li {
    font-family: "Tiempos", serif;
    color: var(--text-300);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.blog-post a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--text-300);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.blog-post a:hover {
    color: var(--accent-main);
    text-decoration-color: var(--accent-main);
}

.blog-post a.module-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--text-300);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.blog-post a.module-link:hover {
    color: var(--accent-main);
    text-decoration-color: var(--accent-main);
}

/* Custom Icons */
.icon-tick,
.icon-cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    vertical-align: -0.1em;
    flex-shrink: 0;
}

.icon-tick svg,
.icon-cross svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-main);
}

/* Tables */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    table-layout: auto;
    font-family: "Tiempos", serif;
    border: 1px solid var(--accent-main);
    border-radius: 0.5rem;
    overflow: hidden;
}

table th,
table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(213, 163, 172, 0.3);
    color: var(--text-300);
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: "Tiempos", serif;
}

table td code,
table th code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

table th {
    font-weight: 600;
    color: var(--text-000);
    font-family: "Tiempos", serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tr:last-child td {
    border-bottom: none;
}

/* Code Block */
.code-block {
    background-color: var(--bg-300);
    border: 1px solid var(--border-100);
    border-radius: 1rem;
    padding: 0.875rem 1rem;
    margin: 1.5rem 0;
    position: relative;
    overflow-x: auto;
    transition: background-color 0.3s, border-color 0.3s;
}

.code-header {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    display: flex;
    gap: 0.375rem;
    z-index: 10;
}

.code-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: var(--text-400);
    cursor: pointer;
    transition: color 0.2s;
}

.code-btn:hover {
    color: var(--text-200);
}

.code-content {
    padding-right: 4rem;
}

code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-100);
}

.inline-code {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875em;
    color: var(--text-100);
}

html.light .inline-code {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Callout */
.callout {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid;
    margin: 1.5rem 0;
}

.callout.tip {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.callout.warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.callout.promotion {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}

.callout-icon {
    flex-shrink: 0;
    width: 1rem;
    margin-top: 0.125rem;
}

.callout-content {
    font-size: 0.875rem;
    color: var(--text-200);
}

.callout-content a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--text-300);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.callout-content a:hover {
    color: var(--accent-main);
    text-decoration-color: var(--accent-main);
}

/* Article Meta */
.article-meta {
    color: var(--text-400);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-family: sans-serif;
}

/* Avatar */
.avatar-container {
    margin: 1.5rem 0 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.avatar {
    width: 120px;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}

.avatar-container p {
    margin: 0;
    flex: 1;
}

/* Job Experience */
.job-experience {
    margin: 2rem 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.job-entry {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.job-entry::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-400);
}

.job-title {
    color: var(--text-200);
    margin-bottom: 0.5rem;
    display: block;
}

.company-name {
    color: var(--accent-main);
    font-weight: 500;
}

.job-period {
    color: var(--text-400);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* Certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.certification-card {
    border: 1px dashed var(--border-100);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.2s;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.certification-card:hover {
    border-color: var(--accent-main);
    background-color: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

.cert-acronym {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-000);
    letter-spacing: 0.05em;
}

.cert-name {
    font-size: 0.875rem;
    color: var(--text-200);
    line-height: 1.4;
    font-family: "Tiempos", serif;
}

.cert-issuer {
    font-size: 0.75rem;
    color: var(--text-400);
    margin-top: auto;
    font-family: sans-serif;
}

/* Education */
.education-section {
    margin: 2rem 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.education-entry {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.education-entry::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-400);
}

.education-degree {
    color: var(--text-200);
    margin-bottom: 0.5rem;
    display: block;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.education-institution {
    color: var(--text-400);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Responsive */
@media (max-width: 1200px) {
    .blog-post-container {
        grid-template-columns: 250px 1fr;
    }
    .blog-post-container.sidebar-collapsed {
        grid-template-columns: 50px 1fr;
    }
    .toc {
        display: none;
    }
}

@media (max-width: 968px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .blog-list-page {
        padding: 2rem 1.5rem;
    }

    .blog-post-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }

    .sidebar {
        position: static;
        width: 100% !important;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar.collapsed {
        width: 100% !important;
    }

    .sidebar.collapsed .sidebar-content {
        display: block;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }

    h1 {
        font-size: 2rem;
    }

    .blog-list-title {
        font-size: 2rem;
    }

    .blog-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .blog-type {
        text-align: left;
    }
}

@media (max-width: 640px) {
    header {
        padding: 0.75rem 1rem;
    }

    nav {
        gap: 1rem;
    }

    nav a {
        font-size: 0.8125rem;
    }
}

