/* ============================================================
   ROOT & RESET
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --glow: rgba(255, 255, 255, 0.85);
  --glow-dim: rgba(255, 255, 255, 0.25);
  --glow-faint: rgba(255, 255, 255, 0.07);
  --accent: #00ffcc;
  --accent-dim: rgba(0, 255, 204, 0.12);
  --accent-glow: rgba(0, 255, 204, 0.5);
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'Share Tech Mono', monospace;
  --slide-transition: 0.75s cubic-bezier(0.77, 0, 0.175, 1);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
  cursor: crosshair;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; }

/* ============================================================
   CANVAS BACKGROUND
============================================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   SCANLINE OVERLAY
============================================================ */
#scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
}

/* ============================================================
   CORNER DECORATIONS
============================================================ */
.corner {
  position: fixed;
  width: 28px;
  height: 28px;
  z-index: 5;
  pointer-events: none;
}
.corner::before,
.corner::after {
  content: '';
  position: absolute;
  background: var(--glow-dim);
}
.corner::before { width: 100%; height: 1.5px; }
.corner::after  { width: 1.5px; height: 100%; }
.corner-tl { top: 16px; left: 16px; }
.corner-tr { top: 16px; right: 16px; }
.corner-tr::before { right: 0; }
.corner-tr::after  { right: 0; }
.corner-bl { bottom: 16px; left: 16px; }
.corner-bl::before { bottom: 0; }
.corner-bl::after  { bottom: 0; }
.corner-br { bottom: 16px; right: 16px; }
.corner-br::before { bottom: 0; right: 0; }
.corner-br::after  { bottom: 0; right: 0; }

@media (max-width: 380px) { .corner { display: none; } }

/* ============================================================
   NAV ARROWS
============================================================ */
#nav-left,
#nav-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: none;
  border: 1.5px solid var(--glow-dim);
  color: var(--white);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: var(--font-pixel);
  opacity: 0;
  pointer-events: none;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.4s, color 0.3s;
}
#nav-left  { left: 14px; }
#nav-right { right: 14px; }
#nav-left.visible,
#nav-right.visible { opacity: 1; pointer-events: all; }
#nav-left:hover,
#nav-right:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  color: var(--accent);
}

@media (max-width: 480px) {
  #nav-left, #nav-right { width: 32px; height: 32px; font-size: 10px; }
  #nav-left  { left: 6px; }
  #nav-right { right: 6px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #nav-left, #nav-right { width: 30px; height: 30px; font-size: 10px; }
}

/* ============================================================
   PAGE DOTS
============================================================ */
#page-dots {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s;
}
#page-dots.visible { opacity: 1; }
.dot {
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--glow-dim);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
@media (max-height: 420px) { #page-dots { display: none; } }

/* ============================================================
   PAGE LABEL
============================================================ */
#page-label {
  position: fixed;
  top: 18px;
  right: 62px;
  z-index: 100;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--glow-dim);
  letter-spacing: 3px;
  opacity: 0;
  transition: opacity 0.5s;
}
#page-label.visible { opacity: 1; }
@media (max-width: 480px) { #page-label { display: none; } }

/* ============================================================
   PAGES WRAPPER
============================================================ */
#pages-wrapper {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--slide-transition);
  will-change: transform;
}

