/* --- Universal Box Sizing & Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #1abc9c;
    --accent-hover-color: #16a085;
    --light-bg-color: #f8f9fa;
    --text-light: #e9ecef;
    --text-dark: #333;
    --border-color-light: #dee2e6;
    --card-bg-light: #ffffff;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --accent-color-rgb: 26, 188, 156; /* Added variable here */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --sidebar-width: 280px;
    --transition-speed: 0.3s ease;
}

body {
    font-family: var(--font-body);
    margin: 0;
    background-color: var(--light-bg-color);
    color: var(--text-dark);
    line-height: 1.7;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- "True" Dark Mode Palette --- */
body.dark-mode {
    --primary-color: #3498db;
    --accent-color: #e67e22;
    --accent-hover-color: #d35400;
    --light-bg-color: #121212;
    --dark-bg-color: #1E1E1E;
    --text-light: #121212;
    --text-dark: #EAEAEA;
    --border-color-light: #383838;
    --border-color-dark: #383838;
    --card-bg-light: #282828;
    --card-bg-dark: #1E1E1E;
    --shadow-dark: 0 6px 15px rgba(0, 0, 0, 0.3);
    --accent-color-rgb: 230, 126, 34; /* Added variable here */
}

/* Light mode border color variables */
:root {
    --border-color-dark: #495057;
}

.container { 
    display: block; /* No flexbox needed */
    min-height: 100vh; 
    padding-top: 60px; 
}

/* --- Hamburger Menu Header --- */
.mobile-header {
    display: block;
    background-color: var(--secondary-color);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001; /* Above everything except active menu */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.dark-mode .mobile-header {
    background-color: var(--dark-bg-color);
}

@media (min-width: 769px) {
    .mobile-header {
        backdrop-filter: blur(10px);
        background-color: rgba(52, 73, 94, 0.95); /* Semi-transparent */
    }
    
    body.dark-mode .mobile-header {
        background-color: rgba(30, 30, 30, 0.95);
    }
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.3em;
    font-weight: 700;
}

body.dark-mode .mobile-logo {
    color: var(--text-dark);
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition-speed), transform 0.3s ease;
    z-index: 1002;
}

body.dark-mode .hamburger-btn {
    color: var(--text-dark);
}

.hamburger-btn:hover {
    color: var(--accent-color);
}

/* Change hamburger icon when menu is open */
body:not(.sidebar-collapsed) .hamburger-btn i.fa-bars::before {
    content: '\f00d'; /* fa-times (X icon) */
}
body:not(.sidebar-collapsed) .hamburger-btn {
    transform: rotate(180deg);
}

/* --- Sidebar (Popup Menu) & Overlay --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile-first: slide-in from left */
.sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; /* Below header */
    left: -100%; /* Hidden off-screen */
    width: 280px;
    height: calc(100vh - 60px);
    background-color: var(--secondary-color);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

body.dark-mode .sidebar {
    background-color: var(--dark-bg-color);
}

.sidebar.open {
    left: 0;
}

/* Desktop: Override to a centered popup */
@media (min-width: 769px) {
    .sidebar {
        /* Reset mobile positioning */
        left: 50%;
        top: 80px; /* Give some space from the top */
        transform: translate(-50%, -30px);
        
        /* New desktop popup appearance */
        width: 100%;
        max-width: 550px;
        height: auto; /* Fit content */
        max-height: calc(100vh - 100px); /* Allow scrolling if viewport is short */
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        background-color: var(--card-bg-light);
        
        /* Hidden by default */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }

    body.dark-mode .sidebar {
        background-color: var(--card-bg-dark);
    }

    /* Active State for Desktop Menu */
    body:not(.sidebar-collapsed) .sidebar {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        left: 50%; /* Ensure it stays centered */
    }

    /* Hide mobile-only .open class effect on desktop */
    .sidebar.open {
        left: 50%;
    }
}


/* --- Main Navigation (Inside Sidebar) --- */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    position: relative;
}

.main-nav li a.nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    text-decoration: none;
    color: #ecf0f1;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    font-size: 0.95em;
}

