:root {
    font-size: 13px;
    --section1: #FF5E3A;
    --section2: #FF2A00;
    --section3: #FF7000;
    --section4: #FFB400;
    --section5: #FFD700;
}

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 3.95rem;
}

body {
    margin: 0;
    background-color: #f0f0f0;
    color: #111;
    font-family: 'Nunito', sans-serif;
}

/* ----------------------------------------------------------------------- */
/*                               Header Section                            */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem); /* subtle blur effect */
    -webkit-backdrop-filter: blur(0.625rem); /* Safari support */
    border-bottom: 0.063rem solid rgba(0, 0, 0, 0.2);
    padding: 0.625rem 1.25rem;
    text-align: center;
    font-weight: bold;
    z-index: 1000;
    transition: background 0.3s;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
}

#logo-section {
    display: flex;
    justify-content: flex-start;
    flex: 1 1 auto;
}

#logo {
    width: clamp(1rem, 8vw, 2.7rem);
    height: auto;
}

#logo:hover {
    cursor: pointer;
}

.header-dino {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    position: absolute;
    top: 2.188rem;
    left: 0;
    white-space: nowrap;
    z-index: 1;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}

#logo:hover .header-dino {
    visibility: visible;
    opacity: 1;
}

nav.navbar {
    display: flex;
    justify-content: center;
    gap: 1.875rem;
    font-weight: 600;
    font-size: 1rem;
    flex: 1 1 auto;
}

nav.navbar a {
    color: white;
    text-shadow: 0.125rem 0.125rem 0.625rem rgba(0, 0, 0, 0.7);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    transition: background 0.3s, color 0.3s;
    border-radius: 0.375rem;
    font-size: clamp(0.75rem, 2vw, 1rem);
}

nav.navbar a:hover {
    transform: scale(1.2);
    text-decoration: underline;
    cursor: pointer;
}

#header-download {
    display: flex;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.header-cv {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    position: absolute;
    top: 2.188rem;
    right: 0;
    white-space: nowrap;
    z-index: 1;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}

#header-download a:hover .header-cv {
    visibility: visible;
    opacity: 1;
}

#header-download a img {
    width: clamp(1.25rem, 4vw, 2rem);
    height: clamp(1.25rem, 4vw, 2rem);
}

#header-download a img:hover {
    transform: scale(1.2);
}

/* ----------------------------------------------------------------------- */
/*                               Hero section                              */

.hero {
    background-image: url('images/trees.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.hero-text {
    text-align: center;
    color: white;
    text-shadow: 0.125rem 0.125rem 0.625rem rgba(0, 0, 0, 0.7);
    animation: fadeIn 2s ease-in-out;
    position: relative;
    z-index: 1;
}

#hero-name {
    font-size: clamp(2rem, 6vw, 4rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.125rem;
}

#hero-job {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-top: 0.625rem;
    font-weight: 300;
}

#hero-tag {
    font-size: clamp(0.875rem, 2vw, 1.2rem);
    margin-top: 1.25rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------------- */
/*                              Section Titles                             */

.section-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0 2.5rem;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 0.25rem;
    background: black;
}

.section-header {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.313rem;
    text-align: center;
    color: black;
    margin: 0 1.25rem;
}

/* ----------------------------------------------------------------------- */
/*                               About section                             */

#about {
    background-color: var(--section1);
    padding: 1.25rem 2.5rem 3.75rem;
    height: max-content;
}

#about-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    padding: 2rem;
}

#about-left {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
}

#about-photo {
    width: 50%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 0.625rem solid black;
    display: block;
    margin: 0 auto;
}

#about-description-box {
    background-color: #FF4D1A;
    border: 0.5rem solid black;
    width: 95%;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow:
        0 0.938rem 1.875rem rgba(0, 0, 0, 0.6),
        0 0.625rem 0.938rem rgba(0, 0, 0, 0.4),
        0 0 1.25rem rgba(255, 60, 10, 0.7);
    word-wrap: break-word;
}

