/* Base Styles */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Helvetica Neue', Arial, sans-serif;
}

:root {
   --primary-color: #0a0a0a;
   --secondary-color: #f0f0f0;
   --accent-color: #00c8ff;
   --accent-color-alt: #ff3e6c;
   --accent-color-third: #36e2ff;
   --accent-color-fourth: #ff36a8;
   --text-color: #ffffff;
   --dark-bg: #121212;
   --transition-speed: 0.3s;
}

body {
   padding: 0;
   max-width: 100%;
   margin: 0 auto;
   background-color: var(--primary-color);
   color: var(--text-color);
   overflow: hidden;
   position: relative;
   min-height: 100vh;
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Landing Page Styles */
.landing-page {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100vh;
   background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
   display: flex;
   justify-content: center;
   align-items: center;
   z-index: 1000;
   transition: opacity 0.8s ease, visibility 0.8s ease;
}

#three-container {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 1;
}

#three-container canvas {
   filter: blur(4px) contrast(1.1) brightness(1.05);
}

.landing-page.hidden {
   opacity: 0;
   visibility: hidden;
   pointer-events: none;
}

.main-portfolio {
   display: none;
}

.main-portfolio.active {
   display: block;
}

.landing-content {
   text-align: center;
   z-index: 10;
   position: relative;
   pointer-events: none;
}

.landing-content * {
   pointer-events: auto;
}

.controls {
   position: absolute;
   top: 20px;
   left: 20px;
   z-index: 20;
   background: rgba(0, 0, 0, 0.7);
   padding: 20px;
   border-radius: 10px;
   color: white;
   font-size: 14px;
}

.controls div {
   margin-bottom: 10px;
}

.controls label {
   display: inline-block;
   width: 120px;
}

.controls input[type="range"] {
   width: 150px;
   margin: 0 10px;
}

.controls span {
   display: inline-block;
   width: 30px;
   text-align: right;
}

.portfolio-title {
   font-size: 6rem;
   font-weight: 300;
   color: #2c3e50;
   margin-bottom: 2rem;
   letter-spacing: 0.2em;
   text-shadow: 0 0 20px rgba(44, 62, 80, 0.3);
   animation: titleGlow 3s ease-in-out infinite alternate;
}

.enter-button-container {
   margin-top: 3rem;
}

.enter-btn {
   background: transparent;
   border: 2px solid #2c3e50;
   color: #2c3e50;
   padding: 12px 30px;
   font-size: 1.1rem;
   font-weight: 500;
   letter-spacing: 0.1em;
   cursor: pointer;
   transition: all 0.3s ease;
   border-radius: 30px;
}

.enter-btn:hover {
   background: #2c3e50;
   color: white;
   box-shadow: 0 5px 20px rgba(44, 62, 80, 0.3);
   transform: translateY(-2px);
}


/* Animations */
@keyframes titleGlow {
   0% {
      text-shadow: 0 0 20px rgba(44, 62, 80, 0.3);
   }
   50% {
      text-shadow: 0 0 40px rgba(44, 62, 80, 0.6), 0 0 60px rgba(44, 62, 80, 0.4);
   }
   100% {
      text-shadow: 0 0 20px rgba(44, 62, 80, 0.3);
   }
}


/* Particles Background */
#particles-js {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 0;
   background-color: transparent;
}

/* Custom Particle Effects */
.particle-burst {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 9999;
}

.burst-particle {
   position: absolute;
   border-radius: 50%;
   pointer-events: none;
   filter: blur(0.5px);
   transform-origin: center center;
}

/* Text Particle System */
.text-particle-system {
   position: fixed;
   pointer-events: none;
   z-index: 9997;
}

.text-particle {
   position: absolute;
   border-radius: 50%;
   pointer-events: none;
   filter: blur(0.5px);
   z-index: 9997;
   transition: transform 0.05s linear;
}

.expanding-ring {
   position: absolute;
   border-radius: 50%;
   transform: translate(-50%, -50%);
   pointer-events: none;
}

.floating-particle {
   position: fixed;
   border-radius: 50%;
   pointer-events: none;
   filter: blur(2px);
   z-index: 0;
   transition: opacity 0.5s ease;
}

/* Header Styles */
.header {
   text-align: center;
   margin-bottom: 40px;
   padding: 80px 80px 0;
   position: relative;
   z-index: 1;
   background: rgba(10, 10, 10, 0.3);
   backdrop-filter: blur(3px);
   border-radius: 0 0 20px 20px;
   width: 90%;
   max-width: 1200px;
   margin-left: auto;
   margin-right: auto;
}

/* Glitch Text Effect */
.glitch-text {
   font-size: 3rem;
   font-weight: bold;
   letter-spacing: 4px;
   margin-bottom: 30px;
   position: relative;
   color: var(--text-color);
   text-transform: uppercase;
   cursor: pointer;
   transition: text-shadow 0.3s, transform 0.3s, opacity 0.3s;
   padding-top: 5px;
   display: inline-block;
   width: auto;
   z-index: 2;
   white-space: nowrap;
}
.glitch-text:hover {
   text-shadow: 0 0 15px var(--accent-color), 0 0 30px var(--accent-color-alt);
   transform: scale(1.05);
}

.glitch-text::before,
.glitch-text::after {
   content: attr(data-text);
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   opacity: 0.8;
}

