/* Domains of Work section styles */
#domains {
  margin: 3em 0;
}

/* Research Domains heading with Gen Z styling */
#domains h2 {
  font-family: 'Orbitron', Arial, sans-serif;
  position: relative;
  display: inline-block;
  margin-bottom: 1.5em;
  font-size: 2.2em;
  letter-spacing: 2px;
  color: #33b1b0; /* Dimmer cyan color */
  text-shadow: 0 0 8px rgba(0, 255, 247, 0.4);
  animation: textGlitch 3s infinite;
}

/* Blinking cursor dot after the heading */
#domains h2::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  margin-bottom: 5px;
  border-radius: 50%;
  background-color: #ff00c8;
  animation: blink 1.2s infinite;
}

/* Animated underline for the heading */
#domains h2::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #00fff7, #ff00c8);
  border-radius: 3px;
  animation: gradientFlow 3s infinite;
}

@keyframes textGlitch {
  0%, 100% { transform: translateX(0); }
  98% { transform: translateX(0); }
  99% { transform: translateX(3px); }
}

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

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Education & Publications badges (Home) === */
.edu-badges {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px 0;
}

.edu-badges .edu-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.35); /* matches darker neon */
  background: linear-gradient(135deg, rgba(24,24,40,0.65), rgba(18,18,30,0.55));
  box-shadow: 0 6px 22px rgba(0,0,0,0.25), inset 0 0 18px rgba(168, 85, 247, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #e8e6ff;
}

.edu-badges .edu-item strong {
  color: #a855f7; /* neon heading palette */
}

.edu-badges .edu-item span {
  color: #c7bff9;
}

.edu-badges .edu-item.pubs {
  border-color: rgba(217, 70, 239, 0.35); /* magenta accent */
  box-shadow: 0 6px 22px rgba(0,0,0,0.25), inset 0 0 18px rgba(217, 70, 239, 0.12);
}

@media (max-width: 480px) {
  .edu-badges .edu-item {
    padding: 7px 10px;
    font-size: 0.95rem;
  }
}


/* Neon Japanese Title Styling */
.neon-japanese-title {
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Sans', sans-serif;
  font-size: 2.8em;
  font-weight: 700;
  text-align: center;
  margin: 1.5em 0;
  position: relative;
  
  /* Neon glow effect - Darker Purple with Magenta tint */
  color: #a855f7;
  text-shadow: 
    0 0 5px #a855f7,
    0 0 10px #9333ea,
    0 0 15px #7c3aed,
    0 0 20px #6b21a8,
    0 0 35px #a21caf,
    0 0 40px #86198f;
  
  /* Animation */
  animation: neonPulse 3s ease-in-out infinite alternate;
}

/* Neon pulsing animation - Darker Purple with Magenta tints */
@keyframes neonPulse {
  0% {
    text-shadow: 
      0 0 5px #a855f7,
      0 0 10px #9333ea,
      0 0 15px #7c3aed,
      0 0 20px #6b21a8,
      0 0 35px #a21caf,
      0 0 40px #86198f;
  }
  100% {
    text-shadow: 
      0 0 2px #a855f7,
      0 0 5px #9333ea,
      0 0 8px #7c3aed,
      0 0 12px #6b21a8,
      0 0 18px #86198f,
      0 0 25px #581c87;
  }
}

/* Responsive adjustments for Japanese title */
@media (max-width: 768px) {
  .neon-japanese-title {
    font-size: 2.2em;
  }
}

@media (max-width: 480px) {
  .neon-japanese-title {
    font-size: 1.8em;
  }
}

