:root {
    --dark-bg: rgba(25, 25, 25, 255);
    --light-text: #D4DDD8;
    --accent: #d67933;
    --accent-hover: #e88a3f;
    --secondary: rgba(255, 255, 255, 0.1);
    --secondary-hover: rgba(255, 255, 255, 0.2);;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-in {
    animation: fadeIn ease 0.8s;
}

/* Global Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout Components */
header {
    background: linear-gradient(180deg, rgb(17, 17, 17) 50%, transparent 100%);
    padding: 20px 0;
    word-spacing: 20px;
    text-align: center;
    width: 100%;
}

main {
    text-align: center;
    flex: 1;
}

footer {
    background: linear-gradient(0deg, rgb(17, 17, 17) 50%, transparent 100%);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
}

/* Typography */
h1, h2, h3 {
    font-weight: bold;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 10px;
}

a {
    color: var(--light-text);
    text-decoration: underline;
    font-size: 1.1em;
    transition: color 0.3s;
}

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

.accent-color {
    color: var(--accent);
}

hr {
    margin: 30px 0;
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, #CCC, transparent);
}

/* Article Styles */
article {
    text-align: left;
    margin: 0 auto;
    max-width: 68%;
    padding: 0 2rem;
    flex: 1;
}

article img {
    display: block;
    margin: 2rem auto;
    max-width: 100%;
    height: auto;
}

.article-title {
    text-align: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0.75)), url('../assets/images/hero.gif');
    background-position: bottom;
    background-size: cover;
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 60%;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    font-size: 2.5em;
    margin: 0;
}

