:root {
  --primary-color: #34aadb;
  --primary-glow: 0 0 15px #34aadb, 0 0 30px rgba(52, 170, 219, .4), inset 0 0 10px rgba(52, 170, 219, .2);
  --primary-glow-subtle: 0 0 10px rgba(52, 170, 219, .2);
  --primary-glow-medium: 0 0 10px rgba(52, 170, 219, .3);
  --content-width: 800px;
  --card-bg: rgba(52, 170, 219, 0.02);
  --card-border: rgba(52, 170, 219, 0.3);
  --card-hover-bg: rgba(52, 170, 219, 0.05);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Developer Mode Color Scheme */
body.developer-mode {
  --primary-color: #ffffff;
  --primary-glow: 0 0 15px #ffffff, 0 0 30px rgba(255, 255, 255, .4), inset 0 0 10px rgba(255, 255, 255, .2);
  --primary-glow-subtle: 0 0 10px rgba(255, 255, 255, .2);
  --primary-glow-medium: 0 0 10px rgba(255, 255, 255, .3);
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.3);
  --card-hover-bg: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

::-moz-selection {
  background: #EB553D;
  color: #fff;
}

::selection {
  background: #EB553D;
  color: #fff;
}

body {
  font-family: 'JetBrains Mono', monospace;
  background: #000;
  color: var(--primary-color);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  transition: all 0.5s ease;
}

.footer {
  width: 100%;
  padding: 1.5rem 0;
  text-align: center;
  background: transparent;
  position: relative;
  z-index: 10;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.footer-content {
  max-width: var(--content-width);
  margin: 0 auto;
  opacity: 0.8;
}

.footer i.fa-heart {
  color: #EB553D;
}

.footer i.fa-coffee {
  color: #C0DEED;
}

/* Home Page Specifics */
#home-page {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  text-align: center;
}

#home-page.active {
  display: flex;
}

/* Non-home pages use block display */
section.page:not(#home-page) {
  display: none;
}

section.page.active:not(#home-page) {
  display: block;
}

/* Fixed Footer only on Home Page */
body:has(#home-page.active) .footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: none;
}


/* Terminal Container */
.terminal {
  width: 100%;
  min-height: 100vh;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.terminal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  background-image: linear-gradient(transparent 50%, rgba(52, 170, 219, 0.06) 50%);
  background-size: 2000px 6px;
  background-repeat: repeat;
  background-position: 0 0;
  background-attachment: fixed;
  pointer-events: none;
  z-index: -1;
}

.terminal::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 96%, rgba(52, 170, 219, .12) 100%);
  background-size: 2000px 8px;
  background-repeat: repeat;
  background-position: 0 0;
  background-attachment: fixed;
  pointer-events: none;
  z-index: -1;
}

.terminal-bg-overlay {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 70%, rgba(0, 0, 0, .3));
  pointer-events: none;
  z-index: -1;
}

/* Warning Screen â€” hidden on mobile by default */
.warning-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 1);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

.warning-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.warning-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-shadow:
    0 0 1px #34aadb,
    0 0 2px #34aadb,
    0 0 3px #34aadb;
  animation: glow-breathe 2s ease-in-out infinite alternate;
  font-weight: bold;
  letter-spacing: 3px;
}

@keyframes glow-breathe {
  0% {
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
  }

  100% {
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
  }
}

.warning-content p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  line-height: 1.6;
}

.warning-screen .key {
  display: inline-block;
  background: rgba(52, 170, 219, 0.2);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  margin: 0 0.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1em;
  box-shadow: 0 0 5px rgba(52, 170, 219, 0.5);
}

.hidden {
  display: none !important;
}

