* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-image: url(images/backgroundgalaxy.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #f0f0f0;;
    margin: 0;
    padding: 20px;
}

header {
    background: linear-gradient(to right, rgba(218, 27, 179, 0.9), rgba(218, 27, 179, 0.7));
    color: white;
    padding: 20px 30px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

nav a {
    color: white;
    font-weight: bold;
    margin: 8px;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    white-space: nowrap;
     transition: background-color 0.5s, text-decoration 0.5s;
}

nav a:hover {
    text-decoration: underline;
    background-color: rgba(255, 255, 255, 0.4);
}

nav a:active {
    background-color: rgba(255, 255, 255, 0.6);
}

main { 
    padding: 20px;
    margin-bottom: 25px;
    margin: 20px auto;
    width: 80%;
    max-width: 950px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #da1bb3;
    
}

section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #da1bb3;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    transition: box-shadow 0.3s ease;
    
}

section:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #2515d0;
    font-size: 42px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

h2 {
    font-size: 28px;
    color: #da1bb3;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

h3, h4 {
    color: #da1bb3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

p {
    line-height: 1.6;
    font-size: 18px;
}

ul {
    list-style-type: square;
    padding-left: 20px;
}

ol {
    list-style-type: decimal;
    padding-left: 20px;
}

img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: cover;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #da1bb3;
}

img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}


footer {
    width: 80%;
    max-width: 950px;
    display: flex;
    justify-content: center;
    margin: 20px auto 30px auto;
    text-align: center;
    color: white;
    background: linear-gradient(to right, rgba(218, 27, 179, 0.9), rgba(218, 27, 179, 0.7));
}

.recipe-box {
    max-height: 250px;
    overflow: auto;
    border: 2px solid #da1bb3;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.9);
}

main.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media screen and (max-width: 480px) {
    h1 { font-size: 24px;  }
    h2 { font-size: 28px; }
    p { font-size: 15px; }

    main {
        width: 95%;
        padding: 15px;
    }

    main.grid-layout {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    nav a {
        padding: 8px 12px;
        font-size: 14px;
    }

    footer {
        width: 95%;
        padding: 15px;
    }
}

@media screen and (max-width: 768px) {
    h1 { font-size: 30px;  }
    h2 { font-size: 22px; }
   p { font-size: 16px; }
   
   main {
    width: 90%;
    padding: 18px;
   }

   main.grid-layout {
    grid-template-columns: 1fr;
   }
   .gallery-grid {
    grid-template-columns: repeat(2,1fr);
   }
   nav a {
    padding: 9px 14px;
    font-size: 16px;
   }

}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.skills-table th, .skills-table td {
    border: 1px solid #da1bb3;
    padding: 10px 14px;
    text-align: left;
}
.skills-table th {
    background-color: #da1bb3;
    color: white;
}
.skills-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.9);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.contact-form label {
  font-weight: bold;
  color: #da1bb3;
  font-size: 15px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #da1bb3;
  border-radius: 8px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  background-color: rgba(255, 255, 255, 0.9);
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2515d0;
}

.contact-form button {
  padding: 12px 30px;
  background-color: #da1bb3;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #b115d0;
}

@media screen and (max-width: 600px) {
  .contact-form button {
    width: 100%;
  }
}
