:root {
    --primary-color: #faf9f6d0;
    --secondary-color: #BDC3CB;
    --tertiary-color: #AD9787;
    --link: #103155;
    --dusty-rose: #CCAFA5;
    --sand: #DCD2CC;
    --ivory: #EDE7DC;
    --dark-grey: #2b2b2b;
    --link-visited: #234560;
    --light-blue: #DAE3E6;
    --sea-blue: #2F6D80;
    --grey-blue: #5c7d9a;
    --light-sand: #ece7e4;
    --link-active: #3b4bf9;

    --standardfontweight: 400;
    --headingfontweight: 700;
    --buttonfontw: 600;
    --mainfont: "Lato", sans-serif;
    --mainfontsize: 16px;
    --honefontsize: 28px;
    --htwofontsize: 24px;
    --mediafontsize: 22px;
    --standardlineh: 1.6;
    --plineh: 1.3;
    --standardtransition: 0.4s opacity, 0.5s background-color, 0.4s font-size;
    --standardbradius: 15px;
    --picbradius: 50% 50%;
    --aboutborder: solid 2px #CCAFA5;
    --buttonw: 120px;
    --boxshadow: 0 4px 6px #223c5075;
    --navbarheight: 10rem;


}


* {
    box-sizing: border-box;
}

/* ======================================================================
   Base / Root / Resets
   ====================================================================== */

body {
    /* background-color: var(--primary-color); */
    background-color: var(--light-sand);
    color: var(--dark-grey);
    font-family: var(--mainfont);
    font-weight: var(--standardfontweight);
    font-size: var(--mainfontsize);
    line-height: var(--standardlineh);
    padding-top: var(--navbarheight);
}

/* ======================================================================
   Main
   ====================================================================== */
main {
    position: relative;
    margin-left: 50px;
    margin-right: 50px;
    margin-top: 20px;
    margin-bottom: 70px;
}
/* ======================================================================
   Typography (headings, paragraphs, buttons, links)
   ====================================================================== */

h1 {
    font-size: var(--honefontsize);
    font-weight: var(--headingfontweight);
}

h2 {
    font-size: var(--htwofontsize);
    font-weight: var(--headingfontweight);
}

p {
    line-height: var(--plineh);
}

a {
    color: var(--link);
}

a:visited {
    color: var(--link-visited);
}

a:hover {
    text-decoration: none;
}

a:focus {
    outline: 2px solid, var(--tertiary-color);
}

a:active {
    color: var(--link-active);
}

button,
.button_form,
.CV_button,
.default_button,
.secondary_button,
.tertiary_button,
.additional_button {
    border: none;
    font-family: inherit;
    font-size: var(--mainfontsize);
    font-weight: 600;
    text-align: center;
    background-color: var(--tertiary-color);
    color: var(--link);
    text-decoration: none;
    padding: 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    display: inline-block;
    border-radius: var(--standardbradius);
    transition: var(--standardtransition);
}

.default_button {
    width: 120px;
    margin: 5px;
}

.secondary_button {
    background-color: var(--grey-blue);
    color: var(--ivory);
    width: var(--buttonw);
    margin: 5px;

}

.tertiary_button {
    background-color: var(--sand);
    color: var(--sea-blue);
    width: var(--buttonw);
    margin: 5px;
}

.additional_button {
    background-color: var(--dusty-rose);
    color: var(--sea-blue);
    width: var(--buttonw);
    margin: 5px;
}

.button_form {
    margin-left: 80px;
}

button:hover,
button:focus,
.additional_button:hover,
.additional_button:focus,
.default_button:hover,
.default_button:focus,
.secondary_button:hover,
.secondary_button:focus,
.tertiary_button:hover,
.tertiary_button:focus,
.CV_button:hover,
.CV_button:focus,
.button_form:hover,
.button_form:focus {
    cursor: pointer;
    opacity: 0.8;
}

/* ======================================================================
   Header
   ====================================================================== */

.header {
    top: 0;
    display: flex;
    width: 100%;
    padding: 20px 20px;
    align-items: center;
}