.glitch-text::before {
   color: var(--accent-color);
   z-index: -1;
   animation: glitch-effect 3s infinite;
}

.glitch-text::after {
   color: var(--accent-color-alt);
   z-index: -2;
   animation: glitch-effect 2s infinite reverse;
}

.glitch-text.active-glitch::before {
   animation: intense-glitch 0.5s infinite;
}

.glitch-text.active-glitch::after {
   animation: intense-glitch 0.4s infinite reverse;
}

@keyframes glitch-effect {
   0% {
      transform: translate(0);
   }
   20% {
      transform: translate(-3px, 3px);
   }
   40% {
      transform: translate(-3px, -3px);
   }
   60% {
      transform: translate(3px, 3px);
   }
   80% {
      transform: translate(3px, -3px);
   }
   100% {
      transform: translate(0);
   }
}

@keyframes intense-glitch {
   0% {
      transform: translate(-5px, 0);
      clip-path: inset(10% 0 80% 0);
   }
   20% {
      transform: translate(5px, 0);
      clip-path: inset(30% 0 50% 0);
   }
   40% {
      transform: translate(-5px, 0);
      clip-path: inset(50% 0 30% 0);
   }
   60% {
      transform: translate(5px, 0);
      clip-path: inset(70% 0 10% 0);
   }
   80% {
      transform: translate(-5px, 0);
      clip-path: inset(10% 0 70% 0);
   }
   100% {
      transform: translate(0);
      clip-path: inset(0);
   }
}

/* Navigation Styles */
.nav {
   display: flex;
   justify-content: center;
   gap: 17px;
   margin: 0 auto 40px;
   padding: 10px 30px;
   position: relative;
   z-index: 2;
   background: rgba(10, 10, 10, 0.2);
   backdrop-filter: blur(2px);
   border-radius: 30px;
   width: fit-content;
}

.nav a {
   text-decoration: none;
   color: var(--text-color);
   font-size: 0.8rem;
   text-transform: lowercase;
   transition: all var(--transition-speed);
   position: relative;
   padding: 5px 10px;
   overflow: hidden;
}

.nav a::before {
   content: '';
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   height: 2px;
   background: linear-gradient(90deg, var(--accent-color), var(--accent-color-alt));
   transform: translateX(-100%);
   transition: transform var(--transition-speed);
}

.nav a:hover::before,
.nav a.active::before {
   transform: translateX(0);
}

.nav a.active {
   font-weight: bold;
   color: var(--accent-color);
}

.nav a:hover {
   text-shadow: 0 0 10px var(--accent-color);
}

/* Portfolio Container Styles */
.portfolio-container {
   width: 100%;
   padding: 0 20px;
   position: relative;
   z-index: 1;
}

/* Category Section Styles */
.category-section {
   margin-bottom: 40px;
   opacity: 1;
   transform: translateY(0);
}

.category-title {
   font-size: 1.8rem;
   color: var(--text-color);
   margin-bottom: 20px;
   padding-left: 10px;
   font-weight: bold;
   text-transform: uppercase;
   letter-spacing: 2px;
   text-shadow: 0 0 10px var(--accent-color);
}

.category-items {
   display: flex;
   overflow-x: auto;
   overflow-y: hidden;
   gap: 20px;
   padding: 20px 0 30px 20px;
   scrollbar-width: thin;
   scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.1);
   scroll-behavior: smooth;
   position: relative;
}


.category-items::-webkit-scrollbar {
   display: none;
}

.category-items {
   -ms-overflow-style: none;
   scrollbar-width: none;
}

/* Gallery Styles (legacy) */
.gallery {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 10px;
   width: 100%;
   padding: 0 20px;
   opacity: 1;
   transform: translateY(0);
   position: relative;
   z-index: 1;
}

/* Portfolio Item Styles */
.portfolio-item {
   min-width: 500px;
   width: 500px;
   height: 280px;
   position: relative;
   overflow: hidden;
   border-radius: 12px;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
   transition: all 0.3s ease;
   cursor: pointer;
   border: 2px solid rgba(255, 255, 255, 0.1);
   flex-shrink: 0;
   background: var(--dark-bg);
}

.portfolio-item:hover {
   box-shadow: 0 8px 30px rgba(0, 200, 255, 0.4);
   border-color: var(--accent-color);
}

.gallery-item {
   width: 100%;
   position: relative;
   overflow: hidden;
   border-radius: 0;
   box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
   transition: opacity 0.5s;
   opacity: 0;
   transform: translateY(30px);
   cursor: pointer;
   border: 2px solid rgba(255, 255, 255, 0.1);
}

.gallery-item.fade-in {
   animation: fadeInStagger 0.3s forwards;
}

.item-inner {
   position: relative;
   overflow: hidden;
   width: 100%;
   height: 100%;
   background: var(--dark-bg);
   display: flex;
   justify-content: center;
   align-items: center;
}

.gallery-item img {
   width: 100%;
   height: 100%;
   object-fit: contain;
   transition: transform 0.5s;
   background-color: var(--dark-bg);
}

.gallery-item:hover {
   box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
   transform: scale(1);
}

.gallery-item .video-thumbnail {
   position: relative;
   width: 100%;
   height: 100%;
   z-index: 3;
}