/* ============================================================
   PAGE
============================================================ */
.page {
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Enable scroll on mobile portrait */
@media (max-width: 768px) {
  .page.scrollable {
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* Enable scroll on short landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .page.scrollable {
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* JS fallback: if content overflows on any other size */
.page.needs-scroll {
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   PAGE INNER
============================================================ */
.page-inner {
  width: 100%;
  max-width: 960px;
  padding: 56px 56px 64px;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px)  { .page-inner { padding: 52px 40px 60px; } }
@media (max-width: 600px)  { .page-inner { padding: 64px 20px 72px; } }
@media (max-height: 500px) and (orientation: landscape) {
  .page-inner { padding: 44px 64px 52px; }
}
@media (min-width: 1400px) {
  .page-inner { max-width: 1100px; padding: 64px 72px 72px; }
}

/* ============================================================
   PAGE HEADING
============================================================ */
.page-heading {
  font-family: var(--font-pixel);
  font-size: clamp(9px, 1.4vw, 15px);
  margin-bottom: 32px;
  color: var(--accent);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,255,204,0.3), transparent);
}
.page-num { color: rgba(255,255,255,0.25); font-size: 0.75em; }

@media (max-height: 500px) and (orientation: landscape) {
  .page-heading { margin-bottom: 14px; }
}

/* ============================================================
   SPLASH
============================================================ */
#splash { flex-direction: column; }

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}
@media (max-height: 500px) and (orientation: landscape) { .splash-center { gap: 18px; } }
@media (max-width: 380px) { .splash-center { gap: 28px; } }

.splash-sub {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 1vw, 10px);
  color: var(--accent);
  letter-spacing: 5px;
  animation: pulse-accent 2.5s ease-in-out infinite;
}

.splash-title {
  font-family: var(--font-pixel);
  /* clamp with both vw and vh so landscape phones don't overflow */
  font-size: clamp(14px, min(3.2vw, 5.5vh), 36px);
  text-align: center;
  line-height: 2;
  min-height: 2.2em;
  text-shadow:
    0 0 10px var(--glow),
    0 0 30px var(--glow-dim),
    0 0 70px rgba(255,255,255,0.08);
}

.cursor-blink {
  animation: blink 0.9s step-end infinite;
  color: var(--accent);
}

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

.enter-btn {
  font-family: var(--font-pixel);
  font-size: clamp(7px, 1.2vw, 12px);
  letter-spacing: 4px;
  padding: 18px 44px;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  position: relative;
  overflow: hidden;
  transition: color 0.35s, border-color 0.35s, box-shadow 0.35s;
  box-shadow: 0 0 16px var(--glow-dim), inset 0 0 16px var(--glow-faint);
  animation: border-pulse 3s ease-in-out infinite;
  opacity: 0;
}
.enter-btn.visible {
  opacity: 1;
  transition: opacity 0.6s ease, color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.enter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateX(-102%);
  transition: transform 0.35s ease;
  z-index: -1;
}
.enter-btn:hover::before { transform: translateX(0); }
.enter-btn:hover {
  color: var(--black);
  border-color: var(--white);
  box-shadow: 0 0 32px rgba(255,255,255,0.4);
}
@media (max-height: 500px) and (orientation: landscape) {
  .enter-btn { padding: 10px 28px; }
}
@media (max-width: 380px) {
  .enter-btn { padding: 14px 26px; letter-spacing: 2px; }
}

@keyframes border-pulse {
  0%, 100% { box-shadow: 0 0 16px var(--glow-dim), inset 0 0 16px var(--glow-faint); }
  50%       { box-shadow: 0 0 32px rgba(255,255,255,0.35), inset 0 0 24px rgba(255,255,255,0.12); }
}
@keyframes pulse-accent {
  0%, 100% { text-shadow: 0 0 8px var(--accent-glow); }
  50%       { text-shadow: 0 0 22px var(--accent-glow), 0 0 44px var(--accent-dim); }
}

/* ============================================================
   ABOUT
============================================================ */
.about-name {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2vw, 24px);
  line-height: 1.6;
  margin-bottom: 12px;
  text-shadow: 0 0 20px var(--glow-dim);
}

/* mono font so the subtitle line never wraps awkwardly */
.about-role {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.15vw, 14px);
  color: rgba(0, 255, 204, 0.85);
  letter-spacing: 0.5px;
  margin-bottom: 26px;
  line-height: 1.6;
}

.about-body {
  font-size: clamp(12px, 1.3vw, 14px);
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.7);
  max-width: 700px;
  margin-bottom: 28px;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}
.tag {
  font-family: var(--font-pixel);
  font-size: clamp(5px, 0.65vw, 7px);
  border: 1px solid var(--glow-dim);
  padding: 6px 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.about-links { display: flex; gap: 26px; flex-wrap: wrap; }
.icon-link {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.8vw, 8px);
  letter-spacing: 2px;
  border-bottom: 1px solid var(--glow-dim);
  padding-bottom: 4px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s, border-color 0.2s;
}
.icon-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-height: 500px) and (orientation: landscape) {
  .about-body  { margin-bottom: 12px; line-height: 1.65; }
  .about-tags  { margin-bottom: 12px; gap: 6px; }
  .about-links { gap: 16px; }
}

/* ============================================================
   SKILLS
============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}
@media (min-width: 1200px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 340px) {
  .skills-grid { grid-template-columns: 1fr; }
}

.skill-block {
  border: 1px solid var(--glow-faint);
  padding: 18px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.3s, background 0.3s;
}
.skill-block:hover {
  border-color: rgba(0, 255, 204, 0.35);
  background: var(--accent-dim);
}
.skill-block-title {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.75vw, 8px);
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.skill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-list li {
  font-size: clamp(10px, 1vw, 12px);
  color: rgba(255, 255, 255, 0.65);
  background: var(--glow-faint);
  padding: 3px 7px;
}

/* ============================================================
   EXPERIENCE
============================================================ */
.exp-card {
  border-left: 2px solid var(--accent);
  padding: 0 0 0 28px;
  position: relative;
}
.exp-card::before {
  content: '';
  position: absolute;
  left: -5px; top: 8px;
  width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}