body.dark-mode .main-nav li a.nav-link {
    color: var(--text-dark);
}

.main-nav li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.main-nav li a:hover,
.main-nav li a.active {
    background-color: var(--accent-color);
    color: #FFFFFF;
}

/* Adjust nav links for desktop popup style */
@media (min-width: 769px) {
    .sidebar .main-nav li a {
        color: var(--text-dark);
        font-size: 1.1em;
        padding: 15px 20px;
    }
}

/* --- Dropdown Menu (Unified) --- */
.has-dropdown > a.nav-link {
    padding-right: 50px; /* Make space for the arrow */
}

.dropdown-toggle-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ecf0f1;
    transition: transform 0.3s ease;
    border-radius: 0 5px 5px 0;
}

.dropdown-toggle-btn i {
    transition: transform 0.3s ease;
}

body.dark-mode .dropdown-toggle-btn {
    color: var(--text-dark);
}

@media (min-width: 769px) {
    .dropdown-toggle-btn {
        color: var(--text-dark);
    }
}

.has-dropdown.open .dropdown-toggle-btn i { 
    transform: rotate(180deg); 
}

.dropdown-menu {
    display: none;
    list-style: none;
    padding: 10px 0 10px 30px;
    margin: 0;
    background-color: rgba(0,0,0,0.1);
    border-radius: 5px;
    width: 100%; /* Make dropdown span full width of parent li */
    opacity: 0; /* Add for transitions */
    visibility: hidden; /* Add for transitions */
    transform: translateY(-10px); /* Add for transitions */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.has-dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 8px 15px;
    display: block;
    font-size: 0.9em;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.2s;
    background: transparent !important; /* Override hover/active */
    margin-bottom: 0;
    border-radius: 5px;
}

body.dark-mode .dropdown-menu li a {
    color: var(--text-dark);
}

@media (min-width: 769px) {
    .dropdown-menu {
        background-color: transparent;
        padding-left: 45px;
    }
    .dropdown-menu li a {
        color: var(--text-dark);
        opacity: 0.8;
    }
    .dropdown-menu li a:hover {
        color: var(--accent-color);
        opacity: 1;
        transform: translateX(5px);
    }
}

/* Desktop Hover Functionality - Controlled by JavaScript */
@media (min-width: 769px) {
    .has-dropdown {
        position: relative;
    }
    
    .has-dropdown .dropdown-menu {
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    }
    
    /* Show dropdown when open class is added (via JavaScript) */
    .has-dropdown.open > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Rotate arrow when open */
    .has-dropdown.open > .dropdown-toggle-btn i {
        transform: rotate(180deg);
        transition: transform 0.2s ease;
    }
}


/* --- Sidebar Bottom Content --- */
.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color-dark);
}

body.dark-mode .sidebar-bottom {
    border-top-color: var(--border-color-light);
}

@media (min-width: 769px) {
    .sidebar-bottom {
        border-top-color: var(--border-color-light);
    }
    body.dark-mode .sidebar-bottom {
        border-top-color: var(--border-color-dark);
    }
}


/* --- Main Content --- */
.content {
    margin-left: 0;
    padding: 40px;
    width: 100%;
    transition: all var(--transition-speed);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color-light);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

body.dark-mode .page-header h1 {
    color: var(--text-dark);
}

.page-header .subtitle {
    font-size: 1.1em;
    color: #777;
}

body.dark-mode .page-header .subtitle {
    color: #aaa;
}

