/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;600;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  /* 
      For more colors visit: https://htmlcolorcodes.com/
      -> Choose any color 
      -> Copy the color mode (HSL)
  */
  --yellow-color: 52;
  --green-color: 116;
  --pink-color: 300;
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat Alternates", serif;
  --biggest-font-size: 2rem;
  --big-font-size: 1.5rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 3rem;
    --big-font-size: 2.5rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  
    background: url('/image/ren.jpg') no-repeat center center fixed;
    backdrop-filter: blur(px);
    background-size: cover;
    background-attachment: scroll;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
    Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 
    sans-serif;
    color: #e7e7e7;
    line-height: 1.5;
    position: relative;
  overflow-x: hidden; 
  min-height: 100vh;
}


a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.card-yellow {
  --hue: var(--yellow-color);
}

.card-green {
  --hue: var(--green-color) ;
}

.card-pink {
  --hue: var(--pink-color);
}

/*=============== CARD ===============*/
.card {
  position: relative;
  padding-block: 5rem;
}

.card__bg, 
.card__blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.card__bg {
  object-fit: cover;
  object-position: center;
}

.card__blur {
  backdrop-filter: blur(6px);
}

.card__container {
  position: relative;
  display: grid;
  grid-template-columns: 260px;
  justify-content: center;
  gap: 2rem;
}

.card__article {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
}

.card__img {
  border-radius: 2rem;
  transition: transform .4s;
}

.card__shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
            hsla(0, 100%, 50%, 0) 70%, 
            hsl(0, 0%, 0%) 100%);
}

.card__data {
  color: var(--white-color);
  position: absolute;
  left: 1.5rem;
  bottom: 2rem;
}

.card__name {
  font-size: var(--big-font-size);
  margin-bottom: .25rem;
}

.card__profession {
  display: block;
  font-size: var(--small-font-size);
}

.card__clip {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: hsl(var(--hue), 90%, 50%);
  box-shadow: 0 0 16px 4px hsl(var(--hue), 90%, 50%);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--black-color);
  z-index: 5;
  cursor: pointer;
  transition: transform .4s;
}

.card__article:hover .card__img {
  transform: scale(1.1);
}

/*=============== CARD INFO ===============*/
.info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 0%, .1);
  backdrop-filter: blur(12px);
  padding: 3rem 1.5rem 1.5rem;
  color: var(--white-color);
  clip-path: circle(8px at 88% 9%);
  transition: clip-path .5s ease-in-out;
}

.info__name {
  font-size: var(--biggest-font-size);
  margin-bottom: .5rem;
}

.info__description {
  font-size: var(--small-font-size);
  margin-bottom: 1rem;
}

.info__button {
  display: inline-flex;
  background-color: hsl(var(--hue), 90%, 50%);
  box-shadow: 0 0 12px hsl(var(--hue), 90%, 50%);
  padding: .5rem .75rem;
  border-radius: .5rem;
  color: var(--black-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  transition: box-shadow .4s;
}

.info__button:hover {
  box-shadow: 0 0 20px hsl(var(--hue), 90%, 50%);
}

.info__social {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  column-gap: .5rem;
}

.info__link {
  background-color: hsl(var(--hue), 90%, 50%);
  box-shadow: 0 0 12px hsl(var(--hue), 90%, 50%);
  width: 2rem;
  height: 2rem;
  border-radius: .75rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--black-color);
  transition: transform .4s;
}

.info__link:hover {
  transform: translateY(-.25rem);
}

/* Rotate icon */
.card__article:hover .card__clip {
  transform: rotate(-45deg);
}

