:root {
    --bg-primary: #080c13;
    --bg-secondary: #0f1522;
    --bg-card: #161e2f;
    --bg-card-hover: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.12);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(59, 130, 246, 0.3);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 1140px;
    --header-height: 72px;
    --border-radius-sm: 8px;
    --border-radius: 16px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background:
        linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' opacity='0.05'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='1.6' intercept='0'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        radial-gradient(circle at 82% -8%, rgba(59, 130, 246, 0.16), transparent 29rem),
        radial-gradient(circle at -8% 48%, rgba(16, 185, 129, 0.07), transparent 25rem),
        var(--bg-primary);
    background-size:
        48px 48px,
        48px 48px,
        160px 160px,
        auto,
        auto,
        auto;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    isolation: isolate;
}
body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}
body::before {
    width: min(74vmax, 1080px);
    height: min(74vmax, 1080px);
    top: -30vmax;
    right: -23vmax;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.18);
    filter: blur(100px);
    opacity: 0.5;
    animation: ambient-drift 18s ease-in-out infinite alternate;
}
body::after {
    width: min(60vmax, 860px);
    height: min(60vmax, 860px);
    bottom: -30vmax;
    left: -20vmax;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    filter: blur(110px);
    opacity: 0.42;
    animation: ambient-drift-reverse 23s ease-in-out infinite alternate;
}
@keyframes ambient-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-8vmax, 9vmax, 0) scale(1.18); }
}
@keyframes ambient-drift-reverse {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(9vmax, -7vmax, 0) scale(1.15); }
}
ul { list-style: none; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 3px solid rgba(96, 165, 250, 0.85); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
    body.has-custom-cursor,
    body.has-custom-cursor a,
    body.has-custom-cursor button,
    body.has-custom-cursor input,
    body.has-custom-cursor textarea { cursor: none; }
    .cursor-dot,
    .cursor-ring {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 3000;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    }
    .cursor-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 16px rgba(96, 165, 250, 0.9);
        transform: translate(-50%, -50%);
    }
    .cursor-ring {
        width: 34px;
        height: 34px;
        border: 1px solid rgba(96, 165, 250, 0.75);
        border-radius: 50%;
        background: rgba(59, 130, 246, 0.06);
        box-shadow: 0 0 24px rgba(59, 130, 246, 0.16);
        transform: translate(-50%, -50%);
    }
    .cursor-dot.is-visible,
    .cursor-ring.is-visible { opacity: 1; }
    .cursor-ring.is-hovering {
        width: 48px;
        height: 48px;
        border-color: rgba(16, 185, 129, 0.9);
        background: rgba(16, 185, 129, 0.08);
    }
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2000;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 700;
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section { padding: 7rem 0; }