/* Zig-zag single column layout for domains */
.domains-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
  justify-items: center;
}
.domain-item {
  background: rgba(34,34,52,0.92);
  border-radius: 16px;
  box-shadow: 0 4px 16px #0f2027;
  padding: 1.5em;
  width: 320px;
  text-align: center;
  position: relative;
}
.domain-item:nth-child(4n+1),
.domain-item:nth-child(4n+4) {
  top: 0;
  left: 40px;
}
.domain-item:nth-child(4n+2),
.domain-item:nth-child(4n+3) {
  top: 0;
  left: -40px;
}
.domain-3d {
  width: 100%;
  height: 220px;
  margin: 1em auto 0 auto;
  background: #181828;
  border-radius: 12px;
  overflow: hidden;
}
/* Banner container styles */
#banner-container {
  width: 100vw;
  min-height: 200px;
  margin-bottom: 2em;
  overflow: hidden;
}
/* Banner image styles */
.banner-img {
  width: 100vw;
  max-width: 100vw;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: 0 4px 24px #0f2027;
  object-fit: cover;
  aspect-ratio: 4/3;
}
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Montserrat:wght@400;700&display=swap');
body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: linear-gradient(135deg, #232526 0%, #0f2027 100%);
  color: #e0e0e0;
  min-height: 100vh;
}
#three-hero {
  width: 100vw;
  height: 70vh;
  background: radial-gradient(circle at 50% 40%, #232526 60%, #0f2027 100%);
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 32px #0f2027;
}
nav {
  background: rgba(34, 34, 52, 0.98);
  box-shadow: 0 2px 12px #0f2027;
  padding: 1em 0;
  text-align: center;
  font-family: 'Orbitron', Arial, sans-serif;
  letter-spacing: 2px;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 3em;
}
nav a {
  color: #00fff7;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.3em;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 0 8px #00fff7;
}
nav a:hover {
  color: #ff00c8;
  text-shadow: 0 0 16px #ff00c8;
}
main {
  max-width: 1000px;
  margin: 3em auto;
  background: rgba(34, 34, 52, 0.92);
  border-radius: 20px;
  box-shadow: 0 8px 32px #0f2027;
  padding: 2.5em;
  font-family: 'Montserrat', Arial, sans-serif;
}
section {
  margin-bottom: 2.5em;
}
h1 {
  font-family: 'Orbitron', Arial, sans-serif;
  color: #00fff7;
  text-shadow: 0 0 12px #00fff7;
  font-size: 2.2em;
}
p, li {
  font-size: 1.1em;
}

/* LOTR GenZ styling for intro */
#home p:first-of-type {
  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 1.4em;
  color: #0051ff; /* Gojo's blue color */
  text-shadow: 0 0 6px rgba(0, 81, 255, 0.7), 0 0 15px rgba(106, 48, 255, 0.5);
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

#home p em {
  font-style: italic;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

/* Adding a subtle Jujutsu Kaisen-inspired effect */
#home p em::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #0051ff, #6a30ff, #0051ff); /* Gojo's blue color scheme */
  animation: domainExpansion 3s infinite;
  box-shadow: 0 0 8px rgba(0, 81, 255, 0.7);
}

@keyframes domainExpansion {
  0% { transform: scaleX(0.95); opacity: 0.7; }
  25% { transform: scaleX(1.02); opacity: 0.9; }
  50% { transform: scaleX(1.05); opacity: 1; box-shadow: 0 0 12px rgba(0, 81, 255, 0.9); }
  75% { transform: scaleX(1.02); opacity: 0.9; }
  100% { transform: scaleX(0.95); opacity: 0.7; }
}

#home p:nth-of-type(2), #home p:nth-of-type(3) {
  line-height: 1.6;
}

#home ul {
  margin-top: 1.5em;
  border-left: 2px solid rgba(0, 81, 255, 0.5);
  padding-left: 1.5em;
  position: relative;
}

#home ul::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #0051ff, transparent);
  animation: cursedEnergyFlow 4s infinite;
}

@keyframes cursedEnergyFlow {
  0% { opacity: 0.3; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0.3; transform: scaleY(0.85); }
}

/* Gojo Cursor Follower */
.gojo-cursor {
  position: fixed;
  width: 60px;
  height: 60px;
  pointer-events: none; /* Ensures it doesn't interfere with clicks */
  z-index: 10000; /* Ensure it's above everything */
  left: 0;
  top: 0;
  filter: drop-shadow(0 0 8px rgba(0, 81, 255, 0.8));
  will-change: transform; /* Performance optimization */
}

.gojo-cursor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: gojoFloat 2s infinite alternate;
  display: block; /* Ensure proper rendering */
}

/* Blue glow effect for Gojo's cursed energy */
.gojo-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 81, 255, 0.4) 0%, rgba(0, 81, 255, 0) 70%);
  z-index: -1;
  animation: pulseGlow 2s infinite;
  transform-origin: center;
  pointer-events: none;
  top: 0;
  left: 0;
}

@keyframes gojoFloat {
  0% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
  100% { transform: rotate(-3deg) scale(1); }
}

@keyframes pulseGlow {
  0% { transform: scale(1.0); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 0.8; }
  100% { transform: scale(1.0); opacity: 0.4; }
}

/* Gojo 3D Model Section Styling */
#gojo-3d-model {
  margin: 3em 0;
  text-align: center;
}

#gojo-3d-model p {
  color: #0051ff;
  font-size: 1.3em;
  margin-bottom: 1.5em;
  font-style: italic;
  text-shadow: 0 0 6px rgba(0, 81, 255, 0.5);
}

.sketchfab-embed-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  margin-bottom: 1em;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 81, 255, 0.6);
}

.sketchfab-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: block; /* Ensure it's displayed */
  min-height: 480px; /* Minimum height */
}

