/* CSS Variables - Nord Theme (Darker) */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #1a1d23;
    --bg-gradient-blue: #81A1C1;
    --bg-gradient-cyan: #88C0D0;
    --text-primary: #ECEFF4;
    --text-muted: #8b949e;
    --accent-cyan: #88C0D0;
    --accent-teal: #A3BE8C;
    --badge-winner: #A3BE8C;
    --badge-winner-text: #A3BE8C;
    --badge-wip: #EBCB8B;
    --badge-wip-text: #EBCB8B;
    --link-hover: #ECEFF4;
    --tree-color: #4C566A;
    --tooltip-bg: #1a1d23;
    --tooltip-text: #ECEFF4;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Aurora Gradient Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(129, 161, 193, 0.08), transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(136, 192, 208, 0.06), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

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

.name {
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.social-icons a:hover {
    color: var(--text-primary);
}

/* Intro */
.intro {
    margin-bottom: 2.5rem;
}

.intro p {
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-muted);
}

.course-link {
    display: inline-block;
    margin-top: 0.25rem;
    margin-left: 1.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85em;
    position: relative;
    transition: color 0.2s ease;
}

.course-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.course-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.course-link:hover {
    color: var(--accent-cyan);
}

.course-line {
    width: 100%;
    margin-left: 1.75rem;
    color: var(--accent-cyan);
    font-size: 0.95em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-line:hover {
    color: var(--link-hover);
}

/* Sections */
section {
    margin-bottom: 2rem;
}

.section-label {
    font-size: clamp(0.75rem, 2.2vw, 0.875rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* Tree List */
.tree-list {
    list-style: none;
    padding-left: 0;
}

.tree-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: clamp(0.75rem, 2.4vw, 0.9rem);
    padding: 0.25rem 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}


.tree-branch {
    color: var(--tree-color);
    font-weight: 400;
    margin-right: 0.25rem;
}

.role {
    color: var(--text-primary);
}

.company,
.project-link {
    color: var(--accent-cyan);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.company::after,
.project-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.company:hover::after,
.project-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.company:hover,
.project-link:hover {
    color: var(--link-hover);
}

.org {
    color: var(--text-primary);
}

.date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.detail {
    color: var(--text-muted);
    font-size: 0.8rem;
}


/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 3rem;
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links a:hover svg {
    opacity: 1;
}

.footer-links svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

/* Tooltips */
.has-tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    width: 340px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.25rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.has-tooltip:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-desc {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Company Icons */
.company-icon {
    height: 1em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.35rem;
    display: inline-block;
}

.company-icon.large {
    height: 1.4em;
}

/* Responsive */
/* Blog Styles */
.name-link {
    color: inherit;
    text-decoration: none;
    display: inline;
    margin: 0;
    padding: 0;
    position: relative;
    transition: color 0.2s ease;
}

.name-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.name-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.name-link:hover {
    color: var(--accent-cyan);
}

.post-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.home-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.875rem;
    position: relative;
    transition: color 0.2s ease;
}

.home-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.home-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.home-link:hover {
    color: white;
}

.post-nav .back-link {
    margin-bottom: 0;
}

.back-link {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    position: relative;
    transition: color 0.2s ease;
}

.back-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.back-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.back-link:hover {
    color: white;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.blog-list {
    list-style: none;
    padding: 0;
}

.blog-post-item {
    margin-bottom: 1rem;
}

.blog-post-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.blog-post-link:hover {
    /* Removed background color highlight */
}

.blog-post-title {
    color: var(--accent-cyan);
    font-size: 0.95rem;
    position: relative;
    transition: color 0.2s ease;
}

.blog-post-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.blog-post-title:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.blog-post-title:hover {
    color: white;
}

.blog-post-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Blog Post Styles */
.post-header {
    margin-bottom: 2.5rem;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.post-content {
    line-height: 1.7;
}

.post-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.post-content code {
    background-color: var(--bg-secondary);
    color: var(--accent-cyan);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
}

.post-content pre {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2.5rem 0;
    }
}

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

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-links {
        gap: 1rem;
    }

    /* Mobile tooltip adjustments */
    .tooltip {
        width: 280px;
    }

    /* Mobile blog adjustments */
    .blog-post-link {
        flex-direction: column;
        gap: 0.25rem;
    }

    .post-title {
        font-size: 1.25rem;
    }
}
