:root {
    --bg-color: #fffde2;
    --text-color: #1a1a1a;
    --accent-color: #000000;
    --font-serif: 'Libre Baskerville', Baskerville, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: 'Roboto Mono', monospace;
    --spacing-unit: 1rem;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-serif);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.1;
    font-family: var(--font-serif);
    font-style: italic;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 0.8;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: Baskerville, "serif Fallback", serif;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

a {
    color: inherit;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* position: fixed; removed to make it scroll */
    width: 100%;
    z-index: 100;
    background: var(--bg-color);
}

header > * {
    pointer-events: auto;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

main {
    padding-top: 0; /* Removed padding since header is in flow */
    min-height: 100vh;
}

/* Tab Functionality */
.tab-content {
    display: none;
    animation: blurIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active-tab {
    display: block;
}

@keyframes blurIn {
    from { 
        opacity: 0; 
        filter: blur(20px);
        transform: scale(0.98);
    }
    to { 
        opacity: 1; 
        filter: blur(0);
        transform: scale(1);
    }
}

/* Hover Effects */
nav a, .cta-button, .logo {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover, .cta-button:hover, .logo:hover {
    opacity: 0.7;
}

/* Sections */
.section {
    padding: 6rem 0;
    max-width: 800px;
    margin: 0 auto;
    animation: blurIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: left;
}

/* Hero Section */
.hero {
    text-align: center;
    /* padding: 8rem 0 10rem; */
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: blurIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image {
    max-width: 300px;
    margin: 0 auto 0;
    display: block;
    min-height: 200px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-sub {
    font-family: var(--font-mono);
    max-width: 600px;
    margin: 2rem auto;
    font-size: 0.8rem;
    line-height: 1.6;
    opacity: 0.8;
}

.cta-button {
    display: inline-block;
    position: relative;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

/* Animated blur background */
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4), transparent 70%);
    filter: blur(20px);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: -1;
}

/* Shimmer effect */
.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
}

.cta-button:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    filter: blur(30px);
}

.cta-button:hover::after {
    left: 100%;
}

.cta-button:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Gentle pulse animation */
@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.cta-button {
    animation: gentlePulse 3s ease-in-out infinite;
}

/* Projects Status Page Styles */
.status-section {
    margin-bottom: 3rem;
}

.status-header {
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
}

.project-status {
    font-family: var(--font-mono);
    opacity: 0.6;
    font-size: 0.8rem;
}

.project-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.project-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid #000;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.project-button:hover {
    background: #000;
    color: #fff;
    opacity: 1;
}

/* Blog Styles */
.blog-list {
    list-style: none;
}

.blog-item {
    margin-bottom: 3rem;
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-item:hover .blog-title {
    text-decoration: none;
}

.blog-item:hover .blog-title::after {
    width: 100%;
}

.blog-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    width: fit-content;
}

.blog-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background-color: currentColor;
    width: 0;
    
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-item:hover .blog-title::after {
    width: 100%;
}

.blog-excerpt {
    opacity: 0.8;
}

/* Contact Styles */
.contact-link {
    display: block;
    width: fit-content;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.contact-link span {
    text-decoration: none;
}

.contact-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px; /* Slight offset from bottom */
    height: 2px;
    background-color: currentColor;
    width: var(--span-width, 0px);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-link:hover::after {
    width: 100%;
}

.link-suffix {
    filter: blur(45px);
    transition: filter 0.3s ease;
}

.contact-link:hover .link-suffix {
    filter: blur(0);
}

.contact-link:hover {
    opacity: 0.7;
}

/* Markdown Blog Content Styles */
.blog-content {
    font-family: 'Libre Baskerville', serif;
    line-height: 1.8;
    color: #333;
}

.blog-content h1, 
.blog-content h2, 
.blog-content h3, 
.blog-content h4, 
.blog-content h5, 
.blog-content h6 {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #000;
    
}

.blog-content h1 { font-size: 2.5rem;line-height: normal; }
.blog-content h2 { font-size: 2rem; }
.blog-content h3 { font-size: 1.5rem; }

.blog-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.blog-content ul, 
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #000;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

.blog-content pre {
    background: #f4f4f4;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.blog-content pre code {
    background: transparent;
    padding: 0;
}

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

.blog-content a {
    color: #000;
    text-decoration: underline;
}

.blog-content a:hover {
    opacity: 0.7;
}


/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.5;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-width: 100%;
    }

    header {
        flex-direction: column;
        align-items: center;
        padding: 1.5rem;
        background: var(--bg-color);
        gap: 1rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.8rem;
    }

    .time-display {
        display: none; /* Hide time on mobile to save space, or move it */
    }
    
    /* main padding adjustment removed */

    .hero {
        min-height: 60vh;
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
        margin-bottom: 0.5rem;
    }

    .hero-sub {
        font-size: 0.9rem;
        padding: 0 1rem;
        margin: 1.5rem auto;
    }

    .hero-image {
        max-width: 200px;
        min-height: 150px;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .container {
        padding: 0 1.5rem;
    }
    
    /* Adjust tab content animation for mobile if needed */
    .tab-content {
        animation: blurIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* Refactored Inline Styles */
.contact-intro {
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

/* Blog Page Specific Styles */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #000;
    text-decoration: underline;
}

#loading {
    text-align: center;
    padding: 4rem;
    font-family: var(--font-mono);
    color: #666;
}

#error {
    text-align: center;
    padding: 4rem;
    color: #e74c3c;
}

.hidden {
    display: none;
}

/* Blog Preview Card */
.blog-preview-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem 0;
    background: var(--bg-color);
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-preview-name {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.1;
}

.blog-preview-author {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    opacity: 0.7;
}

.blog-preview-logo {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    opacity: 0.8;
    object-fit: contain;
    border-radius: 50%;
}