/* Navigation */
.top-nav {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
  z-index: 100;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.nav-link {
  background: var(--card-bg);
  color: var(--primary-color);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 40px;
  padding: 0 0.6rem;
  text-decoration: none;
  transition: background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link i {
  font-size: 1em;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.nav-text {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.8rem;
  margin-left: 0;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease 0.05s,
    margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active & Hover â€” expand text smoothly */
.nav-link.active,
.nav-link:hover {
  background: var(--card-hover-bg);
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}

.nav-link.active .nav-text,
.nav-link:hover .nav-text {
  max-width: 100px;
  opacity: 1;
  margin-left: 0.45rem;
}

/* Terminal Content */
.terminal-content {
  text-align: center;
  width: 100%;
  max-width: var(--content-width);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  flex: 1;
}

/* Page Styles */
.page {
  display: none;
  animation: fadeIn 0.4s ease-out;
  width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Profile Section */
.profile-section {
  margin-bottom: 1.5rem;
  text-align: center;
}

.terminal-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.underline-text {
  position: relative;
  display: inline-block;
}

.underline-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}

.terminal-description {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Bio Section */
.bio-section {
  margin-bottom: 1.5rem;
  text-align: center;
  max-width: 700px;
  width: 100%;
}

.bio-section p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  /* Medium spacing */
  margin: 0 auto 2.5rem auto;
  width: 100%;
  max-width: 650px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: var(--primary-glow-subtle);
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Socials Section */
.socials-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  /* Match stats spacing */
  margin: 0 auto 2.5rem auto;
  width: 100%;
  max-width: 650px;
}

.separator {
  display: none;
  /* Hide separators, button style looks better with just gap */
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
  color: var(--primary-color);
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  transition: var(--transition-smooth);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}

.social-link:hover {
  background: var(--card-hover-bg);
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
  transform: translateY(-2px);
}

/* Gamer Quote */
.gamer-quote {
  padding: 1.5rem;
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  background: transparent;
  text-align: center;
  font-style: italic;
  max-width: 650px;
  /* Match stats/social width */
  width: 100%;
  margin: 0 auto;
}

.quote-author {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Page Header */
.projects-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-shadow: var(--primary-glow-subtle);
}

.page-description {
  opacity: 0.7;
  font-size: 0.95rem;
}

/* Category Filter Tabs */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.6rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-btn:hover {
  background: var(--card-hover-bg);
  border-color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}

.filter-btn i {
  font-size: 0.9em;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

/* Project Card */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
  text-align: left;
}

.project-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
  transform: translateY(-4px);
}

.project-card.hidden {
  display: none;
}

/* Ensure clickable cards don't look like links */
a.project-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.project-card:visited {
  color: inherit;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(52, 170, 219, 0.1), rgba(52, 170, 219, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reusing model card overlay style for project cards */
.project-card .model-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  z-index: 2;
}

.project-card:hover .model-card-overlay {
  opacity: 1;
}

.project-card .model-card-overlay i {
  font-size: 3rem;
  color: var(--primary-color);
}

.project-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  opacity: 0.5;
}

.project-image-placeholder i {
  font-size: 2.5rem;
}

.project-image-placeholder span {
  font-size: 0.8rem;
}

/* Project Tags (Above Title) */
.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-category-tag {
  background: rgba(0, 0, 0, 0.4);
  color: var(--primary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  border: 1px solid var(--card-border);
}

.project-status-tag {
  background: var(--primary-color);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.project-content {
  padding: 1.25rem;
}

.project-name {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.project-description {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Project Card Footer */
.project-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0;
  /* Remove bottom margin to stay in line */
}

.tech-badge {
  padding: 0.2rem 0.5rem;
  background: rgba(52, 170, 219, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--primary-color);
  text-transform: uppercase;
}

/* Project Links */
.project-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.project-link:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

/* 3D Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 2rem;
}

.model-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.model-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}



.model-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotateY(0);
  }

  50% {
    transform: translateY(-10px) rotateY(180deg);
  }
}

.model-placeholder p {
  font-size: 0.85rem;
}

.model-info {
  padding: 1rem;
}

.model-info h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--primary-color);
}

.model-info p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.gallery-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* Experience Cards */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.experience-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition-smooth);
}

.experience-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}

.experience-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.experience-icon {
  width: 48px;
  height: 48px;
  background: rgba(52, 170, 219, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.experience-title {
  flex: 1;
}

.experience-title h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.experience-title .company {
  font-size: 0.85rem;
  opacity: 0.7;
}

.experience-badge {
  padding: 0.25rem 0.6rem;
  background: var(--primary-color);
  color: #000;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

.experience-badge.ongoing {
  background: #4CAF50;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.experience-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.experience-details {
  list-style: none;
  padding-left: 0;
}

.experience-details li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.85rem;
  opacity: 0.85;
}

.experience-details li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition-smooth);
}

.skill-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
  transform: translateY(-2px);
}

.skill-icon {
  width: 48px;
  height: 48px;
  background: rgba(52, 170, 219, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.skill-tag {
  padding: 0.25rem 0.5rem;
  background: rgba(52, 170, 219, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--primary-color);
}

.skill-bar {
  height: 4px;
  background: rgba(52, 170, 219, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  box-shadow: var(--primary-glow-subtle);
  transition: width 1s ease-out;
}

/* Contact */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: left;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.contact-card>p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(52, 170, 219, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

a.contact-item:hover {
  background: var(--card-hover-bg);
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.contact-item i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.gamer-contact-message {
  padding: 1rem;
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  text-align: center;
  font-style: italic;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.9rem;
}



/* =============================================
   RESPONSIVE DESIGN â€” Mobile-First Breakpoints
   Base styles above target mobile (< 600px).
   ============================================= */

/* ---------- Tablet (â‰¥ 600px) ---------- */
@media (min-width: 600px) {
  .top-nav {
    padding: 1.25rem 1.5rem 0;
    gap: 0.5rem;
  }

  .nav-link {
    height: 44px;
  }

  .terminal-content {
    padding: 2rem 1.5rem;
  }

  .terminal-title {
    font-size: 2rem;
  }

  .terminal-description {
    font-size: 1rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .stats-section {
    gap: 2rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .socials-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .social-link {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }

  .projects-grid,
  .gallery-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .experience-header {
    flex-wrap: nowrap;
  }

  .experience-badge {
    width: auto;
    text-align: left;
    margin-top: 0;
  }

  .experience-meta {
    flex-direction: row;
    gap: 1.5rem;
  }

  .warning-content h1 {
    font-size: 3rem;
  }
}

/* ---------- Desktop (â‰¥ 1024px) ---------- */
@media (min-width: 1024px) {
  .top-nav {
    padding: 1.5rem 2rem 0;
  }

  .nav-link.active {
    padding: 0.6rem 1rem;
    min-width: 100px;
  }

  .terminal-content {
    padding: 2rem;
  }

  .terminal-title {
    font-size: 2.5rem;
  }

  .terminal-description {
    font-size: 1.1rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .socials-section {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
  }

  .social-link {
    flex: 1;
    max-width: 160px;
    width: auto;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .warning-screen {
    display: flex;
  }

  .warning-content h1 {
    font-size: 4rem;
  }
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  animation: slideUp 0.4s ease-out backwards;
}

.project-card:nth-child(1) {
  animation-delay: 0.05s;
}

.project-card:nth-child(2) {
  animation-delay: 0.1s;
}

.project-card:nth-child(3) {
  animation-delay: 0.15s;
}

.project-card:nth-child(4) {
  animation-delay: 0.2s;
}

.project-card:nth-child(5) {
  animation-delay: 0.25s;
}

.project-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* Developer Mode Overrides */
body.developer-mode .terminal::before {
  background-image: linear-gradient(transparent 50%, rgba(255, 255, 255, 0.04) 50%);
}

body.developer-mode .terminal::after {
  background: linear-gradient(to bottom, transparent 96%, rgba(255, 255, 255, .08) 100%);
}

body.developer-mode .filter-btn.active {
  background: #fff;
  color: #000;
}

body.developer-mode .project-badge,
body.developer-mode .experience-badge {
  background: #fff;
}

body.developer-mode .skill-progress {
  background: #fff;
}

/* Developer Mode â€“ Cinematic Page Overrides */
body.developer-mode .cinematic-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

body.developer-mode .cinematic-title {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.2);
}

body.developer-mode .cinematic-subtitle {
  color: rgba(255, 255, 255, 0.5);
}

body.developer-mode .cinema-label {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.developer-mode .cinema-embed-wrapper {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 255, 255, 0.05);
}


body.developer-mode .credit-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.developer-mode .cinema-bts-section {
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.developer-mode .cinema-watch-btn {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Cyberpunk Placeholder Styles */
.model-placeholder-cyber {
  width: 100%;
  height: 100%;
  background-color: var(--bg-darker);
  background-image:
    linear-gradient(rgba(52, 170, 219, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 170, 219, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--primary-color);
  border-bottom: 1px solid var(--card-border);
}

.model-placeholder-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(52, 170, 219, 0.1), transparent);
  transform: translateY(-100%);
  animation: scanline 3s linear infinite;
}

.model-placeholder-cyber i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  text-shadow: 0 0 10px rgba(52, 170, 219, 0.5);
}

.model-placeholder-cyber span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-top: 0.5rem;
  text-shadow: 0 0 5px rgba(52, 170, 219, 0.3);
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

/* Model Card Thumbnail Style */
.model-card {
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
  text-decoration: none;
  /* Ensure link underline is removed */
  display: block;
  /* Ensure anchor tag behaves like a block */
  color: inherit;
  /* Inherit text color */
}

.model-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow-subtle);
}

.model-card:hover .model-card-overlay {
  opacity: 1;
}

.model-card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-darker);
}

.model-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.model-card-overlay i {
  font-size: 3rem;
  color: var(--primary-color);
}

.model-card .model-info {
  padding: 1rem;
}

.model-card .model-info h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.model-card .model-info p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Sketchfab badge */
.sketchfab-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.3rem 0.6rem;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-size: 0.7rem;
  color: #1CAAD9;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal base (mobile) */
.modal-content {
  width: 95vw;
  max-height: 95vh;
}

.modal-viewer {
  min-height: 300px;
  max-height: 50vh;
}

.modal-header {
  padding: 1rem;
}

.modal-title-container h2 {
  font-size: 1.1rem;
}

.modal-info {
  padding: 1rem;
}

.modal-meta {
  flex-direction: column;
  align-items: flex-start;
}

/* Modal desktop scale-up */
@media (min-width: 600px) {
  .modal-content {
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
  }

  .modal-viewer {
    min-height: 400px;
    max-height: 60vh;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-title-container h2 {
    font-size: 1.3rem;
  }

  .modal-info {
    padding: 1.5rem;
  }

  .modal-meta {
    flex-direction: row;
    align-items: center;
  }
}

/* 3D Model Loading Overlay */
#model-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity 0.5s ease;
  pointer-events: all;
  /* Block clicks on model */
}

.loading-text {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(52, 170, 219, 0.5);
  animation: pulse-text 1.5s infinite alternate;
  font-weight: bold;
}

@keyframes pulse-text {
  0% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
    text-shadow: 0 0 15px rgba(52, 170, 219, 0.8);
  }
}

.loading-bar-container {
  width: 60%;
  max-width: 300px;
  height: 4px;
  background: rgba(52, 170, 219, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.loading-bar-fill {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  box-shadow: 0 0 10px var(--primary-color);
  outline: none;
}

.inspector-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 5px var(--primary-color);
}

.inspector-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(52, 170, 219, 0.3);
  color: #fff;
  padding: 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  outline: none;
}

.inspector-select:focus {
  border-color: var(--primary-color);
}

/* 3D Inspector Panel Container Styles */
.inspector-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.inspector-toggle:hover {
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 0 15px var(--primary-color);
}

.inspector-panel {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 250px;
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 8px;
  z-index: 15;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  display: block;
  /* Ensure visibility when active */
}

.inspector-panel.active {
  transform: translateX(0);
}

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

.inspector-group h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(52, 170, 219, 0.2);
  padding-bottom: 0.3rem;
}

.inspector-control {
  margin-bottom: 0.8rem;
}

.inspector-control label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
  opacity: 0.8;
}

.inspector-range {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

/* AI Demo Modal */
.ai-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ai-modal.active {
  opacity: 1;
  pointer-events: all;
}

.ai-modal-content {
  background: var(--card-bg);
  border: 1px solid var(--primary-color);
  width: 90%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-modal.active .ai-modal-content {
  transform: scale(1);
}

.ai-header {
  background: rgba(0, 255, 65, 0.1);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--primary-color);
}

.ai-header h2 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.close-ai-modal {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-ai-modal:hover {
  color: #ff5555;
}

.ai-body {
  padding: 2rem;
}

.ai-controls {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-btn {
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
  padding: 0.8rem 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
  transition: all 0.2s;
}

.ai-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
}

.ai-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.prediction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  min-height: 200px;
}

.prediction-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  opacity: 0.5;
  height: 200px;
  border: 1px dashed var(--accent-color);
  border-radius: 8px;
}

.prediction-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Prediction Card */
.pred-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  animation: fadeIn 0.5s ease-out forwards;
}

.pred-image {
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent-color);
  margin: 0 auto 1rem;
  display: block;
  image-rendering: pixelated;
}

.pred-info {
  font-family: 'JetBrains Mono', monospace;
}

.pred-label {
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.pred-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.pred-value.correct {
  color: #55ff55;
}

.pred-value.incorrect {
  color: #ff5555;
  text-shadow: 0 0 10px rgba(255, 85, 85, 0.5);
}

.confidence-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.confidence-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 1s ease-out;
}

/* ============================================
   CINEMATIC PAGE
   ============================================ */

/* Inline Link in Bio */
.cinematic-inline-link {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cinematic-inline-link:hover {
  text-shadow: 0 0 8px var(--primary-color);
  border-bottom-style: solid;
}

/* Hero Section */
.cinematic-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.cinematic-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.cinematic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ==========================================================================
   PREMIERE LAYOUT (Cinematic Page)
   ========================================================================== */

.premiere-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Hero / Theater Section */
.premiere-theater {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.premiere-badge {
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.premiere-year {
  opacity: 0.5;
  color: var(--text-color);
  font-weight: bold;
}

.premiere-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(52, 170, 219, 0.3);
}

.premiere-japanese {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 12px;
  color: var(--primary-color);
  opacity: 0.8;
  margin-bottom: 3rem;
}

/* Video Wrappers */
.premiere-screen-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premiere-screen-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(52, 170, 219, 0.2), 0 0 40px rgba(52, 170, 219, 0.1);
}

.premiere-screen-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Metadata & Credits */
.premiere-metadata {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 0 2rem;
  align-items: start;
}

.premiere-tagline {
  font-family: serif;
  font-size: 1.5rem;
  font-style: italic;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.premiere-description {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
}

.premiere-crew {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.crew-role {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.crew-role span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
}

.crew-role strong {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
}

/* BTS Section */
.premiere-bts-section {
  padding-top: 4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
}

.bts-header {
  margin-bottom: 2rem;
  text-align: center;
}

.bts-header h4 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.bts-header p {
  font-size: 0.9rem;
  color: var(--primary-color);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.bts-screen {
  opacity: 0.9;
}

.bts-screen:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .premiere-metadata {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }

  .premiere-crew {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
    padding-top: 2rem;
  }

  .premiere-title {
    font-size: 2.5rem;
  }
}



/* Watch Button on project card */
.cinema-watch-btn {
  background: var(--card-bg) !important;
  border-color: var(--primary-color) !important;
}

.cinema-watch-btn:hover {
  background: var(--primary-color) !important;
  color: #000 !important;
}

/* ---- Cinematic Responsive ---- */
@media (min-width: 600px) {
  .cinematic-title {
    font-size: 3rem;
  }

  .cinematic-subtitle {
    font-size: 2.2rem;
  }

  .cinema-details {
    grid-template-columns: 1fr 1fr;
  }

  .cinema-play-icon {
    width: 80px;
    height: 80px;
  }

  .cinema-play-icon i {
    font-size: 1.8rem;
  }

  .cinema-volume-group:hover .cinema-volume-slider {
    width: 90px;
  }
}

@media (min-width: 1024px) {
  .cinematic-hero {
    padding: 3rem 2rem 2rem;
  }

  .cinematic-title {
    font-size: 3.5rem;
    letter-spacing: 6px;
  }

  .cinematic-subtitle {
    font-size: 2.5rem;
    letter-spacing: 8px;
  }

  .cinema-play-icon {
    width: 90px;
    height: 90px;
  }

  .cinema-play-icon i {
    font-size: 2rem;
  }

  .cinema-controls {
    padding: 3rem 1.5rem 1rem;
  }

  .cinema-time {
    font-size: 0.8rem;
  }
}

/* ============================================
   PORTFOLIO LIVE PREVIEW THUMBNAIL
   ============================================ */
.portfolio-live-preview {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.95), rgba(5, 5, 10, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0.8rem;
  position: relative;
  overflow: hidden;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================
   DICTIONARY DEFINITION CARD
   ============================================ */
.dict-card {
  text-align: left;
  margin: 0 auto 2.5rem auto;
  width: 100%;
  max-width: 380px;
  /* Constrain width so it centers nicely */
}

.dict-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dict-speaker {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dict-speaker:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 12px var(--primary-glow-subtle);
}

.dict-speaker:active {
  transform: scale(0.92);
}

.dict-word-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dict-word {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}

.dict-phonetic {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.dict-pos-badge {
  display: inline-block;
  background: #3c4043;
  color: #e8eaed;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: capitalize;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.dict-forms {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.65rem;
  letter-spacing: 0.3px;
}

.dict-definition {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  padding-left: 0.2rem;
}

.dict-def-num {
  color: #e8eaed;
  font-weight: 700;
  margin-right: 0.25rem;
}

.dict-example {
  display: block;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.35rem;
  padding-left: 1rem;
}


/* Animated scanline */
.plp-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 2px,
      rgba(255, 255, 255, 0.015) 4px);
  pointer-events: none;
  z-index: 1;
}

.plp-scanline::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--card-hover-bg), transparent);
  animation: plp-scan 4s linear infinite;
}

@keyframes plp-scan {
  0% {
    top: -100%;
  }

  100% {
    top: 100%;
  }
}

.plp-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--primary-glow-subtle);
  position: relative;
  z-index: 2;
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-underline-offset: 4px;
}

