/* style.css */
:root {
    --bg-main: #FFFFFF;
    --bg-overlay: #F3F4F6;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --accent-primary: #2563EB;
    --accent-secondary: #06B6D4;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-main: #0B0A1A;
    --bg-overlay: #15132B;
    --bg-surface: rgba(21, 19, 43, 0.75);
    --text-primary: #FFFFFF;
    --text-secondary: #A09DB0;
    --accent-primary: #8A2BE2;
    --accent-secondary: #00FFFF;
    
    --glass-bg: rgba(25, 23, 49, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(11, 10, 26, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default for custom cursor */
}

/* Custom Cursor */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-secondary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.5s;
    transition-timing-function: ease-out;
}

.cursor-hover {
    width: 50px;
    height: 50px;
    border-color: var(--accent-primary);
    opacity: 0.5;
}

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-main);
    transition: background-color 0.5s ease, color 0.5s ease;
}

body {
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Noise & Parallax bg */
.noise-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9998; opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glow-bg {
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.04) 0%, transparent 30%);
    z-index: -1; pointer-events: none;
    animation: slowSpin 30s linear infinite;
}

[data-theme="dark"] .glow-bg {
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 30%);
}

@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animated Pipeline BG */
.pipeline-bg {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2; pointer-events: none; opacity: 0.4;
    transition: var(--transition);
}

.pipe-line {
    fill: none; stroke: var(--text-secondary); opacity: 0.15;
    stroke-width: 2; stroke-dasharray: 6, 8;
    animation: flowLine 20s linear infinite;
}

.pipe-node {
    fill: var(--bg-main); stroke: var(--accent-primary);
    stroke-width: 2; opacity: 0.6;
}

.data-packet {
    fill: var(--accent-secondary);
    filter: drop-shadow(0 0 8px var(--accent-secondary));
}

@keyframes flowLine {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

[data-theme="dark"] .pipeline-bg { opacity: 0.2; }

.container { width: 90%; max-width: 1100px; margin: 0 auto; }
a, button { cursor: none; } /* relies on custom cursor */
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.section-title {
    font-size: 2.5rem; font-weight: 700; margin-bottom: 4rem;
    position: relative; display: inline-block; color: var(--text-primary);
}

.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 0;
    width: 40px; height: 4px; background: var(--accent-primary); border-radius: 2px;
}

section { padding: 120px 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px; border-radius: 40px; font-weight: 500; font-size: 1rem;
    transition: var(--transition); border: none;
}

.btn-primary {
    background: var(--text-primary); color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px); background: var(--accent-primary); color: #FFF;
}

.btn-outline {
    background: transparent; border: 1px solid var(--text-secondary); color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary); transform: translateY(-3px);
}

/* Nav */
.floating-nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 800px; padding: 15px 30px; z-index: 1000;
    border-radius: 50px; transition: var(--transition);
}

.floating-nav.scrolled {
    background: var(--glass-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
    padding: 12px 30px; max-width: 700px;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links li a { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.nav-links li a:hover { color: var(--accent-primary); }

.icon-nav-btn {
    background: none; border: none; color: var(--text-primary);
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}

.icon-nav-btn svg { width: 20px; height: 20px; }

.hamburger { display: none; cursor: none; flex-direction: column; gap: 6px; }
.hamburger span { width: 25px; height: 2px; background-color: var(--text-primary); transition: var(--transition); }

/* Glass Cards */
.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border); border-radius: 20px;
    box-shadow: var(--glass-shadow); transition: var(--transition);
}

.hover-glow:hover {
    transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .hover-glow:hover { box-shadow: 0 15px 30px rgba(138,43,226,0.15); }

/* Hero */
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: 60px; }
.hero-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.hero-content { max-width: 550px; flex: 1; z-index: 2; }
.hero-illustration { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; }

.floating-tech {
    position: absolute;
    background: var(--glass-bg); backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border); padding: 8px 18px;
    border-radius: 20px; font-size: 0.95rem; font-weight: 600;
    color: var(--accent-primary); box-shadow: var(--glass-shadow);
    z-index: 10; animation: floatBadge 8s ease-in-out infinite;
}

