:root {
  --bg: #07080d;
  --bg-elevated: rgba(15, 18, 30, 0.78);
  --bg-card: rgba(18, 22, 37, 0.85);
  --border: rgba(0, 240, 255, 0.18);
  --border-strong: rgba(0, 240, 255, 0.55);
  --text: #eef4ff;
  --text-muted: #9aa7c4;
  --cyan: #00f0ff;
  --violet: #a855f7;
  --pink: #ec4899;
  --amber: #f59e0b;
  --emerald: #10b981;
  --shadow-neon: 0 0 24px rgba(0, 240, 255, 0.28), 0 0 48px rgba(168, 85, 247, 0.14);
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: 'Orbitron', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* Ambient Background */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(to right, rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 35%, black 30%, transparent 85%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  z-index: -2;
  pointer-events: none;
}

.bg-glow--cyan {
  top: -12%;
  left: -8%;
  background: var(--cyan);
}

.bg-glow--violet {
  bottom: -15%;
  right: -10%;
  background: var(--violet);
}

/* Focus & Accessibility */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Intro Screen */
.intro-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-screen.is-exiting {
  opacity: 0;
  transform: scale(0.98);
}

.intro-card {
  width: 100%;
  max-width: 640px;
  padding: 3.25rem 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-neon);
  backdrop-filter: blur(16px);
  text-align: center;
}

.intro-tag {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.intro-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
}

.intro-subtitle {
  margin: 1rem 0 2.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.neon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: 1.5px solid var(--cyan);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(168, 85, 247, 0.18));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.32), inset 0 0 12px rgba(0, 240, 255, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.neon-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(168, 85, 247, 0.3));
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.55), 0 0 50px rgba(168, 85, 247, 0.3);
}

.neon-btn:active {
  transform: translateY(0);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.22s ease;
}

.neon-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(circle at center, rgba(14, 18, 34, 0.96), #05060a 75%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.loading-screen.is-visible {
  opacity: 1;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}

.loading-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(0, 240, 255, 0.15);
  border-top-color: var(--cyan);
  border-right-color: var(--violet);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.4);
  animation: spin 0.9s linear infinite;
}

.loading-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.8vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow:
    0 0 10px var(--cyan),
    0 0 24px var(--cyan),
    0 0 46px var(--violet);
  animation: neonPulse 1.3s ease-in-out infinite alternate;
}

.loading-bar {
  width: min(300px, 72vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loading-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  transform-origin: left;
  animation: loadProgress 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Main Portfolio Layout */
.portfolio-app {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portfolio-app.is-visible {
  opacity: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(7, 8, 13, 0.8);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(14px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2.5vw, 1.8rem);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

.main-content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.section {
  padding: 3.75rem 0;
  scroll-margin-top: 76px;
}

.section-header {
  margin-bottom: 2rem;
}

.section-eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.section-lead {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
}

/* About Me & Skills */
.about-layout {
  display: grid;
  gap: 1.75rem;
}

.glass-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.identity-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.owner-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
}

.owner-role {
  margin: 0.25rem 0 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.role-sep {
  color: var(--violet);
  margin: 0 0.25rem;
}

.status-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.about-bio {
  margin: 0;
  font-size: 1.05rem;
  color: #d7e2f8;
  line-height: 1.75;
}

.subsection-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.skill-item:hover,
.skill-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.18);
}

.skill-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-icon--unity { color: #38bdf8; }
.skill-icon--unreal { color: #c084fc; }
.skill-icon--blender { color: #fb923c; }
.skill-icon--ai { color: var(--cyan); }

.skill-label {
  font-weight: 600;
  font-size: 0.98rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1.15rem;
}

.project-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--cyan);
  background: rgba(22, 28, 48, 0.95);
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.25), 0 14px 28px rgba(0, 0, 0, 0.45);
}

.project-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.24s ease;
}

.project-tile:hover .project-icon {
  transform: scale(1.08);
}

.project-icon svg {
  width: 100%;
  height: 100%;
}

.project-icon--unity { color: #38bdf8; }
.project-icon--unreal { color: #c084fc; }
.project-icon--blender { color: #fb923c; }
.project-icon--ai { color: var(--cyan); }
.project-icon--resume { color: var(--emerald); }

.project-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.22);
}

.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.24);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.94rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  padding: 1.75rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: #0e1322;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 42px rgba(0, 240, 255, 0.25), 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.22s ease;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.14);
  color: var(--cyan);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.modal-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.modal-description {
  margin: 0 0 1.5rem;
  color: #d7e2f8;
  line-height: 1.7;
}

.modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  background: rgba(0, 240, 255, 0.14);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-cta:hover,
.modal-cta:focus-visible {
  transform: translateY(-2px);
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.35);
}

.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.ai-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.22);
}

.ai-project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cyan);
}

.ai-project-desc {
  margin: 0;
  color: #d7e2f8;
  font-size: 0.94rem;
  line-height: 1.65;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.tech-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #c4b5fd;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.32);
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes neonPulse {
  from {
    opacity: 0.82;
    text-shadow:
      0 0 8px var(--cyan),
      0 0 18px var(--cyan),
      0 0 32px var(--violet);
  }
  to {
    opacity: 1;
    text-shadow:
      0 0 14px var(--cyan),
      0 0 32px var(--cyan),
      0 0 58px var(--violet);
  }
}

@keyframes loadProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1rem;
  }

  .section {
    padding: 2.75rem 0;
  }

  .intro-card {
    padding: 2.4rem 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