.section-header { text-align: center; max-width: 680px; margin: 0 auto 4.5rem; }
.section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.75rem;
}
.section-title { font-size: clamp(2rem, 4vw, 2.65rem); font-weight: 700; letter-spacing: -0.03em; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.4);
}
.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition);
    background-color: rgba(8, 12, 19, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.header.scrolled {
    background-color: rgba(8, 12, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border-color);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; }
.logo-badge {
    background-color: var(--accent-light);
    color: var(--accent);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-highlight);
}
.nav-list { display: flex; align-items: center; gap: 2rem; }
.nav-link { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.btn-nav {
    padding: 0.4rem 1.25rem;
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--border-highlight);
    border-radius: var(--border-radius-sm);
}
.btn-nav:hover { background-color: var(--accent); color: #ffffff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger, .hamburger::before, .hamburger::after {
    display: block; width: 24px; height: 2px;
    background-color: var(--text-primary);
    position: relative; transition: var(--transition);
}
.hamburger::before { content: ''; position: absolute; top: -6px; }
.hamburger::after { content: ''; position: absolute; top: 6px; }
.nav-toggle.active .hamburger { background-color: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 7rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse 62% 55% at 50% 46%, rgba(59, 130, 246, 0.07), transparent 72%);
}
.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}
.role-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; font-family: var(--font-mono);
    color: var(--success); background-color: var(--success-light);
    padding: 0.35rem 1rem; border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.3); margin-bottom: 1.5rem;
}
.pulse-dot {
    width: 8px; height: 8px; background-color: var(--success);
    border-radius: 50%; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hero-title { font-size: clamp(2.55rem, 4.25vw, 3.8rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.045em; margin-bottom: 0.85rem; }
.highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.5rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 1.5rem; }
.hero-description { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 540px; }
.hero-focus { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: -1.1rem 0 2.5rem; }
.hero-focus li {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(22, 30, 47, 0.72);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.73rem;
}
.hero-actions { display: flex; gap: 1rem; margin-bottom: 3rem; }
.hero-socials { display: flex; gap: 1.25rem; }
.social-icon { width: 22px; height: 22px; color: var(--text-muted); transition: var(--transition); }
.social-icon:hover { color: var(--text-primary); transform: translateY(-3px); }

.qa-card-visual {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(96, 165, 250, 0.06);
    position: relative;
}
.visual-header {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 0.85rem 1.25rem; display: flex; align-items: center;
    gap: 0.5rem; border-bottom: 1px solid var(--border-color);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }
.visual-title { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-left: 0.5rem; }
.visual-body { padding: 1.75rem; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.9; }
.code-line.indent { padding-left: 1.5rem; }
.c-keyword { color: #f472b6; }
.c-func { color: #60a5fa; }
.c-pass { color: var(--success); font-weight: 600; }
.c-comment { color: var(--text-muted); font-style: italic; }
.visual-footer {
    padding: 0.85rem 1.75rem; background-color: rgba(16, 185, 129, 0.05);
    border-top: 1px solid var(--border-color); font-family: var(--font-mono); font-size: 0.75rem;
}
.status-indicator { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--success); }
.status-dot { width: 8px; height: 8px; background-color: var(--success); border-radius: 50%; }

.about-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
}
.about-image-container { position: relative; }
.image-frame {
    position: relative;
    border-radius: var(--border-radius);
    padding: 10px;
    background: linear-gradient(135deg, var(--border-color), transparent);
}
.image-accent {
    position: absolute;
    width: 100%; height: 100%;
    top: 20px; left: 20px;
    border: 2px solid var(--border-highlight);
    border-radius: var(--border-radius);
    z-index: -1;
}
.profile-photo {
    width: 100%;
    border-radius: calc(var(--border-radius) - 4px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    object-fit: cover;
    background-color: var(--bg-card);
}
.about-details { display: flex; flex-direction: column; gap: 2.5rem; }
.about-text { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.25rem; }
.mindset-title { font-size: 1.25rem; margin-bottom: 1.5rem; font-weight: 600; }
.mindset-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.mindset-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.25rem; border-radius: var(--border-radius-sm);
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.mindset-card:hover {
    border-color: var(--border-highlight);
    background-color: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.4);
}
.mindset-icon { width: 24px; height: 24px; color: var(--accent); margin-bottom: 0.75rem; }
.mindset-info h4 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.mindset-info p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}
.skill-category {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem; border-radius: var(--border-radius);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.skill-category:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.category-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.category-icon { width: 24px; height: 24px; color: var(--accent); }
.category-header h3 { font-size: 1.15rem; font-weight: 600; }
.skill-list { display: flex; flex-direction: column; gap: 0.85rem; }
.skill-list li { display: flex; align-items: center; gap: 0.65rem; font-size: 1rem; color: var(--text-secondary); }
.bullet { width: 6px; height: 6px; background-color: var(--accent); border-radius: 50%; }

.workflow-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}
.workflow-step {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.75rem; border-radius: var(--border-radius-sm);
    position: relative; transition: var(--transition);
}
.workflow-step:hover {
    border-color: var(--border-highlight);
    background-color: var(--bg-card);
    transform: translateY(-2px);
}
.step-num {
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent);
    background-color: var(--accent-light); display: inline-block;
    padding: 0.25rem 0.65rem; border-radius: 4px; margin-bottom: 1.25rem; font-weight: 600;
}
.step-content h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step-content p { font-size: 0.9rem; color: var(--text-muted); }

