/* --- Variables --- */
:root {
    /* Palette: Fintech Blue/Teal & Slate Theme */
    --bg-body: #050510;
    /* Darker, cooler background (Fintech: Deep Navy/Slate) */
    --bg-surface: #0f172a;
    /* Slate 900 */
    --bg-surface-glass: rgba(15, 23, 42, 0.7);

    --text-primary: #f1f5f9;
    /* Slate 100 - High Contrast White */
    --text-secondary: #cbd5e1;
    /* Slate 300 - Much lighter for readability */
    --text-tertiary: #94a3b8;
    /* Slate 400 */

    --accent-primary: #0ea5e9;
    /* Sky 500 (Fintech Blue) */
    --accent-secondary: #14b8a6;
    /* Teal 500 (Growth/Data) */
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);

    --border-subtle: rgba(255, 255, 255, 0.1);
    /* Stronger borders */
    --border-highlight: rgba(14, 165, 233, 0.3);
    /* Subtle blue highlight */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.15);
    /* Blue glow */

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    /* Tech vibe */


    --max-width: 1100px;
    --nav-height: 80px;
}

[data-theme="light"] {
    /* "Eye Pleasant" Light Theme - Professional Golden/Cream */
    --bg-body: #fdfcf8;
    /* Ivory/Cream - Warm & Professional */
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.95);
    /* Opaque White Glass for clear Header definition */

    --text-primary: #27272a;
    /* Zinc 900 - Professional Dark Gray */
    --text-secondary: #52525b;
    /* Zinc 600 */
    --text-tertiary: #71717a;

    --accent-primary: #d97706;
    /* Amber 600 - Golden Tone */
    --accent-secondary: #059669;
    /* Emerald 600 - Complementary Green */
    --accent-gradient: linear-gradient(135deg, #d97706 0%, #ca8a04 100%);
    /* Gold Gradient */

    --border-subtle: rgba(217, 119, 6, 0.15);
    /* Golden subtle border */
    --border-highlight: rgba(217, 119, 6, 0.4);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 20px rgba(217, 119, 6, 0.15);
    /* Golden Glow */
}

/* Smooth Theme Transition */
body,
.glass-panel,
.navbar,
.job-card,
.skill-card,
.btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 17px;
    /* Increased base size for readability (was 16px) */
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Fintech Grid Background */
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        /* Center Glow */
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 100vw 100vh, 40px 40px, 40px 40px;
    background-repeat: no-repeat, repeat, repeat;
    background-attachment: fixed;
    /* Fix background to fill 'blank' feel */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

section {
    padding: 5rem 1.5rem;
    /* Restored breathing room */
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
    color: var(--text-primary);
    /* Adapted for Light Mode */
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

/* --- Components --- */
/* --- Components --- */
.glass-panel {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    /* Sharper corners for tech feel */
    position: relative;
    overflow: hidden;
}

/* Tech Corners Effect */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent-primary);
    border-left: 2px solid var(--accent-primary);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.glass-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--accent-secondary);
    border-right: 2px solid var(--accent-secondary);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.glass-panel:hover::before,
.glass-panel:hover::after {
    width: 100%;
    height: 100%;
    opacity: 0.1;
    /* Full border glow on hover */
    border-color: var(--accent-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    border: 1px solid var(--border-highlight);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.section-header {
    margin-bottom: 2rem;
    /* Balanced gap */
    text-align: left;
}

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    /* Ensure default visibility */
    background: transparent;
}

/* Light Mode Navbar Specifics */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    /* Solid White */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Proper border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for lift */
}

.navbar.scrolled {
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem;
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    /* Even more solid on scroll */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    /* Ensure logo matches theme */
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.93rem;
    /* Slightly larger for readability */
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-primary);
    /* Fix: Use accent instead of white */
}

.mobile-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 80vh;
    /* Reduced for compactness */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--nav-height) + 1rem);
    /* Tighter top spacing */
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.hero-assets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.float-icon {
    position: absolute;
    font-size: 2.5rem;
    /* Bigger icons */
    color: rgba(14, 165, 233, 0.5);
    /* Higher opacity for visibility */
    animation: float-icon 6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(14, 165, 233, 0.4));
    /* Glow for visibility */
    z-index: 0;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    50% {
        transform: translateY(-30px) rotate(15deg) scale(1.1);
    }

    /* More movement (Play) */
}