.content-section {
    margin-bottom: 50px;
    padding: 20px;
    background-color: var(--card-bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

body.dark-mode .content-section {
    box-shadow: var(--shadow-dark);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

body.dark-mode .section-title {
    color: var(--text-dark);
}

.section-title span {
    position: relative;
    z-index: 1;
}

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

/* --- Hero Section Styles --- */
.hero-section {
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 60px 40px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 40px;
}

body.dark-mode .hero-section {
    background-color: var(--card-bg-light);
    color: var(--text-dark);
}

/* --- Combined Profile Hero Section --- */
.profile-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 40px;
}

body.dark-mode .profile-hero {
    background: linear-gradient(135deg, var(--card-bg-light) 0%, var(--card-bg-dark) 100%);
}

.hero-profile-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.hero-profile-content .profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.2em;
    margin: 0 0 10px 0;
    color: var(--text-light);
    font-weight: 700;
}

body.dark-mode .hero-text h1 {
    color: var(--text-dark);
}

.hero-text .title {
    font-size: 1.3em;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0 0 30px 0;
    opacity: 0.95;
}

body.dark-mode .hero-description {
    color: var(--text-dark);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.hero-buttons .btn {
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.skill-card {
    background-color: var(--light-bg-color);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color-light);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

body.dark-mode .skill-card {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

body.dark-mode .skill-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.skill-card i {
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.skill-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3em;
    margin: 10px 0;
    color: var(--primary-color);
}

body.dark-mode .skill-card h3 {
    color: var(--text-dark);
}

.skill-card p {
    font-size: 0.9em;
    color: #555;
}

body.dark-mode .skill-card p {
    color: #ccc;
}

/* --- Theme Switcher & Social Links --- */
.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 15px;
}

body.dark-mode .theme-switcher {
    color: var(--text-dark);
}
@media (min-width: 769px) {
    .theme-switcher {
        color: var(--text-dark);
    }
}

.theme-switcher i {
    margin-right: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.social-links {
    text-align: center;
    margin-top: 15px;
}

.social-links a {
    color: var(--accent-color);
    font-size: 1.3em;
    margin: 0 10px;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--accent-hover-color);
}

/* --- Project Cards --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color-light);
}

body.dark-mode .project-card {
    box-shadow: var(--shadow-dark);
    border-color: var(--border-color-dark);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}

body.dark-mode .project-info h3 {
    color: var(--text-dark);
}

.project-info p {
    font-size: 0.95em;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* --- Project Pages --- */
.project-detailed-list .project-entry {
    margin-bottom: 40px;
    background-color: var(--card-bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    padding: 25px;
}

body.dark-mode .project-detailed-list .project-entry {
    box-shadow: var(--shadow-dark);
}

.project-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), var(--border-color-light), rgba(0, 0, 0, 0));
    margin: 40px 0;
}

body.dark-mode .project-divider {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), var(--border-color-dark), rgba(255, 255, 255, 0));
}

.project-main-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color-light);
}

body.dark-mode .project-main-image {
    border-color: var(--border-color-dark);
}

.project-entry h3 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    color: var(--accent-color);
    margin-top: 25px;
    margin-bottom: 10px;
}

.project-entry ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 10px;
}

.project-entry .section-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

.project-entry .section-title a:hover {
    color: var(--accent-color);
}

/* --- Contact Form --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color-light);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    background-color: var(--light-bg-color);
    color: var(--text-dark);
}

body.dark-mode .form-group input[type="text"],
body.dark-mode .form-group input[type="email"],
body.dark-mode .form-group textarea {
    border-color: var(--border-color-dark);
    background-color: var(--dark-bg-color);
    color: var(--text-dark);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.25);
}

.contact-details p {
    font-size: 1.05em;
    margin-bottom: 10px;
    word-break: break-all;
}

.contact-details i {
    color: var(--accent-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.contact-details a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
    color: #777;
    border-top: 1px solid var(--border-color-light);
    margin-top: 40px;
}

body.dark-mode .main-footer {
    color: #aaa;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color var(--transition-speed), color var(--transition-speed), transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 15px;
    font-size: 0.85em;
    align-self: flex-start;
}

body.dark-mode .btn-tertiary {
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.btn-tertiary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .btn-tertiary:hover {
    background-color: var(--text-dark);
    color: var(--light-bg-color);
}

/* --- Timeline --- */
.experience-timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 20px;
    border-left: 3px solid var(--accent-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: -39.5px;
    top: 5px;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    border: 3px solid var(--light-bg-color);
    border-radius: 50%;
    z-index: 1;
}

body.dark-mode .timeline-dot {
    border-color: var(--card-bg-light);
}

.timeline-content {
    padding-left: 15px;
}

.timeline-date {
    display: block;
    font-weight: 600;
    font-style: italic;
    color: #777;
    margin-bottom: 5px;
    font-size: 0.9em;
}

