/* Base Styles & Typography */
:root {
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --accent: #111827;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding: 2rem;
}

/* Grid Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
}

/* Card Utility */
.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.dot {
    height: 8px;
    width: 8px;
    background-color: var(--accent);
    border-radius: 50%;
}

.profile-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.name {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-section h3, .social-section h3 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* --- Contact Buttons --- */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    text-decoration: none;
    padding: 12px 16px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-btn i {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Hover Effect */
.contact-btn:hover {
    background-color: var(--accent);
    color: #ffffff; /* White text on hover for light mode */
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover i {
    color: #ffffff;
}

/* Dark Mode Overrides for Contact Buttons */
body.dark-theme .contact-btn:hover {
    background-color: var(--accent);
    color: #111827; /* Dark text on light blue background */
}

body.dark-theme .contact-btn:hover i {
    color: #111827; 
}

.social-section {
    margin-top: 2rem;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icons a {
display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;       /* Increased from 40px */
    height: 50px;      /* Increased from 40px */
    font-size: 1.4rem; /* Enlarges the icon itself */
    border-radius: 50%;
    background-color: var(--bg-color);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color); /* Added to match contact buttons */
    transition: all 0.5s ease;
}

.social-icons a:hover {
background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Overrides */
body.dark-theme .social-icons a {
    background-color: #374151;
    color: #f9fafb;
    border-color: var(--border-color);
}

body.dark-theme .social-icons a:hover {
    background-color: var(--accent);
    color: #111827;
}

/* Main Content Styles */
.content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Top Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.stat-card h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.section-header .subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Timeline (Experience & Education) */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Skills Section */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 500;
    width: 40%;
}

.skill-bar {
    width: 50%;
    height: 6px;
    background-color: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--accent);
    border-radius: 4px;
}

/* What Drives Me Section */
.drives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.drive-item {
    display: flex;
    flex-direction: column;
}

.drive-item i {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drive-item h4 {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.drive-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .drives-grid {
        grid-template-columns: 1fr;
    }
    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .skill-name, .skill-bar {
        width: 100%;
    }
}

/* --- Theme Toggle & Dark Mode --- */

/* Smooth transitions for theme switching */
body, .card, hr, .timeline-item::before, .skill-bar, .social-icons a {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Update the sidebar header to space out the title and button */
.sidebar-header {
    justify-content: space-between;
    width: 100%;
}

/* Toggle Button Styling */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* Dark Mode Color Palette */
body.dark-theme {
    --bg-color: #111827;      /* Darker background */
    --card-bg: #1f2937;       /* Dark card background */
    --text-main: #f9fafb;     /* Light text for headings/main */
    --text-muted: #9ca3af;    /* Lighter muted text */
    --border-color: #374151;  /* Dark borders */
    --accent: #60a5fa;        /* Light blue accent to pop on dark backgrounds */
}

/* Override specific dark mode contrast issues */
body.dark-theme .social-icons a {
    background-color: #374151; /* Darker circle for social icons */
    color: #f9fafb;
}

body.dark-theme .social-icons a:hover {
    background-color: var(--accent);
    color: #111827;
}

/* --- Stats Card Glow Hover Animation --- */
.stat-card {
    position: relative;
    overflow: hidden; /* Keeps the glow strictly inside the card */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1; /* Ensures text stays above the glow layer */
}

/* Ensure child elements transition their colors smoothly */
.stat-card h4, 
.stat-card p, 
.stat-card .stat-icon {
    transition: color 0.3s ease;
}

/* The dynamic spotlight layer */
.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Uses the JS variables to position the center of the gold gradient */
    background: radial-gradient(
        250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(212, 175, 55, 0.25) 0%, 
        transparent 100%
    );
    z-index: -1; /* Puts the glow behind the card content */
}

/* The Hover Effect: Lift and Glow */
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px -8px rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
}

.stat-card:hover::before {
    opacity: 1; /* Reveals the cursor-tracking glow */
}

/* Tint the text and icon slightly golden on hover */
.stat-card:hover h4, 
.stat-card:hover .stat-icon {
    color: #d4af37;
}

/* --- Skills Section Descriptions Update --- */
.skill-item {
    display: flex;
    align-items: center; /* Keeps the progress bar vertically centered with the text block */
    justify-content: space-between;
    gap: 1.5rem;
}

.skill-info {
    width: 45%; /* Slightly wider to give the description room to breathe */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 700; /* Made bolder to distinguish it from the description */
    width: 100%; /* Resets the previous fixed width */
}

.skill-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.skill-bar {
    width: 55%;
}

/* Overriding the previous responsive rule for skills */
@media (max-width: 600px) {
    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .skill-info, .skill-bar {
        width: 100%;
    }
}

/* --- CV Download Button --- */
.cv-section {
    margin-top: 2rem;
}

.cv-section h3 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.cv-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 12px 16px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cv-btn i {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

/* Hover Effect */
.cv-btn:hover {
    background-color: var(--accent);
    color: #ffffff; 
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cv-btn:hover i {
    color: #ffffff;
}

/* Dark Mode Overrides for CV Button */
body.dark-theme .cv-btn:hover {
    background-color: var(--accent);
    color: #111827; 
}

body.dark-theme .cv-btn:hover i {
    color: #111827; 
}

@media (max-width: 600px) {
    .name {
        font-size: 1.8rem; 
        line-height: 1.15;
    }
}