@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}
  
body {
  margin: 0;
  font-family: 'Playfair Display', serif;
}

/*--------------Colors--------------*/
:root {
  --background: white;
  --text-black: #0b0d11;
  --text-white: white;
  --text-accent: rgb(7, 50, 7);
  --accent-main: #e86500;
}

/*--------------Navbar--------------*/
.nav {
  width: 100%;
  background-color: var(--background);
  display: flex;
  align-items: center;
  position: relative; /* Ensure relative positioning for z-index to work */
  z-index: 1; /* Place the navbar on top of other content */
}
.nav > .nav-header {
  flex: 0.95;
  padding-left: 1rem;
}
.nav > .nav-header > .nav-title {
  font-size: 22px;
  color: var(--text-black);
}
.nav > .nav-list {
  display: flex;
  gap: 2rem;
}
.nav > .nav-list > li {
  list-style-type: none;
}
.nav > .nav-list > li a {
  font-family: 'Ubuntu', sans-serif;
  text-decoration: none;
  color: var(--text-black);
  cursor: pointer;
}
.nav > #nav-check {
    display: none;
}

/*--------------Responsive Navbar--------------*/
@media (max-width: 480px) {
  .nav {
    padding: 1rem;
  }
  .nav > .nav-btn {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 0;
    padding-top: 0.2rem;
  }
  .nav > .nav-btn > label {
    display: inline-block;
    width: 50px;
    height: 50px;
    padding: 13px;
  }
  .nav > .nav-btn > label > span {
    display: block;
    width: 25px;
    height: 10px;
    border-top: 2px solid #eee;
  }
  .nav > .nav-list {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    background-color: white;
    height: 0;
    transition: all 0.3s ease-in;
    top: 40px;
    left: 0;
    overflow: hidden;
  }
  .nav > .nav-list > li {
    width: 100%;
    margin-top: 1.5rem;
  }
  .nav > #nav-check:checked ~ .nav-list {
    height: calc(100vh - 50px);
  }
}

/*--------------Header--------------*/
.myHeader {
  text-align: center;
}

.myHeader h1 {
  font-size: 7vh;
  padding: 2.5%;
  color: var(--text-accent);
}

.myHeader h2 {
  font-size: 2vh;
  font-weight: 400;
  padding-bottom: 10%;
}

.myHeader img {
  width: 75vw;
}

.myHeader p {
  font-size: 1.75vh;
  font-weight: 400;
  padding-bottom: 10%;
}

/*--------------Intro--------------*/
.myIntro {
  text-align: center;
  padding: 10%;
}

.myIntro p{
  font-size: 3vh;
  color: var(--text-accent);
}

/*--------------About--------------*/
.myAbout {
  background-color: var(--text-white);
  text-align: center;
  padding-top: 5%;
  padding-bottom: 5%;
  color: var(--text-accent);
}

.myAbout h3 {
  font-size: 3vh;
  font-weight: 400;
}

.myAbout p {
  font-size: 2vh;
}

/*--------------About2--------------*/
.myAbout2 {
  background-color: var(--text-white);
  text-align: center;
  color: var(--text-accent);
}

.myAbout2 h3 {
  font-size: 3vh;
  font-weight: 400;
}

.myAbout2 p {
  font-size: 2vh;
}

/*--------------Footer--------------*/
.footer {
  padding-top: 10%;
  padding-bottom: 3%;
  text-align: center;
  font-size: 1.75vh;
  color: var(--text-black);
}

.footer a {
  text-decoration: none;
  color: var(--text-black);
}

/*--------------Cards--------------*/
.cards {
  background-color: var(--text-white);
  padding-bottom: 10%;
}

article {
  --img-scale: 1.001;
  --title-color: var(--text-accent);
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;

  box-shadow: rgba(0, 0, 0, 0.16) 0px 2.5px 9px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  background: #fff;
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
}

article a::after {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  cursor: pointer;
  content: "";
}

/* basic article elements styling */
article h2 {
  margin: 0 0 18px 0;
  font-family: 'Playfair Display', serif;
  font-size: 2vh;
  letter-spacing: 0.06em;
  color: var(--title-color);
  transition: color 0.3s ease-out;
}

figure {
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

article img {
  max-width: 100%;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.article-body {
  padding: 24px;
}

article a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-accent);
}

article a:focus {
  outline: 1px dotted var(--text-accent);
}

article a .icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

/* using the has() relational pseudo selector to update our custom properties */
article:has(:hover, :focus) {
  --img-scale: 1.1;
  --title-color: var(--text-accent);
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}


/************************ 
Generic layout (demo looks)
**************************/

.articles {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

@media screen and (max-width: 960px) {
  article {
    container: card/inline-size;
  }
  .article-body p {
    display: none;
  }
}

@container card (min-width: 380px) {
  .article-wrapper {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .article-body {
    padding-left: 0;
  }
  figure {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  figure img {
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap; 
  width: 1px;
}