.exp-company {
  font-family: var(--font-pixel);
  font-size: clamp(9px, 1.25vw, 14px);
  color: var(--white);
  margin-bottom: 8px;
}
.exp-role {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.78vw, 9px);
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.exp-date {
  font-size: clamp(11px, 1.05vw, 13px);
  color: var(--glow-dim);
  margin-bottom: 18px;
}
.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.exp-bullets li {
  font-size: clamp(11px, 1.15vw, 13px);
  color: rgba(255, 255, 255, 0.68);
  padding-left: 20px;
  position: relative;
  line-height: 1.75;
}
.exp-bullets li::before {
  content: '>';
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}
@media (max-height: 500px) and (orientation: landscape) {
  .exp-bullets { gap: 7px; }
  .exp-date    { margin-bottom: 10px; }
}

/* ============================================================
   PROJECTS
============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
@media (min-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
}

.project-card {
  border: 1px solid var(--glow-faint);
  padding: 20px;
  background: rgba(255, 255, 255, 0.018);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.25s;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  border-color: rgba(0, 255, 204, 0.3);
  transform: translateY(-3px);
}
.project-name {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.85vw, 9px);
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.9;
}
.project-desc {
  font-size: clamp(10px, 1vw, 12px);
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.7;
  margin-bottom: 12px;
}
.project-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.project-stack span {
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid var(--glow-faint);
  color: var(--accent);
  font-family: var(--font-mono);
}
.project-link-row { display: flex; gap: 16px; }
.proj-link {
  font-family: var(--font-pixel);
  font-size: clamp(5px, 0.68vw, 7px);
  letter-spacing: 1px;
  color: var(--glow-dim);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.proj-link:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   EDUCATION
============================================================ */
.edu-list { display: flex; flex-direction: column; gap: 36px; }
.edu-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 540px) { .edu-card { grid-template-columns: 1fr; gap: 8px; } }
@media (max-height: 500px) and (orientation: landscape) {
  .edu-card { gap: 18px; }
  .edu-list  { gap: 20px; }
}
.edu-year {
  font-family: var(--font-pixel);
  font-size: clamp(7px, 0.88vw, 9px);
  color: var(--accent);
  letter-spacing: 1px;
  padding-top: 4px;
  line-height: 1.8;
}
.edu-degree {
  font-family: var(--font-pixel);
  font-size: clamp(7px, 0.95vw, 11px);
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.9;
}
.edu-school {
  font-size: clamp(11px, 1.1vw, 13px);
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 8px;
}
.edu-gpa {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.75vw, 8px);
  color: var(--accent);
  letter-spacing: 1px;
}

/* ============================================================
   CONTACT
============================================================ */
.contact-tagline {
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2.1vw, 24px);
  line-height: 2;
  margin-bottom: 16px;
  text-shadow: 0 0 20px var(--glow-dim);
}
.contact-sub {
  font-size: clamp(11px, 1.15vw, 13px);
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.85;
}
.contact-rows { display: flex; flex-direction: column; gap: 20px; }
.contact-row  { display: flex; align-items: center; gap: 22px; }
.contact-label {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.78vw, 8px);
  color: var(--accent);
  letter-spacing: 2px;
  width: 88px;
  flex-shrink: 0;
}
.contact-value {
  font-size: clamp(11px, 1.15vw, 14px);
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
  word-break: break-all;
}
.contact-value:hover { color: var(--accent); border-color: var(--accent); }
.contact-value.no-hover { cursor: default; }
.contact-value.no-hover:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255,255,255,0.08);
}

@media (max-height: 500px) and (orientation: landscape) {
  .contact-tagline { font-size: clamp(12px, 1.8vw, 18px); margin-bottom: 8px; }
  .contact-sub     { margin-bottom: 16px; }
  .contact-rows    { gap: 12px; }
}
@media (max-width: 380px) {
  .contact-row   { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-label { width: auto; }
}

/* ============================================================
   LARGE SCREEN BOOST (1440px+)
   Slight font-size bumps so content doesn't look tiny in the
   extra negative space on large monitors.
============================================================ */
@media (min-width: 1440px) {
  .about-name      { font-size: 26px; }
  .about-role      { font-size: 15px; }
  .about-body      { font-size: 15px; max-width: 780px; }
  .exp-company     { font-size: 16px; }
  .exp-bullets li  { font-size: 14px; }
  .contact-tagline { font-size: 28px; }
  .contact-sub     { font-size: 14px; }
  .contact-value   { font-size: 15px; }
  .edu-degree      { font-size: 12px; }
  .edu-school      { font-size: 14px; }
}
