/* -------- BASICS ------------*/
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', monospace;
    word-spacing: 8px;
}

body{
    background-color: #f8d2db;
}

h2{
    font-family: "Brush Script MT", cursive;
    font-size: 60px;
    text-align: center;
    color: #4D243D;
    text-shadow: 2px 3px #d496be;
}

/* -------- NAVIGÁCIÓ ------------*/
.topnav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topnav ul{
    list-style-type: none;
    background-color: #4D243D ;
    padding : 0px;
    margin : 0px;
    display : flex;
    justify-content : flex-end;
    align-items : center;
}

.topnav a{
    color :  #FDFFF7;
    height : 100%;
    text-decoration : none;
    padding : 0 40px;
    display : flex;
    align-items: center;
}

.topnav a:hover{
    background-color: #683153 ;
}

.topnav a.active{
    background-color: #5c2c4a ;
    font-style: italic;
}

.topnav li{
    height : 60px;
}

.topnav .logo {
    margin-right: auto; 
}

.topnav .logo img {
    max-height: 40px; 
    width: auto;
    display: block;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #4D243D;
    color: white;
    padding: 10px;
    z-index: 9999;
}

.skip-link:focus {
    left: 0;
}

/* -------- HAMBURGER MENU ------------*/
.hamburger-menu {
    display: none;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 2000;
    background-color: #4D243D;
    color: #FDFFF7;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.hamburger-menu:hover {
    background-color: #683153;
}

/* -------- HIGH CONTRAST MODE ------------*/
.topnav .contrast-item {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

#contrast-toggle {
    background-color: #4D243D;
    color: #FDFFF7;
    border: 2px solid #9c6d8b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

#contrast-toggle::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    right: 0;
    background-color: #683153;
    transition: all 0.3s ease;
}

#contrast-toggle .contrast-icon {
    position: relative;
    z-index: 1;
    font-size: 20px;
}

#contrast-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(77, 36, 61, 0.3);
}

.high-contrast {
    background-color: #000;
    color: #fff;
}

.high-contrast h1, .high-contrast h2, .high-contrast h3, 
.high-contrast h4, .high-contrast p, .high-contrast li, 
.high-contrast td, .high-contrast th {
    color: #fff;
    text-shadow: none;
}

.high-contrast a {
    color: #ffff00;
    text-decoration: underline;
}

.high-contrast .topnav {
    background-color: #000;
}

.high-contrast .topnav a {
    color: #fff;
    border: 1px solid #fff;
}

.high-contrast .topnav a.active {
    background-color: #fff;
    color: #000;
}

.high-contrast .divider {
    background-color: #fff;
}

.high-contrast .footer-content {
    background-color: #000;
    border-top: 2px solid #fff;
}

.high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

.high-contrast #contrast-toggle {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.high-contrast #contrast-toggle::before {
    background-color: #000;
}

.high-contrast main a {
    color: #ffff00;
    text-decoration: underline;
}

.high-contrast main a:visited {
    color: #cccc00;
    text-decoration: underline;
}

.high-contrast form {
    background-color: #000;
    border: 2px solid #fff;
}

.high-contrast form label {
    color: #fff;
}

.high-contrast form input[type="text"],
.high-contrast form input[type="email"],
.high-contrast form textarea {
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
}

.high-contrast form input[type="submit"] {
    background-color: #fff;
    color: #000;
    border: 2px solid #fff;
}

.high-contrast form input[type="submit"]:hover {
    background-color: #ccc;
    color: #000;
}

.high-contrast fieldset {
    border-color: #fff;
}

.high-contrast legend {
    color: #fff;
}

.high-contrast.contact-bg::before {
    background-color: rgba(0, 0, 0, 0.8);
}

/* -------------- TWO COLUMN LAYOUT -----------------*/
.two-column-layout{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    margin-left: 2%;
    margin-right: 2%;
}

/* ---------- IMAGE - HOME ------------*/
.image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-container img {
    width: 90%; 
    height: auto;
    display: block;
}

.text-overlay {
    position: absolute;
    right: 20px; 
    top: 60%;    
    transform: translateY(-50%); 
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    font-size: clamp(8px, 2vw, 14px);; 
    text-align: right; 
    padding: 40px 10px;
    border-radius: 20px;
}

.image-container img.thumbnail {
    width: auto;
    max-height: 300px;
}

.thumbnail {
    max-width: 300px;
    height: auto;
    border: 3px solid #9c6d8b;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(77, 36, 61, 0.2);
}

.thumbnail:hover {
    transform: scale(1.05);
}

.responsive-img {
    width: 80%;
    height: auto;
}

