*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Kosugi Maru', sans-serif; /* anime font */
  text-decoration: none;
  list-style: none;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* adjusted for scrolled header */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #10101a;
}
::-webkit-scrollbar-thumb {
  background: rgba(147, 112, 219, 0.45);
  border-radius: 4px;
  transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 112, 219, 0.7);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0px);
  }
}

:root {
  --bg--color: #10101a;
  --main-color: #9370DB;
  --2nd-main-color: #ffffffcc;
  --text-color: #fff;
  --big-font: 5rem;
  --h2-font: 1.9rem;
  --p-font: 1rem;
}

body {
  background-color: var(--bg--color);
  color: var(--text-color);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 28px 14%;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(16, 16, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 14%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(147, 112, 219, 0.12);
}

/* Navbar */
.logo {
  color: var(--text-color);
  font-size: 1.8rem;
  font-weight: 600;
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.03);
}

span {
  color: var(--main-color)
}

.navbar {
  display: flex;
}

.navbar a {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 16px;
  margin: 0 4px;
  transition: color 0.3s, border-color 0.3s;
  border-bottom: 2px solid transparent;
}

.navbar a:hover,
.navbar a.active-nav {
  color: var(--main-color);
  border-bottom: 2px solid var(--main-color);
}

#menu-icon {
  font-size: 28px;
  z-index: 10001;
  cursor: pointer;
  display: none;
  transition: transform 0.3s;
}

#menu-icon:hover {
  transform: scale(1.1);
}

/* Home Section */
section {
  padding: 120px 14%;
}

.home {
  display: grid;
  grid-template-columns: 1.45fr 0.55fr;
  grid-gap: 2.2rem;
  align-items: center;
  position: relative;
  height: 100vh;
  width: 100%;
  padding: 120px 10%;
}

.home-img img {
  width: 430px;
  max-width: 100%;
  height: auto;
  animation: float 5s ease-in-out infinite;
}

.home-text h5 {
  color: var(--text-color);
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 20px;
}

.home-text h1 {
  color: var(--text-color);
  font-size: clamp(3rem, 4.8vw, 4.4rem);
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1;
  white-space: nowrap;
}

.home-text h6 {
  color: var(--text-color);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 25px;
}

.typing-line {
  display: block;
  max-width: none;
  white-space: nowrap;
}

#typed-greeting,
#typed-name,
#typed-text {
  color: var(--text-color);
}

#typed-text .typed-highlight {
  color: var(--main-color);
}

.typing-cursor {
  color: var(--main-color);
  margin-left: 3px;
  font-weight: 700;
  display: inline-block;
  animation: typingBlink 0.9s step-end infinite;
}

@keyframes typingBlink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.btn {
  background: var(--main-color);
  color: var(--text-color);
  box-shadow: 4px 4px var(--text-color);
  display: inline-block;
  padding: 0 25px;
  line-height: 42px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  transition: ease all 0.35s;
}

.btn:hover {
  background: var(--text-color);
  color: var(--main-color);
  box-shadow: 4px 4px var(--main-color);
}

/* About Section */
.about {
  display: grid;
  grid-template-columns: repeat(2, 2fr);
  grid-gap: 5rem;
  align-items: center;
}

.about-img img {
  width: 580px;
  max-width: 100%;
  height: auto;
}

.about-text h3 {
  color: var(--text-color);
  font-size: 30px;
  font-weight: 300;
  margin: 0 0 30px;
  letter-spacing: 6px;
}

.about-text h2 {
  font-size: var(--h2-font);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  max-width: 470;
  margin-bottom: 2rem;
}

.about-text p {
  color: var(--2nd-main-color);
  font-size: var(--p-font);
  font-weight: 300;
  line-height: 1.8rem;
  margin-bottom: 1.5rem;
  max-width: 570px;
}

.main-btn .btn {
  margin-right: 20px;
}

/* Services Section */
.center {
  text-align: center;
}

.center h3 {
  color: var(--text-color);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 6px;
}

.service-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, auto));
  grid-gap: 2rem;
  align-items: center;
  margin-top: 4.4rem;
}

.row {
  background: #0b0b13;
  padding: 60px 35px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s;
}

.row i{
  color: var(--main-color);
  font-size: 3rem;
  margin-bottom: 20px;
}

.row h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text-color);
}

.row p {
  font-size: 18px;
  color: var(--2nd-main-color);
  line-height: 30px;
}

