/* ============================================================
   FONTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');


/* ============================================================
   BASE
   ============================================================ */

html {
  -webkit-font-smoothing: antialiased;
}

html,
body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
  font-weight: normal;
  overflow-x: hidden;
}

*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

a {
  color: #757557;
  transition: 0.5s;
  text-decoration: none !important;
}

a:hover,
a:active,
a:focus {
  color: #000000;
  outline: none;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
  font-weight: bold;
  letter-spacing: 0px;
}

h1 {
  font-size: 18px;
}

h2 {
  color: #2b2b2b;
  font-size: 40px;
  line-height: 52px;
  margin-top: 0px;
  margin-bottom: 0px;
}

h4 {
  color: #353535;
  font-size: 20px;
}

p {
  color: #878787;
  font-size: 16px;
  font-weight: normal;
  line-height: 25px;
  letter-spacing: 0.2px;
}

.white-color {
  color: #f0f0f0;
}

.bg-grey {
  background: #2b2b2b !important;
}

.bg-grey .fa {
  color: #d5b7b7;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.parallax-section {
  background-attachment: fixed !important;
  background-size: cover !important;
}

.section-title {
  margin: 0;
  padding-bottom: 32px;
}

#about,
#experience,
#projects,
#coursework,
#contact,
footer {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
}


/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- Preloader --- */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  background: none repeat scroll 0 0 #ffffff;
}

.spinner {
  border: 1px solid transparent;
  border-radius: 5px;
  position: relative;
}

.spinner:before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65px;
  height: 65px;
  margin-top: -10px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid #454545;
  border-top-color: #ffffff;
  animation: spinner .9s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}


/* --- Sidebar Scrollbar --- */

#sidebar {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  height: 320px;
  width: 24px;
  z-index: 1000;
  display: flex;
  justify-content: center;
}

#sidebar-track {
  position: relative;
  width: 4px;
  height: 100%;
  background: rgba(100, 160, 180, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.4s ease;
}

#sidebar.on-home #sidebar-track {
  background: rgba(255, 255, 255, 0.15);
}

#sidebar-thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 28px;
  border-radius: 6px;
  cursor: grab;
  background: rgba(209, 235, 236, 0.55);
  border: 1px solid rgba(0, 100, 140, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 100, 150, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 1;
}

#sidebar-thumb:active {
  cursor: grabbing;
}

#sidebar.on-home #sidebar-thumb {
  background: linear-gradient(145deg, rgba(60, 59, 59, 0.1), rgba(66, 66, 66, 0.4));
  border: 0.5px solid rgba(255, 234, 234, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.sidebar-marker {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #0086a8;
  background: rgba(209, 235, 236, 0.5);
  border: 1px solid rgba(0, 100, 140, 0.35);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
  z-index: 2;
}

.sidebar-marker:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.sidebar-marker.active {
  transform: translate(-50%, -50%) scale(1.45);
  background: rgba(0, 134, 168, 0.65);
  border-color: rgba(0, 134, 168, 0.9);
  box-shadow: 0 4px 12px rgba(0, 134, 168, 0.3);
}

#sidebar.on-home .sidebar-marker {
  color: #a0efff;
  background: linear-gradient(145deg, rgba(60, 59, 59, 0.05), rgba(66, 66, 66, 0.35));
  border: 0.5px solid rgba(255, 234, 234, 0.6);
}

#sidebar.on-home .sidebar-marker.active {
  transform: translate(-50%, -50%) scale(1.45);
  background: rgba(160, 239, 255, 0.45);
  border-color: rgba(160, 239, 255, 0.9);
  box-shadow: 0 4px 12px rgba(160, 239, 255, 0.3);
}

.sidebar-marker::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 40, 60, 0.75);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sidebar-marker:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  #sidebar {
    display: none;
  }
}


/* --- Buttons --- */

.section-btn {
  position: relative;
  background: rgba(3, 194, 252, 0.064);
  border: 1px solid rgba(255, 255, 255, 0.247);
  border-radius: 50px;
  color: hsl(0, 0%, 100%);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  padding: 18px 32px;
  margin-top: 10px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: all ease-in-out 0.4s;
  overflow: hidden;
}