#about-description {
    font-size: 1rem;
    line-height: 1.5;
}

#about-right {
    flex: 2 1 500px;
    display: flex;
    justify-content: center;
}

#about-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 5vh 4vw;
}

.about-box {
    background-color: #FF4D1A;
    border: 0.5rem solid black;
    width: 35%;
    min-width: 15.625rem;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow:
        0 0.938rem 1.875rem rgba(0, 0, 0, 0.6),
        0 0.625rem 0.938rem rgba(0, 0, 0, 0.4),
        0 0 1.25rem rgba(255, 60, 10, 0.7);
    word-wrap: break-word;
}

.about-box p {
    font-size: 1.1rem;
    margin: 0;
}


/* ----------------------------------------------------------------------- */
/*                              Skills section                             */

#skills {
    background-color: var(--section2);
    padding: 1.25rem 2.5rem 3.75rem;
}

#skills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 3vw 4vw;
    padding: 2rem 4vw;
}

.skill-box {
    width: clamp(10rem, 18vw, 13rem);
    height: 12rem;
    background-color: #FF8500;
    border: 0.1rem solid black;
    border-radius: 10%;
    box-shadow:
        0 0.3rem 0.6rem rgba(0, 0, 0, 0.6),
        0 0.2rem 0.4rem rgba(0, 0, 0, 0.4),
        0 0 0.5rem rgba(255, 133, 0, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;

    font-weight: bold;
    font-size: clamp(0.9rem, 1.6vw, 1.2rem);
    overflow: hidden;
}

.skill-box p {
    word-break: break-word;
    margin: 0;
}

.skill-box:hover {
    transform: translateY(-0.5rem);
    box-shadow:
        0 1.25rem 2.5rem rgba(0, 0, 0, 0.65),
        0 0.75rem 1.125rem rgba(0, 0, 0, 0.45),
        0 0 1.75rem rgba(255, 133, 0, 0.9);
}

.skill {
    width: 70%;
    max-height: 8rem;
    object-fit: contain;
    display: block;
    margin-bottom: 0.5rem;
}


/* ----------------------------------------------------------------------- */
/*                          Qualifications section                         */

#qualifications {
    background-color: var(--section3);
    padding: 1.25rem 2.5rem 3.75rem;
}

.qual {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4rem 8rem;
    padding: 2vw 4vw;
    justify-content: center;
}

.qual-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-weight: bold;
    text-align: center;
    position: relative;
    background-color: #FFA500cc;
    color: #000;
    padding: 2rem;
    width: max-content;
    max-width: 40rem;
    border: 0.1rem solid black;
    border-radius: 1.5rem;
    box-shadow:
        0 0.3rem 0.6rem rgba(0, 0, 0, 0.6),
        0 0.2rem 0.4rem rgba(0, 0, 0, 0.4),
        0 0 0.5rem rgba(255, 133, 0, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.qual-box:hover {
    box-shadow:
        0 1.25rem 2.5rem rgba(0, 0, 0, 0.65),
        0 0.75rem 1.125rem rgba(0, 0, 0, 0.45),
        0 0 1.75rem rgba(255, 133, 0, 0.9);
}

.qual-box.cert {
    background-color: #FFB733cc;
}

.qual-box.accred {
    background-color: #FFD966cc;
}

.qual-type {
    background-color: #000;
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: -0.6rem;
    font-size: 0.75rem;
    width: max-content;
    align-self: center;
}

.qual-header {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.2rem 0;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-wrap: nowrap;
}

.qual-major {
    font-size: 1.2rem;
}

.qual-text {
  font-size: 0.9rem;
  line-height: 1.4;
}



/* ----------------------------------------------------------------------- */
/*                             Projects section                            */

#projects {
    background-color: var(--section4);
    padding: 1.25rem 2.5rem 3.75rem;
}

.project-section {
    margin-bottom: 2.5rem;
}

.project-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: black;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    text-align: left;
    text-decoration: underline;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 5rem;
}

.projects-grid a {
    text-decoration: none;
}

