html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  box-sizing: border-box;
  font-family: Lato, sans-serif;
  font-size: 18px;
  
  --contrast-background: #E8E6EB;
  --text-one: #333;
  --text-two: #595959;
  --text-invert: #f9f9f9;
  
  --accent-color-one: #f3bd96;
  --accent-color-one-pale: #ffe9d9;
  --accent-color-two: #c492a7;
  --accent-color-two-pale: #fcd6e6;
  --accent-color-three: #9885a8;
  --accent-color-three-pale: #d5c8df;
  --accent-color-four: #757299;
  --accent-color-four-pale: #c1bfe4;
  
  --body-margin: 15rem;
  --body-margin-medium: calc(var(--body-margin)/1.5);
  --body-margin-small: calc(var(--body-margin)/3);
  
  color: var(--text-one);
  background-color: var(--text-invert);
  
  line-height: 1.5;
}

.hover-slide-line {
  background: linear-gradient(to right,pink,yellow) left bottom / var(--p, 0%) 100% no-repeat;
  transition: .4s;
  
  &:hover {
    --p: 100%;
  }
}

header h1, header > div {
  background-color: var(--text-invert);
  text-wrap: nowrap;
  overflow:hidden;
  text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  padding: .5rem 0;
  margin: 0;
  
  &:before {
    content:'DEVELOPMENT DESIGN';
    color: var(--text-invert);
    margin-right: 5px;
    margin-left: calc(0px - var(--body-margin) *1.3);
  }
  
  &:after {
    content: 'DESIGN ART DEVELOPMENT DESIGN ART DEVELOPMENT DESIGN ART DEVELOPMENT';
    color: var(--text-invert);
    margin-left: 5px;
  }
  
  &:hover {
    background-color: var(--contrast-background);
    background: linear-gradient(90deg,var(--accent-color-one) 0%, var(--accent-color-two) 50%, var(--accent-color-three) 100%);
    
    &:after, &:before {
      color: #333;
      opacity: 0.3;
    }
  }
  
  &.colorful {
    background-color: var(--contrast-background);
    background: linear-gradient(90deg,var(--accent-color-one) 0%, var(--accent-color-two) 50%, var(--accent-color-three) 100%);
    margin-bottom: 0.5rem;
    
    &:after, &:before {
      color: #333;
      opacity: 0.3;
    }
  }
}

nav {
  position: relative;
  padding: 0 0 .2rem;
  color: var(--text-two);
  margin-left: var(--body-margin);
  
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    
    li a {
      color: var(--text-two);
      text-decoration: none;
      font-weight: 700;
      height: 44px;
      padding: 0.9rem 0 0.5rem;
      
      background: linear-gradient(to right,var(--accent-color-one),var(--accent-color-two)) left bottom / var(--p, 0%) 10% no-repeat;
    transition: .4s;
      
      &:hover {
        --p: 100%;
      }
    }
    
    li+li:before {
      content: '|';
      margin: 0 0.5rem;
    }
  }
  
  ul li a.go-home {
    font-weight: 600;
  }
}

main {
 position: relative; 
  
  &.blog-post section {
    padding: 0 8rem;
  }
}

h2 {
  border-bottom: 3px dashed var(--accent-color-one);
  padding-bottom: 0.6rem;
  
  #web-design & {
    border-bottom: 3px dashed var(--accent-color-two);
  }
  
  #philosophy & {
    border-bottom: 3px dashed var(--accent-color-three);
  }
  
  #gallery & {
    border-bottom: 3px dashed var(--accent-color-four);
  }
}

#back-to-top {
  position: fixed;
  float: right;
  top: 90vh;
  right: 1rem;
  z-index: 10;
  background-color: var(--contrast-background);
  padding: 0.5rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-one);
  opacity: 0.5;
  
  &:hover {
    opacity: 1;
  }
}

h2:not(:first-of-type) {
  margin-top: 5rem;
}

.hover-borders {
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  box-sizing: border-box;
  
  &:hover {
    border-top: 3px dashed var(--accent-color-one);
    border-bottom: 3px dashed var(--accent-color-two);
  }
}