/* Clip path animation */
.info:hover,
.card__clip:hover ~ .info {
  clip-path: circle(100%);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }

  .card__container {
    grid-template-columns: 1fr;
  }

  .info {
    padding: 1.5rem 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 768px) {
  .card__container {
    grid-template-columns: repeat(2, 260px);
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .card {
    height: 100vh;
    display: grid;
    place-content: center;
  }
  .card__container {
    grid-template-columns: repeat(3, 340px);
  }
  .card__article, 
  .card__img {
    border-radius: 3rem;
  }
  .card__data {
    left: 2rem;
    bottom: 3rem;
  }
  .card__profession {
    font-size: var(--normal-font-size);
  }
  .card__clip {
    top: 1.5rem;
    right: 1.5rem;
  }

  .info {
    padding: 4rem 2rem 2.5rem;
  }
  .info__description, 
  .info__button {
    font-size: var(--normal-font-size);
  }
  .info__description {
    margin-bottom: 1.5rem;
  }
  .info__social {
    left: 2rem;
    bottom: 2.5rem;
    column-gap: .75rem;
  }
}
/*=============== FLAME BORDER EFFECT ===============*/
.card__article::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 2.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(181, 22, 22, 0.9) 0%, rgba(196, 44, 14, 0.1) 25%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(221, 102, 11, 0.9) 0%, rgba(255,60,0,0.1) 20%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(201, 97, 7, 0.6) 0%, transparent 40%);
  filter: blur(15px);
  opacity: 0.9;
  animation: flameGlow 2s infinite ease-in-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes flameGlow {
  0%   { opacity: 0.9; filter: blur(14px); transform: scale(1); }
  25%  { opacity: 1; filter: blur(16px); transform: scale(1.02); }
  50%  { opacity: 0.85; filter: blur(13px); transform: scale(0.98); }
  75%  { opacity: 1; filter: blur(17px); transform: scale(1.03); }
  100% { opacity: 0.9; filter: blur(15px); transform: scale(1); }
}
/*=============== FLAME BORDER ON TOP ===============*/
/* .card__article::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 2.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,180,60,0.9) 0%, rgba(255,90,0,0.2) 25%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(255,100,10,0.85) 0%, rgba(255,40,0,0.15) 25%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,60,0,0.6) 0%, transparent 45%);
  filter: blur(20px);
  opacity: 0.9;
  animation: flameOnTop 2s infinite ease-in-out;
  pointer-events: none;
  z-index: 5; /* ↑ bring flame above the card 
} */

/* @keyframes flameOnTop {
  0%   { opacity: 0.9; filter: blur(18px); transform: scale(1); }
  25%  { opacity: 1; filter: blur(22px); transform: scale(1.03); }
  50%  { opacity: 0.85; filter: blur(16px); transform: scale(0.97); }
  75%  { opacity: 1; filter: blur(24px); transform: scale(1.04); }
  100% { opacity: 0.9; filter: blur(18px); transform: scale(1); }
} */
/*=============== RISING FIRE BORDER ===============*/
.card__article {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
}

/* flame glow base layer */
.card__article::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255,120,0,0.7), transparent 70%);
  box-shadow: 0 0 20px rgba(255,120,0,0.7),
              0 0 40px rgba(255,80,0,0.5);
  z-index: 1;
  pointer-events: none;
}

/* moving upward flame layer
.card__article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  background: radial-gradient(circle at 50% 120%, rgba(222, 147, 7, 0.895) 0%, transparent 70%) repeat;
  background-size: 200% 300%;
  animation: risingFlame 1.8s linear infinite, flicker 0.2s infinite;
  mix-blend-mode: screen;
  filter: blur(8px);
  z-index: 5;
  pointer-events: none;
} */

/* upward flame motion */
/* @keyframes risingFlame {
  0% {
    background-position: 50% 120%;
    opacity: 0.8;
  }
  50% {
    background-position: 50% 0%;
    opacity: 1;
  }
  100% {
    background-position: 50% -120%;
    opacity: 0.8;
  }
} */

/* random flicker to mimic fire */
@keyframes flicker {
  0%   { transform: scale(1) rotate(0deg); opacity: 1; }
  25%  { transform: scale(1.02) rotate(0.5deg); opacity: 0.9; }
  50%  { transform: scale(0.98) rotate(-0.3deg); opacity: 1; }
  75%  { transform: scale(1.03) rotate(0.4deg); opacity: 0.95; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
/*=============== MOVING FLAME BORDER ===============*/
.card__article {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
}

/* moving flame animation around card edges */
.card__article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  padding: 6px; /* border thickness */
  background: conic-gradient(
    from 0deg,
    #ff4000,
    #ff7300,
    #ffae00,
    #ffd000,
    #ffae00,
    #ff7300,
    #ff4000
  );
  background-size: 200% 200%;
  animation: movingFlame 2s linear infinite;
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  filter: blur(2px) brightness(1.4);
  z-index: 10;
  pointer-events: none;
}
/* 
/* flickering, rotating flame motion */
@keyframes movingFlame {
  0% {
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
  25% {
    background-position: 50% 100%;
    transform: rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
    transform: rotate(0deg);
  }
  75% {
    background-position: 50% 0%;
    transform: rotate(0deg);
  }
  100% {
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
}