.hero-content {
    display: flex;
    /* Side-by-side layout (Text Left, Image Right) */
    align-items: center;
    justify-content: center;
    gap: 4rem;
    /* Spacing between text and image */
    max-width: var(--max-width);
    text-align: left;
    /* Text remains left-aligned */
    z-index: 1;
}

.hero-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.3);
    order: 2;
    /* Image on the right */
    animation: float 6s ease-in-out infinite;
    flex-shrink: 0;
    margin-bottom: 0;
    /* Remove bottom margin */
    /* Signal Tower Effect (Telecom Vibe) */
    position: relative;
    z-index: 2;
}

.hero-img-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
}

/* Signal Waves */
.hero-img-container::before,
.hero-img-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    opacity: 0;
    z-index: 0;
    animation: signal-pulse 3s infinite ease-out;
}

.hero-img-container::after {
    animation-delay: 1.5s;
}

@keyframes signal-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.hero-text-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 9999px;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-desc {
    font-size: 1.35rem;
    /* Bigger overall */
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    max-width: 600px;
    line-height: 1.6;
}

#typewriter {
    font-weight: 700;
    /* Bolder */
    font-size: 1.5rem;
    /* Bigger than surrounding text */
    text-transform: uppercase;
    /* More impact */
    letter-spacing: 0.05em;
    background: linear-gradient(to right, #0ea5e9, #14b8a6);
    /* Explicit gradient ensuring visibility */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-secondary);
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        /* Stack text below image on mobile */
        text-align: center;
        gap: 2rem;
    }

    .hero-img {
        order: initial;
        width: 140px;
        height: 140px;
        margin-bottom: 1rem;
    }

    .hero-text-block {
        align-items: center;
    }
}

/* --- Career --- */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.25rem;
    /* Adjusted for better alignment */
    width: 0.75rem;
    height: 0.75rem;
    background: var(--bg-body);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.job-card {
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    padding-bottom: 1rem;
    /* Reduce bottom padding */
}

.job-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.3);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    /* Fix alignment with text baseline */
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.job-period {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    /* Tech vibe for numbers */
    font-weight: 500;
    white-space: nowrap;
    /* Prevent wrapping */
}

.job-card .text-muted {
    margin-top: 0.5rem !important;
    /* Reduced from 1rem */
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    padding: 2rem;
    height: 100%;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: 0.3s;
}

.skill-tag:hover {
    color: white;
    border-color: var(--accent-primary);
    background: rgba(14, 165, 233, 0.1);
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: white;
    color: black;
    transform: translateY(-3px);
}

/* --- Animations --- */
@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
/* --- Responsive --- */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 85%;
        /* Wider menu on mobile */
        background: rgba(5, 5, 16, 0.98);
        /* Less transparent */
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        border-left: 1px solid var(--border-highlight);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(20px);
    }

    .nav-menu.active {
        transform: translateX(0);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .hero-content {
        flex-direction: column-reverse;
        /* Stack text below image on mobile */
        text-align: center;
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .hero-img {
        order: initial;
        width: 160px;
        /* Slightly larger on mobile for focus */
        height: 160px;
        margin-bottom: 1rem;
        border-width: 2px;
    }

    .hero-text-block {
        align-items: center;
    }

    section {
        padding: 4rem 1.5rem;
        /* Ensure side padding */
    }

    h1 {
        font-size: 2.25rem;
        /* Better scaling */
    }

    .hero-desc {
        font-size: 1rem;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .timeline {
        padding-left: 1.5rem;
        /* Less indentation on mobile */
    }

    .timeline-dot {
        left: -1.85rem;
        /* Adjust dot position */
        width: 0.65rem;
        height: 0.65rem;
    }

    .btn {
        width: 100%;
        /* Full width buttons on mobile */
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    /* Mobile Asset Optimization */
    .hero-assets {
        opacity: 0.3;
        /* Reduce opacity on mobile */
    }

    .float-icon {
        font-size: 1.5rem;
        /* Smaller icons on mobile */
        animation-duration: 8s;
        /* Slower animation */
    }

    /* Ensure content is always above assets */
    .hero-content,
    .section-header,
    .timeline,
    .skills-grid {
        position: relative;
        z-index: 5;
    }
}