/* ============================================
   Personal Website Styles
   Modern, clean design with subtle animations
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Typography */
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Light mode colors - Solarized-inspired warm palette */
    --color-bg: #fdf6e3;
    --color-bg-alt: #eee8d5;
    --color-text: #073642;
    --color-text-muted: #586e75;
    --color-accent: #2e7d32;
    --color-accent-hover: #1b5e20;
    --color-border: #d3cbb8;
    --color-card-bg: #fefbf3;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    /* Sizing */
    --max-width: 720px;
    --border-radius: 6px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* Dark mode - Solarized dark inspired */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #002b36;
        --color-bg-alt: #073642;
        --color-text: #fdf6e3;
        --color-text-muted: #93a1a1;
        --color-accent: #6fbf73;
        --color-accent-hover: #8fce92;
        --color-border: #094652;
        --color-card-bg: #003847;
    }
}

/* ============================================
   Base Styles
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Headings */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

p {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) 0 var(--space-md) 0;
    text-align: left;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    animation: fadeInUp 0.6s ease-out;
}

.tagline {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.pondering {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.pondering #rotating-text {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.hero-photo-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.3);
    transform-origin: center 70%;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-xl);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.nav a {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
}

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

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

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

/* ============================================
   Sections (Tab-style navigation)
   ============================================ */

.section {
    display: none;
    margin-bottom: var(--space-xl);
    animation: fadeIn 0.3s ease-out;
}

/* Show active section */
.section.active {
    display: block;
}

/* Active nav link styling */
.nav a.active {
    color: var(--color-accent);
}

.nav a.active::after {
    width: 100%;
}

/* About Section */
.about-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Projects Section
   ============================================ */

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.project-link {
    font-weight: 500;
    color: var(--color-text);
}

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

.project-title {
    font-weight: 500;
    color: var(--color-text);
}

.project-title:hover {
    color: var(--color-text);
}

.project-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ============================================
   Publications Section
   ============================================ */

.publication-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.publication-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.pub-year {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-muted);
}

.pub-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.pub-title {
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--transition-fast);
}

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

.pub-authors {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
}

.pub-venue {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin: 0;
}

.pub-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xs);
}

.pub-links a {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Writing / Blog Section
   ============================================ */

.writing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.writing-item {
    border-bottom: 1px solid var(--color-border);
}

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

.writing-item a {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    color: var(--color-text);
    transition: background var(--transition-fast);
}

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

.writing-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    min-width: 80px;
}

.writing-title {
    font-weight: 500;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-intro {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-weight: 500;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
    background: var(--color-border);
    transform: translateY(-2px);
    color: var(--color-text);
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

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

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 600px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: var(--space-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: var(--space-md) 0;
    }
    
    .hero-photo-container {
        width: 140px;
        height: 140px;
    }
    
    .nav {
        gap: var(--space-sm) var(--space-md);
    }
    
    .publication-item {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }
    
    .pub-year {
        font-size: 0.875rem;
    }
    
    .writing-item a {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .writing-date {
        min-width: auto;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .social-link {
        justify-content: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .nav,
    .social-links {
        display: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .project-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    .section {
        break-inside: avoid;
    }
}