.section-btn:before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  height: 40%;
  border-radius: 50px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.section-btn:focus,
.section-btn:hover {
  background: rgba(114, 239, 220, 0);
  border-color: white;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.674), inset 0 3px 6px rgba(255, 255, 255, 0.4);
}


/* --- Glass Card --- */

.glass-card {
  position: relative;
  max-width: 900px;
  padding: 28px 32px;
  border-radius: 20px;
  background: rgba(209, 235, 236, 0.25);
  border-color: rgba(27, 64, 79, 0.814);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(180, 220, 255, 0.2));
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .1s ease;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 42%),
    radial-gradient(120% 60% at 10% -10%, rgba(197, 218, 223, 0.511), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.glass-card h2 {
  margin-top: 0;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.glass-card a {
  color: #0fb9d3;
  text-decoration-color: rgba(15, 185, 211, 0.35);
}

.glass-card a:hover {
  text-decoration-color: rgba(15, 185, 211, 0.7);
}


/* --- Social Icons --- */

.social-icon {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
}

.social-icon li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 22px;
  color: #0086a8;
  text-decoration: none;
  background: linear-gradient(145deg, rgba(60, 59, 59, 0), rgba(66, 66, 66, 0.284));
  border: 0.5px solid rgba(255, 255, 255, 0.597);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 3px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.social-icon li a:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.906), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  text-shadow: 0 5px 5px rgba(255, 255, 255, 0.305);
  color: white;
  border: 1px solid white;
}


/* --- Image Containers (Projects) --- */

.square-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
  margin-top: 5%;
  margin-bottom: 5%;
}

.square-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.square-image-container:hover .square-image-overlay {
  opacity: 1;
}

.square-image-overlay .gif-overlay {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.static-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.square-image-container:hover .static-image {
  opacity: 0;
}


/* --- Bullet Points --- */

.bullet {
  position: relative;
  padding-left: 20px;
}

.bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: black;
}


/* ============================================================
   SECTIONS
   ============================================================ */

/* --- Home --- */

#home {
  background:
    linear-gradient(to bottom, rgba(2, 148, 206, 0.278), rgba(6, 62, 147, 0.087)),
    url('../images/backgrounds/utahlake.png');
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: center;
  height: 100vh;
  position: relative;
  text-align: right;
}

#home .home-thumb {
  position: relative;
  z-index: 2;
}

#home .bg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(36, 44, 54, 0.45), rgba(0, 0, 0, 0.1));
}

.front-page-caption {
  color: #fff;
  font-style: normal;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.741);
  font-size: clamp(14px, 3vw, 18px);
  line-height: 1.4;
}

.typewriter {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow: hidden;
  color: white;
  font-size: 40px;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.typewriter-done::after {
  content: '|';
  animation: tw-blink 0.75s step-end infinite;
}

@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.photo-label {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}


/* --- About --- */

#about {
  padding-top: 100px;
}

.about-image-thumb img {
  border-radius: 50%;
  margin-bottom: 22px;
  border: 3px solid rgba(100, 160, 180, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.about-image-thumb .social-icon li a {
  background: #f0f0f0;
}

.about-thumb {
  padding: 32px 12px;
}

.about-thumb p {
  padding: 2px 0;
}

.about-social-icons {
  justify-content: center;
  margin-top: 16px;
}


/* --- Experience --- */

.content-row {
  margin-bottom: 32px;
}

.roles {
  position: relative;
  margin-top: 8px;
  padding-left: 20px;
  border-left: 2px solid rgba(100, 160, 180, 0.5);
}

.role {
  position: relative;
  padding-bottom: 14px;
}

.role:last-child {
  padding-bottom: 0;
}

.content-row .role h4 {
  font-weight: 500;
  margin-bottom: 0;
}

.role::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(100, 160, 180, 0.9);
  border: 2px solid #fff;
}

.role-group-label {
  font-size: 16px;
  color: #999;
  margin-bottom: 4px;
  font-style: italic;
}

.content-row h3 {
  color: #292d33;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: bold;
  font-size: 24px;
}

.content-row h4 {
  color: #292d33;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: bold;
  font-size: 20px;
}

.content-row .date {
  color: #999;
  font-size: 13px;
  margin-top: 2px;
}

.content-row .tech-stack {
  font-style: normal;
  font-family: monospace;
  color: #777;
}

.content-row p {
  margin-bottom: 0;
}

.experience .row {
  display: flex;
  align-items: flex-start;
}

.company-logo {
  margin-top: 13%;
  width: 100%;
}


/* --- Projects / Coursework --- */

.project-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 2%;
}