.gallery-item .video-thumbnail ~ .overlay {
   display: none;
}

.gallery-item .video-thumbnail img {
   transition: transform 0.3s ease;
}

.gallery-item .video-thumbnail:hover img {
   transform: scale(1.05);
}

.gallery-item .overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 1);
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   opacity: 0;
   transition: opacity 0.3s ease;
   padding: 20px;
   text-align: center;
   z-index: 2;
}

.gallery-item:hover .overlay {
   opacity: 1;
}

.gallery-item .overlay h3 {
   color: white;
   font-size: 1.4rem;
   margin-bottom: 15px;
   font-weight: 300;
   letter-spacing: 1px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
   padding-bottom: 8px;
}

.project-info {
   display: flex;
   flex-direction: column;
   gap: 8px;
   width: 100%;
   max-width: 90%;
}

.project-info .summary {
   color: rgba(255, 255, 255, 0.9);
   font-size: 1.1rem;
   font-weight: 400;
   margin-bottom: 5px;
}

.project-info .skills {
   color: var(--accent-color);
   font-size: 0.9rem;
   font-weight: 300;
   margin-bottom: 10px;
   font-style: italic;
}

.project-info .description {
   color: rgba(255, 255, 255, 0.7);
   font-size: 0.9rem;
   font-weight: 300;
   line-height: 1.5;
}

.gallery-item .overlay p {
   color: rgba(255, 255, 255, 0.8);
   font-size: 1rem;
   font-weight: 300;
   line-height: 1.5;
}

.gallery-item.hidden {
   display: none;
}

/* About Page Styles */
#about-page {
   padding: 0;
   width: 100%;
   max-width: 100%;
   margin: 0 auto;
   box-sizing: border-box;
}

#about-page.active {
   display: block;
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
}

.about-container {
   padding: 0;
   width: 100%;
   max-width: 100%;
   margin: 0 auto;
   box-sizing: border-box;
}

.about-container {
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 2rem;
   background: transparent;
   border: 2px solid transparent;
   border-radius: 10px;
   box-shadow: none;
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   transition: all 0.3s ease;
   position: relative;
   overflow: hidden;
}

#about-page.active .about-container {
   opacity: 1;
   transform: translateY(0);
}

.about-header {
   text-align: center;
   margin-bottom: 40px;
   position: relative;
}

