/* Reset all default styles to ensure cross-browser consistency */
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* Ensures that these HTML5 elements behave consistently across older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

/* Set the body line height to ensure consistent spacing across text elements */
body {
	line-height: 1;
}

/* Remove default list styles for ordered and unordered lists */
ol, ul {
	list-style: none;
}

/* Remove quotation marks from blockquote elements */
blockquote, q {
	quotes: none;
}

/* Remove quotation mark content from before and after blockquotes */
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

/* Collapse borders in tables and remove spacing between cells */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/*
=========================
General Styles
=========================
*/

/* Use the box-sizing property to include padding and border in element width/height */
* {
    box-sizing: border-box;
}

/* General body styles, including font and background color */
body {  
    font: 300 16px/22px "Poppins", Arial, Helvetica, sans-serif;
    background: #2e2e2e; /* Dark background color */
    color: #e5e5e5; /* Light text color */
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
}

/* Enable smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure maximum width for key layout elements and prevent horizontal scrolling */
header, section, footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* Make header and nav position relative for future positioning adjustments */
header, nav {
    position: relative;
}

/* Styling for the tagline under the logo */
.tagline {
    font-size: 1.2em;
    color: #e5e5e5;
    margin-top: 5px;
}

/* Basic styles for icons */
.icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

/* Add a scaling effect when icons are hovered over */
.icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/*
=========================
Section Styles
=========================
*/

/* Generic styling for all sections to ensure spacing and centering */
section {
    padding: 60px 20px;
    text-align: center;
    margin: 20px auto;
    overflow: visible;
}

/*
=========================
Button Styles
=========================
*/

/* Default styling for buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    margin-right: 10px;
    background-color: #6c757d; /* Default button background */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Change button background color and elevate slightly on hover */
.btn:hover {
    background-color: #495d91;
    transform: translateY(-3px);
}

/*
=========================
Loading Screen Styles
=========================
*/

/* Full-screen loading screen overlay */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2e2e2e; /* Matches site background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensure the loading screen is on top of all elements */
    color: #e5e5e5;
}

/* Loading text styling with animation for fading in and out */
#loading-text {
    font-size: 2em;
    margin-bottom: 20px;
    animation: fadeInText 1.5s ease-in-out infinite alternate;
}

/* Keyframes for fading in and out text */
@keyframes fadeInText {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Loading bar container styling */
#loading-bar-container {
    width: 80%;
    max-width: 400px;
    height: 10px;
    background-color: #495d91; /* Background for the loading bar container */
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* The actual loading bar that animates */
#loading-bar {
    width: 0;
    height: 100%;
    background-color: #0a9396; /* Color of the loading bar */
    animation: load 3s ease-in-out forwards; /* Fill the bar over 3 seconds */
}

/* Animation for the loading bar filling up */
@keyframes load {
    from { width: 0; }
    to { width: 100%; }
}

/* Start button that shows after the loading screen completes */
#start-button {
    padding: 10px 20px;
    background-color: #495d91;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0; /* Hidden initially */
    transition: opacity 0.5s ease-in-out;
}

/* Show the start button when the class is added */
#start-button.show {
    opacity: 1;
}

/* Slight scaling effect when the start button is hovered over */
#start-button:hover {
    background-color: #0a9396;
    transform: scale(1.05);
}

/* Basic paragraph styling */
p {
    margin-top: 10px;
    font-size: 1.2em;
    animation: fadeInText 1.5s ease-in-out infinite alternate;
}

/*
=========================
Header Styles
=========================
*/

/* Header container that includes logo and navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #343a40;
    padding: 5px 25px;
    border-bottom: 3px solid #495d91; /* Border separating header from content */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    width: 100%;
    z-index: 9999;
    position: fixed;
    top: 0;
}

/* Styling for the unordered list of navigation links */
nav ul {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: flex-end;
    white-space: nowrap;
}

/* Ensure spacing between navigation items */
nav ul li {
    margin-left: 15px;
    white-space: nowrap;
}

/* Basic styles for navigation links */
nav ul li a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 1em;
    padding: 0px 10px;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Add an underline effect when hovering over nav links */
nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #0a9396; /* Underline color */
    transition: width 0.3s ease;
}

/* Change text color and underline width on hover */
nav ul li a:hover {
    color: #0a9396;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Styling for the logo image in the header */
.logo img {
    width: 400px;
    height: auto;
    max-height: 60px;
    object-fit: cover;
}

/* Ensure that the nav remains scrollable if there are too many links */
nav {
    overflow-x: auto;
    max-width: 100%;
}

/* Make the navigation bar sticky when scrolling */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
}