body.dark-mode .timeline-date {
    color: #aaa;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

body.dark-mode .timeline-content h3 {
    color: var(--text-dark);
}

.timeline-content ul {
    list-style-type: '—  ';
    padding-left: 20px;
    margin: 0;
}

.timeline-content ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- Project Page Specific --- */
.project-page-title {
    font-family: var(--font-heading);
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-align: center;
}

body.dark-mode .project-page-title {
    color: var(--text-dark);
}

.project-entry .subtitle {
    text-align: center;
    margin-bottom: 30px;
}

.back-to-projects {
    text-align: center;
    margin-top: 40px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .hero-profile-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-profile-content .profile-img {
        width: 160px;
        height: 160px;
    }

    .hero-text h1 {
        font-size: 2.8em;
    }

    .hero-description {
        font-size: 1.05em;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 15px;
    }

    .content-section {
        padding: 15px;
    }

    .page-header h1,
    .project-page-title {
        font-size: 2em;
    }

    .page-header .subtitle {
        font-size: 1em;
    }

    .section-title {
        font-size: 1.6em;
    }

    .hero-section {
        padding: 40px 20px;
    }

    .profile-hero {
        padding: 40px 20px;
    }

    .hero-profile-content .profile-img {
        width: 140px;
        height: 140px;
        border-width: 4px;
    }

    .hero-text h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }

    .hero-text .title {
        font-size: 1.1em;
    }

    .hero-description {
        font-size: 1em;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 20px;
    }

    .project-card img {
        height: 180px;
    }

    .experience-timeline {
        padding-left: 25px;
        margin-left: 0;
    }

    .timeline-dot {
        left: -32.5px;
        width: 12px;
        height: 12px;
    }

    .timeline-content h3 {
        font-size: 1.25em;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- Breadcrumb Navigation --- */
.breadcrumb {
    background: none;
    padding: 0 0 20px 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid var(--border-color-light);
}

body.dark-mode .breadcrumb {
    border-bottom-color: var(--border-color-dark);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb li {
    color: #6c757d;
    font-size: 0.9em;
}

.breadcrumb li+li::before {
    content: "/";
    padding: 0 8px;
    color: #6c757d;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

/* --- Skills Progress Bars --- */
.skill-progress {
    margin-top: 15px;
}

.skill-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

body.dark-mode .skill-progress-bar {
    background-color: var(--border-color-dark);
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover-color));
    border-radius: 4px;
    transition: width 2s ease-in-out;
}

/* --- Smooth Scrolling & Animations --- */
html {
    scroll-behavior: smooth;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

.skill-card,
.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover,
.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

body.dark-mode .skill-card:hover,
body.dark-mode .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* --- Page Load Animation --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main.content {
    /* Apply the animation to the main content block */
    animation: fadeIn 0.6s ease-out forwards;
}

/* --- Technical Skills Section (About Page) --- */
.skills-category {
    margin-bottom: 30px;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.skills-category-title i {
    font-size: 1.5em;
    color: var(--accent-color);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.skills-category-title h3 {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin: 0;
    color: var(--primary-color);
}

body.dark-mode .skills-category-title h3 {
    color: var(--text-dark);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0; /* Align to the left on mobile by default */
}

/* Add the padding back ONLY for larger screens */
@media (min-width: 769px) {
    .skills-list {
        padding-left: 45px; /* Aligns with the text of the category title */
    }
}
.skill-tag {
    background-color: var(--light-bg-color);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid var(--border-color-light);
    transition: all 0.2s ease-in-out;
}

.skill-tag:hover {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body.dark-mode .skill-tag {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
    color: var(--text-dark);
}

/* Responsive adjustment for the skills list */
@media (max-width: 768px) {
    .skills-list {
        padding-left: 0;
    }
}

/* --- Header Logo Link --- */
.mobile-logo-link {
    text-decoration: none; /* Removes the underline */
    transition: opacity 0.2s ease;
}

.mobile-logo-link:hover {
    opacity: 0.8; /* Adds a subtle feedback on hover */
}