*, 
html, 
body, 
main,
*::before, 
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,html{
  position: relative;
  z-index: auto;
}
/* Custom Properties, update these for your own design */

:root {
  --ff-primary: 'Montserrat', sans-serif;
  --ff-secondary: 'Source Code Pro', monospace;
  --fw-reg: 300;
  --fw-bold: 900;
  --clr-light: #fff;
  --clr-dark: #303030;
  --clr-accent: #16e0bd;
  --clr-accent2:#34d39a;
  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.25rem;
  --fs-h1-sm: 3rem;
  --fs-h2-sm: 2.25rem;
  --fs-h3-sm: 1.25rem;
  --fs-body: 1rem;
  --bs: 0.25em 0.25em 0.75em rgba(0,0,0,.25), 0.125em 0.125em 0.25em rgba(0,0,0,.15);
}

@media (min-width: 800px) {
  :root {
    --fs-h1: 4.5rem;
    --fs-h2: 3.75rem;
    --fs-h3: 1.5rem;
    --fs-body: 1.125rem;
  }
}

/* General styles */

html {
  width: 100%;
  min-width: 100vw;
  height: auto;
  min-height: 100vh;
  overflow-x:hidden;
  scroll-margin: 4em;
  
}

body {
  width: 100%;
  background: var(--clr-light);
  color: var(--clr-dark);
  font-family: var(--ff-primary);
  font-size: var(--fs-body);
  line-height: 1.6;
  min-width: 250px;
  display:flex;
  flex-direction: column;

}
main {
  padding: 4em 0;
}
section {
  padding: 3em 2em;
  width: 100vw;
  margin:0;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: var(--fw-bold);
}

:focus {
  /*outline: 3px solid var(--clr-accent);*/
  outline-offset: 3px;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: .5em 2.5em;
  background: var(--clr-accent);
  color: var(--clr-light);
  text-decoration: none;
  cursor: pointer;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms ease-in-out;
  border-radius: 1em;
}

.btn:hover {
  transform: scale(1.1);
}

/* Typography */

h1, h2, h3 {
  line-height: 1;
  margin: 0;
  padding:0;
}

h1 {
  font-size: var(--fs-h1);
}


h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

.section {
  width: 100%;
  overflow: hidden;
}

.section__title {
  margin-bottom: .25em;
}

.section__title--intro {
  font-weight: var(--fw-reg);
}

.section__title--intro strong {
  display: block;
}

.section__subtitle {
  margin: 0;
  font-size: var(--fs-h3);
  position: relative;
  min-height: max-content;
}

.section__subtitle::before {
  content: '';
  position: absolute;
  top:50%;
  left: 50%;
  width: 200vw;    /* Change from 150vw to 100vw */
  height: 120%;
  background-color: var(--clr-accent);
  transform: translate(-50%,-50%);
  z-index: -1;
}

.section__subtitle--intro, .section__subtitle--about {
  font-family: var(--ff-secondary);
  margin-bottom: 1em
}

.section__subtitle--about {
  margin-left: 1em;
}

.section__subtitle--work {
  color: var(--clr-dark);
  font-family: var(--ff-primary);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 2em;
}

/* header */

header {
  display: flex;
  width: 100%;
  height: 4em;
  justify-content: space-between;
  padding: 1em;
  gap: 1em;
  box-shadow: 1px 3px 8px rgba(0,0,0,.1);
  position:fixed;
  z-index: 100;
  background: white;
}

.header-inner-container{
  display: flex;
  width: 100%;
  justify-content: space-between;

}

.logo {
  max-width: 200px;
}

.nav {
  position: fixed;
  background: var(--clr-dark);
  color: var(--clr-light);
  height: 100vh;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
 overflow-y: auto;
 border: 1px blue solid;
}
.nav-toggle {
  padding: .5em;
  background: transparent;
  border: 0;
  cursor: pointer;
  right: 1em;
  top: 1em;
  z-index: 1000;
  color: var( --clr-accent);

}

.nav__list {
  list-style: none;
  display: flex;
  height: 100%;
  max-width: 700px;
  flex-direction: column;
  gap: 2em;
  align-items: center;
  padding: 2em;
  margin: 4em auto;
  overflow-y: auto;
}


