/* =============== GLOBAL =============== */

:root {
  /*========== Colors ==========*/
  --bg-body: hsl(0, 0%, 8%);
  --bg-body2: hsl(0, 0%, 14%);
  --accent: hsl(153, 71%, 59%);
  --text1: hsl(0, 0%, 100%);
  --text2: hsl(0, 0%, 85%);
  --invalid: hsl(7, 100%, 68%);
}

/* =============== BASE =============== */
html,
body {
  overflow-x: hidden;
}

html {
  box-sizing: border-box;
  font-size: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text1);
  font-size: 1.125rem;
  line-height: 1.56;
  font-family: 'Syne', sans-serif;
}

.bg-less-dark {
  background-color: var(--bg-body2);
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  line-height: 1;
}

p {
  font-size: clamp(1rem, 0.79rem + 0.89vw, 1.125rem);
  line-height: 1.5;
  color: var(--text2);
}

a {
  transition: color 250ms ease-in-out;
  text-decoration: none;
}

ul {
  list-style: none;
}

li { list-style: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

input:user-invalid,
textarea:user-invalid {
  outline-color: var(--invalid);
}

/* =============== LINKS AND BUTTONS =============== */
a.underline,
button {
  display: inline-block;
  padding-bottom: 0.625rem;
  font-size: 1rem;
  line-height: 1.625;
  letter-spacing: 0.143em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text1);
  text-decoration: none;
  background-image: linear-gradient(
    to right,
    var(--accent) 75%,
    var(--accent) 75%
  );
  background-position: 0 2.1em;
  background-repeat: repeat-x;
  background-size: 8px 2px;
}

a:hover {
  color: var(--accent);
}

/* =============== IMAGES AND VISUAL =============== */
img,
svg {
  display: block;
}

/* =============== LAYOUT =============== */
.wrapper {
  width: calc(100% - 3.75rem);
  max-width: 69.375rem;
  margin-inline: auto;
}

.header-xl {
  font-size: clamp(2.5rem, 0.7rem + 7.68vw, 5rem);
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-shadow: 2px 2px 0 #000;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bottom-border {
  border-bottom: 1px solid var(--text2);
}

/* =========== BREAKPOINTS =========== */
@media (max-width: 600px) {
  .wrapper {
    width: calc(100% - 2rem);
  }
}

/*=============== SCROLL BAR ===============*/
/* WebKit (Chrome, Safari) */
::-webkit-scrollbar {
  width: 12px;
  background-color: hsl(23, 4%, 15%);
}

::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background-color: hsl(23, 4%, 30%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(23, 4%, 40%);
}

/* Firefox styles */
html {
  scrollbar-color: hsl(23, 4%, 30%) hsl(23, 4%, 15%);
  scrollbar-width: thin;
}

html:hover {
  scrollbar-color: hsl(23, 4%, 40%) hsl(23, 4%, 15%);
}

/*=============== CUSTOM CURSOR ===============*/
.cursor-dot,
.cursor-outline {
  display: block;
  position: fixed;
  top: -60px;
  left: -60px;
  transform: translate(-50%, -50%);
  border-radius: 100%;
  z-index: 200;
  transition-property: opacity, transform;
  transition-duration: 300ms;
  transition-timing-function: ease-in-out;
  pointer-events: none;
}

.cursor-dot {
  width: 100px;
  height: 100px;
  background-color: #fff;
  color: #000;
  transform: translate(-50%, -50%) scale(0.1);
  z-index: 10;
}

.cursor-dot.hovered {
  transform: translate(-50%, -50%) scale(1);
  mix-blend-mode: exclusion;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  opacity: 0.5;
  transition-duration: 100ms;
}

.cursor-outline.hovered {
  opacity: 0;
}

/* =============== PRELOADER =============== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  box-shadow: inset 55vw 0 0 0 var(--text1), inset -55vw 0 0 0 var(--text1);
  display: grid;
  place-items: center;
  z-index: 100;
}

.preloader.loaded {
  transition: 300ms ease 500ms;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--text1), inset 0 0 0 0 var(--text1);
}

/* Preloader Line Styles */
.preloader .line {
  width: 1px;
  height: 100%;
  background-color: var(--bg-body);
  transition: 0.5s ease;
  animation: loading 1000ms linear forwards;
}

@keyframes loading {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(0.3);
  }
}

/* Loaded State Animation */
.preloader.loaded .line {
  animation: loaded 500ms ease forwards;
}