.hero-subtitle {
    color: var(--accent);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.hero-description {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-button, .secondary-button {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.primary-button {
    background: var(--accent);
    color: white;
}

.secondary-button {
    background: var(--secondary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-button:hover, .secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: var(--accent-hover);
    color: white;
}

.secondary-button:hover {
    background: var(--secondary-hover);
}

/* Card Styles */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 15px;
}

.card {
    width: 300px;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-content {
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.card-content h3 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
}

.card-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* Contact and Social Sections */
.contact-section {
    max-width: 60%;
    margin: 3rem auto;
    padding: 0 2rem;
}

.connect-section {
    max-width: 40%;
    margin: 3rem auto;
    padding: 0 2rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-method {
    margin: 1.5rem 0;
    text-align: center;
}

.contact-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: #888;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-section {
    margin-top: 2rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-card img {
    width: 20px;
    height: 20px;
}

.social-card span {
    font-size: 1.0rem;
}

/* Search Bar */
.search-container {
    margin: 1.5rem auto;
    max-width: 500px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.search-container input {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light-text);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-container input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.search-container input::placeholder {
    color: #888;
}

/* CV Links Styling */
.cv-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.cv-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 138, 76, 0.1);
    border: 1px solid rgba(255, 138, 76, 0.3);
    border-radius: 6px;
    color: #ff8a4c;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.cv-link:hover {
    background: rgba(255, 138, 76, 0.2);
    border-color: #ff8a4c;
    transform: translateY(-1px);
}

.cv-link .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Utility Classes */
.tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    display: inline-block;
    background-color: var(--secondary);
    padding: 0.35rem 0.7rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--light-text);
    transition: all 0.2s ease;
}
.tag:hover {
    background-color: var(--accent-hover);
}
a.tag {
    color: var(--accent);
}
a.tag:hover {
    color: var(--light-text);
    transform: translateY(-2px);
}

/* Back to Top Button */
#back-to-top-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

#back-to-top-btn:hover {
    background-color: var(--secondary-hover);
    color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Blog Preview Cards */
.blog-preview-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-preview-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content {
        max-width: 90%;
    }
    
    article {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero-description {
        font-size: 1rem;
    }

    .card {
        width: 100%;
        max-width: 300px;
    }

    /* Fix social grid on mobile */
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Fix contact sections on mobile */
    .contact-section, .connect-section {
        max-width: 95%;
        padding: 0 1rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    .cv-links {
        gap: 0.5rem;
    }
    
    .cv-link {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Fix article width on mobile */
    article {
        max-width: 95%;
        padding: 0 1rem;
    }

    /* Fix search bar on mobile */
    .search-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    /* Fix CV layout on mobile */
    .cv-section {
        max-width: 95%;
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .cv-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cv-sidebar {
        padding: 1.5rem;
        width: 100%;
    }

    .cv-main {
        width: 100%;
    }

    .cv-portrait img {
        width: 150px;
        height: 150px;
    }

    .cv-skill-tags {
        gap: 0.4rem;
    }

    .cv-contact-details {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    /* Further reduce contact section padding on very small screens */
    .contact-section, .connect-section {
        max-width: 100%;
        padding: 0 0.75rem;
    }

    .contact-info {
        padding: 1rem;
    }

    /* Ensure article fits on small screens */
    article {
        max-width: 100%;
        padding: 0 0.75rem;
    }
}

/* Markdown extenstions */
/* TOC */
.toctitle {
    font-weight: bold;
    margin-bottom: 10px;
    color: #D4DDD8;  /* Light text color */
}

/* CodeHilite */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.codehilite .hll { background-color: #ebdbb2 }
.codehilite { background: #282828; color: #dddddd }
.codehilite .c { color: #928374; font-style: italic } /* Comment */
.codehilite .err { color: #282828; background-color: #fb4934 } /* Error */
.codehilite .esc { color: #dddddd } /* Escape */
.codehilite .g { color: #dddddd } /* Generic */
.codehilite .k { color: #fb4934 } /* Keyword */
.codehilite .l { color: #dddddd } /* Literal */
.codehilite .n { color: #dddddd } /* Name */
.codehilite .o { color: #dddddd } /* Operator */
.codehilite .x { color: #dddddd } /* Other */
.codehilite .p { color: #dddddd } /* Punctuation */
.codehilite .ch { color: #928374; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #928374; font-style: italic } /* Comment.Multiline */
.codehilite .c-PreProc { color: #8ec07c; font-style: italic } /* Comment.PreProc */
.codehilite .cp { color: #928374; font-style: italic } /* Comment.Preproc */
.codehilite .cpf { color: #928374; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #928374; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #ebdbb2; font-weight: bold; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #282828; background-color: #fb4934 } /* Generic.Deleted */
.codehilite .ge { color: #dddddd; font-style: italic } /* Generic.Emph */
.codehilite .ges { color: #dddddd; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.codehilite .gr { color: #fb4934 } /* Generic.Error */
.codehilite .gh { color: #ebdbb2; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #282828; background-color: #b8bb26 } /* Generic.Inserted */
.codehilite .go { color: #f2e5bc } /* Generic.Output */
.codehilite .gp { color: #a89984 } /* Generic.Prompt */
.codehilite .gs { color: #dddddd; font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #ebdbb2; text-decoration: underline } /* Generic.Subheading */
.codehilite .gt { color: #fb4934 } /* Generic.Traceback */
.codehilite .kc { color: #fb4934 } /* Keyword.Constant */
.codehilite .kd { color: #fb4934 } /* Keyword.Declaration */
.codehilite .kn { color: #fb4934 } /* Keyword.Namespace */
.codehilite .kp { color: #fb4934 } /* Keyword.Pseudo */
.codehilite .kr { color: #fb4934 } /* Keyword.Reserved */
.codehilite .kt { color: #fb4934 } /* Keyword.Type */
.codehilite .ld { color: #dddddd } /* Literal.Date */
.codehilite .m { color: #d3869b } /* Literal.Number */
.codehilite .s { color: #b8bb26 } /* Literal.String */
.codehilite .na { color: #fabd2f } /* Name.Attribute */
.codehilite .nb { color: #fe8019 } /* Name.Builtin */
.codehilite .nc { color: #8ec07c } /* Name.Class */
.codehilite .no { color: #d3869b } /* Name.Constant */
.codehilite .nd { color: #fb4934 } /* Name.Decorator */
.codehilite .ni { color: #dddddd } /* Name.Entity */
.codehilite .ne { color: #fb4934 } /* Name.Exception */
.codehilite .nf { color: #8ec07c } /* Name.Function */
.codehilite .nl { color: #dddddd } /* Name.Label */
.codehilite .nn { color: #8ec07c } /* Name.Namespace */
.codehilite .nx { color: #dddddd } /* Name.Other */
.codehilite .py { color: #dddddd } /* Name.Property */
.codehilite .nt { color: #8ec07c } /* Name.Tag */
.codehilite .nv { color: #83a598 } /* Name.Variable */
.codehilite .ow { color: #fb4934 } /* Operator.Word */
.codehilite .pm { color: #dddddd } /* Punctuation.Marker */
.codehilite .w { color: #dddddd } /* Text.Whitespace */
.codehilite .mb { color: #d3869b } /* Literal.Number.Bin */
.codehilite .mf { color: #d3869b } /* Literal.Number.Float */
.codehilite .mh { color: #d3869b } /* Literal.Number.Hex */
.codehilite .mi { color: #d3869b } /* Literal.Number.Integer */
.codehilite .mo { color: #d3869b } /* Literal.Number.Oct */
.codehilite .sa { color: #b8bb26 } /* Literal.String.Affix */
.codehilite .sb { color: #b8bb26 } /* Literal.String.Backtick */
.codehilite .sc { color: #b8bb26 } /* Literal.String.Char */
.codehilite .dl { color: #b8bb26 } /* Literal.String.Delimiter */
.codehilite .sd { color: #b8bb26 } /* Literal.String.Doc */
.codehilite .s2 { color: #b8bb26 } /* Literal.String.Double */
.codehilite .se { color: #fe8019 } /* Literal.String.Escape */
.codehilite .sh { color: #b8bb26 } /* Literal.String.Heredoc */
.codehilite .si { color: #b8bb26 } /* Literal.String.Interpol */
.codehilite .sx { color: #b8bb26 } /* Literal.String.Other */
.codehilite .sr { color: #b8bb26 } /* Literal.String.Regex */
.codehilite .s1 { color: #b8bb26 } /* Literal.String.Single */
.codehilite .ss { color: #b8bb26 } /* Literal.String.Symbol */
.codehilite .bp { color: #fe8019 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #8ec07c } /* Name.Function.Magic */
.codehilite .vc { color: #83a598 } /* Name.Variable.Class */
.codehilite .vg { color: #83a598 } /* Name.Variable.Global */
.codehilite .vi { color: #83a598 } /* Name.Variable.Instance */
.codehilite .vm { color: #83a598 } /* Name.Variable.Magic */
.codehilite .il { color: #d3869b } /* Literal.Number.Integer.Long */

.codehilite {
    background: #282828;
    color: #dddddd;
    overflow-x: auto;
    border-radius: 8px;
    padding: 1rem;
}

.codehilite pre {
    line-height: 125%;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

article .codehilite {
    max-width: 100%;
    box-sizing: border-box;
}

/* Spoiler */
details.spoiler {
    margin: 1rem 0;
}

details.spoiler summary {
    cursor: pointer;
    color: var(--accent);
    text-decoration: underline;
    list-style: none;
    display: inline;
    font-size: inherit;
}

details.spoiler summary::-webkit-details-marker { display: none; }

details.spoiler[open] summary {
    display: block;
    margin-bottom: 0.5em;
}

details.spoiler .spoiler-content {
    border-left: 2px solid var(--accent);
    padding-left: 1em;
    margin-top: 0.5em;
}

/* Video */
.video-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
}

.video-wrapper video {
    max-width: 100%;
    border-radius: 8px;
}

/* CV Page Styles */
.cv-download-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    html, body {
        margin: 0;
        padding: 0;
        font-size: 11pt;
        height: auto;
    }

    .cv-section {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .cv-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .cv-sidebar, .cv-main {
        width: 100%;
        padding: 0.5rem 1rem;
        box-sizing: border-box;
    }

    .cv-sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cv-personal {
        margin-bottom: 0 !important;
        gap: 0.5rem !important;
    }

    .cv-portrait img {
        width: 100px;
        height: 100px;
    }

    h1, h2, h3, h4 {
        font-size: 1.1em;
        margin: 0.2em 0;
    }

    p {
        margin: 0.3rem 0;
        line-height: 1.3;
    }

    .cv-section-container {
        margin: 0 0 0.8rem 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cv-section-container:last-child {
        border-bottom: none;
    }

    .cv-timeline-item {
        padding: 0.5rem;
        border-left: 4px solid var(--accent);
        background-color: rgba(255, 255, 255, 0.03);
    }
}

/* CV Section - More Compact */
.cv-section {
    max-width: 90%;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-sizing: border-box;
}

.cv-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.cv-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.cv-sidebar {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    width: 100%;
}

.cv-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cv-personal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    gap: 0.8rem;
}

.cv-portrait img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 3px solid var(--accent);
}

.cv-title {
    color: var(--accent);
    font-size: 1.05rem;
    margin-top: 0.3rem;
}

.cv-contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.8rem;
    width: 100%;
}

.cv-contact-details p {
    background-color: var(--secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.cv-contact-details p:hover {
    background-color: var(--secondary-hover);
}

.cv-section-container {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-section-container:last-child {
    border-bottom: none;
}

.cv-skills {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cv-skill-category h4 {
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.cv-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.cv-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cv-timeline-item {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 0.8rem;
    transition: background 0.3s ease;
}

.cv-timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.cv-timeline-date {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.cv-timeline-content h4 {
    margin-bottom: 0.4rem;
	margin-top: 0;
}

.cv-timeline-content p {
    margin-bottom: 0.5rem;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .cv-content {
        grid-template-columns: 1fr;
    }
    .cv-sidebar, .cv-main {
        width: 100%;
    }
}