/* ----------- PROGRESS BAR -----------------*/
.prog-bar-container{
    width:40%;
    align-items: center;
    margin-left: 2%
}

.prog-bar-container li{
    position: relative;
    list-style: none;
    margin: 50px 0;
    text-transform: uppercase;
    align-items: center;
}

.prog-bar-container li:before{
    content: "";
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    height: 15px;
    background-color: #4d243daa ;
    border-radius: 1000px;
}

.prog-bar-container li:after{
    content: "";
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 0;
    height: 15px;
    background-color: #4D243D ;
    border-radius: 1000px;
    animation-duration: .7s;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

.prog-bar-container li.python:after{
    animation-name: python;
}

@keyframes python{
    to {
        width: 60%;
    }
}

.prog-bar-container li.database:after{
    animation-name: data;
}

@keyframes data{
    to {
        width: 70%;
    }
}

.prog-bar-container li.office:after{
    animation-name: office;
}

@keyframes office{
    to {
        width: 90%;
    }
}

.prog-bar-container li.functional:after{
    animation-name: functional;
}

@keyframes functional{
    to {
        width: 50%;
    }
}

.prog-bar-container li.c:after{
    animation-name: c;
}

@keyframes c{
    to {
        width: 80%;
    }
}

.prog-bar-container li.java:after{
    animation-name: java;
}

@keyframes java{
    to {
        width: 65%;
    }
}

.prog-bar-container li.web:after{
    animation-name: web;
}

@keyframes web{
    to {
        width: 75%;
    }
}

.prog-bar-container li.english:after{
    animation-name: english;
}

@keyframes english{
    to {
        width: 85%;
    }
}

.prog-bar-container li.spanish:after{
    animation-name: spanish;
}

@keyframes spanish{
    to {
        width: 95%;
    }
}

/* ----------- RESUMES -----------------*/
.resumes{
    color: #000000;
    margin : 30px 30px
}

.resumes h1{
    font-family: 'Copperplate' , 'Copperplate Gothic Light' , fantasy;
    font-size: 70px;
    text-align: center;
    color: #000000;
    text-shadow: 2px 2px #9c6d8b;
    text-align: left;
}

.resumes h2{
    font-family: "Brush Script MT", cursive;
    font-size: 50px;
    text-align: center;
    margin-bottom: 0%;
    color: #000000;
    text-shadow: 1px 1px #9c6d8b;
    text-align: left;
    font-weight: bold;
}

.resumes h4{
    font-family: 'Copperplate' , 'Copperplate Gothic Light' , fantasy;
    font-size: 25px;
    text-align: left;
    font-style: italic ;
}

.resumes .two-column-layout .divider{
    height: 10px;
    width: 100%;
    background-color: #9c6d8b62;
    border-radius: 20px;
}

.resumes #divider{
    height: 10px;
    width: 100%;
    background-color: #9c6d8b62;
    border-radius: 20px;
}

.resumes .myname{
    font-size: 120px; 
    text-align:justify; 
    font-family: "Brush Script MT", cursive;
    text-shadow: 0px 0px;
    margin: 0;
}

.resumes .textarea{
    background-color: #9c6d8b0c;
    color: #000000;
    padding: 1em;
    border-radius: 10px;
    border: 2px solid #9c6d8b09;
}

.resumes .textarea a {
    color: #4D243D;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 8px;
}

.resumes .textarea a:visited {
    color: #9c6d8b;
}

.resumes .textarea a:hover {
    color: #683153;
}

/* ----------- TRAVEL -----------------*/
.travel .two-column-layout {
    align-items: center;
    margin: 40px 0;
    gap: 30px;
}

.travel .two-column-layout > div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
}

.travel .two-column-layout video {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(77, 36, 61, 0.3);
    border: 3px solid #9c6d8b;
}

.paris h2{
    margin-top: 0%;
    margin-bottom: 0%;
}

.paris .textarea{
    font-size: 1em;
    line-height: 1.6;
    padding: 25px;
    margin: 0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(77, 36, 61, 0.1);
    background-color: #9c6d8b35;
}

.travel p{
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 10%;
}

.travel .content-table{
    width: 80%;
    margin: 60px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(77, 36, 61, 0.2);
}

.content-table thead tr{
    background-color: #4D243D;
    color: #FDFFF7;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
}

.content-table th, .content-table tr{
    padding: 15px 20px;
}

.content-table th, .content-table td {
    padding: 15px 20px;
    text-align: left;
}

.content-table tbody tr:nth-of-type(even){
    background-color: #ddb6bf;
}

.gallery{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 50px 0;
    padding: 0 5%;
}