@keyframes loaded {
  0% {
    transform: scaleY(0.3);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* =============== HEADER =============== */
.header {
  position: relative;
  top: 0;
  z-index: 8;
  margin-block-start: 30px;
  margin-block-end: 90px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: clamp(1.5rem, 1.02rem + 2.04vw, 2rem);
  line-height: 1;
  color: var(--text1);
  text-decoration: none;
  cursor: pointer;
}

.header-social {
  font-size: 1.5rem;
  color: var(--text1);
  text-decoration: none;
  cursor: pointer;
  margin-right: 25px;
}

.header-social:hover {
  color: var(--accent);
}

/*======= BREAKPOINTS =======*/
@media (max-width: 1000px) {
  .header {
    margin-block-start: 10px;
  }
  .header-social {
    margin-right: 10px;
  }
}
@media (max-width: 450px) {
  .header-mail {
    display: none;
  }
  .header-social {
    margin-right: 6px;
  }
  .header {
    margin-block-end: 55px;
  }
}

/* Extra-small phones: also drop the Instagram icon to keep the nav uncluttered. */
@media (max-width: 350px) {
  .header-insta {
    display: none;
  }
}

/* =============== HERO =============== */
/* Desktop-first: base = large-screen layout; smaller screens override below. */
.hero {
  position: relative;
  margin-block-start: 0;
}

.hero-wrapper {
  position: relative;
  padding-bottom: 100px;
}

.hero-content {
  display: flex;
  align-items: center;
}

.hero-content picture {
  order: 2;
  z-index: 1;
  margin-left: -80px;
}

.hero-image {
  position: relative;
  top: 0;
  right: 0;
  left: auto;
  translate: 0;
  width: 42vw;
  max-width: 445px;
  height: auto;
  margin-block-start: -199px;
}

.hero-rings {
  position: absolute;
  left: 0;
  right: auto;
  top: 0px;
  z-index: 1;
  height: auto;
  translate: -50% -50%;
}

.hero-circle {
  position: absolute;
  top: 322px;
  right: 352px;
  bottom: 190px;
  margin-bottom: -129px;
  translate: 50%;
  z-index: 2;
}

.hero-text {
  position: relative;
  text-align: left;
  margin-block-start: 0;
  margin-right: 0;
  flex: 1;
  z-index: 1;
}

.hero-headline {
  margin-block-end: 43px;
}

.hero-headline > br {
  display: inline-block;
}

/* h1 > span {
  background-image: linear-gradient(
    to right,
    var(--accent) 75%,
    var(--accent) 75%
  );
  background-position: 0 1.18em;
  background-repeat: repeat-x;
  background-size: 8px 4px;
} */

.hero-description {
  width: 56ch;
  margin-block-end: 66px;
}

.hero-banner {
  max-width: 400px;
  aspect-ratio: 1 / 1;
  border-radius: 52% 48% 59% 41% / 53% 40% 60% 47%;
  overflow: hidden;
  animation: blobAnim 30s linear infinite;
}

@keyframes blobAnim {
  0%,
  100% { border-radius: 52% 48% 59% 41% / 53% 40% 60% 47%; }
  10% { border-radius: 33% 67% 50% 50% / 43% 39% 61% 57%; }
  20% { border-radius: 51% 49% 31% 69% / 65% 39% 61% 35%; }
  30% { border-radius: 51% 49% 56% 44% / 45% 39% 61% 55%; }
  40% { border-radius: 66% 34% 33% 67% / 48% 71% 39% 52%; }
  50% { border-radius: 46% 54% 33% 67% / 48% 30% 70% 52%; }
  60% { border-radius: 46% 54% 56% 44% / 48% 30% 70% 52%; }
  70% { border-radius: 46% 54% 56% 44% / 65% 53% 47% 35%; }
  80% { border-radius: 67% 33% 56% 44% / 37% 53% 47% 63%; }
  90% { border-radius: 46% 54% 32% 68% / 37% 53% 47% 63%; }
}

/*======= BREAKPOINTS =======*/
@media (max-width: 1000px) {
  .hero {
    margin-block-start: -62px;
  }

  .hero-wrapper {
    position: static;
    padding-bottom: 60px;
  }

  .hero-content picture {
    margin-left: 0;
  }

  .hero-image {
    margin-block-start: 0;
  }

  .hero-rings {
    top: 90px;
    translate: -50%;
  }

  .hero-circle {
    top: auto;
    right: 0;
  }

  .hero-text {
    margin-block-start: 90px;
    margin-right: -30px;
    flex: 1 0 58vw;
  }

  .hero-headline {
    margin-block-end: 60px;
  }

  .hero-description {
    width: auto;
    margin-block-end: 34px;
  }
}

@media (max-width: 600px) {
  .hero {
    position: static;
    margin-block-start: 0;
  }

  .hero-wrapper {
    padding-bottom: 80px;
  }

  .hero-content {
    display: block;
  }

  .hero-content picture {
    order: 0;
    z-index: auto;
  }

  .hero-image {
    position: absolute;
    left: 50%;
    right: auto;
    translate: -50%;
    width: 226px;
    max-width: none;
  }

  .hero-rings {
    right: 50%;
    left: auto;
    top: 130px;
    translate: none;
  }

  .hero-circle {
    position: relative;
    top: 171px;
    right: auto;
    bottom: auto;
    translate: calc(100vw - 64px - 16px);
    z-index: auto;
  }

  .hero-text {
    text-align: center;
    margin-block-start: 35px;
    margin-right: 0;
    flex: 0 1 auto;
    z-index: auto;
  }

  .hero-headline {
    margin-block-end: 24px;
  }

  .hero-headline > br {
    display: none;
  }

  .hero-description {
    margin-block-end: 24px;
  }
}

/* =============== SKILLS =============== */
.skills {
  position: relative;
  margin-bottom: 70px;
}

.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 58px 30px;
  border: none;
  padding-block: 72px 0;
}

.skills-item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(2rem, 0.33rem + 7.11vw, 3rem);
  line-height: 1.17;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.skills-item i{
  position: relative;
  z-index: 11;
}

.skills-title {
  font-size: clamp(2rem, 0.33rem + 7.11vw, 3rem);
  line-height: 1.17;
  margin-block-end: 2px;
}

.skills-item:hover .devicon-ruby-plain { color: #CC342D; }
.skills-item:hover .devicon-react-original { color: #61DAFB; }
.skills-item:hover .devicon-mongodb-plain { color: #47A248; }
.skills-item:hover .devicon-redis-plain { color: #DC382D; }
.skills-item:hover .devicon-nodejs-plain { color: #68A063; }
.skills-item:hover .devicon-express-original { color: #000000; }
.skills-item:hover .devicon-postgresql-plain { color: #336791; }
.skills-item:hover .devicon-tailwindcss-original { color: #38BDF8; }
.skills-item:hover .devicon-bootstrap-plain { color: #7952B3; }
.skills-item:hover .devicon-html5-plain { color: #E34F26; }
.skills-item:hover .devicon-javascript-plain { color: #F7DF1E; }

.skills-description {
  margin-block-end: 0;
}

.skills-rings {
  position: absolute;
  bottom: 0;
  left: 100%;
  transform: translate(-40%, 50%);
}

/* ======= BREAKPOINTS ======= */
@media (max-width: 1000px) {
  /* Responsive styles for medium screens */
  .skills-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 52px 24px;
    padding-block: 52px 0;
  }

  .skills-rings {
    left: 50%;
    transform: translate(40%, 50%);
  }
}

@media (max-width: 600px) {
  /* Responsive styles for small screens */
  .skills-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 40px;
  }

  .skills-rings {
    transform: translate(0, 50%);
  }
}

/* =============== PROJECTS =============== */
figure {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

.projects-wrapper {
  padding-block: 140px;
}

.img-holder {
    aspect-ratio: var(--width) / var(--height);
    background-color: hsla(0, 0%, 100%, 0.05);
    overflow: hidden;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-lg {
    font-size: 2.8rem;
}

.projects-list {
  display: grid;
  gap: 60px;
}

.projects-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.projects-card .projects-content {
  display: flex;
  gap: 32px;
  padding: 32px;
}

.projects-card .time { font-size: 12px; }

.projects-card .time .span {
  font-weight: 700;
  line-height: 0.9;
}

.projects-card .projects-text { margin-block: 20px; }

.projects-card .projects-title { font-size: 1.5rem; }

.projects-list li:nth-child(2n) .projects-banner { order: 1; }

/* ======= BREAKPOINTS ======= */
@media (max-width: 992px) {
  .projects-card {
    grid-template-columns: none;
    gap: 40px;
  }

  .projects-card .projects-content { padding: 0 32px; }
  .projects-list li:nth-child(2n) .projects-banner { order: 0; }
}

@media (max-width: 768px) {
  .projects-card .projects-title { font-size: revert; }
}

@media (max-width: 575px) {
  .projects-card .projects-content {
    padding: 0 16px;
    gap: 16px;
  }
}

/* =============== CONTACT =============== */
.contact {
  position: relative;
}

.contact-wrapper {
  padding-block: 84px;
  display: grid;
  grid-template-columns: repeat(2, 27.8rem);
  justify-content: space-between;
}

.contact-headline {
  margin-block-end: 2.25rem;
}

.contact-control {
  position: relative;
  margin-block-end: 16px;
}

.contact-control input,
.contact-control textarea {
  width: 100%;
  padding-block: 16px;
  padding-inline: 24px;
  border: none;
  border-bottom: 1px solid var(--text1);
  background: transparent;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--text1);
}

.contact-control > *::placeholder {
  color: var(--text1);
  opacity: 0.5;
  text-transform: uppercase;
}

.contact-control textarea {
  margin-block-end: 32px;
}

.contact-control.align-right {
  display: flex;
  justify-content: flex-end;
}

.contact-control button {
  background-color: transparent;
  border: none;
}

.contact-invalid-icon {
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  position: absolute;
  top: 50%;
  right: 0;
  translate: -50% -50%;
}

.contact input:focus-visible:user-invalid ~ .contact-invalid-icon,
.contact textarea:focus-visible:user-invalid ~ .contact-invalid-icon {
  display: inline-block;
}

.contact textarea:focus-visible:user-invalid ~ .contact-invalid-icon {
  top: 1.2rem;
  right: 1.5rem;
  translate: none;
}

.contact-rings {
  position: absolute;
  left: 0;
  bottom: 47px;
  translate: -40%;
}

/* ======= BREAKPOINTS ======= */
@media (max-width: 1000px) {
  .contact-wrapper {
    display: block;
    max-width: 27.8rem;
  }

  .contact-headline {
    margin-block-end: 1.25rem;
  }

  .contact-rings {
    translate: -75%;
  }

  .contact-text {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .contact-rings {
    bottom: 97px;
  }
}

/* =============== FOOTER =============== */
footer {
  padding-block: 47px 105px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 32px;
  padding-right: 30px;
}

.footer-home {
  font-size: clamp(1.5rem, 1.02rem + 2.04vw, 2rem);
  line-height: 1;
  color: var(--text1);
  text-decoration: none;
  flex: 0 1 auto;
  margin-inline-end: auto;
  cursor: pointer;
}

.footer-social i {
  color: var(--text1);
  font-size: 25px;
}

.footer-social i:hover {
  color: var(--accent);
}

/*======= BREAKPOINTS =======*/
@media (max-width: 1000px) {
  .footer-nav {
    padding-right: 0;
  }

  footer {
    padding-block: 30px 40px;
  }
}

@media (max-width: 600px) {
  .footer-nav {
    justify-content: center;
    align-items: normal;
    text-align: center;
    gap: 20px 25px;
  }

  .footer-home {
    flex: 1 0 100%;
    margin-inline-end: 0;
  }

  footer {
    padding-block: 40px 60px;
  }
}

/* =============== SCROLL UP =============== */
.scrollup {
  position: fixed;
  right: 3rem;
  bottom: -50%;
  display: inline-flex;
  z-index: 50;
  cursor: pointer;
  border: none;
  outline: none;
  background: hsl(23, 4%, 30%);
  color: var(--text1);
  padding: 7px;
  font-size: 25px;
  border-radius: 6px;
  transition: bottom 0.4s, transform 0.4s;
}

.scrollup:hover {
  transform: translateY(-0.5rem);
  background-color: hsl(23, 4%, 40%);
}

.show-scroll {
  bottom: 3rem;
}

/* ======= BREAKPOINTS ======= */
@media screen and (max-width: 1150px) {
  .scrollup {
    right: 1rem;
  }
}

/* =============== ANNOUNCEMENT BAR =============== */
.announce {
  max-height: 0;
  overflow: hidden;
  background-color: var(--accent);
  color: var(--bg-body);
  transition: max-height 350ms ease;
}

.announce.is-open {
  max-height: 4rem;
}

.announce-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  font-weight: 600;
  font-size: clamp(0.8rem, 0.68rem + 0.55vw, 1rem);
}

.announce-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bg-body);
}

.announce-link:hover {
  color: var(--bg-body);
}

.announce-close {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 0.25rem;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 480px) {
  .announce-arrow {
    display: none;
  }
  .announce-inner {
    gap: 0.4rem;
    padding-inline: 1rem 2rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}
@media (max-width: 400px) {
  .announce-inner {
    font-size: 0.70rem;
  }
}
@media (max-width: 380px){
  .announce-inner{
    gap: 0; 
  }
  .announce-link i{
    display: none;
  }
  .announce-close{
    right: 0;
    padding: 0;
  }
}