.project-box {
    background-color: #FFCB2B;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1rem 2rem rgba(0, 0, 0, 0.6),
        0 0.7rem 1rem rgba(0, 0, 0, 0.4),
        0 0 1.2rem rgba(255, 203, 43, 0.7);
}

.project-box:hover {
    cursor: pointer;
    transform: scale(1.02);
    box-shadow:
        0 1.25rem 2.5rem rgba(0, 0, 0, 0.65),
        0 0.75rem 1.125rem rgba(0, 0, 0, 0.45),
        0 0 1.5rem rgba(255, 203, 43, 0.9);
}

.project-image {
    width: 100%;
    height: 11.25rem;
    object-fit: cover;
    border-bottom: 0.125rem solid #FFCB2B;
}

.project-content {
    padding: 1rem;
    color: #333;
    text-align: center;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.project-content p {
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fae0d4;
    margin: 8% auto;
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 75rem;
    border: 0.25rem solid #ff4c4c;
    box-shadow:
        0 1rem 2rem rgba(0, 0, 0, 0.5),
        0 0 1.2rem rgba(255, 76, 76, 0.8);
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

.close:hover {
    transform: scale(1.4);
}

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

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    text-decoration: underline;
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 2rem;
    max-width: 100%;
}

.modal-info {
    flex: 1 0 48%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 auto;
    gap: 1rem;
}

.info-block {
    margin-bottom: 1rem;
}

.info-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.info-content {
    margin-left: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.github-button {
    display: inline-block;
    align-self: flex-start;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #ff4c4c;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    box-shadow: 0 0.3rem 0.6rem rgba(0, 0, 0, 0.2);
}

.github-button:hover {
    background-color: #e03a3a;
    transform: translateY(-0.125rem);
}

.modal-gallery {
    flex: 1 0 48%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.gallery {
    text-align: center;
    margin: 1.5rem 0;
}

.gallery img {
    width: 100%;
    max-height: 18.75rem;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    gap: 1rem;
}

.gallery-controls button {
    background-color: #ff4c4c;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
}

.gallery-controls button:hover {
    background-color: #e03a3a;
    transform: translateY(-0.125rem);
}


/* ----------------------------------------------------------------------- */
/*                             Contact section                             */

#contact {
    background-color: var(--section5);
    text-align: center;
    padding: 1.25rem 2.5rem;
    min-height: 81.5vh;
}

.contact-section {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 auto;
    padding: 0.625rem 0;
    height: max-content;
}

#contact-s {
    width: 31.25rem;
    height: max-content;
}

.contact-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    min-height: 21.875rem;
}

.contact-header h2 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 0.625rem;
    color: #111;
}

.contact-header p {
    font-size: clamp(2rem, 6vw, 4rem);
    color: #111;
    font-weight: bold;
}
  
.contact-form {
    width: min(90%, 31.25rem);
    min-height: 25rem;
    text-align: right;
}
  
.contact-form label {
    display: block;
    margin: 1.25rem 0 0.375rem;
    font-weight: bold;
    color: #111;
    text-align: left;
}
  
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.625rem;
    border: 0.125rem solid var(--section2);
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: #fff;
    color: #111;
    outline: none;
}
  
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #cc2200;
    box-shadow: 0 0 0 0.125rem rgba(255, 42, 0, 0.2);
}
  
.contact-form button {
    margin-top: 1.563rem;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--section2);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.3s;
}
  
.contact-form button:hover {
    background-color: #cc2200;
    transform: scale(1.1);
}

/* ----------------------------------------------------------------------- */
/*                                   Footer                                */

footer {
    background-color: #FFEDDA;
    color: #111;
    padding: 0.063rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin: 0.65rem 0;
}

.footer-links a img {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-links a img:hover {
    transform: scale(1.2);
}

#footer-link {
    position: relative;
    display: inline-block;
}

#footer-link a:hover .footer-box {
    visibility: visible;
    opacity: 1;
}

.footer-box {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    position: absolute;
    top: -2.813rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}
