:root{
    font-size: 12px;
    --background: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --header: var(--header-background-dark);
    --text-unfocused: var(--text-unfocused-dark);
    --text-focused: var(--text-focused-dark);
    --text-color-dark: #fff;
    --background-color-dark: #3f3f3f;
    --header-background-dark: #181818;
    --text-unfocused-dark: #aaa;
    --text-focused-dark: #fff;
    --text-color-light: #000;
    --background-color-light: #a8a8a8;
    --header-background-light: #e6e6e6;
    --text-unfocused-light: #5e5e5e;
    --text-focused-light: #000;
    --image-text-color: #fff;
    --image-text-unfocused: #aaa;
    --image-text-focused: #fff;
  }
  
  * {
    font-family: "Montserrat", Verdana, Arial, sans-serif;
    font-weight: 400;
    color: var(--text-color, white);
    margin: 0;
    background-color: var(--background);
  }

/* fonts */
/* montserrat-regular - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/montserrat-v26-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
         url('/assets/fonts/montserrat-v26-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
  }
  
  /* montserrat-italic - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 400;
    src: url('/assets/fonts/montserrat-v26-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
         url('/assets/fonts/montserrat-v26-latin-italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
  }
  
  /* montserrat-700 - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    src: url('/assets/fonts/montserrat-v26-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
         url('/assets/fonts/montserrat-v26-latin-700.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
  }
  
  /* montserrat-700italic - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 700;
    src: url('/assets/fonts/montserrat-v26-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
            url('/assets/fonts/montserrat-v26-latin-700italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
  }

  /* animations */

  @keyframes fadeOut {
    0% {
      opacity: 1;
      display: block;
    }
    100% {
      opacity: 0;
      display: none;
    }
  }
  
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-50px);
    }
    60% {
        transform: translateY(-25px);
    }
  }
  
  @keyframes glow-up {
    100% {
        color: var(--text-focused, white);
    }
  }

  @keyframes glow-up-no-mode {
    100% {
        color: var(--image-text-focused, white);
    }
  }

  #site-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(9, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    height: 100vh;
    overflow-y: hidden;
  }

  /* header css */

  my-header, my-footer {
    background-color: var(--header);
  }
  /* section - general */

  section {
    grid-area: 2 / 1 / 9 / 2; 
    overflow-y: scroll;
  }

  section > h2{
    text-align: center;
    padding: 10px;
  }


/* width */
::-webkit-scrollbar {
  width: 10px;
  margin-left: 30px;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 30px;
}
 
