:root {
    /* Typography */
    --font-display: 'Newsreader', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Colors - Warm dark theme */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-elevated: #242424;
    --text-primary: #e8e6e3;
    --text-secondary: #a8a5a0;
    --text-muted: #6b6966;
    --accent: #d4a574;
    --accent-hover: #e8c4a0;
    --border: #2a2a2a;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    
    /* Layout */
    --container-width: 720px;
}

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&family=JetBrains+Mono:wght@400&display=swap');

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

html {
    scroll-behavior: smooth;
}

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

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-xs);
}

h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-body);
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-secondary);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

/* Navbar */
.navbar {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar-container {
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links li::before {
    display: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--spacing-xs) 0;
    position: relative;
}

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

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

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

/* Main content */
main {
    padding: var(--spacing-xl) 0;
}

/* Sections */
.section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.15s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.25s; }
.section:nth-child(5) { animation-delay: 0.3s; }
.section:nth-child(6) { animation-delay: 0.35s; }
.section:nth-child(7) { animation-delay: 0.4s; }
.section:nth-child(8) { animation-delay: 0.45s; }

/* Hero Section */
.hero-content {
    text-align: left;
}

.hero-name {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.hero-role {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-mono);
}

.hero-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: var(--spacing-md);
}

.hero-email {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Section Title */
.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: var(--spacing-md);
    padding-left: 0;
    position: relative;
}

li::before {
    display: none;
}

/* Cards - for services, projects */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Blog list */
.blog-item {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.blog-item:hover {
    background: var(--bg-secondary);
    margin: 0 calc(-1 * var(--spacing-sm));
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    border-radius: 4px;
}

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

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 100px;
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-primary);
}

.blog-title:hover {
    color: var(--accent);
}

/* CV Section */
.cv-download {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--accent);
    color: var(--bg-primary);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
    transition: background 0.2s ease;
}

.cv-download:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
}

.cv-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.experience-item {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-md);
    border-left: 2px solid var(--border);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.experience-role {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
}

.experience-period {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.experience-company {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.experience-details {
    margin-top: var(--spacing-xs);
}

.experience-details li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    padding-left: var(--spacing-sm);
    position: relative;
}

.experience-details li::before {
    content: '→';
    display: block;
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.skill-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Contact */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
}

.contact-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    width: 80px;
    flex-shrink: 0;
}

/* Log section */
.log-stats {
    display: flex;
    gap: var(--spacing-lg);
    align-items: baseline;
}

.log-stat {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
}

.log-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
}

.log-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Blog post view */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent);
}

.blog-content {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.9;
}

.blog-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.blog-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: var(--spacing-lg) 0;
}

.blog-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: var(--spacing-lg) 0;
}

.blog-content code {
    font-family: var(--font-mono);
    background: var(--bg-secondary);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Principles/Doctrine */
.principle-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
}

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

.principle-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.principle-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    :root {
        --spacing-xl: 3rem;
    }
    
    h1, .hero-name {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: var(--spacing-sm);
    }
    
    .nav-links a {
        font-size: 0.75rem;
    }
    
    .blog-item {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .blog-date {
        width: auto;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .log-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Utilities */
.date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}