.about-me {
  border: 1px dashed var(--accent-color-four);
  padding: 2.5rem 3rem 3rem;
  margin-top: 3rem;
  border-radius: 5px;
  
  box-shadow:
      4px 4px 0px 0px var(--accent-color-three),
      8px 8px 0px 0px var(--accent-color-two),
      12px 12px 0px 0px var(--accent-color-one);
    -webkit-box-shadow:
      0px 5px 0px 0px var(--accent-color-three),
      0px 10px 0px 0px var(--accent-color-two),
      0px 15px 0px 0px var(--accent-color-one);
    -moz-box-shadow:
      4px 4px 0px 0px var(--accent-color-three),
      8px 8px 0px 0px var(--accent-color-two),
      12px 12px 0px 0px var(--accent-color-one);
  
  h2 {
    margin: 0;
    border: none;
  }
  
  & > div {
    display: flex;
    gap: 3rem;

    .see-more {
      .circle {
        background-color: var(--accent-color-three-pale);
        aspect-ratio:2/1;
        flex-direction: row;
        gap: 0.5rem;
        border-radius: 5px;
        
        &:hover {
          background-color: var(--accent-color-four);
        }
      }
    }
  }
}

section, article {
  /* padding: 1rem 3rem; */
  margin: 1rem var(--body-margin) 4rem;
  
  ul li{
    margin-bottom: 1rem;
  }
  
  &.full-span {
    margin: 1rem 0 4rem;
    background-color: var(--contrast-background); 
    display:flex;
    flex-direction:column;
    align-items: center;
    
    &:has(.impact-callout) {
      background-color: var(--accent-color-four);
      
      h2 {
        text-align: center;
        width: 30vw;
        color: white;
        border: none;
        font-size: 2.5rem;
        margin-bottom: 0;
      }
    }
    
    p {
      text-align: center;
      padding-bottom: 1rem;
    }
  }
  
  .impact-callout {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    
    > * {
      width: 230px;
      padding: 2rem;
      aspect-ratio: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: var(--accent-color-two-pale);
      border-radius: 5px;
    }
  }
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0;
  
  #web-design & {
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  #corporate & {
    margin-top: 2rem;
    grid-template-columns: 1fr 1fr;
  }
  
  .blog-post & {
    grid-template-columns: 1fr 1fr;
  }
}

.see-more {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  .circle {
    height: 100px;
    aspect-ratio: 1/1;
    margin-top: 1rem;

    color: black;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    &:hover {
      background-color: var(--accent-color-four);
      color: var(--text-invert);
    }
  }
  
  .art & {
    align-items: center;
  }
}

.card-board {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  padding: 0;
  
  margin-bottom: 3rem;
}

.card, a.card {
  position: relative;
  padding: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  
  
  display: flex;
  flex-direction: column;
  
  .card-image {
    width: 100%;
    aspect-ratio: 2/1.2;
    object-fit: contain;
  }

  h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: var(--text-one);
  }

  p {
    margin-top: 0.5rem;
    color: var(--text-two);
    flex-grow: 1;
  }
  
  .fake-link {
    color: var(--text-one);
    padding: 0.5rem;
    align-self: flex-end;
  }
  
  #corporate & {
    background-color: var(--accent-color-one-pale);
    border-radius: 5px;
    
    &:hover{
      background-color: var(--text-invert);
    }
  }
  
  .art & {
    aspect-ratio: 1;
    cursor: pointer;
    padding: 0;
    background-color: var(--accent-color-four-pale);
    
    img {
      aspect-ratio: 1;
      object-fit: cover;
      padding: 1rem;
    }
  }
  
  .blog-post li& {
    border-left: 3px solid var(--accent-color-four);
    padding: 0 0 0 1rem;
    
    p:first-child {
      font-weight:700;
      margin-bottom: 0;
    }
    
    p {
      color: var(--text-one);
    }
    
    &:hover {
      box-shadow: none;
      border-color: transparent;
      border-left: 3px solid var(--accent-color-four);
    }
  }

  &:hover {
    
    .fake-link {
      text-decoration: underline;
      background-color: var(--accent-color-one);
    }
    
    border: 1px dashed var(--accent-color-four);
    box-sizing: border-box;

    box-shadow:
      4px 4px 0px 0px var(--accent-color-three),
      8px 8px 0px 0px var(--accent-color-two),
      12px 12px 0px 0px var(--accent-color-one);
    -webkit-box-shadow:
      4px 4px 0px 0px var(--accent-color-three),
      8px 8px 0px 0px var(--accent-color-two),
      12px 12px 0px 0px var(--accent-color-one);
    -moz-box-shadow:
      4px 4px 0px 0px var(--accent-color-three),
      8px 8px 0px 0px var(--accent-color-two),
      12px 12px 0px 0px var(--accent-color-one);
  }
  
  
  #philosophy & {
    border-left: 1px solid var(--contrast-background);
    
    h3 {
      margin-top: 0;
      padding: .5rem;
    }
    
    p {
      padding-left: .5rem;
    }
    
    &:hover {
      border-left: 1px dashed var(--accent-color-four);
      
      h3 {
        background-color: var(--accent-color-one);
      }
    }
    
  }
  
}