/*
=========================
Hero Section Styles
=========================
*/

/* Main hero section that appears at the top of the page */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, rgba(46,46,46,1) 73%, rgba(52, 58, 64, 1) 100%);
    background-size: cover;
    background-position: center;
    padding: 150px 20px;
    color: white;
    text-align: center;
    margin-top: 60px;
    opacity: 0; /* Initially hidden, will fade in */
    animation: fadeInHero 2s ease-in forwards; /* Fade in animation */
}

/* Fade-in animation for the hero section */
@keyframes fadeInHero {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Container for the hero content */
.hero-content {
    max-width: 800px;
    padding: 20px;
}

/* Large heading in the hero section */
.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: normal;
    opacity: 0; /* Hidden initially */
    transform: translateY(30px); /* Moves up from below */
    animation: fadeInUp 1.5s ease-in-out forwards; /* Fade and move up */
}

/* Animation to fade in and move the heading up */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Paragraph styles for hero section */
.hero p {
    font-size: 1.3em;
    padding: 0 20px;
    margin-bottom: 20px;
}

/* Social media icons in the hero section */
.social-links img {
    width: 50px;
    height: 50px;
    padding: 10px;
}

/* Add a scaling effect when hovering over social icons */
.social-links img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Social media icon styling */
.social-links i {
    font-size: 50px;
    padding: 20px;
}

/* Adjust color of social links */
.social-links a {
    color: #fff; /* Default white color */
    margin-right: 15px;
    transition: color 0.3s ease;
}

/* Change color of social links on hover */
.social-links a:hover {
    color: #0a9396;
}

/* Styling for buttons in the hero section */
.hero-buttons .btn {
    display: inline-block;
    padding: 15px 30px;
    margin-right: 10px;
    background-color: #0a9396;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Adds shadow */
}

/* Hover effect for buttons */
.hero-buttons .btn:hover {
    background-color: #0a9396;
    transform: translateY(-5px); /* Move the button up slightly */
}

/* Styling for the image in the hero section */
.hero-illustration img {
    max-width: 80%;
    height: auto;
    margin-top: 30px;
}

/*
===========================
Section Titles
===========================
*/

/* General styling for section titles */
section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #f8f9fa; /* Light color for the titles */
}

/*
=========================
About Me Section
=========================
*/

/* Container for the About Me section */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background-color: #343a40; /* Dark background */
    border-radius: 10px;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3); /* Add shadow for depth */
    max-width: 1200px;
    margin: 20px auto;
    color: #e5e5e5;
    text-align: center;
}

/* Image styles for the About Me section */
#about img {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 10%; /* Round the image corners */
}

/* Styling for the heading in the About Me section */
.about-container h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #0a9396; /* Accent color */
}

/* Paragraph styles for the About Me section */
.about-container p {
    font-size: 1.2em;
    line-height: 1.8;
    max-width: 900px;
    margin-bottom: 20px;
    color: #e5e5e5;
}

/* Layout for the details listed in the About Me section */
.about-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Creates 3 equal columns */
    gap: 20px 40px;
    justify-items: center;
    padding: 20px 0;
}

/* Individual list items in the About Me section */
.about-details li {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.2em;
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease;
}

/* Image inside each detail */
.about-details li img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

/* Scale the list item slightly on hover */
.about-details li:hover {
    transform: translateY(-5px);
}

/* Scale the image inside the list item on hover */
.about-details li:hover img {
    transform: scale(1.2);
}

/* Styling for the paragraph text inside list items */
.about-details li p {
    font-size: 1.1em;
    color: #afb6be;
}

/*
=========================
Skills Section
=========================
*/

/* Container for the Skills section */
#skills {
    padding: 50px;
    background-color: #2e2e2e; /* Dark background */
}

/* Layout for the skills container */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual skill card */
.skill-card {
    background-color: #343a40;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Scale up the skill card and add shadow on hover */
.skill-card:hover {
    transform: scale(1.05);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.4);
}

/* Image for each skill */
.skill-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* Skill title */
.skill-card h3 {
    color: #f8f9fa;
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* Skill description */
.skill-card p {
    color: #afb6be;
    font-size: 1em;
    text-align: center;
}

/*
=========================
Projects Section
=========================
*/

/* Layout for the projects section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid for projects */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual project card */
.project-card {
    background-color: #343a40;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease-in-out;
}

/* Hover effect for project card */
.project-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Image inside the project card */
.project-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Button that appears when hovering over project card */
.project-card .btn {
    display: none;
    margin-top: 10px;
    background-color: #0a9396;
    color: white;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Display the button on hover */
.project-card:hover .btn {
    display: inline-block;
}

/* Button hover effect */
.project-card .btn:hover {
    background-color: #495d91;
}

/* Scroll animation to reveal project cards */
.scroll-visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-in-out;
}

/* Modal styles for project details */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    overflow: auto; /* Allows scrolling if content exceeds height */
    box-sizing: border-box;
}

