/* General CSS */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    font-family: "Jost", sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Prevent fixed header from overlapping when scrolling to anchors */
#home,
#portfolio,
#skills,
#contact,
#footer {
    scroll-margin-top: 120px;
}

:root {
    --bg-color: #1d1c1b;
    --text-color: #fff;
    --main-color: #ea5445;
    --other-color: #858585;
    --h1-font: 5rem;
    --p-font: 1.1rem;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: 32px 13%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.50s ease;
}

header.header--hidden {
    transform: translateY(-100%);
}

.logo {
    color: var(--text-color);
    font-size: 36px;
    font-weight: 500;
}

.navlist {
    display: flex;
}

.navlist a {
    display: inline-flex;
    font-size: var(--p-font);
    font-weight: 500;
    color: var(--text-color);
    margin: 0 30px;
    transition: all 0.6s ease;
}

.navlist a:hover {
    color: var(--other-color);
    transform: translateY(-6px);
}

.navlist a.active {
    color: var(--main-color);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--main-color);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 30px;
    border: 2px solid var(--main-color);
    transition: all 0.6s ease;
}

.nav-btn:hover {
    background: transparent;
    border: 2px solid var(--main-color);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: contain;
}

section {
    padding: 0px 13% 0px;
    margin-top: 150px;
}

.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 84, 69, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(234, 84, 69, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(234, 84, 69, 0.06), transparent);
    pointer-events: none;
}

.hero-tagline {
    font-family: "Caveat", cursive;
    font-size: 1.4rem;
    color: var(--main-color);
    margin: -12px 0 16px;
    font-weight: 600;
}

.hero-text h1 {
    font-size: var(--h1-font);
    line-height: 1.1;
    font-weight: 250;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: -1px -1px 0px #000, 7px 7px 0px #000, 9px 9px #00000055;
}

.hero-text h1 span {
    color: var(--main-color);
}

.hero-text h6 {
    font-size: 22px;
    font-weight: 600;
}

.hero-text h6 span {
    color: var(--main-color);
}

.hero-text h4 {
    font-family: "Caveat", cursive;
    font-size: 35px;
    font-weight: bold;
    margin-bottom: 30px;
}

.hero-text p {
    font-size: var(--p-font);
    color: var(--other-color);
    margin-bottom: 20px;
    line-height: 2;
}

.hero-icons i {
    display: inline-block;
    font-size: 24px;
    color: var(--text-color);
    margin-right: 20px;
    transition: all 0.6s ease;
    margin-bottom: 40px;
}

.hero-icons i:hover {
    transform: rotate3d(0, 0, 1, 360deg);
    color: var(--main-color);
}

.hero-btn {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 30px;
    border: 2px solid var(--main-color);
    box-shadow: 2px 2px var(--main-color);
    transition: all 0.6s ease;
    margin-right: 30px;
}

.btn:hover {
    background: var(--main-color);
    color: var(--text-color);
}

.btn2 {
    display: inline-block;
    color: var(--text-color);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.05em;
}

