/* --- THEME & COLOR VARIABLES --- */
:root {
    --main-color: #3498db;
    --secondary-color: #ffffff;
    --tertiary-color: #f39c12; 
    --text-color: #333333;
    --bg-color: #f5f7fa;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --resume-accent: #2ecc71;
    --gradient-1: #3498db;
    --gradient-2: #9b59b6;
    --gradient-3: #e74c3c;
    --gradient-4: #f1c40f;
}

[data-theme="dark"] {
    --secondary-color: #0d1117;
    --tertiary-color: #ff6b35;
    --text-color: #f5f7fa;
    --bg-color: #0d1117;
    --glass-bg: rgba(22, 27, 34, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-1: #3498db;
    --gradient-2: #8e44ad;
    --gradient-3: #1abc9c;
    --gradient-4: #3498db;
}

/* --- GENERAL & RESET STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-color); transition: background-color 0.5s ease, color 0.5s ease; min-height: 100vh; overflow-x: hidden; }
.animated-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-4)); background-size: 400% 400%; animation: gradientShift 15s ease infinite; opacity: 0.1; z-index: -1; }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
main { padding-top: 80px; }
section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
h1, h2, h3, h4 { color: var(--text-color); }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 2rem; background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* --- SPLASH SCREEN --- */
#splash-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 1000; transition: opacity 1s, visibility 1s; }
#splash-screen.hidden { opacity: 0; visibility: hidden; }
#matrix-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.splash-content { position: relative; z-index: 10; text-align: center; }
.matrix-text { color: #00ff00; font-family: 'Courier New', monospace; font-size: 1.2rem; margin-bottom: 1rem; opacity: 0; animation: matrixFade 1s forwards; text-shadow: 0 0 5px currentColor; }
@keyframes matrixFade { to { opacity: 1; color: #00ffff; } }
.splash-name { font-size: clamp(2.5rem, 10vw, 4rem); font-weight: bold; margin-bottom: 1rem; font-family: 'Courier New', monospace; background: linear-gradient(90deg, #00ff00, #00ffff, #ff00ff, #00ff00, #00ffff); background-size: 300% 100%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: enhancedGradient 3s linear infinite, glowIn 1s forwards 2s; text-shadow: 0 0 30px rgba(0, 255, 255, 0.5); }
@keyframes enhancedGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes glowIn { to { filter: brightness(1.5) drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)); transform: scale(1.05); } }
.splash-title { font-size: clamp(1rem, 4vw, 1.5rem); font-family: 'Courier New', monospace; opacity: 0; background: linear-gradient(90deg, #00ff00, #ffffff, #00ff00); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: textGlow 2s forwards 2.5s, titleGradient 4s linear infinite 2.5s; }
@keyframes titleGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes textGlow { to { opacity: 1; filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8)); } }

/* --- NAVIGATION --- */
nav { position: fixed; top: 0; left: 0; width: 100%; padding: 1rem 2rem; background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); z-index: 100; transition: transform 0.3s ease, background-color 0.5s ease; }
nav.hidden { transform: translateY(-100%); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 1.5rem; font-weight: bold; background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-color); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--main-color); }
.hamburger { display: none; flex-direction: column; cursor: pointer; z-index: 10; }
.hamburger span { width: 25px; height: 3px; background-color: var(--text-color); margin: 3px 0; transition: 0.3s; }

/* --- THEME TOGGLE --- */
.theme-toggle { position: relative; width: 24px; height: 24px; background: none; border: none; cursor: pointer; padding: 0; margin-left: 1rem; }
.theme-toggle i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.2rem; color: var(--text-color); transition: transform 0.4s ease-out, opacity 0.4s ease-out; backface-visibility: hidden; }
.theme-toggle .fa-moon { transform: translate(-50%, -50%) rotate(90deg) scale(0.5); opacity: 0; }
[data-theme="dark"] .theme-toggle .fa-sun { transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); opacity: 0; }
[data-theme="dark"] .theme-toggle .fa-moon { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }

