/* Basic Page Layout and Theme */
:root {
    --primary-color: #0f7a21;
    --primary-dark: #135b1d;
    --light-gray: #f4f7f6;
    --text-color: #333;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Make the .content div the positioning reference */
.content {
    position: relative; /* This is essential */
    flex: 1;
    padding: 50px;
    background-color: #ffffff;
    margin: 120px auto 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1200px;
    align-self: center;
    
}

/* --- Floating Social Media Bar --- */
.social-media-bar {
    position: fixed; /* This makes it float on the screen */
    top: 120px;      /* Adjust this value to set vertical position */
    background-color: #0f7a21;
    padding: 10px 15px;
    border-radius: 10px; /* Pill shape for horizontal bar */
    z-index: 999;
    display: flex;
    flex-direction: row; /* This makes icons side-by-side */
    gap: 20px;           /* Space between icons */
    transition: right 0.3s ease-out; /* Smooth transition for alignment */
}

.icon-link {
    color: #fff;
    font-size: 22px;
    margin: 0;
    transition: transform 0.2s ease;
}

.icon-link:hover {
    transform: scale(1.15);
    color: #fff;
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
}

/* Navigation */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}


/* --- Work Experience Page: Timeline Layout --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 30px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.timeline-right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 30px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--card-hover-shadow);
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.timeline-content p {
    margin-bottom: 0;
    color: #666;
    line-height: 1.6;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: block;
}

/* --- Skills Page: Modernized Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.skill-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.skill-card ul {
    list-style: none;
    padding: 0;
}

.skill-card li {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-color);
}

.skill-name {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.skill-icon {
    font-size: 1.5em;
    margin-right: 15px;
    color: var(--primary-color);
    width: 25px; /* Fixed width for alignment */
    text-align: center;
}

.progress-bar {
    width: 100%;
    background-color: var(--light-gray);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress {
    background-color: var(--primary-color);
    height: 100%;
    border-radius: 10px;
}

/* Example Progress Widths (customize as needed) */
.w-90 { width: 90%; }
.w-85 { width: 85%; }
.w-80 { width: 80%; }
.w-75 { width: 75%; }
.w-70 { width: 70%; }


/* --- Index Page: Typewriter Effect --- */
.typewriter-text {
    border-right: .15em solid var(--primary-color); /* The cursor */
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

/* Typing animation */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* Cursor animation */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color); }
}

/* Floating card styles */
.floating-card {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    bottom: 20px;
    right: 20px;
    width: 300px; /* Fixed width */
    padding: 20px;
    background-color: #ffffff;
    border: 5px solid #0f7a21; /* Green border */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* On top */
    border-radius: 10px;
    animation: fadeIn 0.5s ease, slideIn 0.5s ease;
    font-family: 'Arial', sans-serif;
}