.example-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 1rem 0 0.5rem;
  
  img {
    width: 100%;
    justify-self: center;
    align-self: center;
  }
  
}

#imageModal {
  padding: 0;
  border-radius: 1rem;
  border: 0;
  background-color: transparent;
  
  img {
    max-height: 90vh;
  }
  
  #text {
    height: 0;
  }
  
  .modalClose {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
  }
}

iframe {
  width: 100%;
  aspect-ratio: 16/9;
}

.project-title {
  background-color: var(--contrast-background);
  padding: 2rem var(--body-margin-small);
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1rem;
  
  &.single {
    grid-template-columns: 1fr;
  }
  
  &.peek-up {
    padding: 0 var(--body-margin-small);
    
    .image-box {
      display: flex;
      justify-content: center;
      align-items:flex-end;
      margin-bottom: -3px;
        
        img {
          max-height: 90%;
          max-width: 100%;
      }
    }
  }
  
  .title-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  h1 {
    text-align: center;
  }
  
  nav {
    margin: 0;
    text-decoration: underline;
    
    ul {
      justify-content: center;
    }
  }
  
}

.left-image {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 2rem;
  
  h3 {
    margin-top: 0;
  }
  
  p:first-child {
    margin-top: 0;
  }
  
  .frame-position {
    display: flex;
    justify-content: center;
  }
}

.right-image {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  
  h3 {
    margin-top: 0;
  }
  
  p:first-child {
    margin-top: 0;
  }
  
  li {
    margin-bottom: 1rem;
  }
  
  .frame-position {
    display: flex;
    justify-content: center;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  
  img {
    width: 100%;
  }
}

footer {
  background-color: var(--text-one);
  height: 6rem;
  color: var(--text-invert);
  padding: .5rem var(--body-margin);
  margin-top: 5rem;
  display: flex;
  align-items: flex-end;
  
  a {
    color: var(--text-invert);
  }
}

footer:hover {
  background-color: var(--accent-color-one);
  background: linear-gradient(270deg,rgba(243, 189, 150, 1) 0%, rgba(196, 146, 167, 1) 50%, rgba(117, 114, 153, 1) 100%);
  color: var(--text-one);
  font-weight:600;
  
  a {
    color: var(--text-one);
  }
}

@media (max-width: 1300px) {
  header h1, header > div{
    &:before {
      margin-left: calc(0px - var(--body-margin-medium) *2.4);
    }
  } 
  
  nav {
    margin-left: var(--body-margin-medium);
  }
  
  section, article {
    margin: 1rem var(--body-margin-medium) 4rem;
  }
  
  .card-board {
    grid-template-columns: 1fr;
  }
  
  .card-list {
    #corporate &, #web-design & {
      grid-template-columns: 1fr 1fr;
    }
  }
  
}

@media (max-width: 1000px) {
  
  .about-me {
    & > div {
      flex-direction: column;
    }
  }
  
  main.blog-post {
    &.blog-post section {
      padding: 0;
    }
  }
  
  .project-title {
    grid-template-columns: 1fr;
  }
  
  .right-image, .left-image {
    grid-template-columns: 1fr;
  }
  
  .card-list {
    #corporate &, #web-design & {
      grid-template-columns: 1fr;
    }
  }
  
  .example-images {
    grid-template-columns: 1fr;
    padding: 3rem 4rem 0.5rem;
  }
  
  footer {
    padding: .5rem var(--body-margin-medium); 
  }
}

@media (max-width: 900px) {
  header h1, header > div {
    
    text-align: center;
    
    &:before, &:after {
      content:'';
      margin: 0;
    }
    
  }
  
  nav {
    margin-left: 0;
    
    ul {
      justify-content: center;
    }
  }
  
  section, article {
  /* padding: 1rem 3rem; */
  margin: 1rem var(--body-margin-small) 4rem;
}
  
  #imageModal {
    width: 80vw;
  }
  
  .two-col {
    grid-template-columns: 1fr;
  }
  
  footer {
    height: 7rem;
    align-items: flex-start;
    padding: .5rem var(--body-margin-small);
  }
}

@media (max-width: 550px) {
  section, article {
    /* padding: 1rem 3rem; */
    margin: 1rem calc(var(--body-margin-small) / 2) 4rem;
  }
}