* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #F4F4F5; 
    --color-grid: #E4E4E7; 
    --color-surface: rgba(255, 255, 255, 0.7); 
    --color-text-primary: #09090B; 
    --color-text-secondary: #52525B;
    --color-border: #D4D4D8;
    --color-border-hover: #A1A1AA;
    --color-accent: #0284C7;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

html.theme-dark {
    --color-bg: #09090B;
    --color-grid: #18181B; 
    --color-surface: rgba(18, 18, 20, 0.6); 
    --color-text-primary: #FAFAFA;
    --color-text-secondary: #A1A1AA;
    --color-border: #27272A;
    --color-border-hover: #52525B;
    --color-accent: #38BDF8;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    
    background-image: 
        linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

::selection { background-color: var(--color-accent); color: #000; }
.mono-text { font-family: var(--font-mono); text-transform: uppercase; }
.highlight { color: var(--color-accent); font-weight: 700; }

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: transparent; 
    border: 1px solid var(--color-border);
    color: var(--color-accent); 
    cursor: pointer;
    width: 44px; 
    height: 44px; 
    border-radius: 8px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background-color: var(--color-accent);
    color: #000;
}
html:not(.theme-dark) .sun-icon { display: none; }
html.theme-dark .moon-icon { display: none; }

.container {
    width: 100%;
    max-width: 900px; 
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.badge {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    background: rgba(56, 189, 248, 0.08);
    color: var(--color-accent);
    padding: 6px 16px; 
    border: 1px solid var(--color-border);
    border-radius: 50px; 
    font-size: 0.75rem; 
    letter-spacing: 0.05em;
}
.pulse-dot { width: 6px; height: 6px; background: var(--color-accent); border-radius: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }

header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin: 20px 0 8px;
    letter-spacing: -0.03em;
}

header p {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.schematic-panel {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.4s ease;
    animation: fadeInUp 1s ease-out;
}
html.theme-dark .schematic-panel { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }

.schematic-panel::before, .schematic-panel::after {
    content: ''; position: absolute; width: 8px; height: 8px; border: 1px solid var(--color-accent); opacity: 0; transition: opacity 0.3s;
}
.schematic-panel::before { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.schematic-panel::after { bottom: -4px; right: -4px; border-left: none; border-top: none; }

.schematic-panel:hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
    transform: translateY(-4px);
}
.schematic-panel:hover::before, .schematic-panel:hover::after { opacity: 1; }

.image-container {
    flex-shrink: 0;
}
.image-wrapper {
    position: relative;
    padding: 12px;
    border: 1px dashed var(--color-border);
    border-radius: 8px; 
    transition: all 0.3s ease;
    overflow: hidden;
}
.schematic-panel:hover .image-wrapper { border-color: var(--color-accent); }

.image-wrapper img {
    width: 240px;
    height: 240px;
    border-radius: 4px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.image-wrapper:hover img {
    transform: scale(1.04);
}

.text-content {
    flex: 1;
}

.text-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bio {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    padding-left: 16px;
    border-left: 2px solid var(--color-border);
}

.connect-text {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-accent);
    letter-spacing: 0.05em;
}

.icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background-color: transparent;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
}

.social-link:hover {
    background-color: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
    transform: translateY(-3px);
}
.social-link svg { transition: transform 0.3s; }
.social-link:hover svg { transform: scale(1.1); }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 100px;
    }
    .theme-toggle {
        top: 20px;
        right: 20px;
    }
    .profile-card.schematic-panel {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        gap: 30px;
    }
    .image-wrapper img {
        width: 180px;
        height: 180px;
    }
    .bio {
        border-left: none;
        padding-left: 0;
    }
    .icons {
        justify-content: center;
    }
}