@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    /* outline: 1px solid red; */
  }

  html {
    color-scheme: light dark;
    scroll-behavior: smooth;
  }

  body {
    margin: unset;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    font-family: system-ui, sans-serif;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin-block-end: 0;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
  }

  h1,
  h2,
  h3,
  h4,
  button,
  input,
  label {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
  }

  button,
  input,
  textarea,
  select {
    font: inherit;
  }

  textarea:not([rows]) {
    min-height: 10em;
  }

  img,
  picture,
  svg,
  canvas {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }

  :target {
    scroll-margin-block: 5ex;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* ################################################################## */

:root {
  --font-primary: "Google Sans", sans-serif;
  --font-secondary: "Roboto", sans-serif;
  --transition: all 0.3s ease;
  --clr-purple: hsla(283, 83%, 34%, 0.8);
  --clr-blue: hsla(217, 89%, 61%, 0.8);
  --clr-red: hsla(5, 69%, 54%, 0.8);
  --clr-yellow: hsla(44, 100%, 48%, 0.8);
  --clr-green: hsla(151, 83%, 34%, 0.8);
  --primary-clr: hsl(173, 77%, 31%);
  --primary-clr-100: hsl(from var(--primary-clr) h s calc(l - 10));
  --primary-clr-500: hsl(from var(--primary-clr) h s calc(l + 10));
  --primary-clr-600: hsl(from var(--primary-clr) h s calc(l + 20));
  --surface: #121212;
}

.box {
  width: 200px;
  aspect-ratio: 1;
}

.primary {
  background-color: var(--primary-clr);
}

.primary-clr-100 {
  background-color: var(--primary-clr-100);
}
.primary-clr-500 {
  background-color: var(--primary-clr-500);
}
.primary-clr-600 {
  background-color: var(--primary-clr-600);
}

body {
  /* font-family: var(--font-primary); */
  background-color: var(--surface);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

@media (prefers-color-scheme: light) {
  :root {
    --surface: #f5f5f5;
  }
}

section:not(:last-of-type) {
  margin-bottom: 10rem;
}

/* Sticky Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* background: rgba(255, 255, 255, 0.95); */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1); */
  z-index: 1000;
  padding: 2rem 0;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100% - 2rem, 1440px);
  margin: 0 auto;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 28px;
  font-style: italic;
  font-weight: normal;
  color: #f0efef;
  text-decoration: none;
  transition: color 0.3s ease;
}

@media (prefers-color-scheme: light) {
  .logo {
    color: #222; /* dark text for light background */
  }
}

.logo img {
  background: var(--primary-clr);
  width: 50px;
  object-fit: cover;
  padding: 6px 6px 6px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(37, 211, 102, 0.4);
}

.logo:hover {
  color: var(--primary-clr);
}

/* WhatsApp Button Styles */
.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:active {
  transform: translateY(0);
}

/* WhatsApp Icon */
.whatsapp-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo {
    font-size: 24px;
  }

  .logo img {
    width: 40px;
  }

  .whatsapp-btn {
    padding: 10px 16px;
    font-size: 14px;
    gap: 8px;
  }

  .whatsapp-icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .whatsapp-btn {
    padding: 12px;
  }
  .whatsapp-btn span {
    display: none;
  }
  .logo span {
    display: none;
  }
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100% - 2rem, 1440px);
  height: 80vh;
  margin: 8rem auto 0;
  padding: 1rem;
  border-radius: 4rem;
  background-color: #000;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 4rem;
  font-weight: normal;
  /* font-weight: 700; */
  margin-bottom: 1.5rem;
  color: #ffffff;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.2s;
}

.hero p {
  font-size: clamp(1rem, -1.5rem + 5vw, 1.75rem);
  text-wrap: balance;
  font-weight: 400;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.4s;
}

.cta-container {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.6s;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(
    90deg,
    var(--clr-purple),
    var(--clr-blue),
    var(--clr-red),
    var(--clr-yellow),
    var(--clr-green)
  );
  background-size: 300% 100%;
  color: #ffffff;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.5s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: gradientShift 5s infinite alternate;
}