.custom-navbar {
    background-color: rgba(92, 125, 154, 0.85);
    box-shadow: var(--boxshadow);
    backdrop-filter: blur(8px);
        top: 0;
    display: flex;
    width: 100%;
    padding: 5px 7px;
/*     align-items: center;
 */    z-index: 890; /* put header above content */
}

.container-fluid {
    align-items: center;
    width: 100%;
}

.navbar-brand img {
    height: 150px;
    border-radius: 50%;
    box-shadow: var(--boxshadow);
}

.nav-link.active {
  font-weight: 600;
  color: var(--link-active);
}

.navbar-link {
    padding: 5px 10px;
    font-size: var(--htwofontsize);
    font-weight: 600;
    color: var(--link);
    transition: var(--standardtransition);
}

.navbar-link:hover {
    color: var(--link-hover);
}

.navbar_list {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    width: 100%;
    margin: 0px 20px 0px 0px;
    padding: 0;
}


/* ======================================================================
   Footer
   ====================================================================== */

.page_footer {
    clear: both;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: space-evenly;
}

.social_media img {
    width: 40px;
    height: 40px;
    margin-right: 20px;
}

.social_media p {
    font-size: 20px;
}
.page_footer p {
    margin: 16px auto;
}

/* ======================================================================
   Home page (main profile / hero / grid styles)
   ====================================================================== */

.main_profile {
    margin-left: 50px;
    margin-right: 50px;
    margin-top: 20px;
    margin-bottom: 70px;
    display: grid;
    gap: 30px;
}

.grid_container {
    display: grid;
    grid-template-columns: 1fr 1.7fr 1fr;
    align-items: center;
}

.profile_grid_item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    background-color: var(--light-sand);
    padding: 0px;
    min-height: 100%;
}
.profile_grid_item:last-child {
    align-self: center;
}

.intro {
    font-size: var(--mainfontsize);
    font-weight: var(--headingfontweight);
    text-align: justify;
    line-height: 1.3;
    padding: 0px 20px;
}
.intro h1 {
    text-align: center;
}

.intro p {
    text-align: justify;
}

.profile_portrait, 
.berlin-svg {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: contain;
}

.profile_portrait {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  display: block;
}

/* SKILLS GRID */
.tech-stack {
    display: grid;
    gap: 20px;
    justify-items: center;
}
.tech-grid {    
    display: grid;
    gap: 20px;
}
.card-header {
    background-color: var(--light-sand);
    font-size: 20px;
    font-weight: 500;
}

.middle-line {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tech-card {
    height: 100%;
    border: none;
    background-color: var(--light-sand);
    padding: 20px;
    border-radius: 12px;
}

.tech-icons li {
  text-align: center;
  justify-items: center;
  list-style: none;
}

.tech-icons img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.tech-name {
  display: flex;
  max-width: 40px;
  max-height: 1rem;  
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.offcanvas-bottom {
  --bs-offcanvas-height: 75vh;
}

.offcanvas-body {
  overflow-y: auto;
}

.tech-stack button {
  justify-self: center;
  width: auto;
  padding: 12px 32px;
}


/* ======================================================================
   About page
   ====================================================================== */
/* MAIN GRID */
.main_grid_container {
    display: grid;
    grid-template-columns: 100%;
    align-content: center;
    background-color: var(--light-sand);
}
.main_first_part {
    display: flex;
    align-items: center;
    justify-self: stretch;
    border: none;
    background-color: var(--light-sand);
    padding: 40px 20px;
    width: 100%;
}
.main_second_part {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: var(--light-sand);
    padding: 40px 20px;
    width: 100%;
}


/* ABOUT GRID */
.about_grid_container {
    display: grid;
    gap: 30px;
    width: 100%;
}

.about_grid_title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--light-sand);
    color: #234560;
    padding: 20px;
    width: 100%;
}

.about_grid_list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 20px;
    justify-items: center;
}

.about_grid_list button {
    width: 15rem;
    height: 15rem;
    text-align: center;
}

.about_grid_list li {
    list-style: none;
    text-align: center;
}



/* ======================================================================
   my_work page (projects grid)
   ====================================================================== */