.tech-sql { top: 10%; right: 10%; animation-delay: 0s; }
.tech-spark { bottom: 20%; right: 5%; animation-delay: 1.5s; color: var(--accent-secondary); }
.tech-aws { top: 20%; left: 0%; animation-delay: 3s; color: var(--text-primary); }
.tech-pipeline { bottom: 15%; left: 5%; animation-delay: 4.5s; color: var(--text-secondary); }

@keyframes floatBadge {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

[data-theme="dark"] .floating-tech { 
    background: var(--glass-bg); color: #FFF; border-color: var(--glass-border);
}

.floating-img {
    max-width: 100%; width: 450px; position: relative; z-index: 5;
    animation: floatImg 6s ease-in-out infinite;
    filter: drop-shadow(0 15px 30px rgba(37,99,235,0.15));
}

@keyframes floatImg {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

[data-theme="dark"] .floating-img { filter: drop-shadow(0 15px 30px rgba(138,43,226,0.3)) brightness(0.9); }

.greeting { font-size: 1.1rem; color: var(--text-secondary); display: block; margin-bottom: 20px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; }
h1.glitch { font-size: 5.5rem; font-weight: 800; line-height: 1; margin-bottom: 10px; color: var(--text-primary); min-height: 100px; }
.role { font-size: 1.8rem; font-weight: 500; margin-bottom: 30px; color: var(--text-secondary); line-height: 1.3; }
.accent-text { color: transparent; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; }
.hero-desc { font-size: 1.15rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 900px) {
    #hero { padding-top: 100px; }
    .hero-wrapper { flex-direction: column-reverse; text-align: center; justify-content: center; gap: 50px; }
    .hero-content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
    h1.glitch { font-size: 4rem; min-height: 80px; }
    .role { font-size: 1.5rem; }
    .floating-img { width: 300px; animation-duration: 4s; }
}

/* Story Scrollytelling Section */
#story-journey { position: relative; padding-top: 100px; }
.story-container { display: flex; gap: 50px; position: relative; align-items: flex-start; }
.story-content { flex: 1; padding-bottom: 50vh; } 
.story-step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.3; transition: var(--transition); }
.story-step.is-active { opacity: 1; transform: scale(1.02); }
.story-step h3 { font-size: 2.2rem; margin-bottom: 25px; color: var(--text-primary); line-height: 1.3; }
.story-step h3 .accent-text { font-size: 1.5rem; }
.story-step p { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.8; }
.story-step p strong { color: var(--text-primary); }

.story-visual-board { flex: 1; position: sticky; top: 25vh; height: 50vh; display: flex; align-items: center; justify-content: center; }
.visual-container { width: 100%; max-width: 400px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; padding: 40px; }
.graphic-layer { position: absolute; width: 50%; height: 50%; opacity: 0; transform: translateY(20px) scale(0.9); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); color: var(--accent-primary); }
.graphic-layer.active { opacity: 1; transform: translateY(0) scale(1); filter: drop-shadow(0 15px 30px rgba(37,99,235,0.3)); }

/* Graphic Keyframes */
/* 1. DAG Flow System */
.graphic-1.active .packet-1 { animation: flowBranch1 2.5s infinite linear; }
.graphic-1.active .packet-2 { animation: flowBranch2 2.5s infinite linear 0.8s; }
.graphic-1.active .packet-3 { animation: flowBranch3 2.5s infinite linear 1.6s; }

@keyframes flowBranch1 {
    0%   { cx: 10; cy: 20; opacity: 0; }
    10%  { cx: 10; cy: 20; opacity: 1; filter: drop-shadow(0 0 5px var(--accent-primary)); }
    30%  { cx: 30; cy: 20; }
    55%  { cx: 50; cy: 45; }
    85%  { cx: 80; cy: 50; opacity: 1; }
    100% { cx: 85; cy: 50; opacity: 0; }
}

@keyframes flowBranch2 {
    0%   { cx: 10; cy: 50; opacity: 0; }
    10%  { cx: 10; cy: 50; opacity: 1; filter: drop-shadow(0 0 5px var(--accent-secondary)); }
    30%  { cx: 35; cy: 50; }
    55%  { cx: 50; cy: 50; }
    85%  { cx: 80; cy: 50; opacity: 1; }
    100% { cx: 85; cy: 50; opacity: 0; }
}

