:root {
  --clr-text:       #424E65;
  --clr-bg:         #F8AB9B;
  --clr-hero-start: #F58670;
  --clr-hero-end:   #F8AB9B;
  --clr-link-hover: #D9966E;
  --clr-nav-bg:     #A67C9A;
  --clr-proj-hover: #A67C9A;
  --clr-btn-hover:  #7C8D7D;
}



/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Links */
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--clr-link-hover); }

/* Navbar */
.nav {
  position: fixed;
  top: 0; width: 100%;
  background: var(--clr-nav-bg);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 4px solid var(--clr-text);
  transition: transform 0.3s ease;
  z-index: 1000;
}
.nav.hide { transform: translateY(-100%); }
.nav ul { list-style: none; display: flex; gap: 2rem; }
.nav a { color: #fff; }
.nav a:hover { color: var(--clr-link-hover); }
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 2rem; color: #fff; cursor: pointer;
}

@media (max-width: 768px) {
  .nav { flex-wrap: wrap; padding: 0.5rem 1rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav ul {
    display: none;
    flex-direction: column;
    background: var(--clr-nav-bg);
    width: 100%;
    padding: 1rem 2rem;
    position: absolute;
    top: 100%; left: 0;
  }
  .nav ul.active { display: flex; }
  .nav a { font-size: 12px; }
  .hero { margin-top: 3rem; }
}

/* Hero Section */
.hero {
  padding: 5rem 2rem;
  text-align: center;
  background: linear-gradient(to bottom, var(--clr-hero-start), var(--clr-hero-end));
  border-bottom: 4px solid var(--clr-text);
  overflow: hidden;
}
.hero h2 { font-size: 2rem; margin-bottom: 1rem; }
.hero p { margin-bottom: 2rem; }

.hero-container.pixel-border {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  border: 4px solid var(--clr-text);
  box-shadow: 8px 8px 0 var(--clr-text);
  background: var(--clr-bg);
  image-rendering: pixelated;
}
.hero-left { flex: 1; padding-right: 2rem; text-align: left; }
.hero-right {
  flex: 1; text-align: right;
  perspective: 600px;
  background-color: var(--clr-hero-start);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 12px 12px;
  transition: transform 0.1s ease-out;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-right .hero-knight {
  max-width: 240px;
  width: 100%;
  image-rendering: pixelated;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}
#typed-text { min-height: 1.6em; }
#cursor { display: inline-block; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-right .hero-knight:hover { transform: rotateY(20deg) rotateX(10deg) scale(1.05); }

@media (max-width: 768px) {
  .hero-container.pixel-border { flex-direction: column-reverse; text-align: center; }
  .hero-left { padding: 1rem 0 2rem; }
  .hero-right { margin-bottom: 1rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  margin: 1rem auto 0;
  padding: 0.75rem 1.5rem;
  background: var(--clr-text);
  color: #fff;
  border: 3px solid var(--clr-text);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--clr-btn-hover);
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 var(--clr-text);
}
input:hover,
textarea:hover {
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 var(--clr-text);
}

/* Projects Section */
.section {
  padding: 4rem 2rem;
  border-bottom: 4px solid var(--clr-text);
}
.grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 2rem auto 0;
  max-width: 1200px;
}
.card {
  background: #ffcec3;
  border: 3px solid var(--clr-text);
  box-shadow: 4px 4px 0 var(--clr-text);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: left;
}
.card h3 { font-size: 1.1rem; }
.card p { font-size: 0.95rem; }
.card:hover {
  transform: translate(-4px, -4px);
  background: var(--clr-proj-hover);
  color: #fff;
  box-shadow: 8px 8px 0 var(--clr-text);
}
.project-img {
  width: 100%;
  border: 4px solid var(--clr-text);
  display: block;
  margin-bottom: 1rem;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: auto;
}
input,
textarea,
button {
  font-family: inherit;
  font-size: 14px;
  padding: 0.75rem;
  border: 3px solid var(--clr-text);
  background: #fff;
  color: var(--clr-text);
  transition: transform 0.2s, box-shadow 0.2s;
}
button:hover {
  background: var(--clr-btn-hover);
  color: #fff;
}

/* Custom Cursors */
body { cursor: url('/assets/images/arrow_cursor.ico') 0 0, auto; }
a:hover,
button:hover,
.btn:hover { cursor: url('/assets/images/hand_cursor.ico') 0 0, pointer; }

/* Footer */
footer {
  background: var(--clr-nav-bg);
  color: #fff;
  text-align: center;
  padding: 2rem;
  margin-top: 2.5em;
}

/* Projects Title Pixel-Wave */
#projects { text-align: center; }
.projects-title {
  position: relative;
  display: inline-block;
  font-size: 1.4rem;
  color: var(--clr-text);
}
.projects-title span {
  display: inline-block;
  animation: wave 1s ease-in-out infinite;
}
.projects-title span:nth-child(1) { animation-delay: 0s; }
.projects-title span:nth-child(2) { animation-delay: 0.1s; }
.projects-title span:nth-child(3) { animation-delay: 0.2s; }
.projects-title span:nth-child(4) { animation-delay: 0.3s; }
.projects-title span:nth-child(5) { animation-delay: 0.4s; }
.projects-title span:nth-child(6) { animation-delay: 0.5s; }
.projects-title span:nth-child(7) { animation-delay: 0.6s; }
.projects-title span:nth-child(8) { animation-delay: 0.7s; }
@keyframes wave {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ABOUT SECTION (Desktop) */
.about-hero {
  padding: 6rem 2rem 2rem 2rem;
  background: linear-gradient(to bottom, var(--clr-hero-start), var(--clr-hero-end));
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.about-container.pixel-border {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
  border: 4px solid var(--clr-text);
  box-shadow: 8px 8px 0 var(--clr-text);
  background: var(--clr-bg);
  image-rendering: pixelated;
  gap: 2.5rem;
  
}
.about-left {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 2rem;
}
.about-title {
  font-size: 2rem;
  letter-spacing: 0.09em;
  margin-bottom: 1.5rem;
  font-family: 'Press Start 2P', monospace;
  text-align: left;
  display: flex;
  gap: 0.08em;
}
.about-title span {
  display: inline-block;
  animation: wave 1s ease-in-out infinite;
}
.about-title span:nth-child(1) { animation-delay: 0s; }
.about-title span:nth-child(2) { animation-delay: 0.08s; }
.about-title span:nth-child(3) { animation-delay: 0.16s; }
.about-title span:nth-child(4) { animation-delay: 0.24s; }
.about-title span:nth-child(5) { animation-delay: 0.32s; }
.about-title span:nth-child(6) { animation-delay: 0.44s; }
.about-title span:nth-child(7) { animation-delay: 0.56s; }

.about-text {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  line-height: 1.65;
  color: var(--clr-text);
  background: #fff6;
  border-radius: 10px;
  padding: 1.5rem 1rem 1rem 1.5rem;
  box-shadow: 0 2px 8px #424e6522;
  max-width: 500px;
  margin-bottom: 2rem;
  transition: transform 0.35s cubic-bezier(.38,1.5,.52,1.02);
}
.about-text:hover {
  animation: about-infinite-float 1.4s ease-in-out infinite;
}
@keyframes about-infinite-float {
  0%   { transform: translateY(0);}
  50%  { transform: translateY(-9px);}
  100% { transform: translateY(0);}
}
.about-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 300px;
  position: relative;
}

/* ABOUT Photo Grid & Icons */
.about-photo-wrap {
  position: relative;
  background: repeating-linear-gradient(
      0deg, #ddd 0 2px, transparent 2px 40px
    ),
    repeating-linear-gradient(
      90deg, #ddd 0 2px, transparent 2px 40px
    ),
    var(--clr-hero-end);
  border: 4px solid var(--clr-text);
  border-radius: 16px;
  width: 420px;
  height: 420px;
  max-width: 90vw;
  max-height: 90vw;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: visible;
}
.about-photo {
  width: 320px;
  height: 320px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 3px solid #fff;
  border-radius: 12px;
  transition: filter 0.14s;
}
.about-icon {
  position: absolute;
  width: 58px; height: 58px;
  filter: drop-shadow(2px 4px 2px #fff9);
  z-index: 5;
  opacity: 0.95;
  animation: float-icon 3.2s infinite ease-in-out alternate;
}
.about-icon-camera    { left: -38px;  top: 18px;  animation-delay: .1s;}
.about-icon-game      { right: -36px; bottom: 32px; animation-delay: .9s;}
.about-icon-movie     { right: -30px; top: 22px; animation-delay: 1.7s;}
.about-icon-leaf      { left: 6px;    bottom: -28px; animation-delay: 2.3s;}
.about-icon-keyboard  { left: 80px;   top: -34px;  animation-delay: 2.9s;}

@keyframes float-icon {
  0%   { transform: translateY(0) scale(1);}
  60%  { transform: translateY(-8px) scale(1.1);}
  100% { transform: translateY(0) scale(1);}
}

/* ABOUT Responsive */
@media (max-width: 900px) {
  .about-container.pixel-border { flex-direction: column; gap: 2rem; align-items: center;}
  .about-left { padding: 0; max-width: 100%; text-align: center;}
  .about-title { justify-content: center; }
  .about-text { margin: 1.5rem auto 2rem auto; }
  .about-right { min-width: 220px; }
  .about-photo-wrap { width: 240px; height: 240px; }
  .about-photo { width: 160px; height: 160px; }
  .about-icon { width: 34px; height: 34px;}
}
@media (max-width: 600px) {
  .about-hero { padding: 5.5rem 0.2rem 1.2rem 0.2rem;}
  .about-container.pixel-border { box-shadow: none !important; }
}
@media (max-width: 900px) {
  .about-hero { margin-top: 3.5rem; }
}

/* Connect Section */
.connect-section {
  margin: 4em auto 3em auto;
  max-width: 560px;
  width: 95vw;
  padding: 2.2em 1em 2em 1em;
  text-align: center;
  background: #c4d1b2;
  border: 3px solid #424E65;
  border-radius: 18px;
  box-shadow: 7px 7px 0 #424E65;
  position: relative;
  z-index: 2;
}
.connect-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 2.1em;
  margin-bottom: 0.7em;
  color: #424E65;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #90a98f;
}
.connect-desc {
  font-family: 'VT323', monospace;
  font-size: 1.35em;
  margin-bottom: 1.5em;
  color: #4d5a38;
}
.connect-btn {
  display: inline-block;
  background: #7C8D7D;
  color: #fffbe9;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.1em;
  border: 2px solid #424E65;
  border-radius: 10px;
  padding: 0.8em 2.5em;
  box-shadow: 3px 3px 0 #424E65;
  text-decoration: none;
  transition: background 0.18s, transform 0.17s, box-shadow 0.16s, color 0.15s;
}
.connect-btn:hover {
  background: #c4d1b2;
  color: #424E65;
  transform: translate(-4px, -4px);
  box-shadow: 7px 7px 0 #424E65;
}
footer {
  margin-top: 2.5em;
}
@media (max-width: 600px) {
  .connect-section {
    padding: 1.2em 0.2em 1.6em 0.2em;
    max-width: 99vw;
    border-radius: 12px;
    margin: 3.5em auto 2.2em auto;
  }
  .connect-title { font-size: 1.23em; }
  .connect-desc { font-size: 1em; }
  .connect-btn { font-size: 0.95em; padding: 0.7em 1.4em; }
}

/* PROJECT PAGE (Cards, Title, Gallery, Details) */
.project-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.7em 1.3em 0 1.3em;
}
.project-title-main {
  font-family: 'Press Start 2P', monospace;
  color: #424E65;
  font-size: 2.2em;
  letter-spacing: 0.03em;
  text-align: center;
  margin-bottom: 0.35em;
  text-shadow: 2px 3px 0 #f8ab9b55, 0 1.5px 8px #f586701a;
}
.project-summary-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2em;
}
.project-summary {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1.15em;
  color: #424e65;
  line-height: 1.7;
  text-align: left;
  background: none;
  max-width: 540px;
  width: 100%;
}
/* Info Cards */
.project-info-cards {
  display: flex;
  gap: 2em;
  flex-wrap: nowrap;
  justify-content: center;
  margin-bottom: 2.2em;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}