.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 2.25rem;
}
.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}
.project-preview {
    height: 190px; background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), var(--bg-card) 62%); position: relative;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--border-color);
}
.preview-placeholder svg { width: 54px; height: 54px; color: var(--text-muted); }
.preview-overlay { position: absolute; top: 1rem; left: 1rem; }
.preview-tag {
    font-family: var(--font-mono); font-size: 0.75rem;
    background-color: rgba(8, 12, 19, 0.85); color: var(--text-primary);
    padding: 0.35rem 0.75rem; border-radius: 4px; border: 1px solid var(--border-color);
}
.project-content { padding: 1.75rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-title { font-size: 1.25rem; margin-bottom: 0.85rem; }
.project-description { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.tag {
    font-family: var(--font-mono); font-size: 0.75rem;
    background-color: var(--bg-primary); color: var(--accent);
    padding: 0.25rem 0.65rem; border-radius: 4px; border: 1px solid var(--border-color);
}
.project-actions { display: flex; gap: 0.75rem; }

.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0;
    width: 2px; height: 100%; background-color: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 3rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: calc(-2rem - 7px); top: 0.25rem;
    width: 14px; height: 14px; background-color: var(--accent);
    border-radius: 50%; box-shadow: 0 0 0 6px var(--bg-primary);
}
.timeline-content {
    background-color: var(--bg-secondary); border: 1px solid var(--border-color);
    padding: 1.75rem; border-radius: var(--border-radius); transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.timeline-content:hover { border-color: var(--border-highlight); background-color: var(--bg-card); transform: translateX(4px); }
.timeline-date {
    font-family: var(--font-mono); font-size: 0.85rem;
    color: var(--accent); display: block; margin-bottom: 0.5rem; font-weight: 500;
}
.degree { font-size: 1.2rem; margin-bottom: 0.35rem; }
.institution { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1rem; }
.gpa-badge {
    display: inline-block; font-size: 0.85rem; font-weight: 600;
    background-color: var(--bg-primary); color: var(--text-primary);
    padding: 0.35rem 0.75rem; border-radius: 4px; border: 1px solid var(--border-color);
}

.certifications-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.75rem; }
.cert-card {
    background-color: var(--bg-secondary); border: 1px solid var(--border-color);
    padding: 1.75rem; border-radius: var(--border-radius); display: flex; align-items: center; gap: 1.25rem;
    transition: var(--transition);
}
.cert-card:hover { border-color: var(--border-highlight); transform: translateY(-3px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.3); }
.cert-icon { width: 38px; height: 38px; color: var(--accent); flex-shrink: 0; }
.cert-year { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); font-weight: 500;}
.cert-info h3 { font-size: 1.1rem; margin-top: 0.15rem; margin-bottom: 0.25rem; }
.cert-issuer { font-size: 0.9rem; color: var(--text-muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.contact-lead { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2.5rem; }
.info-details { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2.5rem; }
.info-item { display: flex; align-items: flex-start; gap: 1.25rem; }
.info-icon { width: 22px; height: 22px; color: var(--accent); margin-top: 0.2rem; }
.info-label {
    display: block; font-size: 0.8rem; text-transform: uppercase;
    font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 0.2rem;
}
.info-value { font-size: 1rem; color: var(--text-primary); font-weight: 500; }
a.info-value:hover { color: var(--accent); }

.contact-socials { display: flex; gap: 1rem; }
.social-btn {
    display: inline-flex; align-items: center; gap: 0.65rem; padding: 0.65rem 1.25rem;
    background-color: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm); font-size: 0.9rem; color: var(--text-primary); transition: var(--transition);
}
.social-btn:hover { border-color: var(--accent); background-color: var(--bg-card); transform: translateY(-2px); }

.contact-map {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}
.contact-map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.footer { border-top: 1px solid var(--border-color); padding: 5rem 0 3rem; background: linear-gradient(180deg, var(--bg-secondary), #090e18); }
.footer-container { display: flex; flex-direction: column; gap: 2rem; }
.footer-logo { font-size: 1.35rem; font-weight: 700; display: block; margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.95rem; color: var(--text-muted); max-width: 400px; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 2rem; border-top: 1px solid var(--border-color);
    font-size: 0.9rem; color: var(--text-muted);
}
.footer-links { display: flex; gap: 2rem; }
.footer-links a:hover { color: var(--text-primary); }

.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 46px; height: 46px;
    background-color: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition); z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background-color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.back-to-top svg { width: 22px; height: 22px; }

.section:not(.hero), .footer { content-visibility: auto; contain-intrinsic-size: auto 800px; }

.reveal-on-scroll {
    will-change: opacity, transform;
}

html.reveal-active .reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

html.reveal-active .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-grid .reveal-on-scroll:nth-child(2),
.workflow-timeline .reveal-on-scroll:nth-child(2),
.projects-grid .reveal-on-scroll:nth-child(2) {
    transition-delay: 0.15s;
}

.skills-grid .reveal-on-scroll:nth-child(3),
.workflow-timeline .reveal-on-scroll:nth-child(3),
.projects-grid .reveal-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

.skills-grid .reveal-on-scroll:nth-child(4),
.workflow-timeline .reveal-on-scroll:nth-child(4) {
    transition-delay: 0.45s;
}

@media (max-width: 1024px) {
    .about-layout {
        grid-template-columns: 280px 1fr;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; gap: 3.5rem; }
    .about-layout, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-image-container { max-width: 300px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed; top: var(--header-height); left: 0; width: 100%;
        background-color: var(--bg-primary); border-bottom: 1px solid var(--border-color);
        padding: 2rem 1.5rem; transform: translateY(-150%); transition: var(--transition); z-index: 999;
    }
    .nav-menu.active { transform: translateY(0); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .hero-title { font-size: 2.3rem; }
    body::before { width: 130vmax; height: 130vmax; top: -62vmax; right: -74vmax; }
    body::after { width: 110vmax; height: 110vmax; bottom: -56vmax; left: -64vmax; }
    .section { padding: 5rem 0; }
    .section-header { margin-bottom: 3rem; }
    .mindset-cards { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1.25rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-on-scroll,
    html.reveal-active .reveal-on-scroll { opacity: 1; transform: none; }
}
