:root {
    --background: #000000;
    --background-secondary: #0a0a0a;
    --background-card: #111111;
    --text: #ffffff;
    --text-secondary: #a1a1aa; /* gray-400 */
    --text-muted: #71717a; /* gray-500 */
    --accent: #3b82f6; /* blue-500 */
    --accent-hover: #2563eb; /* blue-600 */
    --border: #27272a; /* gray-800 */

    --font-heading: "Montserrat", system-ui, sans-serif;
    --font-body: "Open Sans", system-ui, sans-serif;
}

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

html {
    background-color: var(--background);
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: 100%;
}

/* Prevent white background on mobile over-scroll */
html,
body {
    background-color: var(--background) !important;
}

body {
    background: linear-gradient(135deg, var(--background) 0%, var(--background-secondary) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    padding: 4rem 1.5rem;
    max-width: 42rem;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-secondary) 100%);
    z-index: -1;
}

main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--text);
}

h1 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 400; /* font-normal */
    margin-bottom: 0;
}

h2 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500; /* font-medium */
    margin-bottom: 0;
}

h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.bio {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 1rem;
}

.currently-working {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* space-y-6 */
}

.project {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.project:hover::before {
    opacity: 1;
}

.project h3 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.project-subtitle {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.project p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.project p:last-child {
    margin-bottom: 0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 0.25rem 0;
}

.project-link:hover {
    color: var(--accent-hover);
    transform: translateX(2px);
}

.project-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(2px);
}

.connect {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* space-y-4 */
}

.connect .links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    background-color: var(--background-card);
}

.social-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.social-icon:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.email-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    margin-left: 0.5rem;
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        touch-action: manipulation;
    }
    
    body {
        padding: 2rem 1rem;
        background-attachment: scroll; /* Better performance on mobile */
        -webkit-overflow-scrolling: touch;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    main {
        gap: 3rem;
    }
    
    h1 {
        font-size: 1.375rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .bio {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .currently-working {
        gap: 1.25rem;
    }
    
    .project {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .project h3 {
        font-size: 1.0625rem;
        margin-bottom: 0.5rem;
    }
    
    .project-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .project p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .project-link {
        font-size: 0.8125rem;
        margin-top: 0.75rem;
    }
    
    .connect {
        gap: 1rem;
    }
    
    .connect .links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .social-icons-row {
        display: flex;
        gap: 1rem;
        align-items: center;
    }
    
    .social-icon {
        width: 2.5rem;
        height: 2.5rem;
        flex-shrink: 0;
    }
    
    .social-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .email-link {
        font-size: 0.875rem;
        margin-left: 0;
        word-break: break-all;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 1.5rem 1rem;
    }
    
    main {
        gap: 2.5rem;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .project {
        padding: 0.875rem;
    }
    
    .project h3 {
        font-size: 1rem;
    }
    
    .social-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .social-icon svg {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* Smooth scrolling and better focus states */
html {
    scroll-behavior: smooth;
}

.social-icon:focus,
.email-link:focus,
.project:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}