:root {
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Dark (Default) */
    --bg-color: #080808;
    --text-main: #ffffff;
    --text-muted: #666666;
    --accent: #ffffff;
    --blob-color: rgba(255, 255, 255, 0.07);
    --border-soft: rgba(255, 255, 255, 0.1);
    
    /* Switch Colors - Dark Mode */
    --switch-bg: #1a1a1a;
    --switch-thumb: #333333;
    --switch-icon-active: #ffffff;
    --switch-icon-inactive: #666666;
}

body.light-mode {
    --bg-color: #f4f4f5;
    --text-main: #18181b;
    --text-muted: #a1a1aa;
    --accent: #000000;
    --blob-color: rgba(0, 0, 0, 0.05);
    --border-soft: rgba(0, 0, 0, 0.08);

    /* Switch Colors - Light Mode */
    --switch-bg: #e4e4e7;
    --switch-thumb: #ffffff;
    --switch-icon-active: #000000;
    --switch-icon-inactive: #a1a1aa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    cursor: default;
}

/* Flex Column Layout */
.layout-container {
    min-height: 100vh;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.center-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 10vh 0;
}

/* Hero Line: Single line layout */
.hero-line {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin-bottom: 2rem;
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    align-items: baseline;
}

.static-text {
    color: var(--text-muted);
    font-weight: 600;
}

.dynamic-wrapper {
    color: var(--text-main);
    display: inline-flex;
    align-items: baseline;
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    width: 0.1em;
    height: 1em;
    background-color: var(--text-main);
    margin-left: 0.15em; /* Slightly more space */
    animation: blink 1s step-end infinite;
    transform: translateY(0.1em); 
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.sub-hero {
    max-width: 400px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    width: 100%;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-main);
}

.project-category {
    margin-bottom: 4rem;
}

.category-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: block;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    text-decoration: none;
    color: inherit;
    background-color: var(--border-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
}

body.light-mode .project-card:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.project-icon {
    font-size: 2rem;
    color: var(--text-main);
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 50px;
}

.link-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 5px 0;
    margin-right: 2rem;
    position: relative;
    transition: color 0.3s ease;
}

.link-item:last-child { margin-right: 0; }

.link-item:hover { color: var(--text-main); }

.link-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-main);
    transition: width 0.3s ease;
}

.link-item:hover::after { width: 100%; }

.email-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand .logo-text {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

/* New Segmented Theme Switch */
.theme-switch {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.switch-track {
    position: relative;
    width: 72px; /* Wider to fit two icons */
    height: 36px;
    background-color: var(--switch-bg);
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    background-color: var(--switch-thumb);
    border-radius: 50%; /* Circle thumb */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    z-index: 1;
}

/* Slide Logic */
body.dark-mode .switch-thumb { transform: translateX(36px); } /* Move to moon (right) */
body.light-mode .switch-thumb { transform: translateX(0); } /* Stay at sun (left) */

.icon-box {
    position: relative;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Icon Colors Logic */
body.light-mode .icon-box.sun { color: var(--switch-icon-active); }
body.light-mode .icon-box.moon { color: var(--switch-icon-inactive); }

body.dark-mode .icon-box.sun { color: var(--switch-icon-inactive); }
body.dark-mode .icon-box.moon { color: var(--switch-icon-active); }

/* Mouse Blob */
#cursor-blob {
    position: fixed;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--blob-color) 0%, transparent 70%);
    transform: translate(-50%, -50%); 
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-line { font-size: 4rem; }
}

@media (max-width: 768px) {
    .layout-container { padding: 1.5rem; }
    .hero-line { font-size: 3rem; flex-direction: column; gap: 0; } 
    .bottom-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .social-area {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}
@media (max-width: 480px) {
    .hero-line { font-size: 2.5rem; }
}
