/* --- CSS Variables & Theming --- */
:root {
    --bg-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop');
    
    /* Dark Mode */
    --overlay-color: rgba(0, 0, 0, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #e2e2e2;
    --accent-color: #5facff;
    --accent-glow: rgba(95, 172, 255, 0.5);
    
    /* Glass Panels */
    --panel-bg: rgba(20, 20, 20, 0.4);
    --panel-border: rgba(255, 255, 255, 0.15);
    --panel-hover: rgba(255, 255, 255, 0.2);
    
    --nav-bg: rgba(0, 0, 0, 0.2);
    --blur-strength: 20px;
}

[data-theme="light"] {
    --overlay-color: rgba(255, 255, 255, 0.3);
    --text-primary: #1d1d1f;
    --text-secondary: #333333;
    --accent-color: #0066cc;
    
    --panel-bg: rgba(255, 255, 255, 0.45);
    --panel-border: rgba(255, 255, 255, 0.6);
    --panel-hover: rgba(255, 255, 255, 0.65);
    
    --nav-bg: rgba(255, 255, 255, 0.3);
}

/* --- Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay-color);
    z-index: -1; pointer-events: none;
    transition: background-color 0.3s ease;
}

html { scroll-behavior: smooth; }

/* --- Navigation --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    border-bottom: 1px solid var(--panel-border);
}

.nav-content {
    max-width: 1100px; margin: 0 auto; padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}

.logo {
    font-size: 1.5rem; font-weight: 700; color: var(--text-primary);
    text-decoration: none; text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-right, .nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links { list-style: none; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.95rem;
    font-weight: 500; transition: all 0.3s;
}
.nav-links a:hover { color: var(--accent-color); transform: translateY(-1px); }

.theme-btn {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px); color: var(--text-primary);
    padding: 8px 12px; border-radius: 50%; cursor: pointer;
}
.theme-btn:hover { background: var(--panel-hover); }

/* --- Mini Hero --- */
.hero-mini {
    padding-top: 120px; padding-bottom: 40px; text-align: center;
}
.hero-mini h1 {
    font-size: 3rem; font-weight: 800; line-height: 1.2;
    text-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    color: var(--accent-color);
}
.subtitle {
    font-size: 1.1rem; color: var(--text-secondary); margin-top: 10px;
}

/* --- Section Layouts --- */
.section-container { max-width: 1100px; margin: 50px auto; padding: 0 20px; }
.section-title {
    font-size: 2rem; font-weight: 700; margin-bottom: 30px; text-align: center;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Glass Panels (Reusable) --- */
.glass-panel, .glass-card {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: 20px; padding: 30px;
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* --- Profile & About --- */
.profile-panel {
    display: flex; flex-direction: row; gap: 40px; align-items: center;
}
.profile-image-large {
    flex: 0 0 300px; height: 300px;
}
.profile-image-large img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 20px;
    border: 4px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.profile-text { flex: 1; }
.profile-text h2 { font-size: 2rem; margin-bottom: 15px; }

/* Resume Button */
.btn-resume {
    background: var(--text-primary);
    color: #000;
    border: none; padding: 12px 28px; border-radius: 50px;
    font-weight: 700; font-size: 0.95rem; text-decoration: none;
    display: inline-flex; align-items: center; gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255,255,255,0.15);
}
[data-theme="light"] .btn-resume {
    background: #000; color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-resume:hover {
    transform: scale(1.05); box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}
.btn-icon-circle { display: flex; align-items: center; justify-content: center; }

.status-badge-inline {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1); padding: 6px 16px;
    border-radius: 20px; font-size: 0.85rem;
    border: 1px solid var(--panel-border);
}
.pulse {
    width: 8px; height: 8px; background-color: #4ade80; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulse-green 2s infinite;
}

/* --- Soft Skills --- */
.soft-skills-container {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px;
}
.soft-skill-pill {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
    padding: 8px 20px; border-radius: 50px; color: var(--text-secondary);
    font-size: 0.95rem; backdrop-filter: blur(5px); transition: all 0.3s;
}
.soft-skill-pill:hover {
    background: var(--accent-color); color: white;
    border-color: var(--accent-color); transform: translateY(-2px);
}

/* --- Grid Layout for Skills --- */
.grid-stack {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.glass-card { display: flex; flex-direction: column; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.justify-center { justify-content: center; }
.center-text { text-align: center; }

.icon-accent { color: var(--accent-color); font-size: 1.4rem; }
.badge-container { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-container img { height: 26px; border-radius: 4px; }

/* --- Projects --- */
.projects-tabular { display: flex; flex-direction: column; gap: 40px; }
.project-row { display: flex; align-items: center; gap: 40px; padding: 0; overflow: hidden; }
.project-row.reverse { flex-direction: row-reverse; }

.project-img-container {
    flex: 0 0 40%; aspect-ratio: 1 / 1; position: relative;
}
.project-img-container img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.project-info { flex: 1; padding: 40px; }
.project-info h3 { font-size: 1.8rem; margin-bottom: 15px; line-height: 1.3; }
.project-info p { color: var(--text-secondary); margin-bottom: 20px; font-size: 1rem; }
.mini-badges { display: flex; gap: 8px; margin-top: 10px; }
.mini-badges img { height: 24px; }

/* --- Contact & Footer --- */
.contact-card { text-align: center; padding: 60px 20px; }
.text-btn {
    background: transparent; border: 1px solid var(--accent-color);
    color: var(--accent-color); margin-top: 20px; display: inline-block;
    padding: 10px 20px; text-decoration: none;
}
.text-btn:hover { background: var(--accent-color); color: #fff; }

footer {
    text-align: center; padding: 30px; color: var(--text-secondary);
    border-top: 1px solid var(--panel-border);
    background: rgba(0,0,0,0.2); backdrop-filter: blur(20px);
}

/* --- SOCIAL PILLS (Expanding on Hover) --- */
.social-links-expandable {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-pill {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
    cursor: pointer; /* Important for divs to feel clickable */
}

.username {
    max-width: 0; opacity: 0; white-space: nowrap;
    font-size: 0.95rem; font-weight: 500; margin-left: 0;
    transition: all 0.4s ease; overflow: hidden;
}

/* Hover: Expand */
.social-pill:hover {
    width: auto; padding: 0 25px; border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-pill:hover .username {
    max-width: 300px; opacity: 1; margin-left: 10px;
}

/* --- Brand Colors on Hover --- */
.social-pill.email:hover { background: #EA4335; color: white; }
.social-pill.github:hover { background: #181717; color: white; }
[data-theme="light"] .social-pill.github:hover { background: #24292e; }
.social-pill.linkedin:hover { background: #0077b5; color: white; }
.social-pill.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white; border: none;
}
.social-pill.phone:hover { background: #25D366; color: white; }

/* --- Toast Notification --- */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* --- Animations --- */
@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .nav-links { display: none; }
    
    .profile-panel { flex-direction: column; text-align: center; gap: 20px; }
    .profile-image-large { width: 250px; height: 250px; flex: none; }
    
    .grid-stack { grid-template-columns: 1fr; } 
    
    .project-row, .project-row.reverse { flex-direction: column; }
    .project-img-container { width: 100%; height: 300px; flex: none; }
    .project-info { padding: 30px 20px; }
}