
@font-face {
  font-family: "Minecraft";
  src: url(/assets/fonts/Minecraft.otf) format("opentype");
}

@font-face {
  font-family: "Minecraft-Bold";
  src: url(/assets/fonts/Minecraft-Bold.otf) format("opentype");
  font-weight: bold;
}

header {
  max-width: 750px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  text-align: center;
}

@media (max-width: 768px) {

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--header-bg-open);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px var(--shadow);
    z-index: 1000;
    margin-top: 0;
    padding-top: 0;
  }
}

#home {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background: var(--bg);
  color: var(--ink-1);
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s forwards ease-in-out;
  position: relative;
}

.home-content {
  position: relative;
}

.home-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
  animation: scaleUp 1s forwards ease-in-out;
}

.home-content p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--gold-text);
  animation: typing 3s steps(30, end), blinkCursor 0.7s step-end infinite;
}

.btn {
  position: relative;
  display: inline-block;
  background: var(--gold);
  color: #fff;
  padding: 0.5rem 1rem;
  top: 1rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.8rem, 2vw, 1rem);
  opacity: 0;
  border: 1px solid var(--btn-ring);
  box-shadow: 0 4px 6px var(--btn-shadow),
              0 0 15px var(--btn-glow-weak);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInButton 0.5s 0.5s forwards, glowPulse 2s infinite;
}


.btn:hover {
  background-color: var(--gold-deep);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 12px var(--btn-shadow-hover),
              0 0 25px var(--btn-glow-strong);
}


@keyframes glowPulse {
  0% {
    box-shadow: 0 4px 6px var(--btn-shadow),
                0 0 15px var(--btn-glow-weak);
  }
  50% {
    box-shadow: 0 4px 6px var(--btn-shadow),
                0 0 20px var(--btn-glow-mid);
  }
  100% {
    box-shadow: 0 4px 6px var(--btn-shadow),
                0 0 15px var(--btn-glow-weak);
  }
}


#home,
#about,
#highlights,
#experience,
#content-creation,
#thumbnail,
#contacts {
  padding: 4rem 2rem;
  background: var(--bg);
  text-align: center;
}

#about p {
  font-size: 1.3rem;
  margin: 0 auto;
  width: 60%;
  text-align: center;
}

#about h2,
#highlights h2,
#experience h2,
#content-creation h2,
#thumbnail h2,
#contacts h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
  background: var(--heading-gradient);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.server-card,
.video-card,
.thumbnail-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

@media (max-width: 768px) {

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 1rem;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blinkCursor {
  50% {
    border-color: transparent;
  }
}

@keyframes fadeInButton {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.thumbnail-cards {
  display: flex;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.video-card,
.thumbnail-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  overflow: hidden;
  width: 560px;
  max-width: calc(100% - 2px);
  height: 315px;
  box-shadow: 0 4px 6px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}


.video-card {
  width: 450px;
  height: 550px;
}

.video-card iframe,
.thumbnail-card img {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
}

#experience {
  padding: 4rem 2rem;
  background-color: var(--bg);
  text-align: center;
  color: var(--ink-2);
}

.server-cards {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4rem;
}

.server-card {
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  width: 350px;
  max-width: calc(100% - 50px);
  min-height: 460px;
  box-shadow: 0 4px 6px var(--shadow);
}

.server-card .server-icon {
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
}


.server-card:nth-child(3) .server-icon {
    height: auto;
    width: 80%;  
    max-height: 120px;  
    object-fit: contain;
    margin-top: 0.5rem;  
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    transform: scale(1.0);  
}


.server-card h3 {
  font-family: "Minecraft-Bold", sans-serif;
  font-size: 1.5rem;
  background: var(--heading-gradient);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.1rem;
}

.server-card .server-ip {
  font-family: "Minecraft", sans-serif;
  font-size: 1.3rem;
}

.server-card .server-role {
  font-family: "Minecraft", sans-serif;
  font-size: 1.1rem;
}

@media (max-width: 768px) {

  .server-cards {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }
}

#contacts {
  padding: 4rem 2rem;
  background: var(--bg);
  text-align: center;
  color: var(--ink-2);
}

.contact-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-icon {
  display: inline-block;
  width: 100px;
  height: 100px;
  position: relative;
  /* no overflow: hidden */
  transition: transform 0.3s ease;
}


.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}


.contact-icon:hover img {
  transform: scale(1.1);
}


.contact-icon:hover {
  transform: translateY(-5px);
}


.contact-icon::after {
  content: attr(data-label);
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 6px;
  transform: translateX(-50%) translateY(-6px);
  color: var(--ink-4);
  font-family: "Poppins", sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}


.contact-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

.more-link {
  display: inline-block;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  position: relative;
}

.more-link a {
  display: block;
  font-size: 1.5rem;
  color: var(--ink-1);
  text-decoration: none;
}

.video-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
}


