/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ── */
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #06060f;
  font-family: 'Press Start 2P', monospace;
}

/* ── Scene ── */
#scene {
  width: 100vw;
  height: 100vh;
  background: url('bg.png') center/cover no-repeat;
  image-rendering: pixelated;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Scanline overlay (subtle retro feel) ── */
#scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* ── Ship wrapper ── */
#ship-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 5;
  animation: float 3s ease-in-out infinite;
}

#ship-wrapper.state-launching {
  animation: launch 0.75s cubic-bezier(0.4, 0, 1, 1) forwards;
}

#ship-wrapper.state-returning {
  animation: return 0.65s cubic-bezier(0, 0, 0.3, 1) forwards;
}

#ship-wrapper.state-hidden {
  display: none;
}

/* ── Hero text ── */
#hero-text {
  text-align: center;
  margin-bottom: 4px;
}

#hero-name {
  font-size: 20px;
  color: #fff;
  text-shadow: 3px 3px 0 #1a0038, 0 0 20px rgba(176, 126, 255, 0.6);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

#hero-title {
  font-size: 9px;
  color: #b07eff;
  text-shadow: 2px 2px 0 #1a0038;
  letter-spacing: 0.5px;
  line-height: 1.8;
  font-weight: normal;
}

#ship {
  width: 260px;
  image-rendering: pixelated;
  display: block;
}

/* ── Float animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* ── Launch: slight recoil then blast right ── */
@keyframes launch {
  0%   { transform: translateY(0)  translateX(0); }
  12%  { transform: translateY(4px) translateX(-18px); }
  100% { transform: translateY(0)  translateX(115vw); }
}

/* ── Return: comes in from the right ── */
@keyframes return {
  0%   { transform: translateX(115vw); }
  100% { transform: translateX(0); }
}

/* ── Nav buttons ── */
#nav-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-btn {
  background: rgba(60, 0, 100, 0.88);
  color: #e8d8ff;
  border: 2px solid #9050e0;
  padding: 10px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #1a0038;
  transition: background 0.08s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-btn:hover {
  background: rgba(110, 20, 180, 0.95);
  box-shadow: 4px 4px 0 #1a0038;
  transform: translate(-1px, -1px);
}

.nav-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #1a0038;
}

/* ── Start button ── */
#start-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

#start-btn img {
  image-rendering: pixelated;
  width: 150px;
  display: block;
  transition: transform 0.1s, filter 0.1s;
}

#start-btn:hover img {
  transform: scale(1.06);
  filter: brightness(1.15);
}

#start-btn:active img {
  transform: scale(0.96);
}

/* ── Info card ── */
#card {
  position: absolute;
  left: 5vw;
  top: 50%;
  width: min(560px, 88vw);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(-50%) translateX(-115vw);
  background: rgba(8, 4, 24, 0.94);
  border: 2px solid #9050e0;
  box-shadow: 5px 5px 0 #1a0038, inset 0 0 40px rgba(70, 0, 110, 0.25);
  padding: 28px 28px 32px;
  color: #d8c8f8;
  z-index: 20;
  scrollbar-width: thin;
  scrollbar-color: #9050e0 #1a0038;
}

#card::-webkit-scrollbar       { width: 6px; }
#card::-webkit-scrollbar-track { background: #1a0038; }
#card::-webkit-scrollbar-thumb { background: #9050e0; }

#card.state-entering {
  animation: cardIn 0.65s cubic-bezier(0, 0, 0.3, 1) forwards;
}

#card.state-exiting {
  animation: cardOut 0.45s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes cardIn {
  from { transform: translateY(-50%) translateX(-115vw); }
  to   { transform: translateY(-50%) translateX(0); }
}

@keyframes cardOut {
  from { transform: translateY(-50%) translateX(0); }
  to   { transform: translateY(-50%) translateX(-115vw); }
}

/* ── Card close button ── */
#card-close {
  float: right;
  background: none;
  border: 2px solid #9050e0;
  color: #9050e0;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 8px;
  cursor: pointer;
  margin-left: 12px;
  margin-bottom: 8px;
}

#card-close:hover {
  background: #9050e0;
  color: #fff;
}

/* ── Card content typography ── */
#card-content::after { content: ''; display: block; clear: both; }

#card-content h2 {
  font-size: 13px;
  color: #b07eff;
  margin-bottom: 22px;
  text-shadow: 2px 2px 0 #1a0038;
  clear: both;
}

#card-content p {
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.6;
  color: #cfc0ec;
  margin-bottom: 16px;
}

#card-content ul {
  list-style: none;
  margin-bottom: 16px;
}

#card-content li {
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.7;
  color: #cfc0ec;
}

#card-content li::before {
  content: '> ';
  color: #b07eff;
}

#card-content a {
  color: #b07eff;
  text-decoration: none;
}

#card-content a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Experience items ── */
.exp-item {
  margin-bottom: 24px;
  padding-left: 14px;
  border-left: 3px solid #9050e0;
}

.exp-item h3 {
  font-size: 9.5px;
  color: #fff;
  margin-bottom: 6px;
}

.exp-item .company {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #9050e0;
  margin-bottom: 10px;
}

.exp-item p {
  margin-bottom: 0;
}

/* ── Resume download link ── */
.dl-link {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px;
  background: rgba(80, 0, 130, 0.7);
  border: 2px solid #9050e0;
  color: #e8d8ff !important;
  font-size: 9px !important;
  box-shadow: 3px 3px 0 #1a0038;
  text-decoration: none !important;
  transition: background 0.08s, transform 0.08s;
}

.dl-link:hover {
  background: rgba(120, 20, 200, 0.9) !important;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #1a0038;
}

/* ── Resume card sections ── */
.resume-block {
  margin-top: 24px;
}

.resume-heading {
  font-size: 9px;
  color: #b07eff;
  margin-bottom: 14px;
  font-weight: normal;
}

.resume-summary {
  font-family: 'VT323', monospace !important;
  font-size: 18px !important;
  line-height: 1.6 !important;
  color: #b8a8d8 !important;
  margin-bottom: 0 !important;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  #ship { width: 180px; }
  .nav-btn { font-size: 7px; padding: 8px 10px; }
  #start-btn img { width: 120px; }
  #card { left: 4vw; width: 92vw; padding: 20px 18px 24px; }
  #card-content h2 { font-size: 11px; }
}

/* ── Desktop ── */
@media (min-width: 900px) {
  #ship-wrapper { gap: 28px; }

  #hero-name  { font-size: 32px; }
  #hero-title { font-size: 13px; }

  #ship { width: 420px; }

  #nav-buttons { gap: 14px; }
  .nav-btn { font-size: 12px; padding: 14px 22px; box-shadow: 4px 4px 0 #1a0038; }

  #card {
    width: min(700px, 80vw);
    padding: 36px 36px 42px;
    max-height: 82vh;
  }

  #card-close { font-size: 10px; padding: 8px 10px; }

  #card-content h2    { font-size: 16px; margin-bottom: 26px; }
  #card-content p,
  #card-content li    { font-size: 22px; }
  .exp-item h3        { font-size: 12px; }
  .exp-item .company  { font-size: 20px; }
  .resume-heading     { font-size: 11px; }
  .resume-summary     { font-size: 22px !important; }
  .dl-link            { font-size: 11px !important; padding: 14px 22px; }
}
