/**
* CSS file to hold styles that apply across the application
*/

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&family=Montserrat:wght@200;400;600;800&display=swap");

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: "Montserrat", sans-serif;
}

div#main {
  display: flex;
  flex-direction: column;
}

section {
  position: relative;
}

section.dark {
  min-height: 100vh;
  color: white;
  background: rgba(0, 0, 0, 0.25);
}

section.light {
  color: black;
  background: rgba(255, 255, 255, 0.35);
  padding: 8rem 0;
}

section img.background {
  width: 100vmax;
  height: 100%;
  z-index: -1;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  pointer-events: none;
  object-fit: cover;
}

h1 {
  font-weight: 300;
  font-family: "Cormorant Garamond", serif;
  font-size: 7rem;
  margin: 0;
}

@media screen and (max-width: 300px) {
  h1 {
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    font-size: 3rem;
    margin: 0;
  }
}

@media screen and (min-width: 301px) and (max-width: 360px) {
  h1 {
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    font-size: 4rem;
    margin: 0;
  }
}

@media screen and (min-width: 361px) and (max-width: 420px) {
  h1 {
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    font-size: 5rem;
    margin: 0;
  }
}

h2 {
  font-weight: 400;
  font-size: 2rem;
  margin: 0;
  text-align: center;
}

h3 {
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0;
}

p {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 0;
  font-weight: 300;
}

p.large {
  font-size: 24px;
}

p.small {
  font-size: 15px;
}

hr {
  margin: 2.5rem;
}

li {
  line-height: 1.7;
}

li::marker {
  color: #4e567e;
}

a {
  text-decoration: none;
  color: black;
}

a:hover {
  color: #4e567e;
}

/* --- Portfolio Section: Modern Responsive Grid (Best Practice) --- */
.portfolio-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.portfolio-hero {
  margin-bottom: 2.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 1rem;
}

@media (max-width: 700px) {
  .container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.25rem;
  }
  .portfolio-hero {
    margin-bottom: 1.2rem;
  }
}

.box, .container .box {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
  padding: 1.2rem 1rem;
  box-sizing: border-box;
  width: 100%;
  transition: box-shadow 0.18s, transform 0.18s;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.box:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.16);
  transform: translateY(-2px) scale(1.02);
}

/* Header styles */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: top 0.35s cubic-bezier(.4,0,.2,1), background 0.2s, opacity 0.2s, height 0.2s, padding 0.2s;
  height: 56px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
}
body.header-hidden #header {
  top: -56px !important;
  pointer-events: none;
  opacity: 0;
  height: 0;
  padding: 0;
}
body.header-visible #header {
  top: 0 !important;
  pointer-events: auto;
  opacity: 1;
  height: 56px;
  padding: 0 0.5rem;
}

@media (max-width: 700px) {
  #header {
    font-size: 0.92rem;
    height: 40px;
    padding: 0 0.1rem;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.2rem;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    min-width: 0;
  }
  #header a {
    display: inline-block;
    padding: 0.3rem 0.5rem;
    font-size: 0.92rem;
    min-width: 48px;
    text-align: center;
    margin: 0 0.1rem;
    border-radius: 0;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
}

#header a {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  color: #222;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, transform 0.18s;
  border-radius: 6px;
  font-size: 1rem;
}
#header a:hover {
  color: #fff;
  background: #4e567e;
  transform: translateY(-2px) scale(1.08);
}

@media (max-width: 700px) {
  #header a {
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
  }
}

/* Portfolio card animation */
.box, .container .box {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  animation: fadeInUp 0.7s cubic-bezier(.4,0,.2,1) forwards;
}
.box:nth-child(1) { animation-delay: 0.05s; }
.box:nth-child(2) { animation-delay: 0.12s; }
.box:nth-child(3) { animation-delay: 0.19s; }
.box:nth-child(4) { animation-delay: 0.26s; }
.box:nth-child(5) { animation-delay: 0.33s; }
.box:nth-child(6) { animation-delay: 0.40s; }
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 700px) {
  .box, .container .box {
    padding: 1rem 0.5rem;
    border-radius: 7px;
    font-size: 1rem;
  }
}

/* About section content box */
.about-content {
  background-color: white;
  width: 70%;
  max-width: 1100px;
  min-width: 260px;
  padding: 2.5rem 3rem;
  margin: 2rem auto;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: width 0.3s, max-width 0.3s, padding 0.3s;
}
@media (max-width: 1200px) {
  .about-content {
    width: 90%;
    max-width: 900px;
    padding: 2rem 1.5rem;
  }
}
@media (max-width: 700px) {
  .about-content {
    width: 95%;
    max-width: 100vw;
    padding: 1rem;
  }
}
.skills-list {
  text-align: left;
  columns: 2;
  font-size: 1.25rem;
  margin: 2rem 3rem;
  gap: 3rem;
}
@media (max-width: 700px) {
  .skills-list {
    columns: 1;
    font-size: 1rem;
    margin: 1rem 0.5rem;
  }
}
.about-detail {
  padding: 1rem 2rem 0;
}
@media (max-width: 700px) {
  .about-detail {
    padding: 0.5rem 0.5rem 0;
  }
}

/* Home section content and arrow */
.home-content {
  position: absolute;
  top: 30%;
  left: 2rem;
  right: 2rem;
  max-width: 90vw;
}
@media (max-width: 700px) {
  .home-content {
    top: 18%;
    left: 1rem;
    right: 1rem;
  }
}
.down-arrow-container {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
}
.down-arrow {
  height: 2.5rem;
  width: 2.5rem;
  cursor: pointer;
}
@media (max-width: 700px) {
  .down-arrow {
    height: 2rem;
    width: 2rem;
  }
}

/* Portfolio hero image */
.portfolio-hero-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto;
  display: block;
}
@media (max-width: 700px) {
  .portfolio-hero-img {
    max-width: 100vw;
    border-radius: 0;
  }
}

/* Utility for hiding scrollbars on mobile */
body {
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Responsive improvements */
@media (max-width: 900px) {
  section.light {
    padding: 4rem 0.5rem;
  }
  .portfolio-container, .container {
    max-width: 100vw;
    padding: 0 0.5rem;
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.3rem;
  }
  .portfolio-container {
    flex-direction: column;
    align-items: stretch;
  }
  .container {
    display: block;
    width: 100%;
    margin: 0 auto;
  }
  .box {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  ul {
    columns: 1 !important;
    font-size: 1rem !important;
    margin: 1rem 0.5rem !important;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .home-content {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding: 0 1.2rem;
  }
  h2 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
  }
  .portfolio-hero {
    margin-bottom: 0.8rem;
  }
}

/* Footer: always visible, professional, responsive */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 5rem 0 3rem;
  background: inherit;
  color: inherit;
  width: 100%;
  z-index: 10;
}
#contact > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}
#contact a {
  display: inline-block;
}
img.social-icon {
  width: 30px;
  height: 30px;
  filter: none;
  opacity: 1;
  transition: filter 0.2s, opacity 0.2s;
}
img.social-icon:hover {
  filter: brightness(1.2) drop-shadow(0 2px 8px #4e567e33);
  opacity: 0.85;
}
#contact p.small {
  color: white;
  margin-top: 0;
  font-size: 1rem;
  opacity: 0.95;
}
@media (max-width: 700px) {
  #contact {
    padding: 2rem 0 1.5rem;
    gap: 1.2rem;
  }
  #contact > div {
    gap: 1.2rem;
  }
}

body.header-hidden #header,
body.header-visible #header {
  transition: none !important;
}