/* Modal content container */
.modal-content {
    background-color: #2e2e2e;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto; /* Allows the content to scroll vertically if it exceeds the height */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    margin: auto;
    z-index: 10001;
}

/* Modal title */
.modal-content h3 {
    color: #fff;
}

/* Close button for modal */
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5em;
    color: #fff;
    cursor: pointer;
}

/* Change close button color on hover */
.close:hover {
    color: #aaa;
}

/* Modal image */
.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Styling for small images in the modal */
.small-image {
    max-width: 100px; /* Adjust the size as needed */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Animation to fade in and move up the modal content */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styling for the modal scrollbar */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #495d91;
    border-radius: 10px;
}

/* Close button styling */
.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
}

/* Close button hover effects */
.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/*
=========================
Resume Section
=========================
*/

/* Styling for the resume download link */
#resume a {
    display: inline-block;
    padding: 15px 30px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
}

/* Hover effect for the resume download link */
resume a:hover {
    background-color: #495d91;
}

/*
=========================
Contact Section
=========================
*/

/* General container for the contact section */
#contact {
    display: block;
    clear: both;
    padding-bottom: 60px;
}

/* Paragraph and anchor styles inside contact section */
#contact p, #contact a {
    font-size: 1.2em;
    color: #afb6be;
}

/* Form container styling for the contact form */
#contact form {
    background-color: #343a40;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

/* Input and textarea field styling */
input, textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #495d91;
    border-radius: 5px;
    background-color: #2e2e2e;
    color: #e5e5e5;
    transition: border-color 0.3s ease, box-shadow 0.3x ease;
}

/* Focus state for input and textarea fields */
input:focus, textarea:focus {
    border-color: #0a9396;
    outline: none;
    box-shadow: 0 0 8px rgba(10, 147, 150, 0.5);
}

/* Error state for form validation */
input.error, textarea.error {
    border-color: red;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

/* Submit button styling */
button.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #495d91;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    width: 100%;
}

/* Hover effect for the submit button */
button.btn:hover {
    background-color: #0a9396;
    transform: translateY(-3px);
}

/* Active state for the submit button */
button.btn:active {
    transform: scale(0.98);
}

/* Success message styling */
#success-message {
    display: none;
    color: #0a9396;
    margin-top: 15px;
    font-size: 1.2em;
}

/*
=========================
Footer Styles
=========================
*/

/* Footer container */
footer {
    background-color: #343a40;
    border-top: 3px solid #495d91;
    text-align: center;
    padding: 30px 0;
    color: white;
    width: 100%;
    margin-top: 60px;
}

/* Footer content styling */
.footer-content p {
    margin-bottom: 20px;
}

/* Footer content container */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Social icons in the footer */
.social-icons {
    margin-bottom: 20px;
}

/* Social icons styling */
.social-icons a {
    display: inline-block;
    margin: 0 15px;
    font-size: 30px;
    color: white;
    transition: color 0.3s ease;
}

/* Change color of social icons on hover */
.social-icons a:hover {
    color: #0a9396;
}

/* Back to top button in the footer */
.back-to-top {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #495d91;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover effect for the back to top button */
.back-to-top:hover {
    background-color: #0a9396;
    transform: translateY(-3px);
}

/* Animation to fade in sections when scrolled into view */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make sections fade in with delay */
section {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    animation-delay: 0.5s;
}

/*
========================
Media Query for Smaller Screens
========================
*/

/* Media query for screens smaller than 768px */
@media (max-width: 768px) {
    /* Make the header layout vertical */
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Center navigation links */
    nav ul {
        justify-content: center;
    }

    /* Hero content adjustments for smaller screens */
    .hero-content {
        padding: 20px;
        text-align: center;
    }

    /* Adjust font size for smaller screens */
    .hero h1 {
        font-size: 2.5em;
    }

    /* Adjust paragraph font size for smaller screens */
    .hero p {
        font-size: 1.1em;
    }

    /* Stack hero buttons vertically on smaller screens */
    .hero-buttons {
        flex-direction: column;
    }

    /* Adjust modal content width and height for smaller screens */
    .modal-content {
        width: 95%;
        max-width: none; /* Remove the fixed max width */
        max-height: 85vh; /* Slightly reduce the max height for smaller screens */
    }
}