/* --- HERO & SOCIAL BUTTONS --- */
#hero { text-align: center; }
.hero-title { font-size: clamp(2.5rem, 8vw, 3.5rem); margin-bottom: 1rem; }
.hero-subtitle { font-size: clamp(1.2rem, 4vw, 1.5rem); margin-bottom: 2rem; }
.social-buttons { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-color); font-size: 1.2rem; transition: all 0.3s ease; position: relative; text-decoration: none; }
.social-btn:hover { transform: translateY(-5px) scale(1.1); background: var(--main-color); color: var(--secondary-color); box-shadow: 0 0 15px var(--main-color); }
.social-btn::after { content: attr(data-tooltip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: var(--main-color); color: var(--secondary-color); padding: 0.3rem 0.6rem; border-radius: 5px; font-size: 0.8rem; font-weight: bold; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.social-btn:hover::after { opacity: 1; visibility: visible; }

/* --- CARDS & GRIDS --- */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 15px; border: 1px solid var(--glass-border); padding: 2rem; margin-bottom: 2rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.glass-card:hover { transform: translateY(-10px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); }
.projects-grid, .extras-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
/* Individual project cards are no longer glass by default, the container is */
.project-card { background: rgba(0,0,0,0.05); border-radius: 15px; padding: 1.5rem; transition: transform 0.3s ease; }
[data-theme="dark"] .project-card { background: rgba(255,255,255,0.05); }

.project-image { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; transition: transform 0.3s ease; }
.project-card:hover .project-image { transform: scale(1.05); }
.tech-tags-container { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tech-tag { background-color: rgba(52, 152, 219, 0.2); color: var(--main-color); padding: 0.25rem 0.75rem; border-radius: 15px; font-size: 0.8rem; font-weight: 500; }
.youtube-embed { width: 100%; height: 315px; border-radius: 10px; margin-top: 1rem; border: none; }
.blog-post { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--glass-border); }
.blog-post:last-child { border-bottom: none; }

/* --- TECH STACK & RESUME SKILLS (UNIFIED) --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; position: relative; padding: 1rem; }
.skills-grid::before { content: ''; position: absolute; inset: 0; border-radius: 10px; background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(46, 204, 113, 0.2), transparent 200px); opacity: 0; transition: opacity 0.3s ease; pointer-events: none;}
.skills-grid:hover::before { opacity: 1; }
.skill-item { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 10px; padding: 1.5rem 1rem; text-align: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; z-index: 2; }
.skill-item:hover { transform: translateY(-10px) scale(1.05); background: linear-gradient(45deg, var(--resume-accent), var(--gradient-1)); color: var(--secondary-color); box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3); }
.skill-item h4 { font-size: 1rem; font-weight: 500; }
.skill-item p { font-size: 0.9rem; opacity: 0.7; }
.skill-item h4, .skill-item p { transition: opacity 0.3s ease, transform 0.3s ease; }
.skill-item:hover h4, .skill-item:hover p { opacity: 1; transform: translateY(-2px); }
.skill-item i { font-size: 2.5rem; margin-bottom: 1rem; color: var(--main-color); transition: all 0.3s ease; display: inline-block; }
.skill-item:hover i { color: inherit; }
.skill-item[data-skill="html"]:hover i { animation: shake 0.5s ease; }
.skill-item[data-skill="css"]:hover i { animation: spin 1s ease; }
.skill-item[data-skill="js"]:hover i { animation: pulse 0.8s infinite; }
.skill-item[data-skill="react"]:hover i { animation: spin 2s linear infinite; }
.skill-item[data-skill="node"]:hover i { animation: bounce 0.8s ease; }
.skill-item[data-skill="python"]:hover i { animation: wiggle 0.5s ease; }
.skill-item[data-skill="mongo"]:hover i { animation: pulse 1s infinite; }
.skill-item[data-skill="git"]:hover i { animation: flip 0.6s ease; }

/* --- RESUME PAGE SPECIFIC --- */
.resume-container { max-width: 900px; margin: 100px auto 2rem; }
.resume-header { text-align: center; margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 2px solid var(--resume-accent); }
.resume-header h1 { font-size: 2.5rem; }
.contact-info { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.contact-item { display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease; padding: 0.5rem 1rem; border-radius: 10px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.contact-item:hover { transform: translateY(-3px); background: var(--resume-accent); color: var(--secondary-color); }
.resume-section { margin-bottom: 2.5rem; }
.resume-item { margin-bottom: 1.5rem; border-left: 3px solid var(--resume-accent); position: relative; transition: all 0.3s ease; background: var(--glass-bg); border-radius: 0 10px 10px 0; padding: 1rem 1rem 1rem 2rem; }
.resume-item::before { content: ''; position: absolute; left: -8px; top: 1.2rem; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--resume-accent); transition: all 0.3s ease; }
.resume-item:hover { transform: translateX(10px); border-left-color: var(--gradient-1); }
.resume-item:hover::before { background: var(--gradient-1); transform: translateY(-50%) scale(1.5); }
.resume-item h3 { color: var(--main-color); margin-bottom: 0.5rem; }
.resume-item .date { color: var(--tertiary-color); font-weight: bold; margin-bottom: 0.5rem; }
.resume-item ul { margin-left: 1.5rem; margin-top: 0.5rem; }
.download-btn { display: inline-block; margin-top: 2rem; padding: 1rem 2rem; background: linear-gradient(45deg, var(--resume-accent), var(--gradient-1)); color: var(--secondary-color) !important; text-decoration: none; border-radius: 10px; font-weight: bold; transition: all 0.3s ease; }
.download-btn:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4); }

@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-15px); } 60% { transform: translateY(-10px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes flip { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* --- FOOTER --- */
footer { padding: 2rem; text-align: center; border-top: 1px solid var(--glass-border); background: var(--glass-bg); margin-top: 2rem;}
.footer-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; gap: 1rem; }
.footer-right { display: flex; align-items: center; gap: 1.5rem; }
.view-counter, .media-links { display: flex; align-items: center; gap: 0.5rem; }
.media-links a { color: var(--text-color); font-size: 1.2rem; transition: color 0.3s ease; }
.media-links a:hover { color: var(--main-color); }

/* --- RESPONSIVE & PRINT --- */
@media (max-width: 768px) {
    .nav-links { position: fixed; top: 100%; left: 0; width: 100%; background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 1rem; align-items: center; border-top: 1px solid var(--glass-border); transform: translateY(-20px); opacity: 0; visibility: hidden; transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; flex-direction: column; }
    .nav-links.active { display: flex; transform: translateY(0); opacity: 1; visibility: visible; }
    .hamburger { display: flex; }
    .hero-title { font-size: 2.5rem; }
    .footer-content { flex-direction: column; justify-content: center; text-align: center; }
}

@media print {
    body { background: white !important; color: black !important; }
    .animated-bg, nav, footer, .download-btn { display: none; }
    .resume-container { margin: 0; box-shadow: none; border: none; background: transparent; }
    :root { --main-color: #000; --text-color: #000; --bg-color: #fff; --glass-bg: transparent; --glass-border: #ccc; --resume-accent: #000; --gradient-1: #000; --gradient-2: #000; --gradient-3: #000; --gradient-4: #000; }
    .skill-item, .contact-item, .resume-item { background: #f9f9f9; border: 1px solid #eee; }
    h1, h2, h3, p, li, span, i, a { color: #000 !important; background: none !important; -webkit-text-fill-color: initial !important; text-decoration: none; }
}

/* --- VIEW TRANSITION API --- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root:not([data-theme="dark"])::view-transition-new(root) { z-index: 999; }
:root:not([data-theme="dark"])::view-transition-old(root) { z-index: 1; }
:root[data-theme="dark"]::view-transition-new(root) { z-index: 1; }
:root[data-theme="dark"]::view-transition-old(root) { z-index: 999; }