@keyframes flowBranch3 {
    0%   { cx: 10; cy: 80; opacity: 0; }
    10%  { cx: 10; cy: 80; opacity: 1; }
    30%  { cx: 30; cy: 80; }
    55%  { cx: 50; cy: 55; }
    85%  { cx: 80; cy: 50; opacity: 1; }
    100% { cx: 85; cy: 50; opacity: 0; }
}

/* 2. Speed */
.graphic-2.active .fast-packet { animation: shootPacket 1.2s infinite linear; }

@keyframes shootPacket {
    0% { cx: 25; opacity: 1; }
    90% { cx: 75; opacity: 1; filter: drop-shadow(0 0 5px var(--accent-primary)); }
    100% { cx: 75; opacity: 0; }
}

/* 3. Cube */
.graphic-3.active .cube-spin { animation: slowBounce 3s infinite alternate; }
.graphic-3.active .cube-top { animation: glowFace 2s infinite alternate; fill: rgba(37,99,235,0.2); }
.graphic-3.active .cube-left { animation: glowFace 2s infinite alternate 0.6s; fill: rgba(6,182,212,0.2); }
.graphic-3.active .cube-right { animation: glowFace 2s infinite alternate 1.2s; fill: rgba(138,43,226,0.2); }

@keyframes slowBounce { to { transform: translateY(-10px); } }

@keyframes glowFace {
    from { opacity: 0.3; }
    to { opacity: 1; fill-opacity: 0.8; filter: drop-shadow(0 0 8px currentColor); }
}

/* 4. Chart */
.graphic-4.active .bar-1 { animation: growBar1 2s infinite alternate ease-out; }
.graphic-4.active .bar-2 { animation: growBar2 2s infinite alternate ease-out 0.2s; }
.graphic-4.active .bar-3 { animation: growBar3 2s infinite alternate ease-out 0.4s; }
.graphic-4.active .trend-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: traceTrend 4s infinite; }

@keyframes growBar1 { to { height: 30px; y: 50; } }
@keyframes growBar2 { to { height: 60px; y: 20; } }
@keyframes growBar3 { to { height: 85px; y: -5; } }

@keyframes traceTrend {
    0%, 20% { stroke-dashoffset: 100; }
    50%, 80% { stroke-dashoffset: 0; filter: drop-shadow(0 0 5px var(--accent-secondary)); }
    100% { opacity: 0; stroke-dashoffset: 0; }
}

/* 5. Security */
.graphic-5.active .lock-loop { animation: snapLock 3s infinite; transform-origin: center; }
.graphic-5.active .shield-bg { animation: shieldPulse 3s infinite; }

@keyframes snapLock {
    0%, 30% { transform: translateY(-5px); stroke: var(--text-secondary); }
    40%, 100% { transform: translateY(0); stroke: var(--accent-primary); }
}

@keyframes shieldPulse {
    40%, 60% { filter: drop-shadow(0 0 15px rgba(37,235,235,0.4)); stroke: var(--accent-primary); }
}

/* 6. Migration */
.graphic-6.active .legacy-region { animation: spinRound 10s infinite linear; transform-origin: 20px 50px; }
.graphic-6.active .new-region { animation: pulseRegion 2s infinite alternate; }
.graphic-6.active .migrating-user { animation: migrateNode 3s infinite ease-in-out; }
.graphic-6.active .delay-user { animation-delay: 1.5s; }

@keyframes spinRound { to { transform: rotate(360deg); } }

@keyframes pulseRegion {
    to { filter: drop-shadow(0 0 15px var(--accent-primary)); r: 22; }
}

@keyframes migrateNode {
    0% { cx: 20; opacity: 1; fill: currentColor; }
    90% { cx: 80; opacity: 1; fill: var(--accent-primary); }
    100% { cx: 80; opacity: 0; }
}

/* 7. BI Ops & Governance */
.graphic-7.active .refresh-sync { animation: spinRound 3s infinite linear; transform-origin: 80px 45px; }
.graphic-7.active .user-node { animation: authPulse 2s infinite alternate; }
.graphic-7.active .auth-line { stroke-dasharray: 4; animation: traceAuth 1s infinite linear; }
.graphic-7.active .delay-user-2 { animation-delay: 1s; }

