/* Base Variables & Minimalist Theme */
:root {
    --bg-color: #f4f5f6; 
    --bg-color-alpha: rgba(244, 245, 246, 0.95);
    --text-main: #1e2125;
    --text-muted: #6b7177;
    --accent: #ff014f; 
    --border-color: #dce1e4;
    --card-bg: #ffffff;
    --timeline-line: #dce1e4;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-color: #101010;
    --bg-color-alpha: rgba(16, 16, 16, 0.95);
    --text-main: #ffffff;
    --text-muted: #a0a8b3;
    --accent: #ff014f;
    --border-color: #2a2a2a;
    --card-bg: #1a1a1a;
    --timeline-line: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    overflow-x: hidden;
}

/* High-Impact Sticky Header */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-color-alpha);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--text-main);
    color: var(--bg-color);
    border-color: var(--text-main);
}

/* Fluid Infinite-Scale Hero Layout */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(3rem, 8vw, 8rem) 5%;
    max-width: 1600px; 
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; 
}

.welcome-text {
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(1.8rem, 3.6vw, 3.8rem); 
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Forces full name onto a single row only on laptops/monitors where room permits */
@media (min-width: 1025px) {
    .name-wrapper {
        white-space: nowrap;
    }
}

.hero h1 .highlight {
    color: var(--accent);
}

.cursor {
    color: var(--accent);
    font-weight: 300;
    animation: blink 1s step-end infinite;
}

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

.hero p.bio {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 400;
    line-height: 1.8;
    max-width: 95%;
}

/* 100% Transparent Image Container - Always takes page background color */
.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.hero-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: clamp(300px, 45vw, 600px); 
    object-fit: contain;
    background: transparent !important;
    transition: var(--transition);
}

/* High Fidelity Breakpoints for Mobile & Tablet Sizes */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 4rem;
    }
    .hero-content {
        align-items: center;
    }
    .hero p.bio {
        max-width: 100%;
    }
    .hero-img {
        max-height: 400px;
        width: auto;
    }
}

/* Shared Container Layout */
.container {
    padding: clamp(2rem, 5vw, 4rem) 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Timeline Layout */
.timeline {
    position: relative;
    border-left: 2px solid var(--timeline-line);
    margin-left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.timeline-item {
    position: relative;
    padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--text-muted);
    transition: var(--transition);
}

.timeline-item:hover::before {
    background-color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.job-title-company {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.job-title-company span {
    font-weight: 400;
    color: var(--accent);
}

.job-meta {
    text-align: right;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .job-header {
        flex-direction: column;
    }
    .job-meta {
        text-align: left;
    }
}

.job-details {
    margin-left: 0;
    list-style-position: outside;
    padding-left: 1.2rem;
}

.job-details li {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    max-width: 950px;
}

.job-tags { margin-top: 0.75rem; }

/* Elastic Project Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 25vw, 360px), 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.project-card h3 {
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-card ul {
    list-style-position: outside;
    padding-left: 1.1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-card li {
    font-size: clamp(0.9rem, 1vw, 0.95rem);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    font-family: monospace;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    color: var(--text-main);
    display: inline-block;
    margin-right: 0.4rem;
    margin-top: 0.4rem;
}

/* Simplified Contact Section */
.contact-channels {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.channel-button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem clamp(1.5rem, 2.5vw, 2.5rem);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
}

.channel-button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.section-center {
    text-align: center;
}

footer {
    text-align: center;
    padding: 5rem 0 3rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}