@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Reset and base styles */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* Main Font */
.mte, .aboutMe {
  color: rgba(202, 212, 255, 0.5);
  font-family: 'VT323', monospace;
  text-shadow: 0 0 5px rgba(202, 212, 255, 0.5), 0 0 15px rgba(202, 200, 255, 0.5);
  text-decoration: none;
}

/* Body Style */
body {
  background: #0c131f;
  display: block;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  margin: 0;
}

.aboutMeContainer {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  height: 600px;
  max-height: 600px;
  box-sizing: border-box;
}

.aboutMe {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: auto;
  font-size: 25px;
  max-height: auto;
  max-width: 90vw;
  height: auto;
  width: auto;
}

.aboutMeImg {
  justify-self: center;
  align-self: center;
}

.aboutMeImg img {
  display: inline-block;
  align-items: center;
  margin: auto;
  padding: 50px;
  height: auto;
  width: auto;
  max-width: 570px;
  max-height: 580px;
}

/* ONLY Index.html Style and Body Function */
.home-page {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.home-page h1 {
    font-size: 80px;
    margin-bottom: 24px;
    animation:
    fade 2s ,
    flicker2 5s infinite 2s linear alternate,
    neonFlicker 1s 2s;
}

.home-page a {
    font-size: 40px;
    padding: 25px;
    animation: 
    fade 3s,
    flicker2 1s infinite 3s alternate;
}

.home-page a:hover {
  animation-name: fade, flicker;
  animation-duration: 3s, 0.4s;
  animation-iteration-count: 1, infinite;
  animation-delay: 0s, 0s;
  animation-fill-mode: forwards, none;
  animation-timing-function: ease, ease;
}

.home-page a:nth-child(2) {
  animation: 
  fade 1.5s,
  flicker2 2s infinite 5s linear alternate, flicker 0.04s infinite 1s linear alternate;
}
.home-page a:nth-child(3) {
  animation: 
  fade 1.5s,
  flicker2 0.75s infinite 3s linear alternate;
}
.home-page a:nth-child(4) {
  animation: 
  fade 1.75s,
  flicker2 5s infinite 1.5s linear alternate;
}
.home-page a:nth-child(5) {
  animation: 
  fade 1.75s,
  flicker2 1s infinite 2.4s linear alternate;
}
.home-page a:nth-child(6) {
  animation: 
  fade 2.5s,
  flicker2 4s infinite 1.5s linear alternate;
}
.home-page a:nth-child(7) {
  animation: 
  fade 2.5s,
  flicker2 3s infinite 3s linear alternate;
}

.main-footer a {
  font-size: 16px;
}

nav {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin: auto;
}

/* Page Title Styles */
.page-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.page-title-container .navi {
  font-size: 30px;
  display: block;
  margin-top: -350px;
  margin-bottom: auto;
  animation: fade 2.5s, flicker2 2s infinite 2s linear alternate;
}

.page-title-container .img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow:
      0 0 30px 2px rgba(202, 212, 255, 0.5),
      0 0 60px 4px rgba(202, 200, 255, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-title {
    height: 98vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 120px;
    animation: 
    neonFlicker 2s linear 1,
    flicker2 1s infinite 2s linear alternate;
    font-family: 'VT323', monospace;
    color: rgba(202, 212, 255, 0.5);
    text-shadow: 0 0 5px rgba(202, 212, 255, 0.5), 0 0 15px rgba(202, 200, 255, 0.5);
}

.page-title-container .hideOnDesktop {
  display: none;
}

/* Widget */
.contact-widget-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  background: #1a2233;
  color: #cad4ff;
  font-family: 'VT323', monospace;
  border: none;
  border-radius: 50px;
  box-shadow: 0 0 20px 2px rgba(202,212,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
  padding: 2px 8px;
  min-width: unset;
  font-size: 0.95em;
  width: auto;
}
.contact-widget-btn:hover {
  background: #232b3b;
}

.contact-widget-overlay {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.contact-widget-overlay.active {
  display: flex;
}

.contact-widget-popup {
  width: 350px;
  height: 500px;
  padding-top: 100px;
  border-radius: 20px;
  background: #101624;
  box-shadow: 0 0 40px 8px rgba(202,212,255,0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: hidden;
  justify-content: center;
}

.contact-widget-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent !important;
  border: none !important;
  color: #cad4ff;
  font-size: 2em;
  cursor: pointer;
  z-index: 2;
  padding: 0 !important;
  line-height: 1;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin-top: 0px;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-widget-form input,
.contact-widget-form textarea {
  width: 100%;
  margin-bottom: 14px;
  background: #1a2233;
  color: #9ca5cb;
  font-family: 'VT323', monospace;
  border: 1.5px solid rgba(202, 212, 255, 0.5);
  border-radius: 8px;
  padding: 10px 14px;
  box-sizing: border-box;
  font-size: 1em;
  box-shadow: none;
}

.contact-widget-form input::placeholder,
.contact-widget-form textarea::placeholder {
  color: rgba(202, 212, 255, 0.22);
  opacity: 1;
}

.contact-widget-form button[type="submit"] {
  background: #1a2233;
  color: #cad4ff;
  font-family: 'VT323', monospace;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: none;
}

.contact-widget-form button[type="submit"]:hover {
  box-shadow:
    0 0 10px 4px rgba(202, 212, 255, 0.7),
    0 0 20px 8px rgba(202, 200, 255, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Contact Styles */
form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  gap: 20px;
  width: 80%;
  max-width: 600px;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
  margin-bottom: 150px;
  text-align: center;
}

form h2 {
  font-size: 40px;
  text-align: center;
  animation: flicker2 1s infinite 2s linear alternate;
}

.contact-form-selector p {
  font-size: 30px;
  margin-bottom: -7px;
}

form input ,
form textarea {
  background: #1a2233;
  color: rgba(202, 212, 255, 0.8);
  font-family: 'VT323', monospace;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow:
    0 0 10px 1px rgba(202, 212, 255, 0.5),
    0 0 20px 2px rgba(202, 200, 255, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
  outline: none;
  transition: box-shadow 0.2s;
  width:70%;
  align-self: center;
}

form input:focus,
form textarea:focus {
  box-shadow:
    0 0 10px 4px rgba(202, 212, 255, 0.7),
    0 0 20px 8px rgba(202, 200, 255, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

form input[name="name"],
form input[name="email"] {
  width: 80%;
  min-width: 80px;
  max-width: 200px;
  text-align: center;
}

/* Remove arrows in Chrome, Safari, Edge */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove arrows in Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

button,
input[type="submit"] {
  background: #1a2233;
  color: rgba(202, 212, 255, 0.8);
  font-family: 'VT323', monospace;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  box-shadow:
    0 0 30px 2px rgba(202, 212, 255, 0.5),
    0 0 60px 4px rgba(202, 200, 255, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
  width: 142px;
  align-self: center;
  margin-top: 60px;
}

button:hover,
input[type="submit"]:hover {
  background: #232b3b;
  box-shadow:
    0 0 40px 4px rgba(202, 212, 255, 0.7),
    0 0 80px 8px rgba(202, 200, 255, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Link Styles */
a:hover{
    text-decoration-line: underline;
    animation: flicker 0.4s ease;
}

/* Portfolio Grid Styles */
.portfolio-grid {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.imgclass {
    width: auto;
    max-width: 80vw;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin-bottom: 250px;
    border-radius: 8px;
    box-sizing: border-box;
    background: #0c131f;
    box-shadow:
        0 0 30px 2px rgba(202, 212, 255, 0.5),
        0 0 60px 4px rgba(202, 200, 255, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.imgclass:first-of-type {
  margin-top: 60px;
}

.imgclass:last-of-type {
  margin-bottom: 250px;
}

/* Footer Styles */
.footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footerAboutMe {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 400px;
}

.footer-top {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  animation: flicker2 1s infinite 2s linear alternate;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 35px;
  font-size: 20px;
  padding: 15px;
  margin-bottom: 60px;
}

.footer-links a:nth-child(1) {
  animation: flicker2 1s infinite 2s linear alternate;
}
.footer-links a:nth-child(2) {
  animation: flicker2 2s infinite 1s linear alternate, flicker 0.04s infinite linear alternate;
}
.footer-links a:nth-child(3) {
  animation: flicker2 0.5s infinite 3s linear alternate;
}
.footer-links a:nth-child(4) {
  animation: flicker2 5s infinite 0.6s linear alternate;
}
.footer-links a:nth-child(5) {
  animation: flicker2 1s infinite 2.4s linear alternate;
}
.footer-links a:nth-child(6) {
  animation: flicker2 4s infinite 1.5s linear alternate;
}
.footer-links a:nth-child(7) {
  animation: flicker2 3s infinite 3s linear alternate;
}

/* Animations */
@keyframes neonFlicker {
  0% {
    opacity: 0;
    transform: none;
  }
  5% {
    opacity: 0.01;

  }
  10% {
    opacity: 0.05;
  }
  15% {
    opacity: 0.1;
    transform: none;
  }
  20% {
    opacity: 0.8;

  }
  25% {
    opacity: 0.4;
    transform: none;
  }
  30% {
    opacity: 1;
    transform: none;
  }
  40% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes flicker {
  0% {
    opacity: 1;
  }
  10% {
    opacity: 0.7;
  }
  20% {
    opacity: 0.5;
  }
  30% {
    opacity: 0.8;
  }
  40% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flicker2 {
  0% {
    opacity: 1;
  }
  23% {
    opacity: 1;
  }
  24% {
    opacity: 0.6;
  }
 25% {
    opacity: 1;
  }
  49% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  51% {
    opacity: 1;
  }
  62% {
    opacity: 1;
  }
  63% {
    opacity: 0.6;
  }
  64% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

 /* Responsive Design for Mobile Devices */
@media (max-width: 980px) {

  body.home-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
  }

  .home-page h1 {
    font-size: clamp(32px, 10vw, 60px);
    margin-bottom: 6px;
  }

  .nav.mte {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
  }

  .home-page a {
    font-size: 38px;
    padding: 12px;
    animation: 
    fade 3s,
    flicker2 1s infinite 3s alternate;
  }

  .main-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }

  .main-footer a {
    font-size: 20px;
  }

  body {
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 20px));
  }

  .page-title-container {
    display: block;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
  }

  .page-title {
    display: block;
    height: auto;
    min-height: 0;
    width: 100%;
    margin: 60px 0 10px 0;
    padding: 0;
    text-align: center;
    font-size: 60px;
    color: rgba(202, 212, 255, 0.5);
    font-family: 'VT323', monospace;
    text-shadow: 0 0 5px rgba(202, 212, 255, 0.5), 0 0 15px rgba(202, 200, 255, 0.5);
  }

  .page-title-container .navi {
    display: none;
  }

  .hideOnMobile {
    display: none;
  }

  .portfolio-grid {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: auto;
  }

  .imgclass {
    width: auto;
    max-width: 90vw;
    height: auto;
    margin-bottom: 10px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .imgclass:last-of-type {
  margin-bottom: 10px;
  }

  .footer {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 0px;
    gap: 0.1rem;
  }

  .footer-top {
    flex-direction: column;
    font-size: 30px;
  }

  .footer-links {
    flex-direction: column;
    gap: 25px;
    align-items: center;
    padding: 0;
    margin-bottom: 40px;
    font-size: 30px;
  }

  body::-webkit-scrollbar {
    display: none;
  }

}