/* ========================================
   Busy Beaver - Soft Editorial
   With circuit/tech visual accents
   ======================================== */

:root {
    /* Colors - Soft, warm */
    --color-cream: #FAF7F2;
    --color-cream-dark: #F0EBE3;
    --color-text: #2D2A26;
    --color-text-soft: #5C5752;
    --color-text-muted: #9A958E;

    /* Accents - matching logo */
    --color-teal: #2EC4B6;
    --color-teal-soft: rgba(46, 196, 182, 0.15);
    --color-rose: #E8B4B8;
    --color-rose-deep: #D4939A;
    --color-sage: #9DB4A0;
    --color-lavender: #C9B8D9;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Spacing */
    --space-sm: 0.75rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Transitions */
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-text);
    background: var(--color-cream);
    -webkit-font-smoothing: antialiased;
}

/* Background */
.bg-gradient {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
    z-index: -2;
}

/* Floating shapes */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: drift 25s ease-in-out infinite;
}

.shape--1 {
    width: 400px;
    height: 400px;
    background: var(--color-teal);
    top: -150px;
    right: -100px;
}

.shape--2 {
    width: 350px;
    height: 350px;
    background: var(--color-lavender);
    top: 50%;
    left: -200px;
    animation-delay: -8s;
}

.shape--3 {
    width: 300px;
    height: 300px;
    background: var(--color-rose);
    bottom: -100px;
    right: 20%;
    animation-delay: -16s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 20px); }
}

/* Typography */
a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-size: 0.9rem;
    color: var(--color-text-soft);
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--color-teal);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--color-text);
    transition: all var(--transition);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    padding-top: calc(60px + var(--space-xl));
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto var(--space-lg);
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(46, 196, 182, 0.15);
}

.hero-decoration {
    position: absolute;
    inset: -20px;
    z-index: 1;
}

.circuit-decoration {
    width: 100%;
    height: 100%;
    color: var(--color-teal);
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-lavender) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-soft);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: var(--space-xl) var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
}

/* Section headers with icon */
.about-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.section-icon {
    width: 32px;
    height: 32px;
    color: var(--color-teal);
    opacity: 0.7;
}

.section-icon svg {
    width: 100%;
    height: 100%;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
}

/* ========================================
   About
   ======================================== */
.section--about {
    padding-top: var(--space-lg);
}

.about-content {
    max-width: 600px;
    margin-bottom: var(--space-lg);
}

.about-content .text-large {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.about-content p {
    color: var(--color-text-soft);
    margin-bottom: var(--space-sm);
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* About Visual - Turing Tape */
.about-visual {
    margin-top: var(--space-lg);
    text-align: center;
}

.tape-illustration {
    width: 100%;
    max-width: 320px;
    height: auto;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.visual-caption {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
}

/* ========================================
   Writing
   ======================================== */
.section--writing {
    padding-top: var(--space-xl);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.post-item {
    display: flex;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(45, 42, 38, 0.08);
    cursor: pointer;
    transition: all var(--transition);
}

.post-item:hover {
    transform: translateX(8px);
}

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: var(--color-teal-soft);
    border-radius: 10px;
    color: var(--color-teal);
}

.post-item:nth-child(2) .post-icon {
    background: rgba(157, 180, 160, 0.15);
    color: var(--color-sage);
}

.post-item:nth-child(3) .post-icon {
    background: rgba(201, 184, 217, 0.15);
    color: var(--color-lavender);
}

.post-icon svg {
    width: 100%;
    height: 100%;
}

.post-content {
    flex: 1;
}

.post-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-teal);
    margin-bottom: 0.25rem;
}

.post-item:nth-child(2) .post-tag {
    color: var(--color-sage);
}

.post-item:nth-child(3) .post-tag {
    color: var(--color-lavender);
}

.post-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.post-excerpt {
    color: var(--color-text-soft);
    margin-bottom: 0.35rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

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

/* ========================================
   Contact
   ======================================== */
.section--contact {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    text-align: center;
}

.contact-content {
    max-width: 500px;
    margin: 0 auto;
}

.contact-visual {
    margin-bottom: var(--space-md);
}

.contact-illustration {
    width: 100px;
    height: 100px;
    color: var(--color-text);
}

.contact-text {
    color: var(--color-text-soft);
    margin-bottom: var(--space-md);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-soft);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all var(--transition);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

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

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: var(--space-md);
    text-align: center;
    border-top: 1px solid rgba(45, 42, 38, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 0.7;
}

.footer p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ========================================
   Animations
   ======================================== */
.hero-visual,
.hero-title,
.hero-subtitle,
.about-header,
.about-content,
.about-visual,
.post-item,
.contact-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

.hero-visual { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.about-header { animation-delay: 0.1s; }
.about-content { animation-delay: 0.15s; }
.about-visual { animation-delay: 0.2s; }
.post-item:nth-child(1) { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.15s; }
.post-item:nth-child(3) { animation-delay: 0.2s; }
.contact-content { animation-delay: 0.1s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
    }

    .nav {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: var(--space-xl) var(--space-md);
        min-height: auto;
        padding-top: calc(60px + var(--space-lg));
    }

    .hero-visual {
        width: 120px;
        height: 120px;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .section {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .post-item {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .post-icon {
        width: 36px;
        height: 36px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