.row:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(147, 112, 219, 0.15);
  border-color: rgba(147, 112, 219, 0.35);
}

/* CTA Section */
.cta {
  background: #0b0b13;
  width: 100%;
  padding: 150px 0;
  text-align: center;
  margin: 100px auto;
}

.cta h4 {
  color: var(--text-color);
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 30px;
}

/* Resume Section */
.resume {
  text-align: center;
}

.resume h3 {
  color: var(--text-color);
  font-size: 30px;
  font-weight: 580;
  margin: 0 0 30px;
  letter-spacing: 6px;
}

.resume .center {
  display: flex;
  justify-content: center;
}

.resume-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, auto));
  grid-gap: 2rem;
  align-items: center;
  margin-top: 4.4rem;
}

.box {
  background: #0b0b13;
  padding: 60px 35px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s;
  display: flex;
  flex-direction: column;
}

.box h6 {
  color: #3e4455;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.box h4 {
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 25px;
  margin-bottom: 13px;
}

.box p {
  font-size: var(--p-font);
  font-weight: 300;
  margin-bottom: 1.2rem;
  line-height: 1.8rem;
  color: var(--2nd-main-color);
}

.box h5 {
  font-size: 14px;
  font-weight: 500;
  color: var(--2nd-main-color);
}

.box .click-hint {
  display: inline-block;
  margin-top: auto;
  padding-top: 16px;
  margin-bottom: 30px;
  font-size: 14px;
  font-weight: 600;
  color: #3e4455;
  letter-spacing: 1px;
}

.box:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(147, 112, 219, 0.15);
  border-color: rgba(147, 112, 219, 0.35);
}

.clickable-box {
  display: block;
  text-decoration: none;
}

.clickable-box:hover {
  text-decoration: none;
}

/* Contact Section */
.contact {
  text-align: center;
}

.contact-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 4.2rem;
}

.contact-links {
  width: 550px;
  text-align: left;
  margin-bottom: 1.2rem;
  color: var(--2nd-main-color);
  line-height: 1.9;
}

.contact-links a,
.contact-links a:link,
.contact-links a:visited,
.contact-links a:hover,
.contact-links a:active,
.contact-links a:focus,
.contact-links a:focus-visible {
  color: var(--main-color) !important;
  text-decoration: none;
}

.contact-form form {
  position: relative;
  width: 550px;
}

form input, 
form textarea {
  width: 100%;
  padding: 20px;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #0b0b13;
  color: var(--text-color);
  margin-bottom: 0.8rem;
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

form input:focus, 
form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 12px rgba(147, 112, 219, 0.25);
}

form input::placeholder, 
form textarea::placeholder {
  color: var(--2nd-main-color);
}

textarea {
  height: 200px;
  resize: none;
}

form .send-btn {
  background: var(--main-color);
  color: var(--text-color);
  box-shadow: 4px 4px var(--text-color);
  display: inline-block;
  padding: 0 25px;
  line-height: 42px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  transition: ease all 0.35s;
  margin-top: 5px;
}

form .send-btn:hover {
  background: var(--text-color);
  color: var(--main-color);
  box-shadow: 4px 4px var(--main-color);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--2nd-main-color);
  background: #0b0b13;
  line-height: 1.8rem;
  margin-top: 3rem;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-socials a,
.footer-socials a:link,
.footer-socials a:visited,
.footer-socials a:hover,
.footer-socials a:active,
.footer-socials a:focus,
.footer-socials a:focus-visible {
  width: 42px;
  height: 42px;
  border: 1px solid var(--main-color);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--main-color);
  background: transparent;
  font-size: 1.2rem;
  transition: all .30s ease;
  text-decoration: none;
}

.footer-socials a:hover {
  background: rgb(147 112 219 / 12%);
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgb(0 0 0 / 50%);
}

.footer-socials a i {
  color: inherit;
}

.footer-socials a[href^="mailto:"],
.footer-socials a[href^="mailto:"]:link,
.footer-socials a[href^="mailto:"]:visited,
.footer-socials a[href^="mailto:"]:hover,
.footer-socials a[href^="mailto:"]:active,
.footer-socials a[href^="mailto:"] i {
  color: var(--main-color) !important;
  -webkit-text-fill-color: var(--main-color) !important;
}

.footer-socials a:focus,
.footer-socials a:focus-visible {
  outline: none;
}