.floating-card .close-card {
    color: #aaa;
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.floating-card .close-card:hover,
.floating-card .close-card:focus {
    color: #000;
    text-decoration: none;
}

.floating-card .card-content {
    text-align: center;
}

.floating-card .card-header h3 {
    margin: 0;
    color: #28a745;
}

.floating-card .card-header p {
    margin: 5px 0;
    font-style: italic;
    color: #666;
}

.floating-card .card-body p {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card .card-body p i {
    margin-right: 8px;
    color: #28a745;
}

.floating-card .card-footer a {
    margin: 0 10px;
    color: #333;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s;
}

.floating-card .card-footer a:hover {
    color: #28a745;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(30px); }
    to { transform: translateY(0); }
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    justify-content: center; /* Centering horizontally */
    padding: 20px; /* Add some padding */
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

/* Profile Picture */
.profile-picture {
    position: relative; /* Necessary for overlay and animation */
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture img {
    border: 4px solid #0f7a21; /* Enhanced border thickness */
    border-radius: 50%;
    width: 160px;
    height: 160px;
    object-fit: cover;
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Hover Effects */
.profile-picture:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.profile-picture:hover img {
    filter: grayscale(50%) blur(2px);
}

/* Floating Animation */
@keyframes floating {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.profile-picture {
    animation: floating 5s ease-in-out infinite;
}

/* Profile Text */
.profile-text {
    flex: 1;
    max-width: 600px; /* Limit the width */
    margin: 20px; /* Space around the text */
}



/* Button container — left aligned with sensible spacing */
.button-container {
    display: flex;
    justify-content: flex-start; /* <-- left align buttons */
    align-items: center;
    gap: 12px;                  /* space between buttons */
    max-width: 400px;
    margin-top: 20px;
    padding: 0;                 /* keep layout consistent */
}

/* Make buttons stack and stretch on small screens for better tap targets */
@media (max-width: 480px) {
    .button-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .button-container .icon-button,
    .button-container .button {
        width: 100%;
    }
}


.button {
    display: inline-block;
    background-color: #0f7a21;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
}

.button:hover {
    background-color: #135b1d;
}

/* Container Styling */
.education-tiles, .work-experience-tiles, .skills-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.skill-tile .skill-icon {
    color: #0f7a21; /* Green color */
}
/* Tile Styling */
.education-tile, .work-experience-tile, .skill-tile {
    width: calc(25% - 20px); /* 25% width minus margin */
    margin: 10px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.education-tile:hover, .work-experience-tile:hover, .skill-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Link styles */
.education-link, .work-experience-link, .skill-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.education-link h3, .work-experience-tile h3, .skill-tile h3 {
    font-size: 1.25em;
    font-weight: normal;
    color: #333;
    margin: 0;
    transition: color 0.3s ease;
}

.education-link p, .work-experience-tile p, .skill-tile ul {
    color: #666;
}

.education-link:hover h3, .work-experience-tile:hover h3, .skill-tile:hover h3 {
    color: #0f7a21;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .education-tile, .work-experience-tile, .skill-tile {
        width: calc(33.33% - 20px); /* 3 tiles per row */
    }
}

@media (max-width: 768px) {
    .education-tile, .work-experience-tile, .skill-tile {
        width: calc(50% - 20px); /* 2 tiles per row */
    }
}

@media (max-width: 480px) {
    .education-tile, .work-experience-tile, .skill-tile {
        width: calc(100% - 20px); /* 1 tile per row */
    }
}


h2 {
    color: #0f7a21;
    border-bottom: 2px solid #0f7a21;
    padding-bottom: 5px;
}

/* Resume Page Styles */
.certificate-tile, .project-tile {
    width: 200px;
    margin: 10px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px; /* Updated to match modern UI */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.certificate-tile:hover, .project-tile:hover {
    transform: scale(1.05); /* Zoom effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 8px 16px rgba(15, 122, 33, 0.2); /* Greenish tint shadow */
    background-color: #f9f9f9; /* Light background color on hover */
}

.certificate-tile:hover h4, .project-tile:hover h3 {
    color: #0f7a21; /* Green color for headings on hover */
}

.certificate-category h2, .project-category h2 {
    margin-top: 40px;
    color: #0f7a21; /* Green color for categories */
    border-bottom: 2px solid #0f7a21;
    padding-bottom: 5px;
    font-size: 1.2em;
}

.certificate-tiles, .project-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.certificate-tile h4, .project-tile h3 {
    font-size: 1.1em;
    color: #333;
    margin: 0 0 10px;
}

.certificate-tile p, .project-tile p {
    color: #666;
}


.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #0f7a21;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
}

.icon-button:hover {
    background-color: #135b1d;
    transform: translateY(-2px);
}

/* Icon Styles and Animations */
.icon-button .fas {
    margin-right: 0;
    font-size: 16px;
}

.download-button .fas {
    animation: download-pulse 2s infinite;
}

.view-button .fas {
    font-size: 16px;
    transition: color 0.3s ease; /* Added transition for color change */
}

.view-button:hover .fas {
    color: #ff5722; /* Orange color for blink effect on hover */
    animation: view-blink 1s infinite; /* Blink animation on hover */
}

/* Icon Animation Keyframes */
@keyframes download-pulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes view-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes view-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}


/* Certificate and Project Preview Styles */
.project-preview img {
    width: 100%; /* Ensure the preview image fits within the tile */
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Common List Styles */
ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 10px;
}

ul li ul {
    list-style-type: disc;
    margin-left: 20px;
}

/* Animation for waving hand */
@keyframes wave-animation {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* Animation for floating */
@keyframes float-animation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Animation for rotating */
@keyframes rotate-animation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation for bouncing */
@keyframes bounce-animation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Animation for blinking */
@keyframes blink-animation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* Styling for Heptabyte Software */
.bold-text {
    font-weight: bold;
    color: #0f7a21; /* Green color */
    cursor: pointer;
    transition: color 0.3s ease;
}

.bold-text:hover {
    color: #135b1d; /* Darker green on hover */
}

.green-bold-link {
    font-weight: bold;
    color: #0f7a21; /* Green color */
    text-decoration: none; /* Remove underline */
    cursor: pointer;
    transition: color 0.3s ease;
}

.green-bold-link:hover {
    color: #135b1d; /* Darker green on hover */
}
/* ... (existing styles) ... */

/* Modernized Certificate Page */
.certificate-header {
    text-align: center;
    margin-bottom: 40px;
}

.certificate-header h2 {
    font-size: 2.5em;
    color: #0f7a21;
    margin-bottom: 10px;
}

.certificate-header p {
    font-size: 1.2em;
    color: #666;
}

.certificate-group {
    margin-bottom: 50px;
}

.certificate-group h3 {
    font-size: 1.8em;
    color: #333;
    border-bottom: 2px solid #0f7a21;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.certificate-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    perspective: 1000px;
    height: 180px;
    position: relative;
    transition: transform 0.3s;
}

.certificate-card:hover {
    transform: translateY(-10px);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    transition: transform 0.6s;
}

.card-front {
    background: #fff;
    color: #333;
    z-index: 2;
    transform: rotateY(0deg);
}

.card-back {
    background: #0f7a21;
    color: white;
    transform: rotateY(180deg);
}

.certificate-card:hover .card-front {
    transform: rotateY(-180deg);
}

.certificate-card:hover .card-back {
    transform: rotateY(0deg);
}


.card-front i {
    font-size: 3em;
    color: #0f7a21;
    margin-bottom: 15px;
}

.card-front h4 {
    font-size: 1.2em;
    margin: 0;
    text-align: center;
}

.card-back a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 25px;
    margin: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.card-back a:hover {
    background-color: white;
    color: #0f7a21;
}

.card-back span {
    font-size: 1.2em;
    font-weight: bold;
}

.certificate-card.in-progress .card-back {
    background: #ffc107;
}

.certificate-card.starting-soon .card-back {
    background: #17a2b8;
}

/* Work Experience and Skills Page Styles */
.work-experience, .skills {
    padding: 40px 0;
}

.work-experience h2, .skills h2 {
    text-align: center;
    font-size: 2.5em;
    color: #0f7a21;
    margin-bottom: 40px;
}

.work-experience-tiles, .skills-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-experience-tile, .skill-tile {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-experience-tile:hover, .skill-tile:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.work-experience-tile h3, .skill-tile h3 {
    font-size: 1.5em;
    color: #0f7a21;
    margin-bottom: 15px;
}

.work-experience-tile p {
    color: #666;
    line-height: 1.6;
}

.skill-tile ul {
    list-style: none;
    padding: 0;
}

.skill-tile li {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
}

.skill-tile .skill-icon {
    font-size: 1.5em;
    margin-right: 15px;
    color: #0f7a21;
}

/* General Modernization */
body {
    background-color: #f4f7f6;
}

nav ul {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 80px;
}

nav ul li a {
    color: #333;
    font-weight: 600;
}

nav ul li a:hover {
    background-color: #f4f7f6;
    color: #0f7a21;
}

/* --- Updated Modal, Overlay, and Pop-up Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* New Effect: Dark, semi-transparent overlay */
    background-color: rgba(0, 0, 0, 0.6);
    /* Removing the blur effect */
}

.modal-content.mini-popup {
    position: absolute;
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    width: auto;
    margin: 0;
    /* New "Cool" Animation */
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-icon-button {
    position: relative; /* Needed for the tooltip */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--light-gray);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.1em;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.popup-icon-button:hover {
    transform: scale(1.1);
}

/* --- Tooltip Styles --- */
.tooltip {
    visibility: hidden;
    width: 80px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the icon */
    left: 50%;
    margin-left: -40px; /* Use half of the width to center */
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip.show {
    visibility: visible;
    opacity: 1;
}

/* --- Updated Footer Style --- */
.footer {
    background-color: #ffffff; /* Match the header */
    color: var(--text-color); /* Dark text for contrast */
    text-align: center;
    padding: 20px 0;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--light-gray); /* Subtle separator */
}

/* --- Modern Projects Page Styles --- */

.projects-modern h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 20px;
    border-bottom: none;
}

/* Notification Box Style */
.projects-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--light-gray);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 0 auto 60px auto;
    max-width: 800px;
    border-radius: 0 8px 8px 0;
}

.projects-notice i {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-right: 15px;
}

.projects-notice p {
    margin: 0;
    color: #555;
}

/* Showcase Container */
.project-showcase {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.project-entry {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Alternating Layout */
.project-entry:nth-child(even) {
    flex-direction: row-reverse;
}

/* Project Image Style */
.project-image {
    flex: 1;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    transition: transform 0.4s ease;
}

.project-image a:hover img {
    transform: scale(1.05);
}

/* Project Info Style */
.project-info {
    flex: 1;
    padding: 0 20px;
}

.project-category {
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.project-info h3 {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-info p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* Tech Stack Tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tech-tag {
    background-color: var(--light-gray);
    color: #555;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Project Link Buttons */
.project-links {
    display: flex;
    gap: 15px;
}

.project-links .btn-primary, .project-links .btn-secondary {
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-links .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.project-links .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.project-links .btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.project-links .btn-secondary:hover {
    background-color: #d1d1d1;
    transform: translateY(-2px);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 992px) {
    .project-entry, .project-entry:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }
    .project-info {
        padding: 0;
    }
    .tech-stack, .project-links {
        justify-content: center;
    }
}

/* --- New Minimalist & Modern Skills Page Styles --- */

.skills-modern h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 10px;
    border-bottom: none;
}

.skills-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: #666;
    margin-top: 0;
    margin-bottom: 60px;
}

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

.skill-category-item h3 {
    font-size: 1.6em;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.skill-category-item h3 i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 0.9em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background-color: var(--light-gray);
    color: #555;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(15, 122, 33, 0.2);
}

/* --- New Private Projects Page Styles --- */
.private-access-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh; /* Ensures it's centered vertically */
    padding: 40px 20px;
}

.access-notice {
    max-width: 550px;
}

.access-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 25px;
    animation: fadeIn 1s ease-out;
}

.access-notice h2 {
    border-bottom: none;
    font-size: 2.5em;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-out 0.2s;
    animation-fill-mode: both; /* Keeps it invisible until animation starts */
}

.access-notice p {
    color: #555;
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 35px;
    animation: fadeIn 1s ease-out 0.4s;
    animation-fill-mode: both;
}

.access-links {
    animation: fadeIn 1s ease-out 0.6s;
    animation-fill-mode: both;
}

/* Formatted Contact Me button */
.access-links .btn-primary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 10px; /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.access-links .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Formatted Back link */
.back-link {
    display: inline-block;
    color: #777;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.back-link:hover i {
    transform: translateX(-3px);
}

.timeline::after {
    z-index: 1;
}

.timeline-item::after {
    z-index: 3;
    background-color: var(--primary-color);
    border: none;
    box-shadow: 0 0 0 4px #ffffff;
}

.timeline-left::before,
.timeline-right::before {
    z-index: 2;
}

@media (max-width: 768px) {
    .timeline::after { z-index: 0; }
    .timeline-item::after { z-index: 2; }
}

:root{
  --timeline-nudge-left: -1px;
  --timeline-nudge-right: -1px;
  --timeline-nudge-transition: 240ms cubic-bezier(.22,.9,.35,1);
}

.timeline-left {
  transform: translateX(var(--timeline-nudge-left));
  transition: transform var(--timeline-nudge-transition);
}

.timeline-right {
  transform: translateX(var(--timeline-nudge-right));
  transition: transform var(--timeline-nudge-transition);
}

@media (max-width: 768px) {
  .timeline-left,
  .timeline-right {
    transform: none !important;
    transition: none;
  }
}


/* ===== Responsive / mobile-friendly timeline adjustments ===== */
@media (max-width: 600px) {
  /* move vertical line to the left side for single-column layout */
  .timeline::after {
    left: 36px;                /* X position of the vertical line on small screens */
    width: 4px;
    top: 0;
    bottom: 0;
    margin-left: 0;
    z-index: 1;                /* keep the line behind dots and content */
  }

  /* timeline items become full width stacked blocks */
  .timeline-item,
  .timeline-left,
  .timeline-right {
    width: 100% !important;
    left: 0 !important;
    padding: 14px 20px 20px 92px; /* leave room for the dot + line on the left */
    box-sizing: border-box;
    transform: none !important;
    transition: none;
  }

  /* hide the triangle pointers (they clutter small screens) */
  .timeline-left::before,
  .timeline-right::before {
    display: none;
  }

  /* Dot: place it to the left of each stacked item and above the vertical line */
  .timeline-item::after {
    left: 18px !important;     /* x-position of dot relative to the item */
    right: auto !important;
    top: 28px !important;      /* keeps vertical alignment consistent */
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    z-index: 3;                /* above the line */
    box-shadow: 0 0 0 4px #ffffff;
  }

  /* ensure content boxes stay above the vertical line */
  .timeline-content {
    margin: 0;
    background-clip: padding-box;
    z-index: 2;
  }

  /* increase padding between content and dot on mobile for readability */
  .timeline-content {
    padding: 18px 18px 18px 18px;
  }

  /* subtle mobile-friendly shadow & scale on hover (only on devices that support hover) */
  @media (hover: hover) {
    .timeline-item .timeline-content:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(15, 122, 33, 0.12);
    }
  }
}


/* ---------- Responsive & safety fixes (add near end of style.css) ---------- */

/* Safe box-sizing everywhere to avoid width/padding surprises on small screens */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Navigation: allow horizontal scrolling on narrow screens rather than wrapping/cutting off */
nav ul {
  display: flex;            /* keep desktop layout unchanged */
  flex-wrap: nowrap;       /* force single row so overflow-x works */
  overflow-x: auto;        /* allow scrolling when items overflow */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;   /* firefox - hide scrollbar */
  gap: 12px;
  padding: 0 12px;
}

/* hide webkit scrollbar but allow scrolling */
nav ul::-webkit-scrollbar {
  height: 6px;
}
nav ul::-webkit-scrollbar-track { background: transparent; }
nav ul::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 6px; }

/* keep each item from breaking into multiple lines and keep enough touch area */
nav ul li {
  display: inline-flex;
  white-space: nowrap;
}

/* nav anchors - avoid word wraps on very small screens */
nav ul li a {
  white-space: nowrap;
  padding: 12px 14px;
}

/* Ensure the main .content area shrinks nicely on small screens */
.content {
  width: 90%;
  max-width: 1200px;
  margin: 120px auto 40px;
  padding: 48px;
}

/* Footer: always full width, make sure padding and box-sizing prevent clipping */
.footer {
  width: 100%;
  box-sizing: border-box;
  padding: 18px 20px;
}

/* Social bar base: safe right fallback and keep left auto so JS can override */
.social-media-bar {
  right: 30px;    /* fallback for when JS hasn't run */
  left: auto;
  max-width: calc(100% - 60px);
  overflow: visible;
}

/* Small-screen tweaks */
@media (max-width: 1024px) {
  .content { width: 95%; padding: 36px; margin: 110px auto 32px; }
}

/* Smaller tablets / phones */
@media (max-width: 768px) {
  /* navbar: show items starting from left so user can easily scroll horizontally */
  nav ul { justify-content: flex-start; padding-left: 12px; padding-right: 12px; height: 64px; }

  /* reduce .content padding to prevent overflow */
  .content { margin: 100px 12px 24px; padding: 22px; width: auto; border-radius: 12px; }

  /* floating social bar: pin closer to screen edge on phones */
  .social-media-bar {
    top: 60px;
    right: 12px;
    padding: 8px 10px;
    gap: 12px;
  }

  /* buttons/touchables slightly larger for easier tapping */
  .icon-button, .button, .popup-icon-button { padding: 10px 14px; }

  /* certificate grid/cards: use fluid grid to avoid horizontal overflow */
  .certificate-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
}

/* Very small phones */
@media (max-width: 420px) {
  nav ul { padding-left: 8px; padding-right: 8px; gap: 8px; height: 60px; }
  .content { margin: 90px 8px 20px; padding: 18px; }
  .social-media-bar { right: 8px; top: 60px; gap: 8px; padding: 6px 8px; }
}

/* ---------- Skills page: responsive grid and overflow fixes ---------- */

/* Define primary color fallback */
:root {
  --primary-color: #0f7a21;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Skills section container â€” center and cap width like other pages */
.skills-modern {
  padding: 28px 18px;
  max-width: 1200px;
  margin: 0 auto 40px;
  box-sizing: border-box;
  overflow-x: hidden; /* prevent skills from creating horizontal scroll */
  background: transparent; /* keep theme */
}

/* Page heading spacing consistent with other pages */
.skills-modern h2 {
  text-align: center;
  margin-bottom: 8px;
}

/* Subtitle smaller on narrow screens */
.skills-modern .skills-subtitle {
  text-align: center;
  margin-bottom: 18px;
  color: #666;
}

/* Responsive grid: 4 columns on large screens */
.skills-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
  box-sizing: border-box;
}

/* Skill card style that matches tiles elsewhere */
.skill-category-item {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-height: 140px; /* make tiles squarish-ish */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Hover (desktop) â€” subtle lift */
.skill-category-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(15,122,33,0.09);
}

/* Heading and icon styling */
.skill-category-item h3 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #222;
}

/* Ensure the icon in headings uses primary green */
.skill-category-item h3 i {
  color: var(--primary-color);
  font-size: 1.08rem;
}

/* Tags area: wrap and stay inside card */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Tag chip styling â€” green themed */
.skill-tag {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.95rem;
  border-radius: 8px;
  color: var(--primary-color);
  background: rgba(15,122,33,0.06);
  border: 1px solid rgba(15,122,33,0.09);
  font-weight: 600;
}

/* Small tweaks for very long tag text so they don't blow out the grid */
.skill-tag {
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* RESPONSIVE BREAKPOINTS */

/* Desktop-laptop -> keep 4 columns (unchanged) */
/* Slightly smaller screens (tablets) -> 3 columns */
@media (max-width: 1100px) {
  .skills-container { grid-template-columns: repeat(3, 1fr); }
  .skill-category-item { min-height: 150px; }
}

/* Tablet / small laptop -> 2 columns */
@media (max-width: 800px) {
  .skills-container { grid-template-columns: repeat(2, 1fr); }
  .skill-category-item { padding: 18px; min-height: 140px; }
  .skills-modern { padding-left: 16px; padding-right: 16px; }
}

/* Phones -> single column, smaller paddings and fonts */
@media (max-width: 480px) {
  .skills-container { grid-template-columns: 1fr; gap: 14px; }
  .skill-category-item {
    padding: 14px;
    min-height: auto;
    align-items: flex-start;
  }
  .skill-category-item h3 { font-size: 1rem; }
  .skill-tag { font-size: 0.92rem; padding: 6px 8px; }
  .skills-modern { padding: 12px; margin-bottom: 28px; }
}

/* FOOTE R FIX (prevent footer looking short due to content overflow)
   Only gently applied so desktop behavior is unchanged. */
.footer {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* Ensure nothing on skills page causes the page to overflow horizontally */
.skills-modern,
.skills-container,
.skill-category-item,
.skill-tags,
.skill-tag {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Accessibility: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .skill-category-item,
  .skill-category-item:hover {
    transition: none;
    transform: none;
    box-shadow: var(--card-shadow);
  }
}

/* ========== NEW MOBILE NAVIGATION STYLES ========== */
/* Replace all existing mobile navigation CSS with this code */

/* Mobile Navigation - Hidden by default */
.mobile-nav-toggle,
.mobile-nav-overlay,
.mobile-nav-menu {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Hide desktop navigation on mobile */
    .nav-links {
        display: none !important;
    }

    /* Mobile toggle button */
    .mobile-nav-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        background: var(--primary-color);
        border: none;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
        cursor: pointer;
        z-index: 1150; /* normally above content */
        box-shadow: 0 4px 12px rgba(15, 122, 33, 0.25);
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-toggle:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }

    /* When menu is active: hide the toggle so it doesn't block the menu */
    .mobile-nav-toggle.active {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-8px) scale(.95);
        z-index: 1000; /* lower than the menu */
    }

    /* Mobile navigation overlay */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(2px) saturate(.95);
        z-index: 1100;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }

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

    /* Mobile navigation menu */
    .mobile-nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: linear-gradient(180deg, rgba(255,255,255,0.98), white);
        z-index: 1120; /* above overlay and toggle when active */
        transform: translateX(-100%);
        transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 6px 0 30px rgba(7, 34, 11, 0.12);
        flex-direction: column;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        overflow: hidden;
    }

    .mobile-nav-menu.active {
        transform: translateX(0);
    }

    /* Menu header */
    .mobile-nav-header {
        padding: 18px 16px;
        background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-shrink: 0;
    }

    .mobile-nav-header h3 {
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0;
        letter-spacing: 0.2px;
    }

    .mobile-nav-close {
        background: rgba(255,255,255,0.12);
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        padding: 6px;
        border-radius: 6px;
        transition: background 0.2s ease, transform 0.15s;
    }

    .mobile-nav-close:hover {
        background: rgba(255,255,255,0.18);
        transform: translateY(-1px);
    }

    /* Menu items */
    .mobile-nav-items {
        flex: 1;
        padding: 12px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav-items ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mobile-nav-items li {
        margin: 0 !important;
    }

    .mobile-nav-items a {
        display: flex !important;
        align-items: center !important;
        padding: 14px 20px !important;
        text-decoration: none !important;
        color: var(--text-color) !important;
        font-weight: 600 !important;
        transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease !important;
        border-left: 4px solid transparent !important;
        transform: translateX(-8px);
        opacity: 0;
    }

    /* When menu opens, gently slide links into view */
    .mobile-nav-menu.active .mobile-nav-items a {
        transform: translateX(0);
        opacity: 1;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .mobile-nav-items a:hover {
        background: var(--light-gray) !important;
        border-left-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
    }

    .mobile-nav-items a i {
        width: 20px !important;
        margin-right: 14px !important;
        font-size: 16px !important;
        color: var(--primary-color) !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* subtle separators */
    .mobile-nav-items li + li {
        border-top: 1px solid rgba(0,0,0,0.04);
    }

    /* Adjust content margin for mobile toggle button */
    .content {
        margin-top: 80px;
    }

    /* Smaller screens */
    @media (max-width: 480px) {
        .mobile-nav-menu {
            width: calc(100% - 60px);
            max-width: 300px;
            border-top-right-radius: 14px;
            border-bottom-right-radius: 14px;
        }
    }


        /* improve focus for keyboard users and avoid flash on activation */
    .mobile-nav-toggle:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(15,122,33,0.14);
    }

    .mobile-nav-toggle.active {
        /* keep consistent with existing rule but add transition off pointer events earlier */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-8px) scale(.95);
        z-index: 1000;
    }

}


/* ----------------------------
  Global typography & consistency
  Add at the BOTTOM of style.css
  (Non-invasive — uses rems and clamps)
  ---------------------------- */

/* 1) Responsive base font-size (scales with viewport but stays within bounds) */
html {
  /* minimum 14px, preferred scales with viewport, max 18px */
  font-size: clamp(14px, 0.95rem + 0.6vw, 18px);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 2) Base body font setup — keep the site's font stack (Roboto fallback) */
body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-color, #333);
  letter-spacing: 0.01em;
  font-variant-ligatures: common-ligatures;
}