.project-info-card {
  background: #ffcec3;
  border: 3px solid #424E65;
  border-radius: 20px;
  box-shadow: 4px 4px 0 #424E65;
  padding: 1.4em 1.1em;
  font-family: 'VT323', monospace;
  font-size: 1.23em;
  color: #424E65;
  min-width: 170px;
  max-width: 240px;
  width: 100%;
  margin-bottom: 0;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  transition: transform 0.16s, background 0.19s, box-shadow 0.19s, color 0.15s;
  word-break: break-word;
}
.project-info-card strong {
  font-size: 1.06em;
  letter-spacing: 0.01em;
  font-weight: bold;
  margin-right: 0.38em;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}
.project-info-card span,
.project-info-card a {
  display: inline;
  vertical-align: top;
  line-height: 1.4;
  word-break: break-word;
}
.project-info-card a {
  color: #a67c9a;
  text-decoration: underline;
  font-weight: bold;
}
.project-info-card a:hover { color: #f58670; }
.project-info-card:hover {
  background: #A67C9A;
  color: #fff;
  box-shadow: 8px 8px 0 #424E65, 0 2px 12px #a67c9a21;
  transform: translate(-3px, -3px) scale(1.045);
}
.project-info-card:hover a { color: #fff; }

@media (max-width: 900px) {
  .project-info-cards { flex-wrap: wrap; gap: 1em; max-width: 99vw; }
}
@media (max-width: 700px) {
  .project-info-cards {
    flex-direction: column;
    gap: 0.8em;
    align-items: stretch;
    margin-bottom: 1.2em;
  }
  .project-info-card {
    min-width: 0;
    max-width: 99vw;
    width: 100%;
    font-size: 1.08em;
    padding: 1.12em 0.82em;
    justify-content: flex-start;
    text-align: left;
  }
  .project-info-card strong { margin-right: 0.26em; }
}

/* Gallery */
.project-image-gallery {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.2em;
}
.project-image-gallery img {
  width: 290px;
  max-width: 97vw;
  border-radius: 0;
  border: 4px solid #111;
  background: none;
  box-shadow: none;
  margin-bottom: 1.2em;
  object-fit: cover;
  transition: box-shadow 0.17s, transform 0.16s;
  display: block;
}
.project-image-gallery img:hover {
  box-shadow: 0 10px 32px #424e6555, 0 3px 16px #f5867033;
}
/* Detail cards */
.project-section-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.01em;
  color: #424E65;
  margin-left: 0.2em;
  margin-bottom: 0.38em;
  margin-top: 2.2em;
  text-align: left;
  letter-spacing: 0.03em;
  font-weight: bold;
  display: block;
}
.project-detail-card {
  background: #ffcec3;
  border: 3px solid #424E65;
  border-radius: 20px;
  box-shadow: 4px 4px 0 #424E65;
  padding: 2em 1.2em;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1.13em;
  color: #2e3140;
  margin-bottom: 2.1em;
  line-height: 1.85;
  transition: background 0.22s;
}
.project-detail-card:hover,
.project-detail-card:focus-within {
  background: #f58b76;
}
.project-detail-card ul {
  margin-bottom: 0.6em;
  margin-top: 0.4em;
  list-style-position: inside;
}
.project-detail-card li {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1em;
  margin-bottom: 0.4em;
  color: #2e3140;
  line-height: 1.7;
  word-break: break-word;
}

@media (max-width: 900px) {
  .project-container { padding-top: 2.7em; }
  .project-info-cards { gap: 1.1em; }
}
@media (max-width: 700px) {
  .project-container {
    padding-top: 1.5em;
    padding-left: 0.35em;
    padding-right: 0.35em;
  }
  .project-info-cards {
    flex-direction: column;
    gap: 0.6em;
    align-items: stretch;
    margin-bottom: 1.2em;
  }
  .project-info-card {
    min-width: 0;
    max-width: 99vw;
    width: 100%;
    font-size: 1.08em;
    padding: 1.12em 0.82em;
    margin-bottom: 0.18em;
    justify-content: center;
    text-align: center;
  }
  .project-info-card strong { margin-right: 0.26em; }
  .project-image-gallery { gap: 1em; }
  .project-image-gallery img { width: 99vw; max-width: 340px; }
  .project-detail-card { padding: 1.18em 0.55em; }
}

.project-info-card strong:after {
  content: "";
  display: inline-block;
  width: 0.13em;
}
.project-video-card {
  display: flex;
  justify-content: center;
  margin-bottom: 2.3em;
}
.project-video-card video {
  max-width: 540px;
  width: 100%;
  outline: none;
}
@media (max-width: 600px) {
  .project-video-card video { max-width: 98vw; }
}

/* Ivorymilk Screens Custom */
.ivorymilk-screens {
  display: flex;
  flex-direction: column;
  gap: 2em;
  align-items: center;
  margin-bottom: 2.5em;
}
.ivorymilk-screens img {
  width: 100%;
  max-width: 820px;
  border-radius: 14px;
  border: 3px solid #222;
  background: none;
  box-shadow: 0 2px 24px #2222;
  margin-bottom: 1.2em;
  object-fit: cover;
  display: block;
}
@media (max-width: 950px) {
  .ivorymilk-screens img { max-width: 99vw; }
}

/* Custom text selection */
::selection {
  background: #424E65;
  color: #fff;
}
::-moz-selection {
  background: #424E65;
  color: #fff;
}

html, body {
  height: 100%;
}

.about-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.about-hero {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