/* Media query for mobile devices with screen size up to 768px */
@media (max-width: 768px) {
  section {
    padding: 60px 5%;
  }

  header {
    padding: 18px 5%;
  }

  .logo {
    font-size: 1.5rem;
  }

  #menu-icon {
    display: block;
  }

  .navbar {
    background: #0b0b13;
    position: absolute;
    top: -500px;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 15px 30px 0px rgb(0 0 0 / 70%);
    text-align: left;
    transition: 0.2s ease;
  }

  .navbar a {
    display: block;
    margin: 0.8rem 1.2rem;
    padding: 0.8rem;
    border-left: 2px solid var(--main-color);
  }

  .navbar.active {
    top: 100%;
  }

  .home {
    grid-template-columns: 1fr;
    grid-gap: 2rem;
    margin-top: 60px;
    height: auto;
    text-align: center;
    padding: 60px 5%;
  }

  .home-img img {
    width: 280px;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
  }

  .home-text h5 {
    font-size: 20px;
  }

  .home-text h1 {
    font-size: 2.2rem;
  }

  .home-text h6 {
    font-size: 14px;
  }

  .typing-line {
    max-width: 100%;
  }

  .about {
    grid-template-columns: 1fr;
    grid-gap: 2.5rem;
    text-align: center;
    padding: 60px 5%;
  }

  .about-img img {
    width: 280px;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
  }

  .about-text h3 {
    font-size: 22px;
    margin: 0 0 15px;
    letter-spacing: 4px;
  }

  .about-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .about-text p {
    font-size: 0.95rem;
    line-height: 1.6rem;
    margin: 0 auto 1.5rem;
  }

  .center h3, .resume h3 {
    font-size: 1.6rem;
    letter-spacing: 3px;
  }

  .service-content {
    grid-template-columns: 1fr;
    grid-gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .row {
    padding: 30px 20px;
  }

  .row i {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }

  .row h3 {
    margin-bottom: 12px;
  }

  .row p {
    font-size: 15px;
    line-height: 24px;
  }

  .cta {
    padding: 60px 5%;
    margin: 60px auto;
  }

  .cta h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
  }

  .resume-content {
    grid-template-columns: 1fr;
    grid-gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .box {
    padding: 30px 20px;
  }

  .box h4 {
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .box p {
    font-size: 0.85rem;
    line-height: 1.5rem;
  }

  .box h5 {
    font-size: 13px;
  }

  .box .click-hint {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-top: 10px;
  }

  .contact-form {
    margin-top: 2.5rem;
  }

  .contact-form form {
    width: 100%;
  }

  .contact-links {
    width: 100%;
  }

  form input, 
  form textarea {
    padding: 15px;
  }

  textarea {
    height: 160px;
  }

  .footer-socials {
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* Media query for extra small devices (phones up to 480px) */
@media (max-width: 480px) {
  .logo {
    font-size: 1.3rem;
  }

  .home-text h1 {
    font-size: 1.7rem;
  }

  .home-text h5 {
    font-size: 18px;
  }

  .about-text h2 {
    font-size: 1.3rem;
  }

  .center h3, .resume h3 {
    font-size: 1.35rem;
    letter-spacing: 2px;
  }

  .cta h4 {
    font-size: 1.1rem;
  }

  .row, .box {
    padding: 25px 15px;
  }
}

@media (max-width: 1200px) {
  .home-text h1 {
    white-space: normal;
  }

  .typing-line {
    max-width: 680px;
    white-space: normal;
  }
}


/* Interactive tags styling */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 12px;
}

.tag {
  background: rgba(147, 112, 219, 0.08);
  color: var(--main-color);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(147, 112, 219, 0.18);
  transition: all 0.35s ease;
  letter-spacing: 0.5px;
}

.box:hover .tag {
  background: rgba(147, 112, 219, 0.2);
  border-color: rgba(147, 112, 219, 0.5);
  color: #fff;
  box-shadow: 0 0 8px rgba(147, 112, 219, 0.35);
}

/* Pulsing CLICK hint on box hover */
@keyframes pulseHint {
  0% {
    color: #3e4455;
    transform: scale(1);
  }
  50% {
    color: var(--main-color);
    transform: scale(1.05);
    text-shadow: 0 0 8px rgba(147, 112, 219, 0.4);
  }
  100% {
    color: #3e4455;
    transform: scale(1);
  }
}

.box:hover .click-hint {
  animation: pulseHint 1.5s infinite ease-in-out;
}