.about-header h2 {
   font-size: 2.5rem;
   color: var(--text-color);
   margin-bottom: 20px;
   position: relative;
   display: inline-block;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.about-header h2::after {
   content: '';
   position: absolute;
   bottom: -10px;
   left: 50%;
   transform: translateX(-50%);
   width: 100px;
   height: 3px;
   background: linear-gradient(90deg, var(--accent-color), var(--accent-color-alt));
   border-radius: 3px;
}

.about-header-info {
   margin-top: 20px;
   color: var(--text-color);
   font-size: 1.1rem;
   opacity: 0.9;
}

.about-header-info p {
   display: inline-block;
   padding: 8px 20px;
   background: transparent;
   border-radius: 30px;
   border: none;
   box-shadow: none;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.about-content {
   display: flex;
   flex-wrap: wrap;
   gap: 40px;
   margin-bottom: 40px;
}

.about-bio {
   flex: 1;
   min-width: 300px;
   background: rgba(0, 0, 0, 0.2);
   padding: 25px;
   border-radius: 15px;
   border: 2px solid transparent;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-bio:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.about-bio h3, .about-skills h3, .about-experience h3, .contact-info h3 {
   font-size: 2rem;
   color: var(--accent-color);
   margin-bottom: 20px;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
   position: relative;
   display: inline-block;
}

.about-bio h3::after, .about-skills h3::after, .about-experience h3::after, .contact-info h3::after {
   content: '';
   position: absolute;
   bottom: -5px;
   left: 0;
   width: 50px;
   height: 2px;
   background: linear-gradient(90deg, var(--accent-color), transparent);
   border-radius: 2px;
}

.about-bio p {
   margin-bottom: 20px;
   line-height: 1.8;
   font-size: 1.05rem;
   color: rgba(255, 255, 255, 0.9);
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.about-skills {
   flex: 1;
   min-width: 300px;
   background: rgba(0, 0, 0, 0.2);
   padding: 25px;
   border-radius: 15px;
   border: 2px solid transparent;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-skills:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.about-skills h4 {
   margin: 15px 0 5px;
   color: var(--text-color);
   font-size: 1.1rem;
   font-weight: 500;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.skills-category {
   margin-bottom: 20px;
   padding-bottom: 15px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
   position: relative;
}

.skills-category:last-child {
   border-bottom: none;
   padding-bottom: 0;
}

.skills-category h4 {
   color: var(--accent-color);
   font-size: 1.2rem;
   margin-bottom: 10px;
   display: flex;
   align-items: center;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.skills-category h4::before {
   content: '•';
   color: var(--accent-color);
   margin-right: 8px;
   font-size: 1.4rem;
   text-shadow: 0 0 8px var(--accent-color);
}

.skills-category p {
   color: rgba(255, 255, 255, 0.9);
   line-height: 1.6;
   font-size: 1rem;
   margin-left: 18px;
   word-wrap: break-word;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* 첫 번째와 두 번째 스킬 카테고리 강조 */
.skills-category:nth-child(1) h4,
.skills-category:nth-child(2) h4 {
   font-size: 1.3rem;
   color: var(--accent-color-alt);
}

.skills-category:nth-child(1) h4::before,
.skills-category:nth-child(2) h4::before {
   content: '★';
   color: var(--accent-color-alt);
   font-size: 1.2rem;
   text-shadow: 0 0 10px var(--accent-color-alt);
}

.about-bottom-section {
   display: flex;
   flex-wrap: wrap;
   gap: 40px;
}

.about-experience {
   flex: 2;
   min-width: 300px;
   position: relative;
   background: rgba(0, 0, 0, 0.2);
   padding: 25px 25px 25px 80px;
   border-radius: 15px;
   border: 2px solid transparent;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-experience:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Timeline styling for experience section */
.experience-item {
   margin-bottom: 30px;
   padding-bottom: 30px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
   position: relative;
   padding-left: 20px;
}

.experience-item:last-child {
   border-bottom: none;
   margin-bottom: 0;
   padding-bottom: 0;
}

/* Timeline vertical line */
.about-experience:before {
   content: '';
   position: absolute;
   top: 80px;
   left: 47px;
   height: calc(100% - 120px);
   width: 3px;
   background: linear-gradient(to bottom, 
      var(--accent-color) 0%, 
      var(--accent-color-alt) 100%);
   opacity: 0.9;
   border-radius: 1px;
   box-shadow: 0 0 8px rgba(0, 200, 255, 0.3);
}

/* Timeline dots for each experience item */
.experience-item:before {
   content: '';
   position: absolute;
   left: -40px;
   top: 8px;
   width: 16px;
   height: 16px;
   border-radius: 50%;
   background: var(--accent-color);
   box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
   z-index: 2;
}

/* Year label for each experience item */
.experience-item .year {
   position: absolute;
   left: -75px;
   top: 30px;
   color: var(--accent-color);
   font-size: 0.9rem;
   font-weight: bold;
   background: rgba(0, 0, 0, 0.7);
   padding: 4px 10px;
   border-radius: 20px;
   opacity: 0.9;
   box-shadow: 0 0 10px rgba(0, 200, 255, 0.2);
   border: 1px solid rgba(0, 200, 255, 0.3);
   white-space: nowrap;
}

.experience-item h4 {
   font-size: 1.3rem;
   margin-bottom: 5px;
   color: var(--text-color);
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.experience-item p {
   margin-bottom: 10px;
   line-height: 1.6;
   color: rgba(255, 255, 255, 0.9);
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.experience-item p:first-of-type {
   color: rgba(255, 255, 255, 0.7);
   font-style: italic;
   font-size: 0.95rem;
}

.contact-info {
   flex: 1;
   min-width: 300px;
   background: rgba(0, 0, 0, 0.2);
   padding: 25px;
   border-radius: 15px;
   border: 2px solid transparent;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
   display: flex;
   flex-direction: column;
}

.contact-info:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.contact-detail {
   margin-bottom: 12px;
   font-size: 1.05rem;
   color: rgba(255, 255, 255, 0.8);
   display: flex;
   align-items: baseline;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
}

.contact-detail span {
   color: var(--text-color);
   font-weight: 500;
   margin-left: 8px;
}

.contact-links {
   margin-top: 20px;
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
}

.btn-glow {
   display: inline-block;
   padding: 12px 25px;
   background: rgba(0, 200, 255, 0.1);
   color: var(--accent-color);
   text-decoration: none;
   border-radius: 30px;
   border: 1px solid var(--accent-color);
   transition: all 0.3s ease;
   text-align: center;
   font-weight: 500;
   letter-spacing: 1px;
   flex: 1;
   min-width: 120px;
}

.btn-glow:hover {
   background: rgba(0, 200, 255, 0.2);
   box-shadow: 0 0 15px rgba(0, 200, 255, 0.5), 0 0 30px rgba(0, 200, 255, 0.3);
   transform: translateY(-3px);
   color: white;
}

/* Media Queries for About Page */
@media (max-width: 768px) {
   .about-content, .about-bottom-section {
      flex-direction: column;
   }
   
   #about-page {
      padding: 20px;
   }
   
   .about-container {
      padding: 15px;
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
      box-sizing: border-box;
   }
   
   /* Adjust timeline for mobile */
   .experience-item {
      padding-left: 25px;
   }
   
   .about-experience {
      padding-left: 40px;
   }
   
   .experience-item .year {
      position: relative;
      left: 0;
      top: 0;
      margin-bottom: 10px;
      display: inline-block;
      min-width: auto;
   }
   
   .about-experience:before {
      left: 25px;
      top: 80px;
   }
   
   .experience-item:before {
      left: -25px;
      width: 12px;
      height: 12px;
   }
   
   .about-bio p, .about-skills p, .experience-item p {
      font-size: 0.95rem;
      line-height: 1.5;
   }
   
   .about-content, .about-bottom-section {
      flex-direction: column;
      gap: 20px;
   }
   
   .about-bio, .about-skills, .about-experience, .contact-info {
      width: 100%;
      margin-bottom: 20px;
      padding: 15px;
   }
}

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

@keyframes fadeInStagger {
   from {
      opacity: 0;
      transform: translateY(20px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/* Neon Glow Effects */
.neon-glow {
   text-shadow: 0 0 10px var(--accent-color),
                0 0 20px var(--accent-color),
                0 0 30px var(--accent-color-alt);
}

.box-glow {
   box-shadow: 0 0 10px var(--accent-color),
               0 0 20px var(--accent-color-alt);
}

/* Media Queries */
@media (max-width: 768px) {
   .nav {
      flex-wrap: wrap;
      gap: 15px;
   }

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

   .about-content {
      grid-template-columns: 1fr;
   }
   
   .glitch-text {
      font-size: 1.8rem;
      letter-spacing: 4px;
      white-space: nowrap;
   }

   /* Portfolio mobile styles */
   .portfolio-container {
      padding: 0 10px;
   }

   .category-title {
      font-size: 1.5rem;
      margin-bottom: 15px;
   }

   .portfolio-item {
      min-width: 350px;
      width: 350px;
      height: 200px;
   }

   .category-items {
      gap: 15px;
      padding: 10px 0 20px 10px;
   }
}

/* Game Page Styles */
#game-page {
   background: transparent;
   backdrop-filter: none;
   color: white;
   position: relative;
   width: 90%;
   max-width: 1200px;
   min-height: 600px;
   padding: 30px;
   box-sizing: border-box;
   display: none;
   flex-direction: column;
   justify-content: flex-start;
   align-items: center;
   z-index: 5;
   margin-top: 40px;
   border-radius: 20px;
   box-shadow: none;
}

#game-page.active {
   display: flex;
   width: 90%;
   max-width: 1200px;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   margin: 0;
}

/* Game Container Styles */
.game-container {
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 2rem;
   background: transparent;
   border: 2px solid rgba(255, 255, 255, 0.1);
   border-radius: 10px;
   box-shadow: none;
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   transition: all 0.3s ease;
   position: relative;
   overflow: hidden;
   animation: fadeScale 0.8s forwards;
   display: flex;
   flex-direction: column;
   align-items: center;
}

.game-container h2 {
   font-size: 2rem;
   margin-top: 30px;
   margin-bottom: 10px;
   text-align: center;
   color: var(--accent-color);
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-container p {
   text-align: center;
   margin-bottom: 20px;
   font-size: 1rem;
   color: #ccc;
}

/* Game Menu Styles */
.game-menu {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 15px;
   margin: 20px auto;
   width: 100%;
   max-width: 800px;
}

.game-card {
   background: rgba(40, 40, 60, 0.7);
   border-radius: 10px;
   padding: 15px;
   text-align: center;
   transition: all 0.3s ease;
   border: none;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-card h3 {
   font-size: 1.2rem;
}

.game-card p {
   font-size: 0.9rem;
   margin-bottom: 15px;
}

/* Game Area Styles */
#game-area {
   width: 90%;
   max-width: 800px;
   display: none;
   flex-direction: column;
   align-items: center;
   min-height: 300px;
   padding: 20px;
   background: rgba(10, 10, 10, 0.95);
   border-radius: 15px;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   overflow: visible;
   z-index: 10;
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
}

#game-area h2 {
   text-align: center;
   margin-bottom: 15px;
   color: var(--accent-color);
   font-size: 1.8rem;
}

#game-area p {
   text-align: center;
   margin-bottom: 25px;
   opacity: 0.8;
   font-size: 1rem;
}

/* Remove the gallery adjustment for game page */
.gallery.game-active {
   width: 100%;
   padding-right: 0;
}

#portfolio-gallery.game-active {
   width: 100%;
   margin-right: 0;
}

/* Game Buttons */
.play-btn, .guess-btn, .new-game-btn, .restart-btn {
   background: linear-gradient(135deg, var(--accent-color) 0%, #0080ff 100%);
   color: white;
   border: none;
   padding: 10px 25px;
   border-radius: 30px;
   font-size: 1rem;
   font-weight: bold;
   cursor: pointer;
   transition: all 0.3s ease;
   box-shadow: 0 5px 15px rgba(0, 200, 255, 0.3);
}

.play-btn:hover, .guess-btn:hover, .new-game-btn:hover, .restart-btn:hover {
   transform: scale(1.05);
   box-shadow: 0 5px 20px rgba(0, 200, 255, 0.5);
}

/* Back Button Styles */
.back-btn {
   background: transparent;
   color: var(--accent-color);
   border: 2px solid var(--accent-color);
   padding: 8px 16px;
   border-radius: 30px;
   font-size: 0.9rem;
   cursor: pointer;
   transition: all 0.3s ease;
   margin-bottom: 20px;
   display: inline-block;
   position: absolute;
   top: 10px;
   left: 10px;
   z-index: 10;
}

.back-btn:hover {
   background: rgba(0, 200, 255, 0.1);
   transform: translateX(-5px);
}

@keyframes fadeScale {
   from {
      opacity: 0;
      transform: scale(0.95);
   }
   to {
      opacity: 1;
      transform: scale(1);
   }
}

/* Number Baseball Game Styles */
.input-container {
   display: flex;
   justify-content: center;
   gap: 10px;
   margin-bottom: 20px;
}

.input-container input {
   width: 50px;
   height: 50px;
   font-size: 1.5rem;
   text-align: center;
   border-radius: 10px;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.1);
   color: white;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.result-container {
   max-width: 600px;
   margin: 0 auto;
   background: rgba(0, 0, 0, 0.2);
   border-radius: 10px;
   padding: 15px;
}

.result-list {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   gap: 10px;
   justify-content: center;
   max-height: 300px;
   overflow-y: auto;
   padding: 5px;
}

.result-item {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   padding: 10px;
   background: rgba(255, 255, 255, 0.05);
   border-radius: 5px;
   width: calc(33.33% - 10px);
   min-width: 80px;
   box-sizing: border-box;
}

.result-item .guess {
   font-weight: bold;
   font-size: 1.2rem;
   margin-bottom: 5px;
}

.result-item .result {
   color: var(--accent-color);
}

/* Rock Paper Scissors Game Styles */
.score-board {
   display: flex;
   justify-content: center;
   gap: 50px;
   margin-bottom: 30px;
}

.score {
   display: flex;
   flex-direction: column;
   align-items: center;
}

.score span:first-child {
   font-size: 0.9rem;
   opacity: 0.8;
}

.score span:last-child {
   font-size: 2rem;
   font-weight: bold;
   color: var(--accent-color);
}

.game-status {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 20px;
   margin-bottom: 30px;
}

.choice {
   width: 80px;
   height: 80px;
   display: flex;
   justify-content: center;
   align-items: center;
   font-size: 2.5rem;
   background: rgba(255, 255, 255, 0.05);
   border-radius: 50%;
   border: 1px solid rgba(255, 255, 255, 0.1);
}

.vs {
   font-weight: bold;
   font-size: 1.2rem;
   opacity: 0.7;
}

.result {
   text-align: center;
   font-size: 1.2rem;
   /* margin-bottom: 30px; */
   /* height: 30px; */
}

.choices {
   display: flex;
   justify-content: center;
   gap: 20px;
}

.choice-btn {
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 15px;
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 10px;
   cursor: pointer;
   transition: transform 0.2s, box-shadow 0.2s;
}

.choice-btn:hover {
   transform: translateY(-5px);
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 
               0 0 10px var(--accent-color);
}

.choice-btn .emoji {
   font-size: 2rem;
   margin-bottom: 5px;
}

.choice-btn .name {
   font-size: 0.9rem;
}

/* Memory Game Styles */
.game-stats {
   display: flex;
   justify-content: center;
   gap: 30px;
   margin-bottom: 20px;
}

.stat {
   display: flex;
   gap: 5px;
}

.stat span:last-child {
   font-weight: bold;
   color: var(--accent-color);
}

.memory-board {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 15px;
   max-width: 600px;
   margin: 0 auto;
}

.memory-card {
   aspect-ratio: 1;
   perspective: 1000px;
   cursor: pointer;
   min-height: 120px;
}

.memory-card .card-inner {
   position: relative;
   width: 100%;
   height: 100%;
   text-align: center;
   transition: transform 0.6s;
   transform-style: preserve-3d;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
   border-radius: 10px;
}

.memory-card .card-front,
.memory-card .card-back {
   position: absolute;
   width: 100%;
   height: 100%;
   backface-visibility: hidden;
   display: flex;
   justify-content: center;
   align-items: center;
   border-radius: 10px;
   font-size: 3rem;
}

.memory-card .card-front {
   background: linear-gradient(135deg, var(--accent-color), var(--accent-color-alt));
   box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
   border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-card .card-back {
   background: rgba(255, 255, 255, 0.1);
   transform: rotateY(180deg);
   box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.memory-card.flipped .card-inner {
   transform: rotateY(180deg);
}

.memory-card.matched .card-back {
   background: rgba(0, 255, 0, 0.1);
   border: 1px solid rgba(0, 255, 0, 0.3);
   box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.memory-card:hover .card-inner {
   box-shadow: 0 8px 16px rgba(0, 200, 255, 0.4);
   transform: translateY(-5px);
}

.memory-card.flipped:hover .card-inner {
   transform: rotateY(180deg) translateY(-5px);
}

/* Gomoku Game Styles */
.gomoku-container {
   display: flex;
   flex-direction: column;
   align-items: center;
   margin-top: 20px;
}

#gomoku-canvas {
   margin: 20px 0;
   background: rgba(40, 40, 60, 0.7);
   border-radius: 5px;
}

.player-info {
   background: rgba(40, 40, 60, 0.7);
   padding: 10px 20px;
   border-radius: 30px;
   margin-bottom: 15px;
}

/* Media Queries for Games */
@media (max-width: 768px) {
   .memory-board {
      grid-template-columns: repeat(3, 1fr);
   }
   
   .choices {
      flex-wrap: wrap;
   }
   
   .game-menu {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
   }
}

/* Video Thumbnail Styles */
.video-thumbnail {
   position: relative;
   width: 100%;
   height: 100%;
   cursor: pointer;
   overflow: hidden;
   z-index: 5;
}

.video-thumbnail img,
.video-thumbnail video {
   width: 100%;
   height: 100%;
   object-fit: cover;
   transition: transform 0.5s;
}

.play-button {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   width: 70px;
   height: 70px;
   background-color: rgba(255, 0, 0, 0.8);
   border-radius: 50%;
   display: flex;
   justify-content: center;
   align-items: center;
   transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
   z-index: 4;
   cursor: pointer;
   opacity: 0.9;
}

.play-button::after {
   content: '';
   width: 0;
   height: 0;
   border-top: 15px solid transparent;
   border-bottom: 15px solid transparent;
   border-left: 20px solid white;
   margin-left: 5px;
}

.gallery-item .video-thumbnail:hover .play-button {
   background-color: rgba(255, 0, 0, 1);
   transform: translate(-50%, -50%) scale(1.1);
}

/* Video Modal Styles */
.video-modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.9);
   display: flex;
   justify-content: center;
   align-items: center;
   z-index: 9999;
}

.modal-content {
   position: relative;
   width: 80%;
   max-width: 1000px;
   background-color: var(--dark-bg);
   border-radius: 10px;
   box-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
   overflow: hidden;
   animation: scaleIn 0.3s ease;
}

.close-modal {
   position: absolute;
   top: -40px;
   right: 0;
   color: white;
   font-size: 30px;
   cursor: pointer;
   transition: color 0.3s ease;
}

.close-modal:hover {
   color: #ff3e6c;
}

.video-container {
   position: relative;
   padding-bottom: 56.25%;
   height: 0;
   overflow: hidden;
}

.video-container iframe {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
}

@keyframes scaleIn {
   from { transform: scale(0.9); }
   to { transform: scale(1); }
}

/* 로컬 비디오 스타일 */
.gallery-item .video-thumbnail.local-video video {
   width: 100%;
   height: 100%;
   object-fit: contain;
   transition: transform 0.3s ease;
   background-color: var(--dark-bg);
   cursor: pointer;
   z-index: 1;
   -webkit-transform-style: preserve-3d;
   transform-style: preserve-3d;
   -webkit-backface-visibility: hidden;
   backface-visibility: hidden;
}

.gallery-item .video-thumbnail.local-video:hover video {
   transform: scale(1);
}

/* Game Styles - Common */
.game-title {
   color: var(--accent-color);
   text-align: center;
   margin-bottom: 10px;
}

.game-description {
   text-align: center;
   margin-bottom: 20px;
   color: #ccc;
}

.game-btn {
   background: linear-gradient(135deg, var(--accent-color) 0%, #0080ff 100%);
   color: white;
   border: none;
   padding: 8px 20px;
   border-radius: 30px;
   font-size: 1rem;
   font-weight: bold;
   cursor: pointer;
   transition: all 0.3s ease;
   box-shadow: 0 5px 15px rgba(0, 200, 255, 0.3);
}

.game-btn:hover {
   transform: scale(1.05);
   box-shadow: 0 5px 20px rgba(0, 200, 255, 0.5);
}

.game-btn:disabled {
   opacity: 0.7;
   cursor: not-allowed;
   transform: none;
   box-shadow: none;
}

.win-message {
   text-align: center;
   margin-bottom: 20px;
   padding: 15px;
   background: rgba(0, 200, 255, 0.1);
   border-radius: 10px;
   border: 1px solid var(--accent-color);
}

.win-message h3 {
   color: var(--accent-color);
   margin-bottom: 10px;
}

/* Memory Game Styles */
.memory-board {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 10px;
   max-width: 400px;
   margin: 0 auto;
}

.memory-card {
   aspect-ratio: 1;
   perspective: 1000px;
   cursor: pointer;
}

.memory-card .card-inner {
   position: relative;
   width: 100%;
   height: 100%;
   text-align: center;
   transition: transform 0.6s;
   transform-style: preserve-3d;
}

.memory-card .card-front,
.memory-card .card-back {
   position: absolute;
   width: 100%;
   height: 100%;
   backface-visibility: hidden;
   display: flex;
   justify-content: center;
   align-items: center;
   border-radius: 5px;
   font-size: 2.5rem;
}

.memory-card .card-front {
   background: linear-gradient(135deg, var(--accent-color), var(--accent-color-alt));
   box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
   border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-card .card-back {
   background: rgba(255, 255, 255, 0.1);
   transform: rotateY(180deg);
}

.memory-card.flipped .card-inner {
   transform: rotateY(180deg);
}

.memory-card.matched .card-back {
   background: rgba(0, 255, 0, 0.1);
   border: 1px solid rgba(0, 255, 0, 0.3);
}

.game-stats {
   display: flex;
   justify-content: space-around;
   margin-bottom: 20px;
}

.stat {
   display: flex;
   flex-direction: column;
   align-items: center;
}

/* Card Battle Game Styles */
.health-bar-outer {
   width: 100%;
   height: 15px;
   background-color: rgba(255, 0, 0, 0.2);
   border-radius: 10px;
   overflow: hidden;
   margin-top: 5px;
}

.health-bar-inner {
   height: 100%;
   background: linear-gradient(90deg, #ff3e6c, #ff36a8);
   border-radius: 10px;
   transition: width 0.3s ease;
}

.card {
   width: 80px;
   height: 120px;
   border-radius: 10px;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   color: white;
   font-weight: bold;
   cursor: pointer;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
   position: relative;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
   margin: 0 5px;
}

.card:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card.active {
   transform: translateY(-10px);
   box-shadow: 0 10px 20px rgba(0, 200, 255, 0.5);
}

.card-attack {
   background: linear-gradient(135deg, #ff3e6c, #ff36a8);
}

.card-defense {
   background: linear-gradient(135deg, #36e2ff, #00c8ff);
}

.card-magic {
   background: linear-gradient(135deg, #a36eff, #7c3aed);
}

.card-value {
   font-size: 2rem;
}

.card-type {
   font-size: 0.8rem;
   margin-top: 5px;
}

.battle-card {
   width: 100px;
   height: 150px;
   margin: 10px;
   animation: cardEntrance 0.5s ease;
}

.card-area {
   margin-top: 10px;
   min-height: 150px;
   display: flex;
   justify-content: center;
}

.battle-log {
   width: 100%;
   max-width: 600px;
   height: 100px;
   overflow-y: auto;
   padding: 10px;
   background-color: rgba(0, 0, 0, 0.2);
   border-radius: 5px;
   margin-bottom: 20px;
   color: #ccc;
   font-size: 0.9rem;
}

.player-hand {
   display: flex;
   justify-content: center;
   gap: 10px;
   flex-wrap: wrap;
   width: 100%;
   max-width: 600px;
}

@keyframes cardEntrance {
   from {
      transform: translateY(-50px);
      opacity: 0;
   }
   to {
      transform: translateY(0);
      opacity: 1;
   }
}

/* Contact Links */
.contact-links {
   display: flex;
   flex-wrap: wrap;
   gap: 15px;
   margin-top: 15px;
}

.btn-glow {
   display: inline-block;
   padding: 8px 15px;
   background: rgba(0, 200, 255, 0.1);
   color: var(--accent-color);
   text-decoration: none;
   border-radius: 20px;
   border: 1px solid var(--accent-color);
   transition: all 0.3s ease;
   text-align: center;
}

.btn-glow:hover {
   background: rgba(0, 200, 255, 0.2);
   box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
   transform: translateY(-3px);
}

/* Media Queries for About Page */
@media (max-width: 768px) {
   .about-content {
      grid-template-columns: 1fr;
   }
   
   .about-bottom-section {
      grid-template-columns: 1fr;
   }
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* 페이지 공통 스타일 */
.page {
    width: 100%;
    min-height: 100vh;
    padding: 2rem 0;
    display: none;
}

.page.active {
    display: block;
}

/* Portfolio 페이지 스타일 */
#portfolio-page {
    display: none;
}

#portfolio-page.active {
    display: block;
}

/* About 페이지 스타일 */
#about-page {
    display: none;
}

#about-page.active {
    display: block;
}

/* Games 페이지 스타일 (중복 제거됨 - 위에 정의되어 있음) */

/* 햄버거 메뉴 스타일 제거 */
.menu-toggle {
  display: none; /* 항상 숨김 */
}

/* 모바일 화면용 미디어 쿼리 */
@media (max-width: 768px) {
  /* 모바일에서 헤더 패딩 최소화 */
  .header {
    padding: 40px 10px 0;
    margin-bottom: 15px;
    width: 95%;
  }
  
  /* 모바일에서 nav 패딩 최소화 */
  .nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 10px;
    padding: 5px 8px;
    background: rgba(10, 10, 10, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 20px;
    width: fit-content;
  }
  
  /* all과 about을 제외한 모든 메뉴 항목 숨김 */
  .nav a:not([data-category="all"]):not([data-page="about"]) {
    display: none;
  }
  
  /* 표시되는 메뉴 항목 스타일 */
  .nav a[data-category="all"], 
  .nav a[data-page="about"] {
    font-size: 0.9rem;
    padding: 5px 8px;
  }

  /* 갤러리 패딩 최소화 */
  .gallery {
    padding: 0 3px;
    gap: 5px;
  }
  
  /* About 페이지 모바일 스타일 개선 */
  #about-page {
    padding: 5px;
    width: 95%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .about-container {
    flex-direction: column;
    padding: 5px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    margin: 0;
  }
  
  /* 텍스트 크기 및 간격 조정 */
  .about-bio p, .about-skills p, .experience-item p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  
  .about-content, .about-bottom-section {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .about-bio, .about-skills, .about-experience, .contact-info {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    box-sizing: border-box;
  }
  
  .about-bio h3, .about-skills h3, .about-experience h3, .contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  /* 경험 섹션 타임라인 조정 */
  .about-experience {
    padding-left: 25px;
  }
  
  .experience-item:before {
    left: -18px;
    width: 8px;
    height: 8px;
  }
  
  .experience-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
  }
  
  .about-experience:before {
    left: 15px;
  }
  
  /* 모달 창 패딩 최소화 */
  .modal-content {
    width: 95%;
  }
  
  /* 모바일 전체 너비 제한 방지 */
  body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }
  
  /* 모바일에서 텍스트 짤림 방지 */
  .about-container * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .skills-category p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-left: 12px;
  }
  
  .skills-category h4 {
    font-size: 1.1rem;
  }
}

/* 모바일 환경에서 비디오 컨트롤 개선 */
@media (max-width: 768px) {
  .gallery-item .video-thumbnail.local-video {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
  }
  
  .gallery-item .video-thumbnail.local-video video {
    pointer-events: none;
  }
  
  .play-button {
    width: 80px;
    height: 80px;
    opacity: 1;
  }
} 