.plp-subtitle {
  font-size: 0.45rem;
  color: var(--primary-color);
  opacity: 0.7;
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
  margin-bottom: 0.3rem;
}

.plp-stats {
  display: flex;
  gap: 0.8rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--card-bg);
  position: relative;
  z-index: 2;
}

.plp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.plp-stat-num {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--primary-color);
}

.plp-stat-label {
  font-size: 0.35rem;
  color: var(--primary-color);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plp-links {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.2rem;
  position: relative;
  z-index: 2;
}

.plp-link {
  width: 22px;
  height: 22px;
  border: 1px solid var(--card-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--primary-color);
  background: var(--card-bg);
}

/* ============================================
   SKIP-TO-CONTENT LINK (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: #000;
  padding: 0.75rem 1.5rem;
  z-index: 100000;
  border-radius: 0 0 4px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ============================================
   SCREEN READER ONLY (Visually Hidden)
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: var(--primary-glow-subtle);
}

.filter-btn:focus-visible,
.social-link:focus-visible,
.project-link:focus-visible,
.contact-item:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Remove inner dotted focus border in Firefox */
button::-moz-focus-inner {
  border: 0;
}

/* ============================================
   COLOR CONTRAST IMPROVEMENTS
   ============================================ */
/* Boost low-opacity text to meet WCAG AA (4.5:1) on #000 background */
.page-description,
.stat-label,
.quote-author,
.experience-meta span,
.footer-content {
  opacity: 0.85;
}

.terminal-description {
  opacity: 1;
}

.dict-phonetic {
  color: rgba(255, 255, 255, 0.55);
}

.dict-forms {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body {
    scroll-behavior: auto;
    transition: none;
  }

  .warning-content h1 {
    animation: none;
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
  }

  .terminal::before,
  .terminal::after {
    animation: none;
  }

  .page {
    animation: none;
  }

  .social-link:hover {
    transform: none;
  }

  .skill-progress {
    transition: none;
  }

  .nav-text {
    transition: none;
  }

  .nav-link {
    transition: none;
  }
}

/* ============================================
   FONT DISPLAY SWAP OVERRIDE
   ============================================ */
@font-face {
  font-family: 'JetBrains Mono';
  font-display: swap;
}