.scroll {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.scroll.scroll--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.scroll a {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    letter-spacing: 0.05em;
    transition: all 0.6s ease;
}

.scroll a:hover {
    color: var(--main-color);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Adjusting media queries */
@media (max-width: 1510px) {
    :root {
        --h1-font: 4.2rem;
        --p-font: 1rem;
    }

    .profile-img {
        width: 200px;
        height: 200px;
        border-radius: 50%;
        object-fit: contain;
    }
}

@media (max-width: 1330px) {
    header {
        padding: 22px 4%;
    }

    section {
        padding: 22px 4%;
    }

    :root {
        --h1-font: 4rem;
    }

    .profile-img {
        width: 200px;
        height: 200px;
        border-radius: 50%;
        object-fit: contain;
    }
}

/* Tablet: stack hero, smaller type */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        text-align: center;
        padding-top: 2rem;
    }
    .hero-text {
        order: 1;
    }
    .hero-img {
        order: 0;
    }
    .hero-btn {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .hero-btn .btn,
    .hero-btn .btn2 {
        margin-right: 0;
    }
    .skill-icons {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    .skill {
        max-width: 400px;
    }
}

/* Mobile: smaller hero type, single-column projects already from grid */
@media (max-width: 768px) {
    :root {
        --h1-font: 2.5rem;
        --p-font: 0.95rem;
    }
    section {
        margin-top: 100px;
    }
    .hero-text h6 {
        font-size: 18px;
    }
    .hero-text h4 {
        font-size: 26px;
    }
    .profile-img {
        width: 140px;
        height: 140px;
    }
    .hero-btn {
        flex-direction: column;
    }
    .skills h2,
    #portfolio h2 {
        font-size: 1.75rem;
    }
    .project h3 {
        font-size: 1rem;
    }
    .project img {
        height: 160px;
    }
    .project-detail {
        padding: 80px 4% 40px;
    }
    .project-detail h1 {
        font-size: 2rem;
    }
    .project-media img,
    .project-media video {
        max-width: 100%;
    }
}

/* Small phones */
@media (max-width: 480px) {
    :root {
        --h1-font: 2rem;
    }
    .portfolio-icons {
        grid-template-columns: 1fr;
    }
}

.skills {
    background-color: #252422;
    padding: 80px 0;
    text-align: center;
}

.skills h2, #portfolio h2, #contact h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--main-color);
}

.skill-icons {
    display: flex;
    justify-content: space-around;
}

.skill {
    flex: 1;
    margin: 0 20px;
}

.skill i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--main-color);
}

.skill h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.skill p {
    font-size: 1rem;
    color: var(--other-color);
    line-height: 1.5;
}

.skills .skill h3 {
    color: var(--text-color);
}

.skills .skill p {
    color: var(--other-color);
}

#portfolio {
    padding: 50px 0;
    text-align: center;
}

#portfolio .container {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-items: stretch;
    align-items: stretch;
}

.project {
    display: flex;
    flex-direction: column;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(234, 84, 69, 0.25);
}

.project-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.project-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--main-color);
    transition: transform 0.4s ease;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85));
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project:hover .project-overlay {
    opacity: 1;
}

.project h3 {
    padding: 16px 12px 4px;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--text-color);
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 0 12px 12px;
}

.project-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(234, 84, 69, 0.2);
    color: var(--main-color);
    border-radius: 20px;
    font-weight: 500;
}

.project .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--main-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 0 15px 15px;
}

.project .btn:hover {
    background-color: #ff6b5e;
}

/* Contact section & form */
#contact {
    padding-bottom: 4rem;
}

#contact .container {
    max-width: 640px;
    margin: 0 auto;
}

.contact-form {
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #2a2928;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #666;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(234, 84, 69, 0.2);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form .btn-submit {
    margin-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--main-color) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    font-size: 1rem;
    margin: 0 !important;
}

.btn-submit:hover {
    background: #ff6b5e !important;
}

/* Footer */
#footer {
    padding: 48px 24px 32px;
    background: #161514;
    border-top: 1px solid #2a2928;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--other-color);
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--main-color);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.footer-social a {
    color: var(--other-color);
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    color: var(--main-color);
    transform: translateY(-3px);
}

.footer-credit {
    font-size: 0.9rem;
    color: #555;
}

/* Focus states (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal-card {
        opacity: 1;
        transform: none;
    }
}

/* --- Project pages: shared layout polish --- */
.project-detail {
    padding: 100px 13% 60px;
    color: var(--text-color);
    text-align: center;
}

.project-detail .container {
    max-width: 800px;
    margin: 0 auto;
}

.project-detail h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--main-color);
}

.project-detail h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--main-color);
}

.project-detail .project-img {
    width: 100%;
    height: auto;
    margin-bottom: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project-detail > .container > p:first-of-type {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--other-color);
}

.project-detail p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--other-color);
}