.nav__link, .nav__title, .nav__link_sub {
  text-decoration: none;
  font-weight: var(--fw-bold);
  text-wrap:wrap;
}
.nav__link, .nav__link_sub {
  cursor: pointer;
  color: inherit;
}
.nav__link, .nav__title {
  font-size: 2em;
}

.nav__title {
  pointer-events: none;  /* Makes it non-interactive */
}

.nav__link_sub {
  font-size: 1.5em;
  text-align: left;
  text-indent: 0;
  list-style: none;
}

.nav__link_sub::before {
  content: '\f061';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900; /* Added required font-weight */
  margin-right: 10px;
}

.nav__link:hover,  
.nav__link_sub:hover{
  color: var(--clr-accent);
}

.nav__link.active,
.nav__link_sub.active {
  font-weight: var(--fw-bold);
  color: var(--clr-accent);
}



i.hamburger {
  font-size: 25px;
}

.nav-open .nav {
  transform: translateX(0);
}

.nav-open .nav-toggle {
  position: fixed;
}

.nav-open .hamburger {
  transform: rotate(90deg);
}


/* Intro section */
#home{
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro{
  position: relative;
  margin: 0 auto;
  max-width: 1000px;
}
.intro__img {
  box-shadow: var(--bs);
  border-radius: 1em;
}

.intro-text-container{
  display: flex;
  
  flex-direction: column;
  align-items:  flex-start;
  margin: 2em 0;

}

@media (min-width: 600px) {
  .intro {
    display: grid;
    margin: 0 auto;
    grid-column-gap: 1em;
    grid-template-areas: "img title" "img subtitle";
    grid-template-columns: min-content minmax(100px, 1fr);
  }
}

@media (min-width: 600px) {
  .intro__img {
    grid-area: img;
    min-width: 250px;
    position: relative;
    z-index: 2;
  }
}

@media (min-width: 600px) {
  .section__subtitle--intro {
    grid-column: -1 / 1;
    grid-row: 2;
    text-align: left;
    position: relative;

  }
}

/* My services section */

.my-services {
  background-image: url(/img/blob-scene-haikei-8.png);
  background-size: cover;
  color: var(--clr-dark);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;

}
.my-services .row {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 15px;
  flex-wrap: wrap;
}

.my-services .col {
  flex: 1 1 30%; /* Flex-shrink: 1; Base size: 30% */
  min-width: 300px;
}

.section__title--services {
  color: var(--clr-dark);
  position: relative;
  margin-bottom: 1.2em;
}

.section__title--services::after {
  content: '';
  display: block;
  width: 2em;
  height: 1px;
  margin: 0.5em auto 1em;
  opacity: 0.25;
  z-index: 5;
}


.services {
  margin-bottom: 4em;
  display: flex;
  gap: 2em;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.service {
  display: grid;
  grid-template-rows: max-content 20px 1fr;
  max-width: 500px;
  margin: 0 auto;
  gap: 2em;
  height: 100%;
  background: white;
  border-radius: 1em;
  padding: 2rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.service i{
  font-size: 1.8em;
  color: white;
  background: var(--clr-accent);
  border-radius: 5em;
  width: 2.25em;
  aspect-ratio: 1 / 1; 
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}


#wave1, #wave2 {
  margin: 0;
  padding: 0;
  position: absolute; 
  left: 0;
  transform: translateX(-50%);
  width: 100%;
  height: auto;
  fill: #fff;
}

#wave1 {
  top: 0;
  transform: translateY(-30%);
}

#wave2 {
  bottom: 0;
  transform: translateY(0%);
}

@media (min-width: 800px) {
  .services {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    gap: 2em;
  }
}

.about-me {
  max-width: 1000px;
  margin: 0 auto;
}
.about-me__body{
  display: grid;
  grid-gap: 1em;
  padding: 1em 0;
}
.about-me__img {
  box-shadow: var(--bs);
  min-width: 250px;
  border-radius: 1em;
}

@media (min-width: 600px) {
  .about-me {
    display: grid;
    grid-template-columns: 1fr 250px;
    grid-template-areas: "title img" "subtitle img" "text img";
    grid-column-gap: 2em;
  }
}

@media (min-width: 600px) {
  .section__title--about {
    grid-area: title;
  }
}

@media (min-width: 600px) {
  .section__subtitle--about {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    left: -1em;

    padding-right: calc(200px + 4em);
  }
}