@keyframes authPulse {
    to { fill: var(--accent-primary); filter: drop-shadow(0 0 5px var(--accent-primary)); }
}

@keyframes traceAuth {
    to { stroke-dashoffset: -8; }
}

@media (max-width: 900px) {
    .story-container { flex-direction: column-reverse; }
    .story-visual-board { position: sticky; top: 100px; height: 40vh; margin-bottom: 30px; z-index: -10; opacity: 0.5; /* Place faint in background on mobile */ }
    .story-step { min-height: 70vh; margin-bottom: 60px; opacity: 1; }
    .story-content { padding-bottom: 0; }
}


/* Projects Filtering */
.flex-title { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 4rem; }
.filter-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-btn {
    padding: 8px 16px; border: 1px solid var(--glass-border); background: var(--bg-overlay);
    color: var(--text-secondary); border-radius: 30px; transition: var(--transition); font-size: 0.9rem;
}

.filter-btn.active, .filter-btn:hover { background: var(--text-primary); color: var(--bg-main); border-color: var(--text-primary); }

.project-card.hide { display: none; }

/* Sub sections general layout */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background: var(--glass-border); top: 0; bottom: 0; left: 20px; margin-left: -1px; }

.timeline-item { position: relative; margin-bottom: 50px; padding-left: 70px; }

.timeline-dot {
    position: absolute; width: 14px; height: 14px; background: var(--bg-main);
    border: 3px solid var(--accent-primary); border-radius: 50%; left: 14px; top: 10px; z-index: 1; transition: var(--transition);
}

.timeline-item:hover .timeline-dot { background: var(--accent-primary); box-shadow: 0 0 15px var(--accent-primary); }

.timeline-content { padding: 40px; }

.timeline-content .date {
    display: inline-block; padding: 6px 14px; background: var(--bg-overlay);
    color: var(--accent-primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px;
}

.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.edu-card { padding: 40px; text-align: center; }
.skills-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.skill-category { padding: 40px; border-left: 4px solid transparent; transition: all 0.4s ease; display: flex; flex-direction: column; }
.skill-category:hover { border-left-color: var(--accent-primary); transform: translateY(-5px); }
.skill-category h3 { margin-bottom: 25px; font-size: 1.5rem; display: flex; align-items: center; gap: 15px; }

.skill-icon-box {
    display: inline-flex; justify-content: center; align-items: center; width: 45px; height: 45px;
    border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: var(--accent-primary); font-size: 1.2rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 12px; }

.skill-tags span {
    padding: 8px 16px;
    background: var(--bg-surface, rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skill-tags span:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .skill-tags span {
    background: rgba(255,255,255,0.7);
    border-color: rgba(0,0,0,0.05);
    color: #333;
}

[data-theme="light"] .skill-tags span:hover {
    background: var(--accent-primary);
    color: #fff;
}

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { padding: 40px; display: flex; flex-direction: column; height: 100%; }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }

/* Contact and Footer + Back top */
.contact-info { max-width: 500px; margin: 0 auto; padding: 40px; display: flex; flex-direction: column; gap: 25px; align-items: center; }
.contact-link { display: flex; align-items: center; gap: 15px; font-size: 1.25rem; font-weight: 500; }

.social-links {
    max-width: 600px; margin: 30px auto 50px auto; padding: 25px 40px;
    display: flex; gap: 15px; flex-wrap: wrap; justify-content: center;
}

.social-link {
    font-size: 1rem; font-weight: 500; color: var(--text-secondary);
    padding: 8px 24px; border-radius: 30px; border: 1px solid var(--glass-border);
    transition: var(--transition); background: var(--bg-main);
}

.social-link:hover {
    color: var(--bg-main); background: var(--text-primary); border-color: var(--text-primary);
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px;
    background: var(--text-primary); color: var(--bg-main); border: none; border-radius: 50%;
    font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transform: translateY(20px); transition: var(--transition);
    z-index: 1000;
}

#back-to-top.show { opacity: 1; pointer-events: all; transform: translateY(0); }

/* Animations */
.hero-animate { opacity: 0; transform: translateY(40px); animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.reveal-up {
    opacity: 0; transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; transition-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; transition-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; transition-delay: 0.5s; }
