@view-transition {
  navigation: auto;
}

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

:root{
  --main-bubble-color: #5388fc;
  --main-text-color: #000000;
  --main-bg-color: #ffffff;
  --light-blue: #dce9ff;
  --bg-color: #f3f3f3;
  --light-grey: #eeeeee;
  --text-color: #333;
  --card-radius: 12px;
  --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

html, body, p, span, a, h1, h2, h3, h4, h5, h6, button, label, input, textarea {
  font-family: "Lato", sans-serif;
  color: var(--main-text-color);
}

body {
  margin: 0;
  padding: 3dvw;
  box-sizing: border-box;
  overflow-x: hidden;
}

h1{
  text-align: center;
  margin-top: 2rem;
}

header{
  background-color: var(--light-grey);
  padding: 1rem;
  margin-bottom: 2rem;
}

nav{
  display:flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin:0;
  padding:0;  
}

nav a{
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--card-radius);
  transition: 
  background-color 0.3s ease,
  transform 0.2s ease,
  box-shadow 0.2s ease;
}

nav:has(a:hover) {
  background: color-mix(in oklab, var(--main-bubble-color) 20%, white);
  transition: background 0.3s ease;
}

nav a:hover{
  background-color: var(--main-bubble-color);
  color: white;
  transform: scale(1.1); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); 
}

footer{
  text-decoration: none;
  color: #000000;
  text-align: center;
  padding: 0.5rem 1rem;
  background-color: var(--light-grey);
  border-radius: var(--card-radius);
  margin-top: 2rem;
  transition: 
  background-color 0.3s ease,
  transform 0.2s ease,
  box-shadow 0.2s ease;
}

footer a:hover{
  background-color: var(--main-bubble-color);
  color: white;
  transform: scale(1.1); 
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2); 
}

/* === Main Page === */
#slideshow {
    width: 95%;
    max-width: 700px;
    aspect-ratio: 16 / 9;
    margin: 2rem auto;
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
}

#slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    cursor: pointer;
}

#slideshow img.active {
    opacity: 1;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 6px;
    z-index: 10;
}

#prevBtn { left: 10px; }
#nextBtn { right: 10px; }

.slide-btn:hover {
    background: rgba(0,0,0,0.75);
}

/* === Mobile === */
@media (max-width: 600px) {
    #slideshow {
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }

    .slide-btn {
        font-size: 1rem;
        padding: 0.4rem 0.6rem;
    }
}

audio,
iframe {
  width: 100%;
  border-radius: var(--card-radius);
}

/* === About Page === */
#about-page {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  padding: 2rem;
  overflow-x: hidden;
}

#about-content{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  overflow-x: hidden;
}

.Photo {
  background-color: rgb(155, 155, 155);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  width: 260px;
  text-align: center;
}

.Photo img {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  object-fit: cover;
  background-color: var(--main-color);
}

.Photo h2 {
  margin-top: 1rem;
  color: var(--main-color);
}

.Photo p {
  background-color: var(--light-blue);
  padding: 1rem;
  border-radius: var(--card-radius);
  font-style: italic;
}

#info-section{
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  flex: 1;
  gap: 1.5rem;
  max-width: 100%; 
}

#Resume{
  width: 95%;
  margin: 0 auto;
  overflow: auto;
  background: white;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1rem;
}

#Resume iframe{
  border: none;
  border-radius: var(--card-radius);
  width: 100%;
  height: 500px;
}

/* === portfolio === */
/* === portfolio load buttons === */
.load-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.load-buttons button {
    background: transparent;
    color: #000000;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #000000;
    border-radius: var(--card-radius);
    cursor: pointer;

    transition:
        background-color 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        color 0.3s ease;
}

.load-buttons button:hover {
    background-color: var(--main-bubble-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#portfolio-main {
  background-color: var(--main-bubble-color);
  border: 2px solid #000000;
  border-radius: var(--card-radius);
  padding: 2rem 1rem;
  margin: 10px auto;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

#portfolio-main h1 {
  text-align: center;
  margin-bottom: 1rem;
}

#project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-items: center;
  width: 100%;
  box-sizing: border-box;
}

.project-card:not(:has(img)) {
  opacity: 0.6;
  background: color-mix(in srgb, #ddd 80%, white);
}

#project-list h2 {
  text-align: center;
}

project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  background-color: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
}

/* contact */
#contact-form {
  display: flex;
  justify-content: center;       
  align-items: center;            
  padding: 2rem;
  background-color: #f7f9ff;     
}

