/* Base Variables & Theme */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { 
    background: var(--bg-darker); 
    color: var(--text-main); 
    line-height: 1.6; 
    overflow-x: hidden;
}

/* Matrix Canvas Styling */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; 
    opacity: 0.25; 
}

/* Twinkling Star Cursor Effect */
.magic-star {
    position: absolute;
    pointer-events: none;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    z-index: 9999;
    animation: twinkle 0.8s forwards linear;
}
@keyframes twinkle {
    0% { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0; transform: scale(0) rotate(180deg) translateY(30px); }
}

/* Typography Utilities */
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-top: 10px; }
h1, h2, h3 { color: #fff; font-weight: 600; }

/* Navigation */
.navbar { position: sticky; top: 0; z-index: 999; width: 100%; transition: all 0.3s; }
.glass-nav {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 15px 20px; }
.logo { font-size: 1.5rem; font-weight: 700; }
.logo span { color: var(--accent); }

.navbar ul { list-style: none; display: flex; gap: 20px; align-items: center; }
.navbar a { color: var(--text-main); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.3s; }
.navbar a:hover { color: var(--accent); }
.btn-nav { background: var(--glass-bg); padding: 8px 16px; border-radius: 8px; border: 1px solid var(--glass-border); }
.btn-nav:hover { background: var(--accent) !important; color: #000 !important; }

/* Mobile Menu */
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* Layout & Sections */
.section { max-width: 950px; margin: 0 auto; padding: 80px 20px; }
.section-header { margin-bottom: 30px; }
.section-header h2 { font-size: 2rem; border-bottom: 2px solid var(--glass-border); padding-bottom: 10px; display: inline-block; }
.section-header i { color: var(--accent); margin-right: 10px; }

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, border-color 0.3s;
}
.glass-card:hover { border-color: rgba(56, 189, 248, 0.3); transform: translateY(-3px); }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #000; padding: 10px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 0 15px var(--accent-glow); border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
.btn-outline:hover { background: var(--accent); color: #000; }
.hero-actions { margin-top: 30px; display: flex; gap: 15px; justify-content: center; }

/* Hero Section */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 40px; }
.avatar { 
    width: 180px; 
    height: 180px; 
    object-fit: cover; 
    object-position: top;
    border-radius: 50%; 
    border: 3px solid var(--accent); 
    box-shadow: 0 0 25px var(--accent-glow);
    margin-bottom: 20px;
    animation: float 5s ease-in-out infinite;
}
.hero h1 { font-size: 3rem; margin-bottom: 5px; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* Experience Timeline Cards */
.timeline .card { margin-bottom: 25px; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.company { color: var(--text-muted); font-size: 0.95rem; margin-top: 5px; }
.badge { background: rgba(56, 189, 248, 0.1); color: var(--accent); padding: 5px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--accent-glow); white-space: nowrap; }

/* Lists */
.task-list { list-style: none; }
.task-list li { margin-bottom: 8px; position: relative; padding-left: 20px; color: var(--text-muted); font-size: 0.95rem; }
.task-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 30px; }
.contact-box { text-decoration: none; color: var(--text-main); display: flex; flex-direction: column; align-items: center; gap: 15px; }
.contact-box i { font-size: 2rem; color: var(--accent); }

/* Skills Tags */
.skills-container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.skill-tag { background: rgba(2, 6, 23, 0.5); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; transition: all 0.3s; }
.skill-tag:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); transform: translateY(-2px); }

/* Footer */
footer { text-align: center; padding: 30px; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem; margin-top: 40px; }

/* Animations */
.popup { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.popup.show { opacity: 1; transform: translateY(0); }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .navbar ul { display: none; flex-direction: column; width: 100%; position: absolute; top: 60px; left: 0; background: var(--bg-dark); padding: 20px; border-bottom: 1px solid var(--glass-border); }
    .navbar ul.show { display: flex; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .avatar { width: 140px; height: 140px; }
    .section { padding: 50px 20px; }
    .card-header { flex-direction: column; }
}

/* ========================================= */
/* PRINT STYLES (For PDF Generation)         */
/* ========================================= */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .no-print, .navbar, .hero-actions, footer, #matrix-canvas, .magic-star { display: none !important; }
    .glass-card { background: none !important; border: none !important; box-shadow: none !important; padding: 10px 0 !important; color: #000 !important; page-break-inside: avoid; }
    .section { padding: 20px 0 !important; max-width: 100% !important; margin: 0 !important; }
    .text-accent { color: #000 !important; font-weight: bold; }
    h1, h2, h3, .subtitle, .task-list li, .company { color: #000 !important; }
    .skill-tag { border: 1px solid #ccc !important; color: #000 !important; }
    .avatar { width: 100px; height: 100px; border: 2px solid #000; box-shadow: none; animation: none; }
    .badge { border: 1px solid #000; color: #000; background: none; }
    .popup { opacity: 1 !important; transform: none !important; transition: none !important; }
    .contact-grid { display: block; }
    .contact-box { display: inline-block; margin-right: 20px; border: none; }
}