.project-detail ul {
    text-align: left;
    display: inline-block;
    margin: 0.75rem 0 1.5rem;
    padding-left: 1.25rem;
}

.project-detail ul li {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.project-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.project-links .btn {
    display: inline-block;
    padding: 12px 22px;
    background: var(--main-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

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

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--other-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

.back-to-projects {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.back-to-projects.back-to-projects--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-projects .btn {
    display: inline-block;
    padding: 12px 20px;
    background: var(--main-color);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(234, 84, 69, 0.35);
    transition: background 0.2s, transform 0.2s;
}

.back-to-projects .btn:hover {
    background: #ff6b5e;
    transform: translateY(-2px);
}

/* On project pages, add space above the fixed button so it doesn't overlap the footer */
.project-page #footer {
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .back-to-projects {
        bottom: 20px;
        left: 16px;
        right: auto;
    }
    .back-to-projects .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    .project-details {
        padding: 80px 4% 40px;
    }
    .project-details h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .back-to-projects {
        bottom: 16px;
        left: 12px;
    }
    .back-to-projects .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* --- aws / project-detail media & code --- */
.project-media {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.project-media img, .project-media video {
    width: 100%;
    max-width: 45%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-detail .container {
    text-align: center;
}

.project-img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.project-detail .code-block {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
}

.code-block code {
    display: block;
    white-space: pre-wrap;
}
.project-poster {
    width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* --- project-details (stock, credit card) --- */
.project-details {
    padding: 100px 13% 60px;
    background: var(--bg-color);
}

.project-details .container {
    max-width: 800px;
    margin: 0 auto;
}

.project-details h2 {
    font-size: 2.25rem;
    color: var(--main-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.project-details .project-image {
    text-align: center;
    margin-bottom: 1.75rem;
}

.project-details .project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project-details .project-description {
    text-align: left;
}

.project-details .project-description h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.project-details .project-description p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--other-color);
}

.project-details .project-description ul {
    list-style: disc;
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.project-details .project-description ul li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--other-color);
}

.project-details .project-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 2rem;
}

.project-details .project-btns .btn,
.project-details .project-btns .btn2 {
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.project-details .project-btns .btn:hover,
.project-details .project-btns .btn2:hover {
    transform: translateY(-2px);
}

.project-image {
    text-align: center;
    margin-bottom: 20px;
}

.project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-description {
    text-align: left;
}

.project-description h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-top: 20px;
}

.project-description p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #ccc; /* Adjusted text color for readability */
}

.project-description ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.project-description ul li {
    font-size: 1rem;
    line-height: 1.8;
    color: #ccc; /* Adjusted text color for readability */
}

.project-btns {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn, .btn2 {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 10px;
    text-decoration: none;
    color: #fff;
    background-color: #ea5445;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.btn:hover, .btn2:hover {
    background-color: #ff6b5e;
}

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #222;
    color: #fff;
}


.contact-section {
    position: fixed;
    bottom: 0;
    left: 20px; /* Adjust the left position as needed */
    width: calc(100% - 40px); /* Adjust the width and left padding */
    max-width: 300px; /* Set a maximum width */
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Add a shadow for better visibility */
    z-index: 1000; /* Ensure it's above other elements */
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

/* Adjustments for responsiveness */
@media screen and (max-width: 768px) {
    .contact-section {
        padding: 10px;
    }
}

/* Style for form elements */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button[type="submit"] {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
}

/* Submitted message */
#submitted-message {
    margin-top: 10px;
    font-weight: bold;
}

/* Mobile menu */
#menu-icon {
    display: none;
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--text-color);
}

@media screen and (max-width: 768px) {
    #menu-icon {
        display: block;
    }
    .navlist {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-color);
        padding: 1rem;
        gap: 0.5rem;
    }
    .navlist.open {
        display: flex;
    }
    .nav-btn {
        padding: 10px 20px;
        font-size: 13px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 16px 12px;
    }
    .logo {
        font-size: 1.35rem;
    }
    .nav-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}