#contact-form form {
  background-color: #ffffff;
  border: 2px solid #5388fc;
  border-radius: var(--card-radius);
  padding: 2rem 3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;             
  font-family: "Lato", sans-serif;
}

#contact-form fieldset {
  border: none;                 
  padding: 0;
}

#contact-form legend {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
  text-align: center;
}

#contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #222;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--card-radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: #5388fc;
  box-shadow: 0 0 5px rgba(83, 136, 252, 0.5);
  outline: none;
}

#contact-form button {
  display: block;
  width: 100%;
  background-color: #5388fc;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.8rem;
  border: none;
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#contact-form button:hover {
  background-color: #3e6ee8;
  transform: translateY(-2px);
}

#contact-form button:active {
  transform: translateY(0);
}

#contact-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;          
  justify-content: center;
  background-color: var(--main-bubble-color);
  border: 2px solid #000;
  border-radius: var(--card-radius);
  padding: 2rem 2.5rem;
  width: fit-content;
  margin: 2rem auto;           
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: "Lato", sans-serif;
  color: #000;
}

#contact-info p {
  display: flex;                  
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.8rem 1.2rem;
  margin: 0.6rem 0;
  border: 2px solid #000;
  border-radius: var(--card-radius);
  background-color: #f1f1f1;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

#contact-info p:hover {
  background-color: #fff38c;
  transform: translateY(-3px);
}

#contact-info a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.4rem;
  transition: color 0.2s ease;
}

#contact-info a:hover {
  color: #0037ff;
  text-decoration: underline;
}

/* === skills === */

.list-intro{
  display: flex;
  gap: 2rem;
}

.list-intro > *{
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  border: #000000 solid 2px;
  border-radius: var(--card-radius);
}

.list-intro h2{
  text-align: center;
}


@property --bg-color-1 {
  syntax: "<color>";
  inherits: false;
  initial-value: #7f7fff; 
}

@property --bg-color-2 {
  syntax: "<color>";
  inherits: false;
  initial-value: #ff9de6; 
}

