/* ========================================
   Typewriter Theme - Variables
   ======================================== */
:root {
    --paper-color: #f4f1e8;
    --ink-color: #2b2b2b;
    --accent-color: #8b4513;
    --fade-color: #6b6b6b;
    --line-color: #d4d1c8;
    --font-family: 'Courier Prime', 'Courier New', monospace;
}

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

body {
    font-family: var(--font-family);
    background-color: #e8e5dc;
    color: var(--ink-color);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
}

/* ========================================
   Paper Effect
   ======================================== */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.page {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    background-color: var(--paper-color);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.page-inner {
    padding: 60px 80px;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: relative;
    margin-bottom: 40px;
}

.date-stamp {
    position: absolute;
    top: -20px;
    right: 0;
    padding: 4px 12px;
    border: 2px solid var(--accent-color);
    background-color: var(--paper-color);
    transform: rotate(3deg);
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.header-content {
    margin-top: 20px;
}

.title {
    font-size: 42px;
    font-weight: bold;
    color: var(--ink-color);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--ink-color);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

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

.subtitle {
    font-size: 18px;
    color: var(--fade-color);
    margin-bottom: 8px;
    font-style: italic;
}

.tagline {
    font-size: 14px;
    color: var(--fade-color);
    margin-top: 12px;
    font-style: italic;
}

.contact-bar {
    margin-top: 24px;
    padding: 12px 0;
    border-top: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
    font-size: 14px;
    color: var(--fade-color);
}

/* ========================================
   Typewriter Line Separator
   ======================================== */
.typewriter-line {
    width: 100%;
    height: 2px;
    background-color: var(--line-color);
    margin: 40px 0;
    position: relative;
}

.typewriter-line::before {
    content: '* * *';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--paper-color);
    padding: 0 16px;
    color: var(--fade-color);
    font-size: 12px;
    letter-spacing: 8px;
}

/* ========================================
   Sections
   ======================================== */
.section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--ink-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.section-content {
    font-size: 16px;
    line-height: 1.8;
}

.section-content p {
    margin-bottom: 16px;
}

/* ========================================
   Writing/Work Items
   ======================================== */
.writing-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.writing-item {
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
}

.item-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--ink-color);
    margin-bottom: 8px;
}

.item-description {
    font-size: 15px;
    color: var(--ink-color);
    margin-bottom: 6px;
}

.item-note {
    font-size: 13px;
    color: var(--fade-color);
    font-style: italic;
}

/* ========================================
   Skills
   ======================================== */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-item {
    display: inline-block;
    padding: 6px 14px;
    background-color: transparent;
    border: 1px solid var(--ink-color);
    color: var(--ink-color);
    font-size: 14px;
    transition: all 0.2s ease;
}

.skill-item:hover {
    background-color: var(--ink-color);
    color: var(--paper-color);
}

/* ========================================
   Projects
   ======================================== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project-item {
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line-color);
}

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

.project-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.project-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--ink-color);
}

.project-year {
    font-size: 14px;
    color: var(--fade-color);
}

.project-description {
    font-size: 15px;
    color: var(--ink-color);
    margin-bottom: 12px;
}

.project-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--ink-color);
}

/* ========================================
   Contact
   ======================================== */
.contact-content {
    font-size: 16px;
}

.contact-content p {
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.social-link {
    color: var(--ink-color);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.social-link:hover {
    border-bottom-color: var(--accent-color);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    margin-top: 60px;
    text-align: center;
}

.footer-text {
    font-size: 14px;
    color: var(--fade-color);
    margin-bottom: 8px;
}

.footer-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 12px;
    color: var(--fade-color);
    margin-top: 8px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .page {
        margin: 20px;
    }

    .page-inner {
        padding: 40px 30px;
    }

    .title {
        font-size: 32px;
    }

    .section-title {
        font-size: 20px;
    }

    .date-stamp {
        position: static;
        display: inline-block;
        margin-bottom: 20px;
    }

    .social-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .page-inner {
        padding: 30px 20px;
    }

    .title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background-color: white;
    }

    .page {
        box-shadow: none;
        margin: 0;
    }

    .paper-texture {
        display: none;
    }

    .cursor {
        display: none;
    }
}
