/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* CSS Variables */
:root {
    --primary-bg: #131312;
    --primary-text: #e8e8e4;
    --secondary-text: #a0a09a;
    --accent-color: #cccccc;
    --border-color: rgba(255,255,255,0.12);
    --hover-color: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Crimson Text', Georgia, serif;
    /* no background-color — canvas handles it */
    color: var(--primary-text);
    line-height: 1.6;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1.5rem 0;
}

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

.logo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--primary-text);
}

.logo:hover {
    color: var(--hover-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    position: relative;
    color: var(--secondary-text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-text);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.95rem;
    color: var(--primary-text);
    letter-spacing: 0.03em;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #131312;
    z-index: 2000;
    padding: 2rem;
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.95rem;
    color: var(--primary-text);
    letter-spacing: 0.03em;
    margin-bottom: 3rem;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-links a {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.5rem;
    color: var(--primary-text);
}

.mobile-nav-links a:hover {
    color: var(--hover-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8rem 2rem 2rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    flex: 1;
}

.hero-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    animation: fadeInUp 0.8s ease-out;
    flex: 1;
    text-align: left;
    color: var(--primary-text);
}

.hero-image {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Footer */
.page-footer {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footnote {
    font-size: 0.85rem;
    color: var(--secondary-text);
    line-height: 1.6;
    text-align: center;
    padding-bottom: 1.5rem;
}

.footnote a {
    color: var(--secondary-text);
    text-decoration: none;
    border-bottom: 1px solid rgba(160,160,154,0.4);
    transition: var(--transition);
}

.footnote a:hover {
    color: var(--primary-text);
    border-bottom-color: var(--primary-text);
}

/* Content Sections */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    min-height: calc(100vh - 80px);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 3rem;
    font-weight: 400;
    color: var(--primary-text);
}

/* Thoughts Grid */
.thoughts-grid {
    display: grid;
    gap: 3rem;
}

.thought-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.thought-item:last-child {
    border-bottom: none;
}

.thought-date {
    font-size: 0.85rem;
    color: var(--secondary-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.thought-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
    color: var(--primary-text);
}

.thought-excerpt {
    color: var(--secondary-text);
    line-height: 1.7;
}

.thought-item:hover .thought-title {
    color: var(--hover-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.project-card {
    cursor: pointer;
    transition: var(--transition);
}

.project-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #2a2a2a;
    margin-bottom: 1rem;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--primary-text);
}

.project-description {
    color: var(--secondary-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* About Section */
.about-content {
    line-height: 1.8;
    color: var(--primary-text);
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content a {
    color: var(--primary-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.about-content a:hover {
    color: var(--hover-color);
}

.about-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-image {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

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

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

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .hero-section {
        padding: 6rem 1.5rem 2rem;
    }

    .content-section {
        padding: 6rem 1.5rem 3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .about-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .about-image {
        width: 100%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-section,
    .content-section {
        padding: 5rem 1rem 2rem;
    }
}
