:root {
--bg: #ffe8e6;
--card: #FEF7F3;
--primary: #C62828;
--text-dark: #333;
--text-light: #4A4A4A;
--border-color: #F4D2C8;
--shadow-card: 0 -4px 8px #F4D2C8, 0 4px 8px #F4D2C8;
--radius: 14px;
--opacity: 80%;
--font-size-body: 18px;
--font-size-h1: 32px;
--font-size-h2: 24px;
--font-size-h1-mobile: 24px;
--font-size-h2-mobile: 20px;
--font-size-button: 14px;
--font-weight-700: 700;
--line-height-h: 1.2;
--line-height-body:1.6;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
}

html {
  font-size: var(--font-size-body);
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: var(--line-height-body);
  color: var(--text-dark);
  background-color:var(--bg);
  min-height: 100%;
  overflow: visible;
}

/* Typography */
h1{
  font-size: var(--font-size-h1-mobile);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: var(--font-weight-700);
  line-height: var(--line-height-h);
  color: var(--primary);
}

h2{
  font-size: var(--font-size-h2-mobile);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: var(--font-weight-700);
  line-height: var(--line-height-h);
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

button {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: var(--font-size-button);
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.white-button {
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 5px;
   border: 1px solid var(--text-dark);
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.white-button img{
  width: 1rem;
  height: 1rem;
}

.white-button:hover{
  box-shadow: var(--shadow-card);
}

.black-button:hover{
  box-shadow: var(--shadow-card);
}

.black-button {
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 1px solid var(--primary);
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.black-button img{
  width: 1rem;
  height: 1rem;
}

.black-button.no-wrap-text{
  background-color: var(--primary);
  color: var(--bg);
  border: 1px solid var(--primary);
}

.no-wrap-text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HEADER */
header{
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background-color: var(--card); 
  box-shadow: 0 2px 10px var(--border-color);
}

.header-container {
  max-width: 1024px;
  margin: auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: border 0.3s ease;
}

.header-container.no-border {
  border-bottom: none;
}

.logo {
  font-weight: var(--font-weight-700);
  font-size: 24px;
}

.nav-options {
  display: none;
}

.nav-options ul {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-evenly ;
  align-items: center;
  gap: 2rem;
}

.nav-desktop ul {
  display: flex;
  gap: 30px;
}

.nav-desktop a {
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dark);
}

.nav-desktop a:hover{
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--text-dark);
  transition: .3s;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  background: var(--card);
  padding: 0 20px 10px;
  transition: right 0.4s ease;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}
.mobile-menu.open {
  box-shadow: var(--shadow-card);
  right: 0;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
}

.close-menu {
  font-size: 40px;
  background: none;
  border: none;
  align-self: flex-end;
  cursor: pointer;
}

/* Main */
main{
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}

main section {
  max-width: 1024px;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Profile photo and description */
.description {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  padding: 20px;
  width: 100%;
  margin: 24px auto;
  margin-bottom: 32px;
}

.description-container p{
  overflow-wrap: break-word;
  word-break: break-word;
}

.description-header h1{
  color: var(--text-dark);
  font-weight: var(--font-weight-700);
}

.description-container{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

.profile-image-container{
  align-items: center;
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
}

.profile-image-container img{
  border-radius: 20px;
  max-width: 712px;
  width: 100%;
  height: auto;
}

/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  max-width: 1024px;
  width: 100%;
  margin: 32px auto;
}

.projects-header{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projects-header h1{
  color: var(--text-dark);
  font-weight: var(--font-weight-700);
}

.projects-header p{
  color: var(--text-light);
}

/* Project cards */
.project-cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
}

.project-card{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  background-color: var(--card);
}

.project-card-header{
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-card-header h3{
  font-weight: var(--font-weight-700);
}

.project-card p{
  color: var(--text-light);
  font-size: var(--font-size-button);
}

.tags{
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.7rem;
}

.tags span{
  background-color: var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 12px;
}

.project-card .white-button{
  background-color: var(--card);
}

/* Contacts */
.contact-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding:20px;
  width: 100%;
  max-width: 1024px;
  margin: 32px auto;
}

/* LEFT */
.contact-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.contact-left .button-container{
  margin-top: 1rem;
}

.contact-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-header h1 {
  color: var(--text-dark);
  font-weight: var(--font-weight-700);
}

.contact-header p {
  color: var(--text-light);
}

.documents h1{
  color: var(--text-dark);
  font-weight: var(--font-weight-700);
}

.download-button img {
  width: 1rem;
  height: 1rem;
}

.download-button:hover{
  box-shadow: var(--shadow-card);
}

.download-button.no-wrap-text {
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 1px solid var(--text-dark);
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}


/* RIGHT */
.contact-content {
  width: 100%;
}

.contact-info {
  background-color: var(--card);
  width: 100%;
  box-sizing: border-box;
  max-width: 1024px;
  padding: 40px 60px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.contact-info h2 {
  margin-bottom: 2rem;
  font-size: var(--font-size-h2);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  font-size: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card);
  border-radius: 50%;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-details a{
  overflow-wrap: break-word;
  word-break: break-word;
}

.contact-label {
  color: var(--text-light);
  font-size: var(--font-size-button);
}

.contact-value {
  font-weight: 500;
}

.contact-value:hover{
  color: var(--primary);
}

/* Footer */
footer{
  color: var(--text-light);
  text-align: center;
  display: block;
  font-size: var(--font-size-button);
}

/* Responsiveness */
@media (min-width: 350px){
  .button-container{
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
}

@media (min-width: 480px){
  .nav-options{
    display: flex;
    flex-direction: row;
  }
  .description{
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    gap: 2rem;
    box-sizing: border-box;
    max-width: 1024px;
    width: 100%;
    margin: 48px auto;
  }

  .profile-image-container img{
    border-radius: 50% 50% 0 50%;
  }
  
  .contact-section{
    margin: 48px auto;
  }

  #projects{
    margin: 48px auto;
  }

  .logo {
  font-size: 32px;
  }

  h1{
    font-size: var(--font-size-h1);
  }

  h2{
    font-size: var(--font-size-h2);
  }
}

@media (min-width: 768px){
  body {
    background-image: url("assets/background.png");
    background-size: cover;
  }

  .description {
    align-items: center;
  }

  .projects-header {
    text-align: center;
  }
  .contact-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }

  .contact-left {
    flex: 1;
  }

  .contact-content {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 1024px) {
  .project-cards {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}
