/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #070707;
    background-color: #ffffff;
}

/* Start hidden */
body * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* When shown */
body.loaded * {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #070707;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: #070707;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.6;
}

/* Main Content */
main {
    margin-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Container override for article pages */
.article-page .container {
    max-width: 800px;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
    gap: 80px;
    min-height: 500px;
}

.hero-image {
    flex: 0 0 300px;
    height: 300px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 30px;
}

.hero .subtitle {
    font-size: 16px;
    opacity: 0.6;
}

/* Projects Section */
.projects {
    padding: 80px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 60px;
    text-align: center;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 100px;
    min-height: 400px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.project-card:nth-child(even) {
    flex-direction: row-reverse;
}

.project-image {
    flex: 0 0 500px;
    height: 350px;
    background-color: #f8f8f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.project-content {
    flex: 1;
}

.project-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.project-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
}

.project-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.tag {
    background-color: #72c7ff;
    color: #070707;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.read-time {
    font-size: 14px;
    color: #999;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 80px;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-description {
    font-size: 20px;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Two images side by side */
.media-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.media-row .media-container {
    flex: 0 0 auto;
    text-align: center;
}

.media-row .article-image {
    height: 300px;
    width: auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Project Header (for individual project pages) */
.project-header {
    padding: 60px 0 40px 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 60px;
}

.project-header .project-date {
    margin-bottom: 20px;
}

.project-header .project-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 20px;
    opacity: 0.8;
    margin-bottom: 30px;
    line-height: 1.5;
}

.project-header .project-tags {
    justify-content: center;
    margin-bottom: 20px;
}

.project-header .tag {
    padding: 8px 16px;
}

/* Article Content */
.article-content {
    padding-bottom: 80px;
}

.article-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin: 60px 0 20px 0;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 16px 0;
    line-height: 1.4;
}

.article-content p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 24px;
    color: #070707;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content li {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.article-content blockquote {
    border-left: 4px solid #e0e0e0;
    margin: 30px 0;
    padding: 20px 30px;
    background-color: #fafafa;
    font-style: italic;
    font-size: 18px;
}

/* Media Elements */
.media-container {
    margin: 40px 0;
    text-align: center;
}

.article-image {
    max-width: 60%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    font-style: italic;
}

/* YouTube Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Back Navigation */
.back-nav {
    padding: 40px 0 20px 0;
}

.back-link {
    color: #070707;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.6;
}

.back-link::before {
    content: "←";
    font-size: 18px;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    text-align: center;
    background-color: #fafafa;
}

.contact h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
}

.contact p {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 40px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    font-size: 16px;
    color: #070707;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: #070707;
    color: #ffffff;
}

/* Zoom overlay styles */
.zoom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay.active {
    display: flex;
    opacity: 1;
}

.zoom-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.zoom-overlay.active .zoom-image {
    transform: scale(1);
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.zoom-close:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .nav-container {
        padding: 0 20px;
    }

    .container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 20px;
    }

    /* Hero Section Mobile */
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 40px 0;
    }

    .hero-image {
        flex: none;
        width: 250px;
        height: 250px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    /* Projects Mobile */
    .project-card {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 60px;
        align-items: center;
        text-align: center;
    }

    .project-card:nth-child(even) {
        flex-direction: column !important;
    }

    .project-image {
        flex: none;
        width: 100%;
        max-width: 400px;
        height: auto;
    }

    .project-title {
        font-size: 24px;
    }

    .project-description {
        font-size: 16px;
    }

    /* Project Header Mobile */
    .project-header .project-title {
        font-size: 36px;
    }

    .project-subtitle {
        font-size: 18px;
    }

    .project-tags {
        justify-content: center;
    }

    /* Article Content Mobile */
    .article-content h2 {
        font-size: 28px;
    }

    .article-content h3 {
        font-size: 22px;
    }

    .article-content p,
    .article-content li {
        font-size: 16px;
    }

    .zoom-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
}

/* Link banner */
.link-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 700px;
    margin: 0 auto 30px;
}

.banner-content {
    flex: 1;
    margin-right: 20px;
}

.banner-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.banner-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.banner-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-thumb {
    flex: 0 0 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f000;
}

.banner-thumb img {
    height: 100%;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Shared style for banners */
.article-note,
.article-warning {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Note banner */
.article-note {
    background-color: #72c7ff;
    color: #070707;
}

.article-note::before {
    content: "💡";
    font-size: 20px;
    flex-shrink: 0;
}

/* Warning banner */
.article-warning {
    background-color: #ffb3b3;
    color: #070707;
}

.article-warning::before {
    content: "⚠️";
    font-size: 20px;
    flex-shrink: 0;
}

/* Code block container */
.article-content pre {
    background-color: #f4f4f4;
    color: #070707;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    line-height: 1.6;
    margin: 24px 0;
}

/* Remove default extra spacing from code inside pre */
.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Inline code */
.article-content code {
    background-color: #f4f4f4;
    color: #d6336c;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

/* Optional syntax highlighting */
.token.keyword,
.token.builtin,
.token.selector {
    color: #d6336c;
}

.token.function {
    color: #0066cc;
}

.token.string {
    color: #22863a;
}

.token.comment {
    color: #6a737d;
    font-style: italic;
}

.token.number {
    color: #e36209;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent; /* transparent background */
    border: none;             /* no border */
    padding: 0;               /* no extra padding */
    font-size: 20px;          /* emoji size */
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s ease; /* optional hover effect */
}

.copy-btn:hover {
    transform: scale(1.5); /* optional: make emoji slightly bigger on hover */
    color: #22863a;        /* optional: change color on hover */
}