/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

/* Add this at the very top of your CSS, or ensure it's in a reset */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Temporarily add this for diagnostic, remove later! */
}

/* colors used
#d9e4ec - Blue Gray as background
#b7cfdc - Misty Blue
#385e72 - Misty Blue Dark as text color
#ffffff - White as button background
#073147 - Dark Blue as text color
#2b2b2b - Dark Gray as secondary button text color
#778aa7 - Light Blue as button hover background
 */

.navigation-list_item {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #333;
  padding: 0.5em 0;
  -webkit-transition: color 0.3s ease;
  -o-transition: color 0.3s ease;
  transition: color 0.3s ease;
  max-width: 100%;
  height: auto;
}

/* Top line */
.navigation-list_item::before,
.navigation-list_item::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #161a28;
  -webkit-transform: scaleX(0);
  -ms-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transition: -webkit-transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

/* Position top and bottom lines */
.navigation-list_item::before {
  top: 0;
  -webkit-transform-origin: left;
  -ms-transform-origin: left;
  transform-origin: left;
}

.navigation-list_item::after {
  bottom: 0;
  -webkit-transform-origin: right;
  -ms-transform-origin: right;
  transform-origin: right;
}

/* Hover state - animate both lines */
.navigation-list_item:hover::before,
.navigation-list_item:hover::after {
  -webkit-transform: scaleX(1);
  -ms-transform: scaleX(1);
  transform: scaleX(1);
}

/* Optional text color change on hover */
.navigation-list_item:hover {
  color: #577bde;
}

body {
  background-color: #f6f8fa;
  color: #073147;
  font-family: "Chivo", sans-serif;
  font-weight: 200;
  font-style: normal;
}

h4 {
  font-family: "Chivo", sans-serif;
  font-size: medium;
  font-weight: 200;
  font-style: italic;
  color: #073147;
}

a {
  color: #073147;

  /* link color */
}

a:visited {
  /* visited link */
  color: #073147;
}

a:hover,
a:focus {
  /* No underlining when hovering over a link */
  text-decoration: none;
}

a:active {
  /* selected link */
  color: #073147;
}

