/* General Styles */
body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f4f4f4;
    /* Fixed text-size-adjust with all required prefixes */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Disable hyphenation to prevent words from being incorrectly split */
p {
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

header {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-weight: 900;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: white;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin-top: 0.5rem;
}

nav ul li {
    display: inline;
    margin-right: 10px;
}

nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 3rem;
    /* Add padding to accommodate footer */
}

section {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
    color: #2c3e50;
    font-family: 'Times New Roman', Times, serif;
}

/* Underline class */
.underline {
    text-decoration: underline;
}

/* Profile Image */
.profile-image {
    display: block;
    width: 200px;
    height: auto;
    margin: 0 auto 1rem;
}

/* Project Styles */
.project {
    border-bottom: 3px solid #2c3e50;
    /* Increased thickness and changed color */
    padding-bottom: 2rem;
    /* Increased padding for more space */
    margin-bottom: 2rem;
    /* Increased margin for more separation */
}

.project:last-child {
    border-bottom: none;
}

.project-link,
.pdf-download {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    margin-right: 10px;
}

.project-link:hover,
.pdf-download:hover {
    background-color: #2980b9;
}

/* Contact and Socials */
.social-links {
    list-style-type: none;
    padding: 0;
}

.social-links li {
    display: inline-block;
    margin-right: 20px;
}

.social-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 18px;
}

.social-links a:hover {
    color: #2980b9;
}

.social-links i {
    margin-right: 5px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 0.25rem 0 !important;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.8em !important;
    line-height: 1.2 !important;
}

#backToTop {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

#backToTop:hover {
    background-color: #555;
}

#backToTop.show {
    opacity: 1;
}

/* Project Images */
.project img {
    max-width: 50%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* Responsive Design */
@media (max-width: 600px) {
    nav ul li {
        display: block;
        margin-bottom: 10px;
    }

    main {
        padding: 1rem;
        padding-bottom: 3rem;
        /* Add padding to accommodate footer */
    }

    .profile-image {
        width: 150px;
    }

    .social-links li {
        display: block;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 2em;
    }
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
    body {
        /* Fix for iOS Safari 100vh issue */
        min-height: -webkit-fill-available;
    }

    html {
        height: -webkit-fill-available;
    }
}

/* Fix for IE/Edge */
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
    .project img {
        width: 50%;
    }

    footer {
        position: fixed;
        width: 100%;
    }
}

/* Better font rendering in Firefox */
@-moz-document url-prefix() {
    body {
        text-rendering: optimizeLegibility;
    }
}