.semester {
  margin-bottom: 20px;
}

.course-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course {
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}


/* --- Envelope (Contact) --- */

.glass-envelope {
  position: relative;
  padding: 50px 40px 40px;
  border-radius: 6px;
  background: #fdf8f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-envelope:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.5);
}

.glass-envelope::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 4px;
  border: 20px solid transparent;
  background:
    linear-gradient(#fdf8f0, #fdf8f0) padding-box,
    repeating-linear-gradient(
      45deg,
      #e6394796 0px,   #e6394796 24px,
      #fdf8f0 24px,  #fdf8f0 48px,
      #75caee 48px,  #75caee 72px,
      #fdf8f0 72px,  #fdf8f0 96px
    ) border-box;
  pointer-events: none;
  z-index: 0;
}

.glass-envelope > * {
  position: relative;
  z-index: 1;
}

.envelope-stamp {
  position: absolute;
  top: 0px;
  right: 15px;
  width: 150px;
  height: 150px;
  background: url('../images/snoopy-stamp.png') center / contain no-repeat;
  z-index: 2;
}

.envelope-sender {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 220px;
  margin-bottom: 28px;
}

.envelope-sender input {
  background: transparent;
  border: none;
  border-bottom: 1px solid #c9b890;
  color: #333;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  padding: 4px 0;
  outline: none;
}

.envelope-sender input::placeholder {
  color: #a89878;
}

.envelope-recipient {
  text-align: center;
  margin: 8px 0 28px;
}

.recipient-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 2px;
}

.recipient-email {
  font-size: 14px;
  color: #666;
}

.envelope-message-area textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #c9b890;
  border-radius: 4px;
  padding: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #333;
  resize: none;
  outline: none;
}

.envelope-message-area textarea::placeholder {
  color: #a89878;
}

.envelope-send {
  text-align: right;
  margin-top: 14px;
}

.envelope-send button {
  background: #c9b890;
  border: none;
  border-radius: 50px;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.envelope-send button:hover {
  background: #b0a070;
  box-shadow: 0 px 12px rgba(0, 0, 0, 0.1);
}

/* --- Research Links --- */

.research-link {
  color: #0066cc;
}

.research-link:hover {
  color: #004499;
}


/* --- Contact Modal --- */

#contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.contact-modal-content {
  background: #fdf8f0;
  border-radius: 8px;
  padding: 40px 48px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.contact-modal-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.contact-modal-content h3 {
  margin-bottom: 8px;
}

.contact-modal-content p {
  color: #666;
  margin-bottom: 24px;
}

#contact-modal-close {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 28px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
}


/* --- Footer --- */

footer {
  background-image: url('../images/backgrounds/home-bg1.jpg');
  text-align: center;
  padding: 30px 0;
}

footer p {
  padding-bottom: 16px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (prefers-reduced-transparency: reduce) {
  .glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-icon li a::after {
    display: none;
  }

  .social-icon li a:hover {
    transform: none;
  }
}

@media (min-width: 992px) {
  #about .row.about-flex {
    display: flex;
    align-items: center;
  }

  #about .row.about-flex::before,
  #about .row.about-flex::after {
    display: none !important;
    content: none !important;
  }
}

@media (max-width: 980px) {
  #home {
    height: 55vh;
  }
}

@media (max-width: 768px) {
  #home {
    height: 85vh;
  }
}

@media (max-width: 580px) {
  h1 {
    font-size: 29px;
  }

  h2 {
    font-size: 23px;
  }

  #home {
    height: 95vh;
  }
}

@media (max-width: 500px) {
  .home-thumb h1 {
    font-size: 50px;
    white-space: normal;
    word-break: break-word;
  }

  .home-thumb p {
    font-size: 30px;
  }

  .home-thumb a {
    font-size: 15px;
  }
}

@media (max-width: 320px) {
  #home {
    height: 125vh;
  }
}