.video-container {
  width: 100%;
  height: 100%;
  position: relative;
}


.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}


.play-button {
  transition: all 0.3s ease;
}


.play-button::before {
  border-top: 15px solid transparent;
  border-left: 25px solid white;
  border-bottom: 15px solid transparent;
}


.video-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow:
    0 2px 16px rgba(0,0,0,1),
    0 0px 4px rgba(0,0,0,0.9),
    0 0px 32px rgba(0,0,0,0.7);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
}



.thumbnail-card {
  position: relative;
}


.thumbnail-card .video-title {
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

#bg3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  text-align: center;
  color: var(--scroll-fg);
  font-family: 'Poppins',sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), visibility 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.scroll-indicator.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(60px);
}

.scroll-text {
  margin-bottom: 10px;
  font-size: 1rem;
  animation: bounce 1.5s infinite;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--scroll-fg, #fff);
  border-radius: 15px;
  margin: 0 auto;
  position: relative;
  animation: bounce 1.5s infinite;
}

.wheel {
  width: 6px;
  height: 6px;
  background: var(--scroll-fg, #fff);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.thumbnail-subtitle {
  margin-top: 6px;
  color: var(--ink-5);
  font-weight: 300;
  font-size: 0.95rem;
}



#about .brushstroke-highlight {
  position: relative;
  display: inline;
  color: var(--gold-text);
  font-weight: 600;
  padding-bottom: 0.05em;
}


#about .brushstroke-highlight::after {
  content: '';
  position: absolute;
  left: -2px;
  bottom: -0.18em;
  width: calc(100% + 4px);
  height: 0.4em;
  background-image: var(--brushstroke-svg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}



.contact-form-wrapper {
  margin-top: 0.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}


.contact-form {
  background: var(--bg);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}


.form-group {
  margin-bottom: 1.5rem;
}


.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--ink-2);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}


.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--input-placeholder);
}


.form-input:focus,
.form-textarea:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--input-border);
}


.form-textarea {
  resize: none;
}


.form-submit {
  display: block;
  margin: 0 auto;
  width: auto;
  min-width: 160px;
  background: var(--bg);
  color: var(--ink-1);
  border: 1px solid var(--input-border);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.form-submit:active {
  transform: translateY(0);
}



@media (max-width: 768px) {

  .contact-form-wrapper {
    margin-top: 2rem;
    max-width: 100%;
    padding: 0 1rem;
  }


  .contact-form {
    padding: 1.5rem;
  }


  .form-input,
  .form-textarea {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }


  .form-submit {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }
}



.highlight-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
}


.highlight-item {
  flex: 1 1 0;
  min-width: 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  text-align: left;
}


.highlight-screenshot-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-soft);
  box-shadow: 0 10px 30px var(--shadow-soft);
  margin-bottom: 1.1rem;
}


.highlight-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.highlight-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}


.highlight-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}


.highlight-link:hover {
  background: var(--surface-soft-hover);
  color: var(--ink-1);
}


.highlight-link svg {
  width: 14px;
  height: 14px;
  display: block;
}


.highlight-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 5px;
  box-sizing: border-box;
  flex-shrink: 0;
}


.highlight-item h3 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink-1);
  font-weight: 600;
  -webkit-text-fill-color: var(--ink-1);
  background: none;
}


.highlight-item p {
  font-size: 0.95rem;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.55;
}


@media (max-width: 768px) {

  .highlight-grid {
    gap: 2.25rem;
  }

  .highlight-item {
    flex: 1 1 100%;
    max-width: 380px;
  }
}


/* ---- Phones ---- */
@media (max-width: 768px) {

  #about p {
    width: 90%;
  }
}

@media (max-width: 640px) {

  .thumbnail-card {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 520px) {

  .video-card {
    height: auto;
    aspect-ratio: 450 / 550;
  }
}

@media (max-width: 480px) {

  #about p {
    width: 100%;
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {

  /* the typed tagline would be wider than the screen: a touch smaller keeps it on one line */
  .home-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 350px) {

  /* narrower still: let it wrap and fade in instead of typing */
  .home-content p {
    white-space: normal;
    overflow: visible;
    border-right: 0;
    animation: fadeInButton 1.2s ease-in-out both;
  }
}


/* ---- Lightbox: one native <dialog> (built by lightbox.js) for thumbnails and videos ---- */
.lightbox {
  max-width: none;
  max-height: none;
}

.lightbox-stage img {
  max-width: 80vw;
  max-height: 80vh;
}

.lightbox-stage iframe {
  width: auto;
  height: 85vh;
  max-width: 100vw;
  aspect-ratio: 9 / 16;
}

.lightbox .close,
.lightbox .arrow {
  z-index: 1001;
  font: inherit;
  font-size: 2rem;
}


@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .scroll-text,
  .mouse,
  .wheel {
    animation: none;
  }
}
