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

/* Color Variables */
:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #666666;
    --text-tertiary: #888888;
    --text-quaternary: #999999;
    --link-decoration: #cccccc;
    --hover-color: #000000;
}

[data-theme="dark"] {
    --bg-color: #111111;
    --text-primary: #ededed;
    --text-secondary: #a1a1a1;
    --text-tertiary: #666666;
    --text-quaternary: #555555;
    --link-decoration: #444444;
    --hover-color: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout Container */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 80px 24px;
    position: relative;
}

/* Header Actions / Toggle */
.header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    color: var(--text-primary);
    background-color: rgba(125, 125, 125, 0.1);
}

/* Toggle Logic: Hide/Show Icons */
.moon-icon { display: none; }
.sun-icon { display: block; }

[data-theme="dark"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: none; }


/* Typography Hierarchy */
h1 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    margin-top: 60px;
}

h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

p {
    font-size: 15px;
    color: var(--text-secondary); /* Updated to use variable */
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--link-decoration);
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration-color: var(--hover-color);
}

/* Hero Section */
.hero {
    margin-bottom: 60px;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.bio {
    max-width: 90%;
    color: var(--text-secondary);
}

/* Project Items */
.project-item {
    margin-bottom: 32px;
    cursor: default;
}

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

.arrow {
    font-size: 12px;
    color: var(--text-quaternary);
    transition: transform 0.2s;
}

.project-item:hover .arrow {
    transform: translate(2px, -2px);
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Experience Items */
.experience-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    font-size: 15px;
}

.role {
    font-weight: 500;
    color: var(--text-primary);
}

.company {
    color: var(--text-secondary);
    margin-left: 6px;
}

.company::before {
    content: "—";
    margin-right: 6px;
    opacity: 0.5;
}

.date {
    color: var(--text-tertiary);
    font-size: 14px;
    font-feature-settings: "tnum";
    flex-shrink: 0;
    margin-left: 24px;
}

/* Footer */
.social-links {
    margin-top: 24px;
    display: flex;
    gap: 16px;
}

.social-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
}

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

/* Mobile Responsiveness */
@media (max-width: 500px) {
    .experience-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .date {
        margin-left: 0;
        font-size: 13px;
    }
}