.cta-button:hover {
  background-position: 100% 0;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Animated Background */
.animated-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.curved-line {
  position: absolute;
  border: none;
  border-radius: 50%;
  opacity: 0.4;
}

.curved-line-1 {
  top: -50%;
  left: -20%;
  width: 140%;
  height: 140%;
  border: 2px solid var(--clr-yellow);
  animation: rotate 60s linear infinite;
  /* animation: rotate 60s linear; */
}

.curved-line-2 {
  bottom: -30%;
  right: -10%;
  width: 100%;
  height: 100%;
  border: 2px solid var(--clr-blue);
  animation: rotate 45s linear infinite reverse;
}

.curved-line-3 {
  top: 20%;
  left: 30%;
  width: 80%;
  height: 80%;
  border: 2px solid var(--clr-red);
  animation: rotate 30s linear infinite;
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-container {
    width: 100%;
  }
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ################################ about section ######################## */

@property --glow-deg {
  syntax: "<angle>";
  inherits: true;
  initial-value: -90deg;
}

.about-me-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: center;
}

section h2 {
  font-size: 2.5rem;
  font-weight: normal;
  margin-block-start: 0;
}

section img {
  width: 400px;
  height: 500px;
  object-fit: cover;
  margin-inline: auto;
  /* margin-top: 4rem; */
  border-radius: 4rem;
}

@media (width > 1440px) {
  section img {
    width: 500px;
    height: 650px;
  }
}

.glowing-border {
  display: grid;
  justify-items: center;
  /* place-items: center; */
  /* align-self: stretch; */
  --gradient-glow: var(--clr-red), var(--clr-yellow), var(--clr-green),
    var(--clr-blue), var(--clr-purple), var(--clr-red);

  padding: 10rem 6rem;

  border: var(--border-width, 2px) solid transparent;
  border-left: 0;
  border-radius: 0 100vw 100vw 0;
  background: linear-gradient(var(--surface, canvas) 0 0) padding-box,
    conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;

  position: relative;
  isolation: isolate;

  animation: glow 10s infinite linear;
}

@media (prefers-color-scheme: light) {
  .glowing-border {
    color: #222; /* dark text for light background */
  }
}

.glowing-border p {
  max-width: 600px;
  text-align: center;
  text-wrap: balance;
}

@keyframes glow {
  100% {
    --glow-deg: 270deg;
  }
}

.glowing-border::before,
.glowing-border::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.glowing-border::before {
  z-index: -1;
  background: var(--surface, canvas);
  inset: 0.5rem;
  scale: 1.2 1;
  transform-origin: right;
  filter: blur(var(--glow-size, 1rem));
}

.glowing-border::after {
  z-index: -2;
  inset: 0.5rem;
  background: conic-gradient(from var(--glow-deg), var(--gradient-glow));
  filter: blur(var(--glow-size, 1rem));
  opacity: var(--glow-intensity, 0.125);
}

.glowing-border.right {
  border-radius: 100vw 0 0 100vw;
  border: var(--border-width, 2px) solid transparent;
  border-right: 0;

  &::before {
    transform-origin: left;
  }
}

@media (width < 1100px) {
  body {
    overflow-x: hidden;
  }

  .about-me.about-me {
    margin-top: 15rem;
    margin-bottom: 0;
  }
  .about-me-container {
    grid-template-columns: 1fr;
  }

  .about-me-container > * {
    grid-area: 1 / 1;
  }
  .image-container {
    align-self: start;
    justify-self: center;
    margin-top: -150px;
    z-index: 2;
  }
  section img {
    object-position: center top;
    width: 300px;
    height: 300px;
    border-radius: 50%;
  }
  .glowing-border {
    justify-items: center;
    border: var(--border-width, 2px) solid transparent;

    border-bottom: 0;
    border-radius: 0;
    border-radius: 100vw 100vw 0 0;
    padding: 12rem 6rem 3rem;
    text-align: center;
  }
  .glowing-border::after {
    z-index: -2;

    background: conic-gradient(from var(--glow-deg), var(--gradient-glow));
    filter: blur(var(--glow-size, 1rem));
    opacity: var(--glow-intensity, 0.125);
  }
  .glowing-border::before {
    scale: 1 1;
    transform-origin: top;
  }
}

@media (width < 600px) {
  .glowing-border {
    padding: 10rem 3rem 3rem;
  }
  .image-container {
    margin-top: -125px;
  }
  section img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
  }
  section h2 {
    font-size: 2rem;
  }
}
@media (width < 450px) {
  .glowing-border {
    padding: 10rem 1rem 3rem;
  }
}

/* ###################### Skill Section ##################### */

.skill-container {
  display: grid;
  grid-template-columns: 2fr 3fr;
  align-items: center;
}

.skill span {
  font-size: 1.2rem;
  font-weight: 500;
}

.skill video {
  display: block;
  max-width: 100%;
  width: 500px;
  justify-self: center;
  /* aspect-ratio: 3 / 4; */
}

/* ###################### Portfolio Section ############################ */

.portfolio {
  background-image: linear-gradient(135deg, #0e1c26, #2a454b, #294861);
  padding-block: 10rem;
}

.portfolio h2 {
  text-align: center;
  margin: 0;
  margin-bottom: 6rem;

  /* margin-bottom: 6rem; */
}

.animated-text {
  font-weight: 600;
  background: linear-gradient(
    270deg,
    var(--clr-red),
    var(--clr-yellow),
    var(--clr-green),
    var(--clr-blue),
    var(--clr-purple),
    var(--clr-red)
  );
  background-size: 800% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animateGradient 10s linear infinite reverse;
}

@keyframes animateGradient {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.portfolio-container {
  list-style: none;
  padding: 0;
  margin: 0;
  width: min(100% - 2rem, 1440px);
  margin-inline: auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  column-gap: 1rem;
  row-gap: 2rem;
}

.portfolio-container video {
  transform-origin: 50% 0;
  transition: 350ms;
}

.portfolio-container:has(:hover) video:not(:hover) {
  filter: grayscale(100%) brightness(50%);
  transition: all 350ms;
}

.portfolio-container video:hover {
  transform: scale(1.125);
}

.portfolio-container li {
  border-radius: 2rem;
  overflow: hidden;
}

.portfolio-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* aspect-ratio: 4 / 3; */
}

/* ########################## Footer ############################ */

footer {
  padding: 1rem;
  margin-top: 10rem;
}
footer p {
  font-size: 0.875rem;
  margin: 0;
  text-align: center;
  opacity: 0.2;
}
