/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/
:root {
  --bg-white: hsla(0, 0%, 100%, 1);
  --bg-gainsboro: hsla(154, 10%, 86%, 1);
  --bg-wild-blue-yonder: hsla(227, 39%, 75%, 1);
  --bg-orange-crayola: hsla(18, 97%, 62%, 1);
  --bg-roman-silver-alpha-30: hsla(210, 9%, 57%, 0.3);

  /* Colors */
  --bg-beige: hsla(36, 33%, 94%, 1);
  --bg-lavender-blush: hsla(360, 80%, 97%, 1);
  --bg-polished-pine: hsla(180, 25%, 85%, 1);

  --text-orange-crayola: hsla(18, 97%, 62%, 1);
  --text-blue-crayola: hsla(216, 98%, 52%, 1);
  --text-eerie-black: hsla(210, 11%, 15%, 1);
  --text-eerie-black-2: hsla(0, 0%, 7%, 1);
  --text-black: hsla(270, 100%, 0%, 1);

  --border-eerie-black: hsla(0, 0%, 7%, 1);

  --fontFamily-poppins: 'Poppins', sans-serif;
  --fontFamily-clashDisplay: 'ClashDisplay', cursive;

  --fontSize-1: 6.2rem;
  --fontSize-2: 5rem;
  --fontSize-3: 3.8rem;
  --fontSize-4: 3.4rem;
  --fontSize-5: 2.2rem;
  --fontSize-6: 2.5rem;
  --fontSize-7: 2rem;
  --fontSize-8: 1.8rem;
  --fontSize-9: 1.4rem;
  --fontSize-10: 2.4rem;

  --weight-semiBold: 600;

  --shadow-1: 0 4px 6px hsla(256, 100%, 9%, 0.1);
  --shadow-2: 4px 4px 0px hsla(0, 0%, 7%, 1);
  --shadow-3: 2px 2px 0px hsla(0, 0%, 7%, 1);

  --radius-circle: 50%;

  --transition-1: 250ms ease;
  --transition-2: 500ms ease;
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li {
  list-style: none;
}

a,
img,
span,
input,
button,
ion-icon {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  height: auto;
}

input,
button,
textarea {
  background: none;
  border: none;
  font: inherit;
}

input,
textarea {
  width: 100%;
}

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

ion-icon {
  pointer-events: none;
}

html {
  font-family: var(--fontFamily-poppins);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-white);
  color: var(--text-eerie-black-2);
  font-size: 1.6rem;
  line-height: 1.5;
  /* Prevent scroll initially until loaded */
  overflow: hidden;
}

body.loaded {
  overflow-y: auto;
}

