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

:root {
    /* Color Palette - Technical/Builder */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --border-dark: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-code: #f1f5f9;
    --terminal-green: #22c55e;
    
    /* Spacing */
    --container-width: 800px;
    --section-spacing: 6rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.7;
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    color: var(--primary-hover);
}

/* ===========================
   Navigation
   =========================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border);
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo::before {
    content: '$ ';
    color: var(--terminal-green);
    margin-right: 0.25rem;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    font-family: var(--font-mono);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::before {
    content: '>';
    opacity: 0;
    margin-right: 0.25rem;
    color: var(--terminal-green);
    transition: opacity 0.2s ease;
}

.nav-links a:hover::before {
    opacity: 1;
}

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

/* ===========================
   Typography
   =========================== */
.page-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    display: inline-block;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.25rem;
}

.section-title::before {
    content: '# ';
    color: var(--terminal-green);
}

.subsection-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subsection-title::before {
    content: '// ';
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.section-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    border-left: 3px solid var(--border);
    padding-left: 1rem;
}

/* ===========================
   Sections
   =========================== */
section {
    padding: var(--section-spacing) 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

section:first-of-type {
    padding-top: calc(var(--section-spacing) + 3rem);
}

/* ===========================
   About Section
   =========================== */
.about {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.about-text {
    max-width: 700px;
    margin-bottom: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-text p:first-child {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.about-text a {
    font-weight: 500;
    border-bottom: 1px solid var(--primary);
}

.about-text a:hover {
    border-bottom-width: 2px;
}

/* Experience Section */
.experience-section {
    max-width: 700px;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
}

.experience-section .section-title {
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.experience-section .section-title:first-of-type {
    margin-top: 0;
}

.experience-bullet-list {
    list-style: none;
    border-left: 2px solid var(--border);
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.experience-bullet-list li {
    margin-bottom: 0.875rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.experience-bullet-list li::before {
    content: '•';
    position: absolute;
    left: -1.75rem;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.25rem;
}

.experience-bullet-list li:last-child {
    margin-bottom: 0;
}

.experience-bullet-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.experience-bullet-list a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px solid var(--primary);
}

.experience-bullet-list a:hover {
    border-bottom-width: 2px;
}

/* ===========================
   Writing Section
   =========================== */
.writing {
    background: var(--bg-secondary);
}

.essay-list {
    list-style: none;
    margin-bottom: 2.5rem;
    border-left: 2px solid var(--border);
    padding-left: 1.5rem;
}

.essay-list li {
    margin-bottom: 1rem;
    position: relative;
}

.essay-list li::before {
    content: '→';
    position: absolute;
    left: -1.75rem;
    color: var(--primary);
    font-weight: bold;
}

.essay-list a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.05rem;
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.essay-list a:hover {
    border-bottom-color: var(--primary);
    transform: translateX(4px);
}

.archive-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    background: var(--bg-code);
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.archive-text a {
    font-weight: 600;
}

/* ===========================
   Media Section
   =========================== */
.media-list {
    list-style: none;
    border-left: 2px solid var(--border);
    padding-left: 1.5rem;
}

.media-list li {
    margin-bottom: 1rem;
    position: relative;
}

.media-list li::before {
    content: '▸';
    position: absolute;
    left: -1.75rem;
    color: var(--accent);
    font-weight: bold;
}

.media-list a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.05rem;
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.media-list a:hover {
    border-bottom-color: var(--accent);
    transform: translateX(4px);
}

/* ===========================
   Advisory Section
   =========================== */
.advisory {
    background: var(--bg-secondary);
}

.advisory-content {
    max-width: 700px;
}

.advisory-content .experience-bullet-list {
    margin-top: 0;
    margin-bottom: 2rem;
}

.advisory-content p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.contact-item:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
    transform: translateX(4px);
}

.contact-item i {
    font-size: 1.75rem;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-code);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.contact-item:hover i {
    background: var(--primary);
    color: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-handle {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 3rem 0;
    border-top: 2px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    font-family: var(--font-mono);
}

.footer p::before {
    content: '// ';
    color: var(--text-muted);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    :root {
        --section-spacing: 4rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .nav-links {
        gap: 1.5rem;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .page-title {
        font-size: 2.25rem;
        padding-left: 0.75rem;
        border-left-width: 3px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .about-text p:first-child {
        font-size: 1.25rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 0.875rem;
    }
}

/* ===========================
   Animations & Effects
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Cursor effect for links in lists */
.essay-list a::after,
.media-list a::after {
    content: '';
    position: absolute;
    left: 100%;
    margin-left: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.essay-list a:hover::after,
.media-list a:hover::after {
    content: '_';
    opacity: 1;
    animation: blink 1s step-end infinite;
}

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

/* ===========================
   Focus States (Accessibility)
   =========================== */
a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* ===========================
   Selection
   =========================== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .nav,
    .footer {
        display: none;
    }
    
    body {
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    section {
        page-break-inside: avoid;
    }
}