/* 3) Headings scale with rems (non-invasive sizes that match most design systems) */
h1, .page-title { font-size: 2.25rem; line-height: 1.08; margin: 0 0 0.6rem; font-weight: 700; }
h2 { font-size: 1.75rem; line-height: 1.12; margin: 0 0 0.6rem; font-weight: 700; }
h3 { font-size: 1.25rem; line-height: 1.18; margin: 0 0 0.5rem; font-weight: 600; }
h4 { font-size: 1.05rem; line-height: 1.22; margin: 0 0 0.4rem; font-weight: 600; }
h5, h6 { font-size: 0.95rem; line-height: 1.3; margin: 0 0 0.3rem; font-weight: 600; }

/* 4) Paragraphs and small text */
p { font-size: 1rem; margin: 0 0 1rem; color: var(--text-color); }
small, .small { font-size: 0.85rem; color: #666; }

/* 5) Inputs / buttons / anchors - consistent font & line-height */
button, input, select, textarea, a, .button, .icon-button {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Keep anchor look unchanged in places where you styled links, but ensure consistent text rendering */
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: rgba(0,0,0,0.05); }

/* 6) Ensure UI elements have consistent letter spacing and readable touch targets */
button, .button, .icon-button, .popup-icon-button {
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-user-select: none;
}

/* 7) Make content areas use rem-based padding so scaling remains consistent */
.content {
  padding: clamp(16px, 2.5vw, 48px); /* won't override your desktop rules, but helps small screens */
}

/* 8) Responsive heading scale for very small screens */
@media (max-width: 420px) {
  h1, .page-title { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  .content { padding: 14px; }
}

/* 9) Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* 10) Small utility: keep long words from overflowing or breaking layout unexpectedly */
* { word-wrap: break-word; }

/* End of typography snippet */



/* === Center page content vertically (keeps fixed nav + footer space) === */
/* Put this at the end of your style.css */

:root {
  /* adjust if your nav/footer heights differ */
  --nav-height: 400px;     /* height of your fixed nav (update if different) */
  --footer-height: 60px;  /* height of your footer (update if different) */
}

/* Ensure the main content area is a flex container so sections can center */
.content {
  display: block; /* keep existing behavior by default */
  box-sizing: border-box;
}

/* Center the home section vertically in the available viewport space */
.home {
  display: flex;
  align-items: center;           /* vertical center of .home children */
  justify-content: center;       /* horizontal center (keeps layout balanced) */
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
  padding: 24px;                 /* breathing room on all sides */
  box-sizing: border-box;
}

/* Prevent content from overlapping the fixed nav on very small screens */
@media (max-width: 480px) {
  :root {
    --nav-height: 72px;     /* optional tweak for small mobile nav height */
    --footer-height: 56px;
  }
  .home {
    padding-top: 18px;
    padding-bottom: 18px;
    min-height: calc(100vh - var(--nav-height) - var(--footer-height));
    align-items: flex-start; /* on very small screens let content start near top */
  }
}

/* Keep profile-section layout intact and responsive */
.profile-section {
  width: 100%;
  max-width: 1100px; /* limit line length for large screens */
  margin: 0 auto;
  box-sizing: border-box;
  padding: 12px;
}

/* If you prefer the content exactly centered on medium screens too,
   remove the align-items: flex-start in the small-screen media query above. */

   

/* ------------------------
   Dark mode variables + rules
   Append this to the END of style.css
   ------------------------ */

:root {
  /* keep defaults (no change) */
}

/* Smooth, subtle transitions for theme changes (non-invasive) */
html, body, .content, nav ul, .footer, .certificate-tile,
.skill-card, .timeline-content, .skill-category-item,
.education-tile, .work-experience-tile, .skill-tile,
.floating-card, .modal-content.mini-popup {
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

/* Dark theme applied when .dark-theme is present on <html> */
.dark-theme {
  --light-gray: #222427;       /* used across many existing rules */
  --text-color: #e7e7e7;
  --muted-color: #cfcfcf;
  --card-bg: #1f1f22;
  --card-shadow: 0 8px 30px rgba(0,0,0,0.6);
  --primary-color: #6fd07a;    /* slightly brighter green for contrast */
  --primary-dark: #58a85f;
}

/* Page surfaces */
.dark-theme body {
  background-color: var(--light-gray);
  color: var(--text-color);
}

/* Main content card */
.dark-theme .content {
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

/* Header / nav / footer */
.dark-theme nav ul {
  background-color: #141516;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.dark-theme .footer {
  background-color: #141516;
  color: var(--muted-color);
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* Cards, tiles, modals */
.dark-theme .certificate-tile,
.dark-theme .project-tile,
.dark-theme .skill-card,
.dark-theme .timeline-content,
.dark-theme .education-tile,
.dark-theme .work-experience-tile,
.dark-theme .skill-tile,
.dark-theme .skill-category-item,
.dark-theme .floating-card,
.dark-theme .modal-content.mini-popup {
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.03);
}

/* Text / paragraphs / muted text */
.dark-theme p,
.dark-theme .project-info p,
.dark-theme .timeline-content p,
.dark-theme .certificate-tile p,
.dark-theme .project-tile p {
  color: var(--muted-color);
}

/* Links & buttons — keep green accent but adjust hover contrast */
.dark-theme a,
.dark-theme nav ul li a {
  color: var(--text-color);
}

.dark-theme nav ul li a:hover {
  color: var(--primary-color);
  background-color: rgba(255,255,255,0.02);
}

/* Icon buttons (including our toggle) */
.dark-theme .icon-button,
.dark-theme .button,
.dark-theme .icon-button:hover,
.dark-theme .button:hover {
  background-color: var(--primary-color);
  color: #0a0a0a;
}

/* Mobile menu gradient tweak */
.dark-theme .mobile-nav-menu {
  background: linear-gradient(180deg, #141516, #1a1a1a);
}

/* Social bar — keep green for recognizability, slightly darker on dark theme */
.dark-theme .social-media-bar {
  background-color: #0e5c18;
  color: #fff;
}

/* Small-screen and element-specific adjustments to avoid washed-out visuals */
.dark-theme .typewriter-text { border-right-color: var(--primary-color); }
.dark-theme .skill-tag { background: rgba(111,208,122,0.06); color: var(--primary-color); border-color: rgba(111,208,122,0.09); }

/* Focus outlines for accessibility (high contrast) */
.dark-theme :focus {
  outline: 3px solid rgba(111,208,122,0.18);
  outline-offset: 2px;
}

/* Screen-reader only helper (keeps existing accessible markup) */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===== Fix: force certificate cards to respect dark mode =====
   Paste this at the END of static/css/style.css
*/

.dark-theme .certificate-group,
.dark-theme .certificate-grid {
  background: transparent !important;
  color: var(--text-color) !important;
}

/* Card container */
.dark-theme .certificate-card {
  background-color: var(--card-bg) !important;      /* card surface */
  color: var(--text-color) !important;              /* card text */
  border: 1px solid rgba(255,255,255,0.04) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55) !important;
  /* if your card uses overflow or transforms, keep them */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* If your cards have inner .card-front / .card-back with their own backgrounds */
.dark-theme .certificate-card .card-front,
.dark-theme .certificate-card .card-back {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12)) !important;
  color: var(--text-color) !important;
  border: none !important;
}

/* Icons inside cards */
.dark-theme .certificate-card i.fas,
.dark-theme .certificate-card i.fab {
  color: var(--primary-color) !important; /* keep the accent visible */
}

/* Card headings / titles */
.dark-theme .certificate-card h4 {
  color: var(--text-color) !important;
}

/* Back-side action buttons (View / Download) */
.dark-theme .certificate-card .view-btn,
.dark-theme .certificate-card .download-btn {
  background-color: transparent !important;
  color: var(--primary-color) !important;
  border: 1px solid rgba(111,208,122,0.12) !important;
}

/* Hover states for the action buttons to remain visible in dark mode */
.dark-theme .certificate-card .view-btn:hover,
.dark-theme .certificate-card .download-btn:hover {
  background-color: rgba(111,208,122,0.10) !important;
  color: #080; /* darker text when hovered; keeps readability */
}

/* Special state badges (in-progress, starting-soon) */
.dark-theme .certificate-card.in-progress .card-back span,
.dark-theme .certificate-card.starting-soon .card-back span {
  color: var(--muted-color) !important;
  background: rgba(255,255,255,0.02) !important;
  border-radius: 6px;
  padding: 6px 8px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.03) !important;
}

/* If a parent element forces white backgrounds (rare) - try a stronger override */
.dark-theme .certificate-grid .certificate-card,
.dark-theme section.resume .certificate-card {
  background-color: var(--card-bg) !important;
}

/* Ensure links inside certificate area keep good contrast */
.dark-theme .certificate-card a {
  color: var(--primary-color) !important;
  text-decoration: none;
}

/* Accessibility: make sure focus states remain obvious on dark background */
.dark-theme .certificate-card a:focus,
.dark-theme .certificate-card button:focus {
  outline: 3px solid rgba(111,208,122,0.14) !important;
  outline-offset: 2px;
}

/* ===== Fix: stronger h3 color in dark mode (skills tiles) =====
   Append to the END of static/css/style.css
*/

.dark-theme .skills-modern .skill-category-item h3 {
  color: var(--primary-color) !important;     /* brighter accent for headings */
  font-weight: 600 !important;                /* slightly bolder for emphasis */
  text-shadow: 0 1px 0 rgba(0,0,0,0.45) !important; /* subtle depth for readability */
  letter-spacing: 0.2px !important;
}

/* make the icon before the heading use the same accent */
.dark-theme .skills-modern .skill-category-item h3 i {
  color: var(--primary-color) !important;
  margin-right: 8px;
  opacity: 1 !important;
}

/* keep the subtitle and tags readable but not overpowering */
.dark-theme .skills-modern .skills-subtitle,
.dark-theme .skills-modern .skill-tags .skill-tag {
  color: var(--muted-color) !important;
}

/* ===== Unique theme toggle: append to end of static/css/style.css ===== */

/* Base look for the special toggle */
.icon-button.theme-toggle {
  --toggle-width: 52px;
  --toggle-height: 28px;
  --knob-size: 22px;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toggle-width);
  height: var(--toggle-height);
  padding: 0;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(250,250,250,0.92));
  box-shadow: 0 4px 14px rgba(20,20,20,0.08), inset 0 -1px 0 rgba(0,0,0,0.03);
  transition: background 240ms ease, box-shadow 240ms ease, transform 200ms ease;
  overflow: hidden;
}