.gallery img{
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(77, 36, 61, 0.2);
    border: 3px solid transparent;
}

.gallery img:hover{
    transform:scale(1.05);
    cursor: pointer;
}

/* -------- FORM STYLING ------------*/
form {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 30px;
    background-color: #f8e4e9;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(77, 36, 61, 0.2);
}

form label {
    display: block;
    margin: 15px 0 5px;
    color: #4D243D;
    font-weight: bold;
}

form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #9c6d8b;
    border-radius: 8px;
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', monospace;
    font-size: 16px;
    box-sizing: border-box;
}

form input[type="radio"],
form input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #4D243D;
}

form textarea {
    resize: vertical;
    min-height: 150px;
}

form input[type="submit"] {
    background-color: #4D243D;
    color: #FDFFF7;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    margin-top: 20px;
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', monospace;
}

form input[type="submit"]:hover {
    background-color: #683153;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

/* -------- CONTACT PAGE BACKGROUND ------------*/
.contact-bg {
    background-image: url('media/hatter.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.contact-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 210, 219, 0.7); 
    z-index: -1;
}

.contact-bg .form-container {
    position: relative;
    z-index: 1;
}

/* -------- TABLE AND DETAILS STYLING ------------*/
.table-caption {
    background-color: #4D243D;
    color: #FDFFF7;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    cursor: pointer;
}

.table-caption:hover {
    background-color: #683153;
}

details {
    margin-bottom: 10px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

details[open] summary {
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

details summary:focus {
    outline: 2px solid #4D243D;
}

/* -------- TEXT FORMATTING ------------*/
.keyword {
    font-weight: bold;
    color: #4D243D;
}

.keyword-italic {
    font-style: italic;
    font-weight: bold;
    color: #4D243D;
}

.highlight-list {
    list-style-type: disc;
    padding-left: 30px;
    margin: 20px 0;
}

.highlight-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

main a {
    color: #4D243D;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

main a:visited {
    color: #9c6d8b;
    text-decoration: underline;
}

main a:hover {
    color: #683153;
}

/*------- FOOTER STYLES --------*/
.site-footer {
    background-color: #4D243D;
    color: #FDFFF7;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 5px solid #9c6d8b;
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', monospace;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-message {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-family: "Brush Script MT", cursive;
    letter-spacing: 1px;
}

.heart {
    color: #f8d2db;
    font-size: 1.6rem;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    color: #f8d2db;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 2px solid #9c6d8b;
}

.social-link:hover {
    background-color: #683153;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.social-name {
    font-size: 1rem;
}

.social-link:visited {
    color: #f8d2db;
}

/* -------- RESPONSIVE DESIGN ------------*/
@media screen and (max-width: 768px) {
    .topnav ul {
        flex-direction: column;
        align-items: stretch;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
    }
    
    .topnav.open ul {
        height: auto;
    }
    
    .topnav li {
        height: auto;
    }
    
    .topnav a {
        padding: 15px;
        justify-content: center;
    }
    
    .topnav .logo {
        margin: 0;
        padding: 10px 0;
        display: flex;
        justify-content: center;
    }
    
    .hamburger-menu {
        display: block !important;
    }
    
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .resumes .myname {
        font-size: 60px;
        text-align: center;
    }
    
    .resumes h1, .resumes h2 {
        text-align: center;
    }
    
    .travel .content-table {
        min-width: auto;
        width: 90%;
        margin: 5%;
        font-size: 80%;
        overflow-x: auto;
        display: block;
    }
    
    .prog-bar-container {
        width: 80%;
    }

    form {
        padding: 20px;
        width: 90%;
    }

    .topnav .contrast-item {
        margin: 0;
        width: 100%;
        justify-content: center;
        padding: 10px 0;
    }
    
    #contrast-toggle {
        width: 40px;
        height: 40px;
    }
}

@media screen and (max-width: 480px) {
    h2 {
        font-size: 40px;
    }
    
    .resumes .myname {
        font-size: 40px;
    }
    
    .resumes h4 {
        font-size: 20px;
    }
    
    .travel .content-table {
        font-size: 70%;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 600px) {
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-link {
        width: 80%;
        margin: 0 auto;
        justify-content: center;
    }
    
    .footer-message {
        font-size: 1.2rem;
    }
}

/* -------- PRINT STYLES ------------*/
@media print {
    .topnav, .hamburger-menu, .footer-content, .social-links, video, button, form, .skip-link {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, blockquote, ul, ol, dl, table {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .travel img {
        max-width: 50% !important;
    }
    
    .two-column-layout {
        display: block;
    }
    
    .divider {
        border-top: 1px solid #000;
        background: none;
    }
}