/* grid fallback */
/*     .grid_item { display: inline-block; width: 33%; }
 */
@supports (display: grid) {
  .grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    grid-auto-rows: auto;
    transition: all .25s ease;
    grid-auto-flow: dense;
  }

  .grid_item {
    display: flex;
    flex-direction: column;
    background-color: var(--light-sand);
  }

  /* ChatApp featured card */
  .grid_item.featured {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}


.page_content { 
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}


/* CARDS */

.custom_header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    object-fit: cover;
}

.card-img-top {
    width: 100%;
    height: auto;
    display: block;
}

.custom-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
}

.card-title {
    font-size: var(--htwofontsize);
    font-weight: var(--headingfontweight);
    text-align: center;
    align-content: center;
    line-height: 1.3;
    min-height: 2.6em;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1rem;
    border-top: none;
    background-color: var(--light-sand);
}

.carousel-item img {
  width: 100%;
  height: auto;
}


/* MODAL */

.custom-modal {
    display: flex;
    flex-direction: column;
    border: none;
    background-color: var(--light-sand);
}
.custom-modal-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px;
}

.modal_image_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1fr;
    margin: 0;
    padding: 0;
    object-fit: cover;
}
.modal_image { 
    width: 100%;
    height: fit-content;
}

.custom-modal-text p {
    padding: 20px;
    background-color: var(--light-sand);
    width: 100%;
    margin: 0;
}
/* ======================================================================
   Media queries and Utility Keyframes
   ====================================================================== */

@media all and (max-width: 750px) {
    body { line-height: var(--plineh); }   
    .offcanvas-bottom { --bs-offcanvas-height: 90vh;}
  .profile_grid_item {
    justify-content: center;
    align-content: center;
    padding: 10px;
  }

}
/* MOBILE LAYOUT */
@media all and (max-width: 500px) {
    .custom-navbar { margin-top: 0px;
                     align-items: center;  }
/* HOMEPAGE GRID */
  .grid_container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "intro"
      "berlin";
  }
/* PROJECTS GRID */
  .grid {
    grid-template-columns: 1fr;
  }

  .grid_item.featured {
    grid-column: auto;
    grid-row: auto;
  }                     
    }
@media all and (min-width: 100px) and (max-width: 996px) {
        .header { display: flex; 
                  align-content: center;
                  align-items: center; }
        .custom-navbar { 
            align-content: center; 
        }
/* HOMEPAGE GRID*/  
  .grid_container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "portrait berlin"
      "intro intro";
  }

  .profile_grid_item:nth-child(1) {
    grid-area: portrait;
    justify-content: center;
    align-content: center;
  }

  .intro {
    grid-area: intro;
    text-align: center;
  }

  .profile_grid_item:nth-child(3) {
    grid-area: berlin;
  }

}
/* TABLET LAYOUT */
@media (max-width: 749px) and (min-width: 500px) {
/* HOMEPAGE GRID*/  
  .grid_container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "portrait berlin"
      "intro intro";
  }

  .profile_grid_item:nth-child(1) {
    grid-area: portrait;
  }

  .intro {
    grid-area: intro;
    text-align: center;
  }

  .profile_grid_item:nth-child(3) {
    grid-area: berlin;
  }
/* PROJECT GRID */
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid_item.featured {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}


@keyframes color-change { 0% { fill: #edc655; } 50% { fill: #fcffad; } 100% { fill: #bf683a; } }
.sun { animation: 4s color-change infinite alternate linear; }
@keyframes cloud-move { from { transform: translate(0, 50px); } to { transform: translate(200px, 50px); } }
.cloud-front { animation: 30s cloud-move infinite alternate linear; }
@keyframes cloud-move-reverse { from { transform: translate(446px, 48px); } to { transform: translate(100px, 48px); } }
.cloud-back { animation: 34s cloud-move-reverse infinite alternate linear; }
@keyframes letter1-move-reverse { from { transform: translate(50px, 25px); } to { transform: translate(-100px, 25px); } }
.letter1, .letter2, .letter3 { animation: 10s letter1-move-reverse infinite alternate linear; }
