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

:root {
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --text-primary: #d1d1d1;
    --text-secondary: #999999;
    --bg-main: #1a1a1e;
    --bg-subtle: #18181c;
    --border-color: #353536;
    --link-hover: #ffffff;
    --selection-bg: rgba(113, 162, 255, 0.2);
    --selection-color: var(--text-primary);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 120ms cubic-bezier(0.1, 0.7, 0.1, 1);
    --theme-toggle-size: 32px;
}

/* Light theme variables */
[data-theme="light"] {
    --text-primary: #2a2a2a;
    --text-secondary: #555555;
    --bg-main: #fafafa;
    --bg-subtle: #f5f5f5;
    --border-color: #e5e5e5;
    --link-hover: #000000;
    --selection-bg: rgba(22, 95, 232, 0.2);
    --selection-color: var(--text-primary);
}

body {
    font-family: var(--font-mono);
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-main);
    letter-spacing: -0.011em;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

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

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    padding: 72px 0 48px;
}

.header h1 {
    font-size: 42px;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.3;
}

.header p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 550px;
}

/* Sections */
#about,
#experience,
#projects {
    padding: 48px 0;
}

#experience,
#projects,
.footer {
    border-top: 1px solid var(--border-color);
}

h2 {
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.about-image {
    flex: 1;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.cta-button {
    text-decoration: none;
    align-self: flex-start;
    padding: 8px 16px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 13px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.cta-button:hover {
    background-color: var(--bg-subtle);
    border-color: var(--text-primary);
}

/* Experience and Project Grids */
.experience-grid,
.project-grid {
    display: grid;
    gap: 16px;
}

.experience-card,
.project-card {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: background-color var(--transition-fast);
    will-change: background-color;
    background-color: transparent;
}

.experience-card:hover,
.project-card:hover {
    background-color: var(--bg-subtle);
}

.experience-card h3,
.project-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.experience-card p,
.project-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.company-logo img {
    height: 35px;
    width: 35px;
    border-radius: 5px;
}

.experience-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer */
.footer {
    padding: 48px 0;
    margin-top: 48px;
}

.footer p {
    font-size: 16px;
}

.social-links {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    white-space: nowrap;
}

.social-link {
    color: var(--text-secondary);
    font-size: 13px;
    transition: color var(--transition-fast);
}

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

/* Theme toggle styles */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: var(--theme-toggle-size);
    height: var(--theme-toggle-size);
    padding: 8px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    z-index: var(--z-theme);
}

.theme-toggle:hover {
    background: var(--bg-subtle);
}

.theme-toggle svg {
    width: 100%;
    height: 100%;
}

/* Selection styles */
::selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 56px 0 40px;
    }

    .header h1 {
        font-size: 24px;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image,
    .about-text {
        width: 100%;
    }

    .experience-card,
    .project-card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}