.sketchfab-embed-wrapper p {
  margin-top: 1em;
  text-align: center;
  font-size: 0.9em !important;
  color: #9a9a9a !important;
  text-shadow: none !important;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2em;
}
.project-card {
  background: linear-gradient(135deg, #232526 60%, #0f2027 100%);
  border-radius: 14px;
  box-shadow: 0 4px 16px #0f2027;
  padding: 1.5em;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px #ff00c8;
}
form {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}
input, textarea {
  padding: 1em;
  border-radius: 10px;
  border: none;
  background: #232526;
  color: #fff;
  font-size: 1em;
}
button {
  background: linear-gradient(90deg, #00fff7 0%, #ff00c8 100%);
  color: #fff;
  border: none;
  padding: 1em 2.5em;
  border-radius: 10px;
  font-size: 1.1em;
  cursor: pointer;
  font-family: 'Orbitron', Arial, sans-serif;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #0f2027;
}
button:hover {
  background: linear-gradient(90deg, #ff00c8 0%, #00fff7 100%);
  box-shadow: 0 4px 16px #ff00c8;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(15, 32, 39, 0.8) !important;
    border: 1px solid rgba(0, 255, 247, 0.3) !important;
    color: #00fff7 !important;
    font-size: 1.5rem !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    z-index: 1001 !important;
    cursor: pointer !important;
  }
}

/* Responsive Design for All Devices */
/* Base responsive styles */
html {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
}

/* Fix for sticky positioning */
nav {
  position: relative;
  z-index: 100;
}

/* Navigation responsive styles */
@media (max-width: 768px) {
  nav {
    position: relative;
    padding: 0;
    background: none;
  }
  
  /* Menu styles - no pseudo-element menu button */
  nav::before {
    content: "";
    display: none;
  }
  
  /* Hide the menu by default */
  nav ul {
    display: none;
    flex-direction: column;
    padding: 0.5rem;
    background-color: rgba(15, 32, 39, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: absolute;
    width: 100%;
    z-index: 1000;
  }
  
  /* Show the menu when nav has active class */
  nav.active ul {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding-top: 70px; /* More space for the menu button */
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background-color: rgba(15, 32, 39, 0.98);
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 0 15px rgba(0, 255, 247, 0.2);
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  nav li {
    margin: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: slideIn 0.5s forwards;
    animation-delay: calc(0.1s * var(--i, 0));
  }
  
  nav.active li {
    --i: 0;
  }
  
  nav.active li:nth-child(1) { --i: 1; }
  nav.active li:nth-child(2) { --i: 2; }
  nav.active li:nth-child(3) { --i: 3; }
  nav.active li:nth-child(4) { --i: 4; }
  nav.active li:nth-child(5) { --i: 5; }
  nav.active li:nth-child(6) { --i: 6; }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  nav a {
    padding: 1rem 0.5rem;
    display: block;
    width: 100%;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    border-radius: 8px;
  }
  
  nav a:hover {
    background: rgba(0, 255, 247, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  /* Add a bit of spacing between menu items for better touch targets */
  nav li + li {
    border-top: 1px solid rgba(255, 255, 247, 0.1);
    margin-top: 8px;
  }
}

/* Main content responsive styles */
@media (max-width: 992px) {
  main {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .domain-item:nth-child(4n+1),
  .domain-item:nth-child(4n+4),
  .domain-item:nth-child(4n+2),
  .domain-item:nth-child(4n+3) {
    left: 0;
  }
}

/* Project cards responsive styles */
@media (max-width: 768px) {
  .project-list {
    grid-template-columns: 1fr;
  }
  
  .project-card {
    width: 100%;
  }
  
  .domains-list {
    grid-template-columns: 1fr;
  }
  
  .domain-item {
    width: 100%;
  }
}

/* Small screens */
@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }
  
  h1 {
    font-size: 1.8rem;
    text-align: center;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  section {
    padding: 1.5rem 1rem;
  }
  
  .domain-3d {
    height: 180px;
  }
  
  input, textarea, button {
    padding: 0.5rem;
  }
  
  .contact-links {
    gap: 10px;
  }
  
  .contact-item {
    padding: 10px;
    flex: 1 1 100%; /* Full width on small screens */
  }
  
  /* Improve readability on mobile */
  p {
    line-height: 1.6;
  }
  
  /* Better spacing for project cards on mobile */
  .project-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }
  
  /* Ensure the Gojo cursor doesn't get in the way on mobile */
  .gojo-cursor {
    width: 40px;
    height: 40px;
    opacity: 0.8;
  }
}

/* Extra styling for medium screens */
@media (min-width: 481px) and (max-width: 768px) {
  .domains-list {
    gap: 1em;
  }
}

/* Print styles */
@media print {
  body {
    color: #000;
    background: #fff;
  }
  
  nav, button, form, .gojo-cursor {
    display: none;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
  
  main {
    width: 100%;
    margin: 0;
    padding: 0;
  }
}