/* small icon inside the toggle (moon/sun) - keep accessible but subtle */
.icon-button.theme-toggle > i {
  position: absolute;
  font-size: 12px;
  z-index: 3;
  pointer-events: none;
  transition: opacity 180ms ease, transform 240ms ease;
  color: #333;
}

/* the moving knob */
.icon-button.theme-toggle::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  width: var(--knob-size);
  height: var(--knob-size);
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 10px rgba(16,16,16,0.15);
  transition: transform 240ms cubic-bezier(.2,.9,.2,1), background 240ms ease, box-shadow 240ms ease;
  z-index: 2;
}

/* Desktop hover/press micro-interactions */
.icon-button.theme-toggle:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16,16,16,0.08); }
.icon-button.theme-toggle:active { transform: translateY(0); }

/* Dark theme states: move knob to the right, change background */
.dark-theme .icon-button.theme-toggle {
  background: linear-gradient(180deg, rgba(18,18,18,0.95), rgba(28,28,28,0.95));
  box-shadow: 0 6px 20px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(255,255,255,0.02);
}

/* knob position in dark mode */
.dark-theme .icon-button.theme-toggle::after {
  transform: translateY(-50%) translateX(calc(var(--toggle-width) - var(--knob-size) - 6px));
  background: var(--primary-color, #6fd07a); /* uses primary color if defined */
  box-shadow: 0 6px 18px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* swap icon color/visibility in light vs dark */
.icon-button.theme-toggle i { opacity: 1; transform: translateX(0); }
.dark-theme .icon-button.theme-toggle i { color: #fff; transform: translateX(0); }

/* If you want the icon to change visually, we'll toggle the inner HTML in JS (keeps aria accessible) */

/* Make sure toggle sits nicely in desktop nav */
nav .nav-links li { display: inline-flex; align-items: center; }
nav .nav-links li .theme-toggle { margin-left: 6px; }

/* Mobile: place the toggle inside mobile header and make it visible */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 8px;
}
.mobile-nav-header .theme-toggle {
  margin-left: 8px;
  flex: 0 0 auto;
}

/* Reduce size slightly on very small screens */
@media (max-width: 420px) {
  .icon-button.theme-toggle { --toggle-width: 46px; --toggle-height: 24px; --knob-size: 20px; }
  .mobile-nav-header .theme-toggle { margin-right: 6px; }
}


 