@media (min-width: 600px) {
  .about-me__img {
    grid-area: img;
    position: relative;
    z-index: 2;
  }
}

/* My Work */

.my-work {
  background-image: url(/img/blob-scene-haikei-9.png);
  background-size: cover;
  color: var(--clr-accent);
  text-align: center;
  position: relative;
  padding: 2em 0 10em 0;
  background: #e9fef8;
  display: grid;
  align-items: center;
}

.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 400px));
  grid-template-rows: minmax(max-content,1fr);
  padding: 2em;
  grid-gap: 1em;
  justify-content: center;
}
.portfolio__card {
  color:var(--clr-dark);
  border-radius: 2em;
  display: grid;
  grid-template-rows: 65% c;
  background: white;
}



.portfolio__card_text{
  display: grid;
  text-align: left;
  padding: 1.5em;
  grid-gap: .5em;
}
.portfolio__card_text > *{
  margin: 0;
  padding: 0;
}

.portfolio__card_text h3{
  font-size: 1.2em;
}
.portfolio__item {
    background: var(--clr-accent);
    overflow: hidden;
    object-fit: cover;
    position: relative;
    min-height: 200px;
}

.portfolio__img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the container */
    z-index: 3;
    transition: 
        transform 750ms cubic-bezier(.5, 0, .5, 1),
        opacity 250ms linear;
}

.portfolio__item, .portfolio__img {
  border-radius: 2em 2em 0 0;
}


.portfolio__img_text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: var(--fw-bold);
    text-decoration: none;
    pointer-events: none; /* Prevent hover issues */
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25); 
}



/* Text overlay functionality */
.portfolio__img:hover, 
.portfolio__item:focus .portfolio__img {
    transform: scale(1.05); /* Adjusted zoom */
    opacity: 0.25; /* Less opacity reduction */
    z-index: 1;
}



/* portfolio page*/

.portfolio-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  padding-bottom: 10em;
}
.portfolio_intro{
  display: flex;
  max-width: 100vw;
  flex-wrap: wrap-reverse;
  justify-content: center;
  gap:1.5em;
  margin: 0;

  padding:0;
  margin-top: 2em;
}
.intro-text-container{
  padding: 0 2em;
}
.portfolio_intro h1 {
  font-size: var(--fs-h1);
}
.portfolio_intro p {
  font-size: var(--fs-h3);
}
.portfolio_intro .intro-text-container > *{
  text-align: left;
}
.intro__portfolio_img{
  width: 100%;
  height: auto;
  max-width:500px;
  max-height: 500px;
  object-fit: cover;
  border-radius: 3em;
}

@media (max-width: 768px) {
  .intro__portfolio_img{
  
    border-radius: 0;
  }
}

.portfolio-item-individual{
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1em;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-radius: 3em;
  box-shadow: 1px 3px 8px rgba(0,0,0,.1);
  text-align: left;
  padding: 3em;
}

.portfolio-items  p,
.portfolio-items  li {
  text-align: left;
  max-width: 600px;
}

.project__demo {
  border-radius: 2em;
}

.project-links {
  display: flex;

  margin: 0 auto;
  padding: 1em;
  gap: 2em;
}
.project-links a{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
}
.project-links i{
  font-size: 1.2em;
}

@media (max-width: 768px) {
  .project-links {
    display: flex;
    flex-direction: column;
    gap: 1em;
  }
}

/* footer */

.footer {
  background: #111;
  color: var(--clr-accent);
  text-align: center;
  padding: 2.5em 0;
  font-size: var(--fs-h3);
  width: 100%;
  margin: 0;  /* Ensure no margin at bottom */
 /* Help with stacking context */
  bottom: 0;   
  position:absolute;
  z-index: 50;

}
.footer > * {
  margin:0;
  padding:0;
}
.footer a {
  color: inherit;
  text-decoration: none;
}

.footer__link {
  font-weight: var(--fw-bold);
}

.footer__link:hover, .social-list__link:hover {
  opacity: .7;
}

.footer__link:hover {
  text-decoration: underline;
}

.social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.social-list__item {
  padding: 0 0.51em;
}

.social-list__item:not(:last-child) {
  border-right: .5px solid var(--clr-accent);
}

.social-list__link {
  padding: .5em;
}*, *::before, *::after {
  box-sizing: border-box;
}