/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--text-unfocused, white);
  border-radius: 30px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--text-focused, white);
}

  /* index.html */

  #hero-img {
    width: 100%;
    height: 80vh;
    object-fit: cover;
  }

  #index {
    overflow-y: hidden;
  }

  #index * {
    background-color: transparent;
    color: var(--image-text-color, white);
  }

  #index > div {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    top: 50%;
  }

  #index > div > a{
    color: var(--image-text-unfocused, gray);
    cursor: pointer;
    margin-top: 1em;
    text-decoration: none;
  }
  
  #index > div > a::before, .container > article > a::before, #experience a::before{
    transition: all 0.3s ease;
  }
  
  #index > div > a:hover {
    animation: glow-up-no-mode 1s forwards;
  }

  .container > article > a:hover, #experience a:hover {
    animation: glow-up 1s forwards;
  }

  /* containers - general */

  .container {
    display: flex;
    width: 100%;
    border: 1px solid var(--text-color); 
    border-radius: 10px;
    padding: 10px;
  }

  .container > aside{
    width: 25%;
    border-radius: 30px;
  }

  .container > aside img {
    height: 150px;
    object-fit: cover;
    width: calc(100% - 5px);
    margin: 5px;
  }

  .container > aside figure{
    text-align: right;
    padding: 10px;
    font-size: .75rem;
    border-radius: 30px;
  }
  
  .container > article{
    width: 75%;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    line-height: 2;
    overflow-y: scroll;
    padding-left: 10px;
    border-radius: 30px;
  }

  .container > article > * {
    margin: 10px 0;
  }

  .container > article > a
  {
    font-size: 1rem;
    color: var(--text-unfocused, gray);
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
  }

  .container > article > details{
    line-height: 1.5;
  }

  /* about me */
  #about-me {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-y: hidden;
  }

  #about-me .container {
    height: 75%;
    width: 80%;
  }

  #about-me #portrait source, img{
    border-radius: 10px;
  }

  /* banners */
  .banner {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    -moz-transition: all 1s;
    -webkit-transition: all 1s;
    transition: all 1s;
  }

  .banner:hover{
    height: 350px;
  }

  .banner > * {
    font-size: 3rem;
    font-weight: 700;
    color: var(--image-text-color);
    padding: 1%;
    background-color: transparent;
  }

  /* portfolio */
  #portfolio > a {
    text-decoration: none;
  }

  #experience-banner{
    background-image: url(/assets/anheuser_busch.jpg), url(/assets/anheuser_busch_lowres.jpg);
    /* Source : Image by John W. Iwanski via Flickr, licensed under ("https://creativecommons.org/licenses/by-nc/2.0/") CC BY-NC 2.0 */
  }
  
  #education-banner{
    background-image: url(/assets/ucsd.jpg), url(/assets/ucsd_lowres.jpg);
    /* source: personal image */
  
  }
  
  #projects-banner{
    background-image: url(/assets/office.jpg), url(/assets/office_lowres.jpg);
    /* source: AI generated image */
  }

  /* experience page */
  #experience {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
  }

  #experience .container {
    margin: 10px 0;
  }

  #experience > div {
    flex-direction: column;
    display: flex;
    align-items: center;
    width: 80%;
  }

  #experience .container > article{
    line-height: 1.25;
    overflow-y: hidden;
  }

  #experience .container a {
    text-decoration: none;
  }

  #experience a {
    font-size: 1rem;
    color: var(--text-unfocused, gray);
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
  }

  #experience summary {
    cursor: pointer;
  }
  #experience summary h3 {
    font-size: 1.5rem;
  }

  #experience details hr {
    margin: 10px;
  }

  #experience summary strong {  
    font-size:  2rem;
    font-weight: bold;
  }

  #experience summary strong:hover {  
    text-decoration: underline;
  }
  /* contact form */
  /* from contact form html */
  #contact-page{
    overflow-y: scroll;
    text-align: center;
    & ul{
      width: 50%;
      list-style-type: none;
      padding-inline: 0;
    }
    
    & ul > * {
      margin: 5px;
    }

    & article{
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    
    & hr{
      width: 50%;
      margin: auto;
    }
  }

  #contact-page > *{
    margin: 1rem 0;
  }

  #contact-page form *:required:invalid {
    border-width: 5px !important;
  }

  #contact-page form *:required:valid {
    border-width: 1px !important;
  }

  #contact-page .char_count {
    float: right;
    font-size: 0.5rem;
  }
  

  .icon{
    width: 50px;
    height: 50px;
  }

  .contact-icons > a{
    display: inline-block;
    height: 50px;
    width: 50px;
    margin: 25px;
  }

  .contact-icons > a:hover{
    animation: glow-out 2s forwards;
  }

  @keyframes glow-out {
    from {}
    to{
      -webkit-box-shadow: 2px 10px 84px 15px rgba(201,201,201,1);
      -moz-box-shadow: 2px 10px 84px 15px rgba(201,201,201,1);
      box-shadow: 2px 10px 84px 15px rgba(201,201,201,1);
    }
  }

  #contact-page form{
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  #contact-page form > label {
    padding: 0.5rem;
    width: 80%;
  }

  #contact-page form > * {
    margin: 5px 0;
  }

  #contact-page fieldset{
    width: 80%;
  }

  #contact-page textarea, input[type="email"], input[type="text"]{
    width: 100%;
  }

  #contact-page input[type="email"], input[type="text"], textarea{
    padding: 12px 20px;
    border: 1px solid black;
    margin: 8px 0;
    color: black;
    background-color: rgb(224, 224, 224);
  }

  #contact-page input[type="email"]:focus, input[type="text"]:focus, textarea:focus
  {
    background-color: white;
  }
  
  #contact-page button[type=submit] {
    background-color: #333;
    color: var(--image-text-color, white);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
  }

  #contact-page button[type=submit]:hover {
    transition: background-color 0.3s ease;
    background-color: color(display-p3 0.484 0.806 0.385 / 0.5);
  }

  #contact-page output {
    font-size: 0.75rem;
  }

  #contact-page output[name="error"] {
    color: red;
  }
  
  #contact-page output[name="information"] {
    color: greenyellow;
  }

  #contact-page > hr {
    border-color: var(--text-color, white)
  }

  .error {
    font-size: 0.75rem;
    margin-top: 20px;
    padding: 0;
    opacity: 0;
    animation: fadeOut 5s ease-in-out forwards;
  }

  .popup{
    position:absolute;
    bottom:20%;
    left:30%;
    background-color: #333;
    border: 5px solid white;
    color: var(--image-text-color, white);
    padding: 10px 20px;
    border-radius: 5px;
  }
  
  /* media queries */
  @media (max-width: 768px) {
    #index > div, #index > div> a {
        font-size: 1rem;
    }
    #index > div > a{
        padding: 10px 25px 10px 25px;
    }
  }

  @media (max-width: 480px) {

    /* containers */
    .container {
      flex-direction: column;
      align-items: center;
      width: 95%;
    }

    .container > aside {
      width: 100%;
    }

    .container > aside figure{
      text-align: center;
      padding: 0px;
      margin-top: 10px;
    }

    .container figcaption{
      display: none;
    }

    .container > article{
      margin-top: 10px;
      width: 95%;
      line-height: 1.5;
    }

    /* banners */
    .banner{
      align-items: center;
      justify-content: center;
    }

    @keyframes glow-in {
      from {}
      to{
        -webkit-box-shadow: inset 2px 10px 84px 15px rgba(201,201,201,1);
        -moz-box-shadow: inset 2px 10px 84px 15px rgba(201,201,201,1);
        box-shadow: inset 2px 10px 84px 15px rgba(201,201,201,1);      }
    }

    .banner > * {
        font-size: 1.5rem;
    }

    #experience .container > article{
      line-height: 1;
      font-size: 1.25rem;
    }

    /* contact form */

    #contact-page{
      font-size: 0.75rem;
    }

    #contact-page > hr, #contact-page form{
      width: 100%;
    }

  }