button,
.button {
  font-family: "Chivo", sans-serif;
  font-weight: 200;
  font-style: normal;
  color: #ffff;
  background-color: rgb(15, 78, 99);
  border-radius: 1000px;
  padding: 10px 20px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

button:hover,
.button:hover {
  background-color: #778aa7;
  color: rgb(2, 52, 69);
  cursor: pointer;
  opacity: 0.8;
}

button:focus,
.button:focus {
  outline: none;
  -webkit-box-shadow: 0 0 0 2px #385e72;
  box-shadow: 0 0 0 2px #385e72;
}

button:active {
  background-color: #ffff;
  color: rgb(2, 52, 69);
}

.button__secondary {
  background-color: #b7f6e7;
  color: #2b2b2b;
  cursor: pointer;
  opacity: 0.8;
}

.button,
button {
  /* overwrites browser defaults and resets the border */
  border: none;
  display: inline-block;

  /* takes the font from the outer container */
  font-family: inherit;

  /* styles the button */
  background-color: #525d5b;
  color: white;
  text-decoration: none;
  padding: 10px;
  border-radius: 3px;

  /* width of the border, type, color */
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  -webkit-transition-duration: 0.2s;
  -o-transition-duration: 0.2s;
  transition-duration: 0.2s;
  -webkit-transition-property: opacity;
  -o-transition-property: opacity;
  transition-property: opacity;
}

button:hover,
button:focus,
.button:hover,
.button:focus {
  /* lets the mouse appear as a hand when hovering over the button */
  cursor: pointer;

  /* reduces the opacity of the button to 80% */
  opacity: 0.8;
}

ul {
  list-style: none;
}

header {
  margin: 0 auto;
  max-width: -webkit-fit-content;
  max-width: -moz-fit-content;
  max-width: 100%;
}

.profile__portrait {
  float: left;
  width: 250px;
  margin-right: 40px;
  border-radius: 50%;
  max-width: 100%;
  height: auto;
}

.page-footer {
  clear: both;
}

.profile {
  max-width: 700px;
  margin: 0 auto;
}

.hobby {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 20px;
}

.profile_portrait {
  float: right;
  max-width: 100%;
  height: auto;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* Add a class for the footer */
.page-footer {
  clear: both;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  text-align: center;
  border-top: #d7d7d7 solid 5px;
}

.page-header {
  display: -webkit-box;

  /* Add flex display to the header itself */
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;

  /* Space out items */
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;

  /* Vertically align items */
  -ms-flex-align: center;
  align-items: center;
  border-top-right-radius: 10px;
  width: 100%;

  /* Use 100% of parent width */
  padding: 20px;
  border-bottom: 5px solid #d7d7d7;
  font-weight: 250;
  left: 0;
  top: 0;
  z-index: 1000;

  /* Ensure it stays on top if fixed */
  background-color: #f6f8fa;

  /* Add a background if fixed, so content doesn't show through */
}

.main-navigation {
  padding: 0;
}

.navigation-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-header img {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.page-header_item {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 200px;
  flex: 0 1 200px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.page-header_item:last-child {
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  text-align: right;
}

h2 {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-align: center;
}

.navigation-list {
  list-style-type: none;
}

.navigation-list li {
  display: inline-block;
  margin-left: 15px;
}

#grid__item {
  background-color: lightgray;
}

.main-navigation {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: right;
  -ms-flex-pack: right;
  justify-content: right;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 20px;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid black;
  border-radius: 5px;
  width: 400px;
  margin: 0 auto;
}



@-webkit-keyframes color-change {
  0% {
    fill: #edc655;
  }

  50% {
    fill: #fcffad;
  }

  100% {
    fill: #f76414;
  }
}

@keyframes color-change {
  0% {
    fill: #edc655;
  }

  50% {
    fill: #fcffad;
  }

  100% {
    fill: #f76414;
  }
}

.sun {
  -webkit-animation: color-change 4s infinite alternate linear;
  animation: color-change 4s infinite alternate linear;
}

@-webkit-keyframes cloud-move {
  from {
    -webkit-transform: translate(0, 50px);
    transform: translate(0, 50px);
  }

  to {
    -webkit-transform: translate(200px, 50px);
    transform: translate(200px, 50px);
  }
}

@keyframes cloud-move {
  from {
    -webkit-transform: translate(0, 50px);
    transform: translate(0, 50px);
  }

  to {
    -webkit-transform: translate(200px, 50px);
    transform: translate(200px, 50px);
  }
}

.cloud-front {
  -webkit-animation: 30s cloud-move infinite alternate linear;
  animation: 30s cloud-move infinite alternate linear;
}

@-webkit-keyframes cloud-move-reverse {
  from {
    -webkit-transform: translate(446px, 48px);
    transform: translate(446px, 48px);
  }

  to {
    -webkit-transform: translate(100px, 48px);
    transform: translate(100px, 48px);
  }
}

@keyframes cloud-move-reverse {
  from {
    -webkit-transform: translate(446px, 48px);
    transform: translate(446px, 48px);
  }

  to {
    -webkit-transform: translate(100px, 48px);
    transform: translate(100px, 48px);
  }
}

.cloud-back {
  -webkit-animation: 34s cloud-move-reverse infinite alternate linear;
  animation: 34s cloud-move-reverse infinite alternate linear;
}

.grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 20px;
  -ms-grid-row-span: auto;
  grid-row-end: auto;
  padding: 20px;
}

h1,
p {
  text-align: center;
}

@media all and (max-width: 500px) {
  .grid {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
  }
}

@media all and (min-width: 500px) and (max-width: 750px) {
  .grid {
    -ms-grid-columns: 1fr 20px 1fr;
    grid-template-columns: 1fr 1fr;
  }
}

@media all and (max-width: 750px) {
  .grid {
    grid-gap: 10px;
  }

  .grid__item:last-child {
    grid-column: auto / auto;
    grid-row: auto / auto;
  }

  h1 {
    font-size: 22px;
  }
}

@media screen and (max-width: 768px) {
  /* CSS rules for screens up to 768px wide */
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  /* CSS rules for screens between 769px and 1024px wide */
}

@media screen and (min-width: 1025px) {
  /* CSS rules for screens larger than 1024px wide */
}

.profile__portrait {
  float: none;

  /* Remove float for mobile; stack it */
  width: 80%;

  /* Make it flexible */
  max-width: 250px;

  /* But don't let it get too big */
  margin: 20px auto;

  /* Center it with auto margins */
  border-radius: 50%;
  height: auto;
  display: block;

  /* Essential for auto margins to work */
}

/* For larger screens, re-introduce float */
@media all and (min-width: 768px) {
  .profile__portrait {
    float: left;
    width: 250px;

    /* You can keep the fixed width here as screens are larger */
    margin-right: 40px;
    margin-left: 0;

    /* Reset margin for larger screens */
  }

  .profile {
    /* If .profile__portrait is floated, ensure its parent (.profile) is wide enough
       and doesn't get too narrow, or use flexbox for better control. */
    max-width: 700px;

    /* Keep max-width */
    margin: 0 auto;

    /* Center profile */
  }
}

/* Also check .profile_portrait (with underscore) */
.profile_portrait {
  /* This seems to be a duplicate or slightly different class name for an image */
  float: none;

  /* Stack by default */
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;

  /* Center if it's the only content */
}

@media all and (min-width: 768px) {
  .profile_portrait {
    float: right;

    /* Re-apply float for larger screens if needed */

    /* Consider setting a max-width here if it's a large image */
  }
}

/* --- Base Styles (Mobile-First) --- */
body {
  font-size: 16px;

  /* Base font size for readability */
  padding: 10px;
}

.container {
  width: 95%;

  /* Use percentages for fluid width */
  margin: 0 auto;
}

img {
  max-width: 100%;

  /* Important for all images */
  height: auto;
}

/* Stack columns by default */
.column {
  width: 100%;
  margin-bottom: 20px;
}

/* --- Media Queries for Larger Screens (using min-width) --- */

/* Tablet breakpoint */
@media screen and (min-width: 768px) {
  body {
    font-size: 18px;

    /* Slightly larger text on tablets */
  }

  .container {
    width: 90%;
  }

  .column {
    width: 48%;

    /* Two columns */
    float: left;

    /* Or use Flexbox/Grid */
    margin-right: 4%;
  }

  .column:nth-child(2n) {
    /* Clear float on every second column if using floats */
    margin-right: 0;
  }
}

/* Desktop breakpoint */
@media screen and (min-width: 1024px) {
  body {
    font-size: 20px;

    /* Even larger text on desktops */
  }

  .container {
    max-width: 1200px;

    /* Optional: cap max width on very large screens */
    width: 80%;
  }

  .column {
    width: 31%;

    /* Three columns */
    margin-right: 2%;
  }

  .column:nth-child(3n) {
    margin-right: 0;
  }
}