/* === Base Reset & Variables === */
:root {
    --lavender: #E6E6FA;
    --sky-blue: #B4D4E7;
    --pastel-pink: #F8D0D8;
    --peach: #FFECD2;
    --soft-yellow: #FFF9E6;
    --text-dark: #2D2D2D;
    --text-light: #5A5A5A;
}

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

html {
    font-size: 18px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.7;
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        var(--lavender) 0%,
        var(--pastel-pink) 25%,
        var(--peach) 50%,
        var(--sky-blue) 75%,
        var(--soft-yellow) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === Landing Page Background === */
.landing-page {
    background: url('yellow-house.jpg') center center / cover no-repeat fixed;
    animation: none;
}

/* === Writings Page Background === */
.writings-page {
    background: url('writings-bg.jpg') center center / cover no-repeat fixed;
    animation: none;
}

.writings-page .page-title {
    color: #ffffff;
    font-weight: 500;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.5);
}

.writings-page .back-link {
    color: #ffffff;
    font-weight: 500;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.writings-page .back-link:hover {
    color: #fff9e6;
}

.writings-page .writing-box {
    border: 3px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
}

.writings-page .writing-box h3 {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.5);
}

.writings-page .writing-box:hover {
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

/* === Article Page (Individual Writing) === */
.article-page {
    background: #000000;
    animation: none;
}

.article-page .page-title {
    color: #ffffff;
    font-weight: 400;
}

.article-page .back-link {
    color: #888888;
}

.article-page .back-link:hover {
    color: #ffffff;
}

.article-page .me-content,
.article-page .me-value,
.article-page p {
    color: #ffffff;
}

/* === Me Page Background === */
.me-page {
    background: url('me-bg.png') center top / cover no-repeat;
    min-height: 100vh;
    animation: none;
}

.me-page .page-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.me-page .page-title {
    color: #4A6B5D;
    font-weight: 400;
    font-style: italic;
}

.me-page .back-link {
    color: #7A9B8D;
    font-weight: 400;
}

.me-page .back-link:hover {
    color: #4A6B5D;
}

.me-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.me-page .me-label {
    color: #5A5A5A;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

.me-page .me-value {
    color: #2D2D2D;
    font-weight: 400;
}

/* === Thoughts Page - Pastel Coding Core === */
.thoughts-page {
    background: #FDF6F8;
    animation: none;
}

.thoughts-page .page-header {
    font-family: 'JetBrains Mono', monospace;
}

.thoughts-page .page-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 1.5rem;
    color: #8B7B8B;
}

.thoughts-page .back-link {
    font-family: 'JetBrains Mono', monospace;
    color: #B8A0B8;
    font-size: 0.85rem;
}

.thoughts-page .back-link:hover {
    color: #D4A5D4;
}

.terminal-window {
    background: #FEFEFE;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(180, 160, 180, 0.15);
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid #F0E6F0;
}

.terminal-header {
    background: linear-gradient(135deg, #FAE8F0 0%, #E8F0FA 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #A090A0;
    margin-left: auto;
    margin-right: auto;
}

.terminal-body {
    padding: 1.5rem;
}

.thought-line {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #FAF5FA;
    align-items: flex-start;
}

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

.line-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #D4C4D4;
    min-width: 24px;
    user-select: none;
}

.thought-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 300;
    color: #6B5B6B;
    line-height: 1.7;
}

.cursor-line {
    opacity: 0.6;
}

.cursor {
    font-family: 'JetBrains Mono', monospace;
    color: #D4A5D4;
    animation: blink 1s infinite;
}

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

/* === Landing Page === */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    max-width: 600px;
    color: #1a1a1a;
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    min-height: 4em;
    cursor: default;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.landing-page .tagline {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.tagline-word {
    display: inline-block;
    transition: transform 0.15s ease;
}

.tagline-word:hover {
    transform: scale(1.08);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.landing-page .nav-links a {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.nav-links a:hover {
    color: var(--text-dark);
    transform: scale(1.3);
}

.landing-page .nav-links a:hover {
    color: #fff9e6;
}

.signature {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-dark);
    margin-top: 3rem;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease;
    cursor: default;
}

.landing-page .signature {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.signature:hover {
    transform: scale(1.1);
}

/* === Page Layout === */
.page {
    min-height: 100vh;
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.back-link {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.back-link:hover {
    color: var(--text-dark);
    transform: scale(1.1);
}

/* === Writings Grid (Chaos Style) === */
.writings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.writing-box {
    border: 1px solid rgba(45, 45, 45, 0.2);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: block;
    background: transparent;
    position: relative;
}

.writing-box:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(45, 45, 45, 0.4);
}

.writing-box h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.writing-box span {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

/* === Thoughts (Quote Stream) === */
.thoughts-stream {
    max-width: 600px;
    margin: 0 auto;
}

.thought {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-dark);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(45, 45, 45, 0.1);
    line-height: 1.6;
}

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

.thought-date {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-style: normal;
    color: var(--text-light);
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
}

/* === Me Page === */
.me-content {
    max-width: 500px;
}

.me-section {
    margin-bottom: 2.5rem;
}

.me-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: block;
}

.me-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.me-value a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.me-value a:hover {
    color: var(--text-light);
}

.me-tldr {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: #2D2D2D;
    line-height: 1.8;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* === Empty State === */
.empty-state {
    color: var(--text-light);
    font-style: italic;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
}

/* === Responsive === */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .page {
        padding: 3rem 1.5rem;
    }

    .writings-grid {
        grid-template-columns: 1fr;
    }
}