/*-----------------------------------*\
  #PRELOADER (NEW)
\*-----------------------------------*/
.preloader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-white);
  z-index: 999999;
  /* Highest possible z-index */
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.remove {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 5px solid var(--bg-gainsboro);
  border-top-color: var(--bg-orange-crayola);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-family: var(--fontFamily-clashDisplay);
  font-size: var(--fontSize-8);
  font-weight: var(--weight-semiBold);
  letter-spacing: 2px;
  color: var(--text-eerie-black);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/*-----------------------------------*\
  #MOBILE WARNING POPUP
\*-----------------------------------*/
.mobile-warning-overlay {
  position: fixed;
  inset: 0;
  background-color: hsla(210, 11%, 15%, 0.9);
  z-index: 9999;
  display: none;
  /* Hidden by default */
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.mobile-warning-overlay.active {
  display: grid;
  animation: fadeIn 0.3s ease;
}

.mobile-warning-content {
  background-color: var(--bg-white);
  border: 3px solid var(--border-eerie-black);
  box-shadow: 8px 8px 0px var(--bg-orange-crayola);
  padding: 30px 25px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.warning-title {
  font-size: var(--fontSize-5);
  margin-bottom: 15px;
  color: var(--text-eerie-black);
}

.warning-text {
  font-size: var(--fontSize-8);
  margin-bottom: 30px;
  color: var(--text-eerie-black-2);
}

.mobile-warning-content .btn {
  margin-inline: auto;
  width: 100%;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}


/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/
.container {
  padding-inline: 16px;
}

.shape {
  display: none;
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.title {
  font-family: var(--fontFamily-clashDisplay);
  font-weight: var(--weight-semiBold);
  line-height: 1.2;
}

.h1 {
  font-size: var(--fontSize-2);
}

.h2 {
  font-size: var(--fontSize-3);
}

.h3 {
  font-size: var(--fontSize-5);
}

.h4 {
  font-size: var(--fontSize-6);
}

.btn {
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  max-width: max-content;
  min-width: max-content;
  padding: 15px 30px;
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-2);
  font-weight: var(--weight-semiBold);
  transition: var(--transition-1);
  gap: 5px;
}

.btn:is(:hover, :focus-visible) {
  box-shadow: none;
}

.btn-primary,
.btn-secondary {
  gap: 5px;
  text-transform: uppercase;
}

:is(.btn-primary, .btn-secondary) ion-icon {
  font-size: 2rem;
  transform: rotate(-45deg);
}

.btn-primary:is(:hover, :focus-visible) {
  color: var(--text-orange-crayola);
}

.btn-secondary {
  background-color: var(--bg-orange-crayola);
}

.btn-small {
  padding: 10px 20px;
  font-size: var(--fontSize-9);
}

.btn-small ion-icon {
  font-size: 1.6rem;
  transform: none;
}

.section {
  padding-block: 75px;
}

.text-center {
  text-align: center;
}

.section-title {
  margin-block-end: 45px;
}

.has-bg-image {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/*-----------------------------------*\
  #ANIMATION & UTILITIES
\*-----------------------------------*/
/* Scroll Reveal */
.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay for Grids */
.stagger-delay:nth-child(1) {
  transition-delay: 100ms;
}

.stagger-delay:nth-child(2) {
  transition-delay: 200ms;
}

.stagger-delay:nth-child(3) {
  transition-delay: 300ms;
}

.stagger-delay:nth-child(4) {
  transition-delay: 400ms;
}

.stagger-delay:nth-child(5) {
  transition-delay: 500ms;
}

.stagger-delay:nth-child(6) {
  transition-delay: 600ms;
}

/* Blinking Cursor */
.cursor {
  display: inline-block;
  color: var(--text-orange-crayola);
  animation: blink 1s step-end infinite;
  font-weight: bold;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/
.navbar .btn {
  display: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding-block: 25px;
  z-index: 4;
}

.header.active {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-family: var(--fontFamily-clashDisplay);
  font-size: 2.6rem;
  font-weight: var(--weight-semiBold);
  color: var(--text-eerie-black);
}

.nav-open-btn {
  font-size: 3.5rem;
}

.navbar {
  position: absolute;
  top: 85px;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: var(--transition-2);
}

.navbar.active {
  max-height: 310px;
  visibility: visible;
}

.navbar-list {
  padding-block-start: 15px;
}

.navbar-link,
.cv-btn .span {
  font-weight: var(--weight-semiBold);
  text-transform: uppercase;
}

.navbar-link {
  padding: 10px 20px;
}

.cv-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 25px 20px;
  cursor: pointer;
}

/* Active Link Highlight */
.navbar-link.active-link {
  color: var(--text-orange-crayola);
  position: relative;
}

/*-----------------------------------*\
  #HERO
\*-----------------------------------*/
.hero {
  background-color: var(--bg-wild-blue-yonder);
  padding-block: 130px 75px;
}

.hero .container {
  display: grid;
  gap: 50px;
}

.hero-subtitle {
  font-size: var(--fontSize-5);
}

.hero-title {
  color: #FFFFF0;
  text-shadow: var(--shadow-2);
  margin-block-start: 12px;
  margin-block-end: 12px;
}

.hero-text {
  font-size: var(--fontSize-8);
  font-weight: 300;
  line-height: 1.6;
  margin-block-end: 16px;
}

.hero-banner {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

.code-block {
  background-color: #1e1e1e;
  border: 2px solid var(--border-eerie-black);
  border-radius: 8px;
  box-shadow: 4px 4px 0px hsla(220, 10%, 10%, 1);
  padding: 20px 15px;
  overflow-x: auto;
  position: relative;
  width: 100%;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 12px;
  width: 10px;
  height: 10px;
  background-color: #ff5f56;
  border-radius: 50%;
  box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #27c93f;
}

.code-block pre {
  margin: 0;
  margin-top: 30px;
  width: 100%;
}

.code-block code {
  color: #a9b7c6;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 1.2rem;
  line-height: 1.6;
  white-space: pre;
  word-spacing: normal;
  letter-spacing: normal;
}

.code-block code span {
  display: inline;
  white-space: inherit;
}

.code-block .kw {
  color: #c792ea;
}

.code-block .cls {
  color: #82aaff;
}

.code-block .fn {
  color: #ffd580;
}

.code-block .var {
  color: #9cdcfe;
}

.code-block .str {
  color: #c3e88d;
}

/*-----------------------------------*\
  #ABOUT SECTION
\*-----------------------------------*/
.about {
  background-color: var(--bg-beige);
}

.about-content {
  display: block;
  width: 100%;
  margin-inline: auto;
}

.about-text-block {
  background-color: var(--bg-white);
  padding: 40px 30px;
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  width: 100%;
}

.about-text-block:hover {
  box-shadow: none;
  transform: translateY(-2px);
}

.about-subtitle {
  margin-block-end: 20px;
  color: var(--text-orange-crayola);
}

.about-text {
  font-size: var(--fontSize-8);
  line-height: 1.8;
}

/*-----------------------------------*\
  #TECHNICAL SKILLS SECTION
\*-----------------------------------*/
.skills {
  padding-block: 100px;
  background-color: var(--bg-polished-pine);
}

.skills-grid {
  display: grid;
  gap: 25px;
}

.skill-card {
  background-color: var(--bg-white);
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-2);
  padding: 25px 20px;
  position: relative;
  transition: var(--transition-1);
  height: 100%;
}

.skill-card:hover {
  box-shadow: none;
  transform: translateY(-3px);
}

.skill-title {
  font-size: 2.2rem;
  margin-block-end: 15px;
  color: var(--text-eerie-black);
  padding-right: 30px;
}

.skill-description {
  font-size: 1.6rem;
  line-height: 1.6;
  margin-block-end: 20px;
  color: var(--text-eerie-black-2);
}

.skill-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background-color: var(--bg-gainsboro);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: var(--weight-semiBold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/*-----------------------------------*\
  #PROJECTS SECTION
\*-----------------------------------*/
.projects {
  padding-block: 100px;
}

.projects-grid {
  display: grid;
  gap: 40px;
}

.project-card {
  background-color: var(--bg-white);
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-2);
  padding: 40px 30px;
  position: relative;
  transition: var(--transition-1);
}

.project-card:hover {
  box-shadow: none;
  transform: translateY(-3px);
}

.project-number {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: var(--fontSize-1);
  font-family: var(--fontFamily-clashDisplay);
  font-weight: var(--weight-semiBold);
  color: var(--bg-gainsboro);
  line-height: 1;
}

.project-title {
  margin-block-end: 20px;
  color: var(--text-eerie-black);
}

.project-description {
  font-size: var(--fontSize-8);
  line-height: 1.8;
  margin-block-end: 25px;
  color: var(--text-eerie-black-2);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-end: 25px;
}

/*-----------------------------------*\
  #CONTACT SECTION
\*-----------------------------------*/
.contact {
  padding-block: 100px;
  background-color: var(--bg-lavender-blush);
}

.contact-content {
  background-color: var(--bg-white);
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-2);
  padding: 60px 40px;
  width: 100%;
  margin-inline: auto;
}

.contact-title {
  font-size: var(--fontSize-1);
  margin-block-end: 20px;
}

.contact-text {
  font-size: var(--fontSize-8);
  line-height: 1.8;
  margin-block-end: 40px;
}

.contact-text-wrapper {
  margin-bottom: 30px;
}

.contact-form {
  display: grid;
  gap: 25px;
}

.form-group {
  display: grid;
  gap: 10px;
}

.form-label {
  font-weight: var(--weight-semiBold);
  font-size: var(--fontSize-8);
  color: var(--text-eerie-black);
}

.form-input,
.form-textarea {
  background-color: var(--bg-white);
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-3);
  padding: 15px 20px;
  font-size: var(--fontSize-8);
  outline: none;
  transition: var(--transition-1);
}

.form-input:focus,
.form-textarea:focus {
  box-shadow: none;
  border-color: var(--text-orange-crayola);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form .btn {
  justify-self: start;
  margin-block-start: 10px;
}

.form-message {
  margin-block-start: 20px;
  padding: 15px;
  border-radius: 4px;
  font-weight: var(--weight-semiBold);
  text-align: center;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/
.footer {
  position: relative;
  background-color: var(--bg-gainsboro);
  padding-block-start: 60px;
}

.footer-top {
  display: grid;
  gap: 30px;
  font-size: var(--fontSize-8);
  line-height: 1.7;
  margin-block-end: 30px;
}

.footer .logo {
  margin-block-end: 35px;
}

.social-list {
  display: flex;
  gap: 10px;
  margin-block-start: 30px;
}

.social-link {
  background-color: var(--bg-white);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-circle);
  border: 2px solid var(--border-eerie-black);
  box-shadow: var(--shadow-3);
  transition: var(--transition-1);
}

.social-link:is(:hover, :focus-visible) {
  box-shadow: none;
  color: var(--text-orange-crayola);
  transform: translateY(-2px);
  border-color: currentColor;
}

.footer-list-title {
  font-size: var(--fontSize-10);
  margin-block-end: 30px;
}

address.footer-text {
  margin-block-end: 15px;
}

.footer .btn {
  font-size: 1.6rem;
  padding-inline: 40px;
}

.copyright {
  padding-block: 30px;
  font-size: var(--fontSize-8);
  font-family: var(--fontFamily-clashDisplay);
  text-align: center;
}

.footer .shape-1 {
  display: block;
  top: 0;
  right: 0;
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/
@media (min-width: 575px) {
  .container {
    max-width: 540px;
    width: 100%;
    margin-inline: auto;
  }

  .contact-content {
    padding-inline: 50px;
  }
}

@media (min-width: 768px) {
  :root {
    --fontSize-5: 2.6rem;
    --fontSize-4: 4.2rem;
    --fontSize-2: 7.8rem;
    --fontSize-3: 6.6rem;
  }

  .container {
    max-width: 720px;
  }

  .btn {
    padding: 20px 50px;
  }

  .section {
    padding-block: 150px;
  }

  .hero {
    padding-block: 200px 130px;
  }

  .hero-text {
    --fontSize-8: 2.2rem;
    line-height: 1.8;
  }

  .hero .btn {
    margin-block-start: 50px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    padding-inline: 90px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }

  .header {
    padding-block: 0;
  }

  .header .container {
    border-block-end: 2px solid var(--border-eerie-black);
  }

  .nav-open-btn {
    display: none;
  }

  .navbar,
  .navbar.active {
    all: unset;
    display: flex;
    align-items: center;
  }

  .navbar-list {
    padding-block-start: 0;
    display: flex;
  }

  .cv-btn {
    border-inline-start: 2px solid var(--border-eerie-black);
    padding-inline-start: 50px;
    margin-inline-start: 20px;
  }

  .header.active .container,
  .header.active .cv-btn {
    border: none;
  }

  .hero .container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer .shape-2 {
    display: block;
    bottom: 100px;
    left: 0;
  }

  .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
  }

  .contact-text-wrapper {
    margin-bottom: 0;
    text-align: left;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .shape {
    display: block;
  }

  .cv-btn {
    padding-block: 35px;
  }

  .navbar .btn {
    display: block;
    padding: 10px 25px;
    text-transform: uppercase;
    margin-inline-start: 20px;
  }

  .hero {
    position: relative;
  }

  .hero-banner {
    position: relative;
    z-index: 1;
  }

  .hero .shape-1 {
    top: -140px;
    left: -120px;
    z-index: -1;
  }

  .hero .shape-2 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .contact {
    padding-block: 200px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    margin-block-end: 40px;
  }

  .footer-bottom .wrapper {
    display: flex;
    justify-content: space-between;
  }

  .footer .shape-2 {
    bottom: 50px;
  }

  .footer .shape-3 {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
  }

  .copyright {
    text-align: left;
    padding-block-end: 50px;
  }
}

@media (min-width: 1400px) {
  :root {
    --fontSize-5: 3.1rem;
    --fontSize-2: 9rem;
  }

  .container {
    max-width: 1320px;
  }
}

@media (max-width: 575px) {
  .code-block {
    padding: 18px 20px;
    border-radius: 6px;
  }

  .code-block::before {
    width: 8px;
    height: 8px;
    top: 8px;
    left: 10px;
    box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
  }

  .code-block pre {
    margin-top: 25px;
  }

  .code-block code {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .contact-content {
    padding: 40px 20px;
  }

  .contact-title {
    font-size: var(--fontSize-4);
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .code-block {
    padding: 25px 20px;
  }

  .code-block code {
    font-size: 1.3rem;
    line-height: 1.7;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .code-block {
    padding: 35px 28px;
  }

  .code-block code {
    font-size: 1.5rem;
    line-height: 1.75;
  }

  .hero .container {
    gap: 40px;
  }
}

@media (min-width: 992px) {
  .code-block {
    padding: 45px 40px;
  }

  .code-block code {
    font-size: 1.7rem;
    line-height: 1.8;
  }
}

@media (min-width: 1200px) {
  .code-block {
    padding: 50px 45px;
  }

  .code-block code {
    font-size: 1.8rem;
  }
}

@media (max-width: 767px) {
  .hero {
    padding-block: 120px 60px;
  }

  .hero .container {
    padding-inline: 12px;
  }

  .hero-banner {
    margin-inline: -12px;
    padding-inline: 12px;
  }
}