.skills, .tools, .other-skills {
  padding: 1.5rem;
  border-radius: var(--card-radius);
  background: radial-gradient(
    circle at 40% 60% in oklab,
    var(--bg-color-1),
    var(--bg-color-2)
  );
  color: #000;
  border: 2px solid #7f7fff;
  box-shadow: 0 4px 20px rgba(127, 127, 255, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: gradient-shift 8s infinite alternate linear;
}

@keyframes gradient-shift {
  0% {
    --bg-color-1: #7f7fff;
    --bg-color-2: #ff9de6;
  }
  100% {
    --bg-color-1: #66d9ff; 
    --bg-color-2: #b388ff;
  }
}

@property --scu-red {
  syntax: "<color>";
  inherits: false;
  initial-value: #7B1E1E; 
}

@property --scu-gold {
  syntax: "<color>";
  inherits: false;
  initial-value: #CBA052;
}

main {
  margin: 0 auto;
  padding: 2dvh 3dvw;
  max-width: 94dvw;
  box-sizing: border-box;
}

.UCSD {
  border: #000 solid 2px;
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: row;
  gap: 3dvw;
  padding: 2dvw;
  margin-block: 4dvh;
  background: linear-gradient(
    135deg in oklab,
    color(display-p3 0.1 0.2 0.55),
    color-mix(in oklab, #FFCD00 85%, white)
  );
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(24, 43, 73, 0.4);
  max-width: 100%;
  box-sizing: border-box;
}

.experience {
  border: #000 solid 2px;
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: row;
  gap: 2dvw;
  padding: 2dvw;
  margin-block: 4dvh;
  background: linear-gradient(
    135deg in oklab,
    var(--scu-red),
    var(--scu-gold)
  );
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(123, 30, 30, 0.4);
  animation: scu-gradient-shift 8s infinite alternate ease-in-out;
  max-width: 100%;
  box-sizing: border-box;
}

@keyframes scu-gradient-shift {
  0% {
    --scu-red: #7B1E1E;
    --scu-gold: #CBA052;
  }
  100% {
    --scu-red: #8C2C2C;
    --scu-gold: #E3B96F;
  }
}

@media (max-width: 1225px) {
  .UCSD,
  .experience {
    flex-wrap: wrap;
    justify-content: center;
    gap: 3dvw;
    padding: 4dvw;
    margin-block: 6dvh;
    max-width: 100%;
    box-sizing: border-box;
  }

  main {
    overflow-x: hidden; 
  }
}

/* === mid tablet to mobile === */
@media (max-width: 965px){
  .UCSD,
  .experience {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0 auto;
    margin-bottom: 10px;
    width: 90%;
    font-size: 0.9rem;
  }
}

/* === Mobile View === */
@media (max-width: 600px) {
  /* === Navbar Sizing === */
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 0;
  }

  nav a {
    flex: 1 1 calc(33.33% - 0.8rem); 
    text-align: center;
    font-size: 0.9rem;
    padding: 0.6rem 0;
    border-radius: 6px;
  }

  /* === Main Mobile === */
  #main-page-layout {
    display: grid;
    grid-template-columns: 1fr;   
    grid-template-rows: repeat(6, auto); 
    gap: 1rem;
    justify-items: center;
    align-items: center;
    background-color: var(--main-bubble-color);
    border-radius: 2rem;
    padding: 1rem;
    width: 95%;
    margin: 0 auto;
  }

  #main-page-layout > * {
    text-align: center;
    width: 90%;
    max-width: 300px; 
  }

  #main-page-layout p {
    font-size: 0.95rem;
  }

  #main-page-layout canvas,
  #main-page-layout img,
  #main-page-layout svg,
  #main-page-layout video,
  #main-page-layout progress {
    width: 100%;
    max-width: 280px;
  }

  #progress-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  #progress-bar label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  #progress-bar progress {
    width: 85%;
  }

  #main-page-layout video {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  /* === About Mobile === */
  #about-page {
    flex-direction: column;
    align-items: center;
  }

  .Photo {
    width: 90%;
    max-width: 250px;
    padding: 1rem;
  }

  #info-section {
    flex-direction: column;
    width: 100%;
    padding: 1rem;
    gap: 1rem;
  }

  #Resume {
    width: 95%;
    margin: 0 auto;
    padding: 0.5rem;
  }

  #Resume iframe {
    height: 400px;            
    max-width: 100%;
  }

  /* === Contact Sizing === */
  #contact-info {
    width: 90%;               
    padding: 1rem 1.2rem;      
    border-radius: 12px;       
    margin: 1.5rem auto;
  }

  #contact-info p {
    font-size: 0.9rem;        
    padding: 0.6rem 0.8rem;    
    border-radius: 1.5rem;
    margin: 0.4rem 0;
  }

  #contact-info a {
    font-size: 0.9rem;        
  }

  /* === Skills Sizing === */
  .list-intro {
    flex-direction: column;   
    align-items: center;
    gap: 1rem;
  }

  .list-intro > * {
    width: 90%;
    max-width: 300px;
    font-size: 0.9rem;
    padding: 0.8rem;
  }

  .list-intro h2 {
    font-size: 1.1rem;
  }

  /* === Credits Sizing === */
  .UCSD {
    flex-direction: column;     
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
  }

  .experience {
    width: 90%;
    margin: 0 auto;
    font-size: 0.9rem;          
    padding: 1rem;
  }
}

/* === Desktop View === */
@media (min-width: 1300px) {
  /* === Navbar Sizing === */
  nav a{
    font-size: 1.5rem;
  }

  /* === About Desktop === */
   #about-page {
    align-items: center;
    padding: 3rem 5rem;       
  }

  #about-content {
    flex-direction: row;         
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .Photo {
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    width: 300px;                
    padding: 2rem;
  }

  .Photo img {
    width: 180px;
    height: 180px;
  }

  #info-section {
    flex: 1;
    gap: 2rem;
    padding: 2rem;
  }

  #Resume {
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
  }

  #Resume iframe {
    height: 800px;            
  }

  /* === Skills Sizing === */
  .list-intro {
    gap: 1rem;
    justify-content: center;
  }

  .list-intro > * {
    flex: 1 1 30%;        
    min-width: 280px;
    max-width: 400px;
    padding: 2rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .list-intro h2 {
    font-size: 1.6rem;
  }

  /* === Credits Sizing === */
  .UCSD,
  .experience {
    max-width: 1100px;       
    width: 100%;              
    margin: 0 auto;          
  }

  .UCSD {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    padding: 2rem 3rem;
    margin-bottom: 2rem; 
  }

  .experience {
    padding: 2rem 3rem;
  }
}

/* ===  Adding page transitions === */
#page {
  display: block;
  width: 100%;
  height: 100%;
}

::view-transition-old(page),
::view-transition-new(page) {
  animation-duration: 0.35s;
}

::view-transition-old(page) {
  animation: fade-out 0.35s ease;
}

::view-transition-new(page) {
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}