@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* =========================================================
   BASE & VARIABLES
========================================================= */
:root {
  --accent: #7ca67e;
  --dark: #415a43;
  --darker: #2d3e2f;
  --bg: #1a1a1a;
  --card-bg: #242424;
  --text: #ffffff;
  --text-muted: #b0b0b0;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================================
   NAVIGATION
========================================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(124, 166, 126, 0.1);
}

nav .nav-left {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: 50%;
}

nav .nav-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav .nav-right > a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

nav .nav-right > a:hover,
nav .nav-right > a.current {
  color: var(--accent);
}

nav .nav-right > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

nav .nav-right > a:hover::after,
nav .nav-right > a.current::after {
  width: 100%;
}

nav .socials {
  display: flex;
  gap: 1.2rem;
  padding-left: 1.5rem;
  margin-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

nav .socials a {
  color: var(--text);
  font-size: 1.4rem;
  transition: all 0.3s;
}

nav .socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
  position: fixed;
  left: 2%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
  opacity: 0.7;
}

.sidebar a::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s;
  flex-shrink: 0;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--accent);
  opacity: 1;
}

.sidebar a:hover::before,
.sidebar a.active::before {
  background: var(--accent);
  width: 12px;
  height: 12px;
}

/* =========================================================
   BANNER
========================================================= */
.banner {
  position: relative;
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(45, 62, 47, 0.9), rgba(26, 26, 26, 0.8));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
  margin-top: 0;
  perspective: 1000px;
}

.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(124, 166, 126, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 166, 126, 0.05) 0%, transparent 50%);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6)), linear-gradient(to right, transparent 0%, transparent 100%);
  z-index: 1;
  animation: fadeInOverlay 1.5s ease-out;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  animation: fadeInUp 1s ease-out;
}

.banner-content h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.banner-content p {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  cursor: pointer;
  animation: float 2s ease-in-out infinite;
  z-index: 3;
}

.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

/* =========================================================
   SECTIONS
========================================================= */
section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 3rem 2rem;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--accent);
  position: relative;
  display: inline-block;
  width: 100%;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* =========================================================
   STATS SECTION
========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-card {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.1), rgba(124, 166, 126, 0.05));
  border-radius: 16px;
  border: 2px solid rgba(124, 166, 126, 0.25);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  box-shadow: 0 4px 15px rgba(124, 166, 126, 0.1);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(124, 166, 126, 0.3);
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.15), rgba(124, 166, 126, 0.08));
}

.stat-card .number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.8rem;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 500;
}

/* =========================================================
   CARDS
========================================================= */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(124, 166, 126, 0.15);
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(124, 166, 126, 0.15);
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background: #8fb891;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(124, 166, 126, 0.3);
}

.btn-container {
  text-align: center;
  margin: 1.5rem 0;
}

.itch-btn,
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* =========================================================
   YOUTUBE SECTION (HOME PAGE)
========================================================= */
#youtube .youtube-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

#youtube iframe {
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

/* =========================================================
   YOUTUBE FEATURED SECTION
========================================================= */
#youtube .youtube-featured {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin: 3rem 0;
}

#youtube .youtube-featured-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-bottom: 4rem;
  border-bottom: 2px solid rgba(124, 166, 126, 0.3);
  border-image: linear-gradient(to right, transparent, rgba(124, 166, 126, 0.3) 15%, rgba(124, 166, 126, 0.3) 85%, transparent) 1;
}

#youtube .youtube-featured-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#youtube .youtube-featured-item.reverse {
  direction: rtl;
}

#youtube .youtube-featured-item.reverse > * {
  direction: ltr;
}

#youtube .youtube-video-wrapper {
  display: flex;
  justify-content: center;
}

#youtube .youtube-video-wrapper iframe {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  border-radius: 8px;
}

#youtube .youtube-text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#youtube .youtube-text-wrapper h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 700;
}

#youtube .youtube-text-wrapper p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

/* =========================================================
   JOURNEY CAROUSEL
========================================================= */
#youtube .journey-section {
  margin: 4rem 0;
}

#youtube .journey-section h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
}

#youtube .journey-carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
}

#youtube .journey-carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  max-width: 900px;
  height: 400px;
}

#youtube .journey-carousel-track {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#youtube .journey-carousel-item {
  flex: 0 0 240px;
  height: 280px;
  opacity: 0.5;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transform: scale(0.75);
}

#youtube .journey-carousel-item.active {
  opacity: 1;
  flex: 0 0 320px;
  height: 360px;
  transform: scale(1);
  z-index: 10;
}

#youtube .journey-carousel-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

#youtube .journey-carousel-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
#youtube .youtube-video {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  margin: 1rem 0;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(124, 166, 126, 0.2);
}

/* =========================================================
   PORTFOLIO PAGE - YOUTUBE VIDEOS BIGGER
========================================================= */
#games .youtube-video {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(124, 166, 126, 0.2);
}

#uni-projects .youtube-video,
#work .youtube-video {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(124, 166, 126, 0.2);
}

/* =========================================================
   PORTFOLIO PAGE - YOUTUBE SNIPPETS GRID
========================================================= */
#games .youtube-snippets,
#uni-projects .youtube-snippets,
#work .youtube-snippets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* =========================================================
   PORTFOLIO PAGE - PROJECT TITLES
========================================================= */
#games .youtube-snippets .card h4,
#games .youtube-snippets .card h3,
#uni-projects .youtube-snippets .card h4,
#uni-projects .youtube-snippets .card h3,
#work .youtube-snippets .card h4,
#work .youtube-snippets .card h3 {
  text-align: center;
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* =========================================================
   PORTFOLIO PAGE - HIGHLIGHT CARDS
========================================================= */
#games .card.highlight,
#uni-projects .card.highlight,
#work .card.highlight,
#events .card.highlight {
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.1) 0%, rgba(124, 166, 126, 0.05) 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

#games .card.highlight h4,
#uni-projects .card.highlight h4,
#work .card.highlight h4,
#events .card.highlight h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

#games .card.highlight p,
#uni-projects .card.highlight p,
#work .card.highlight p,
#events .card.highlight p {
  color: var(--text);
  line-height: 1.6;
  margin: 0.8rem 0;
}

#games .card.highlight ul,
#uni-projects .card.highlight ul,
#work .card.highlight ul,
#events .card.highlight ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#games .card.highlight li,
#uni-projects .card.highlight li,
#work .card.highlight li,
#events .card.highlight li {
  color: var(--text);
  margin: 0.8rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

#games .card.highlight li::before,
#uni-projects .card.highlight li::before,
#work .card.highlight li::before,
#events .card.highlight li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
}

/* =========================================================
   PORTFOLIO PAGE - ITCH EMBED BIGGER
========================================================= */
#games .youtube-snippets iframe[src*="itch.io"],
#uni-projects .youtube-snippets iframe[src*="itch.io"],
#work .youtube-snippets iframe[src*="itch.io"] {
  width: 300px !important;
  height: 240px !important;
  margin: 1.5rem auto !important;
  display: block;
}

/* =========================================================
   GALLERY
========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 250px;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

/* =========================================================
   FADE EFFECTS
========================================================= */
.fade-item {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  background: var(--darker);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(124, 166, 126, 0.1);
  margin-top: 3rem;
}

footer p {
  color: var(--text-muted);
}

/* =========================================================
   ANIMATIONS
========================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes scrollDot {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* =========================================================
   FEATURED PROJECTS
========================================================= */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem 0;
}

.featured-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  height: 450px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(124, 166, 126, 0.15);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  text-decoration: none;
}

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s;
}

.featured-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s;
}

.featured-card:hover img,
.featured-card:hover video {
  transform: scale(1.05);
}

.featured-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.featured-card-overlay h3 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.featured-card-overlay p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =========================================================
   COLLAPSIBLE SECTION
========================================================= */
.collapsible-header {
  cursor: pointer;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border: 1px solid rgba(124, 166, 126, 0.15);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  margin-bottom: 0;
}

.collapsible-header:hover {
  border-color: var(--accent);
  background: rgba(124, 166, 126, 0.05);
}

.collapsible-header h3 {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
}

.collapsible-icon {
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.collapsible-header.active .collapsible-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--card-bg);
  border: 1px solid rgba(124, 166, 126, 0.15);
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.collapsible-content.active {
  max-height: 2000px;
  transition: max-height 0.4s ease-out;
}

.collapsible-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.collapsible-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.collapsible-item:nth-child(1) { animation-delay: 0.1s; }
.collapsible-item:nth-child(2) { animation-delay: 0.2s; }
.collapsible-item:nth-child(3) { animation-delay: 0.3s; }
.collapsible-item:nth-child(4) { animation-delay: 0.4s; }

.collapsible-item h4 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.collapsible-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

.collapsible-item ul {
  list-style: none;
  padding-left: 1rem;
}

.collapsible-item li {
  color: var(--text);
  margin: 0.5rem 0;
  position: relative;
  padding-left: 1rem;
}

.collapsible-item li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =========================================================
   CAROUSEL / SIDE SCROLLING
========================================================= */
.featured-carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
}

.featured-carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  max-width: 1200px;
  height: 480px;
}

.featured-carousel-track {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.featured-carousel-item {
  flex: 0 0 320px;
  height: 360px;
  opacity: 0.5;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.75);
}

.featured-carousel-item.active {
  opacity: 1;
  flex: 0 0 500px;
  height: 450px;
  transform: scale(1);
  z-index: 10;
}

.featured-carousel-item:nth-child(1) { animation-delay: 0.1s; }
.featured-carousel-item:nth-child(2) { animation-delay: 0.2s; }
.featured-carousel-item:nth-child(3) { animation-delay: 0.3s; }
.featured-carousel-item:nth-child(4) { animation-delay: 0.4s; }

.carousel-container {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s ease-out;
  padding: 1rem 0;
  width: max-content;
}

.carousel-item {
  flex: 0 0 350px;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.carousel-item:nth-child(1) { animation-delay: 0.1s; }
.carousel-item:nth-child(2) { animation-delay: 0.2s; }
.carousel-item:nth-child(3) { animation-delay: 0.3s; }
.carousel-item:nth-child(4) { animation-delay: 0.4s; }
.carousel-item:nth-child(5) { animation-delay: 0.5s; }
.carousel-item:nth-child(6) { animation-delay: 0.6s; }
.carousel-item:nth-child(7) { animation-delay: 0.7s; }
.carousel-item:nth-child(8) { animation-delay: 0.8s; }

.carousel-controls {
  display: none !important;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border: 2px solid var(--accent);
  background: var(--card-bg);
  color: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.1);
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

/* =========================================================
   HOME PAGE - FIX
========================================================= */
#featured .carousel-item {
  flex: 0 0 500px;
}

#featured .carousel-item .featured-card {
  opacity: 1;
  transform: none;
  animation: none;
  height: 350px;
}

/* =========================================================
   RESPONSIVE - CAROUSEL
========================================================= */
@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 280px;
  }
}

@media (max-width: 600px) {
  .carousel-item {
    flex: 0 0 200px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .carousel-gallery {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   RESPONSIVE - SIDEBAR FIX
========================================================= */
@media (max-width: 968px) {
  .sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid rgba(124, 166, 126, 0.2);
    z-index: 1000;
    transition: left 0.3s ease;
    padding-top: 80px;
    overflow-y: auto;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar::before {
    content: '☰';
    position: fixed;
    left: 20px;
    top: 25px;
    font-size: 1.5rem;
    color: var(--accent);
    cursor: pointer;
    z-index: 1001;
  }

  body {
    margin-left: 0;
  }
}

/* =========================================================
   SKILLS SECTION
========================================================= */
.skills-simple {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 2rem auto;
  max-width: 900px;
  align-items: center;
}

.skill-section {
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(124, 166, 126, 0.2);
  width: 100%;
}

.skill-section:last-child {
  border-bottom: none;
}

.skill-section h3 {
  color: var(--accent);
  margin-bottom: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.skill-section h3 i {
  font-size: 1.4rem;
}

.skill-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.skill-card {
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.1), rgba(124, 166, 126, 0.05));
  border: 2px solid rgba(124, 166, 126, 0.25);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(124, 166, 126, 0.1);
}

.skill-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.15), rgba(124, 166, 126, 0.08));
  box-shadow: 0 12px 40px rgba(124, 166, 126, 0.3);
  transform: translateY(-8px);
}

.skill-card h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-item {
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.15), rgba(124, 166, 126, 0.08));
  border: 2px solid rgba(124, 166, 126, 0.35);
  border-radius: 25px;
  padding: 1rem 1.8rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(124, 166, 126, 0.15);
}

.skill-item:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.25), rgba(124, 166, 126, 0.12));
  box-shadow: 0 12px 40px rgba(124, 166, 126, 0.3);
  transform: translateY(-4px) scale(1.05);
}

.skills-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(124, 166, 126, 0.2);
}

.portfolio-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portfolio-link:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 8px 25px rgba(124, 166, 126, 0.3);
  transform: translateY(-3px);
}


/* =========================================================
   CONTACT FORM
========================================================= */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--card-bg);
  border: 1px solid rgba(124, 166, 126, 0.15);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(124, 166, 126, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-group button {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}

.form-group button:hover {
  background: #8fb891;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(124, 166, 126, 0.3);
}

/* =========================================================
   RESPONSIVE - SKILLS & FORM
========================================================= */
@media (max-width: 600px) {
  .skills {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 0 1rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 1rem;
  }
}

/* =========================================================
   RESPONSIVE - GAMES SECTION
========================================================= */
@media (max-width: 768px) {
  #games .video-itch-container {
    grid-template-columns: 1fr;
  }

  #games .youtube-video {
    height: 250px;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    width: 280px !important;
    height: 224px !important;
    margin: 0 auto !important;
    display: block;
  }
}

@media (max-width: 600px) {
  #youtube .youtube-video {
    height: 200px;
  }

  #games .youtube-video {
    height: 200px;
  }

  #games .video-itch-container {
    grid-template-columns: 1fr;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    width: 220px !important;
    height: 176px !important;
  }

  #uni-projects .youtube-video,
  #work .youtube-video {
    height: 200px;
  }
}

/* =========================================================
   GAMES SECTION - VIDEOS & EMBEDS SIDE BY SIDE
========================================================= */
#games .youtube-snippets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

#games .youtube-video {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Video + Itch embed side by side */
#games .card {
  display: flex;
  flex-direction: column;
}

#games .video-itch-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0;
}

#games .video-itch-container .youtube-video {
  height: 280px;
  margin: 0;
  width: 100%;
}

#games .video-itch-container iframe[src*="itch.io"] {
  width: 100% !important;
  height: 280px !important;
  margin: 0 !important;
  display: block;
}

/* =========================================================
   RESPONSIVE - GAMES SECTION
========================================================= */
@media (max-width: 1024px) {
  #games .video-itch-container {
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    height: 240px !important;
  }
}

@media (max-width: 768px) {
  #games .video-itch-container {
    grid-template-columns: 1fr;
  }

  #games .youtube-video {
    height: 250px;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    width: 280px !important;
    height: 224px !important;
    margin: 0 auto !important;
    display: block;
  }
}

@media (max-width: 600px) {
  #youtube .youtube-video {
    height: 200px;
  }

  #games .youtube-video {
    height: 200px;
  }

  #games .video-itch-container {
    grid-template-columns: 1fr;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    width: 220px !important;
    height: 176px !important;
  }

  #uni-projects .youtube-video,
  #work .youtube-video {
    height: 200px;
  }
}

/* =========================================================
   PROJECT SHOWCASE (Alternating Layout)
========================================================= */
.project-showcase {
  margin: 2rem 0;
}

.project-showcase h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  text-align: center;
}

.project-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.project-content.reverse {
  direction: rtl;
}

.project-content.reverse > * {
  direction: ltr;
}

.project-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-media iframe {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.project-text .card.highlight {
  margin: 0 !important;
}

.project-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.project-text .highlight {
  background: linear-gradient(135deg, rgba(124, 166, 126, 0.1), rgba(124, 166, 126, 0.05));
  border: 2px solid rgba(124, 166, 126, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(124, 166, 126, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-text .highlight:hover {
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(124, 166, 126, 0.3);
  transform: translateY(-8px);
}

.project-text .highlight h4 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-text .highlight ul {
  margin-left: 1.5rem;
  color: var(--text-muted);
}

.project-text .highlight ul li {
  margin-bottom: 0.5rem;
}

@media (max-width: 968px) {
  .project-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-content.reverse {
    direction: ltr;
  }
}
.project-media iframe[src*="itch.io"] {
  width: 100% !important;
  max-width: 500px !important;
  margin: 0 auto !important;
  display: block !important;
}

@media (max-width: 968px) {
  .project-media iframe[src*="itch.io"] {
    max-width: 100% !important;
  }
}
/* Make project showcase titles green */
#games .project-showcase h3 {
  color: var(--accent);
}

#uni-projects .project-showcase h3 {
  color: var(--accent);
}

#work .project-showcase h3 {
  color: var(--accent);
}

#events .project-showcase h3 {
  color: var(--accent);
}

/* Increase video sizes in Games section */
.youtube-video { min-height: 280px !important; }

/* Game Development section titles */
#games .project-showcase h3 { color: var(--accent); }

/* =========================================================
   MOBILE RESPONSIVE - COMPREHENSIVE OVERHAUL
========================================================= */

/* TABLET (768px and below) */
@media (max-width: 768px) {
  /* Navigation adjustments */
  nav {
    padding: 0 3%;
  }

  nav .nav-left {
    font-size: 1.2rem;
    gap: 0.5rem;
  }

  .nav-logo {
    height: 35px;
  }

  nav .nav-right {
    gap: 1.5rem;
  }

  nav .nav-right > a {
    font-size: 0.95rem;
  }

  nav .socials {
    gap: 0.8rem;
    padding-left: 1rem;
    margin-left: 0.8rem;
  }

  nav .socials a {
    font-size: 1.2rem;
  }

  /* Banner/Hero adjustments */
  header.banner {
    padding: 2rem 2rem !important;
    min-height: 70vh;
  }

  header.banner h1 {
    font-size: 2.5rem !important;
  }

  header.banner p {
    font-size: 1.2rem !important;
  }

  /* Section spacing */
  section {
    padding: 3rem 1.5rem !important;
  }

  section h2 {
    font-size: 1.8rem !important;
    margin-bottom: 2rem !important;
  }

  /* Project showcase */
  .project-content {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .project-content.reverse {
    direction: ltr;
  }

  .project-showcase h3 {
    font-size: 1.3rem !important;
  }

  /* Featured grid */
  .featured-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Skills cards */
  .skill-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Sidebar */
  .sidebar {
    left: 1%;
  }

  .sidebar a {
    font-size: 0.85rem;
    gap: 0.5rem;
  }
}

/* MOBILE (600px and below) */
@media (max-width: 600px) {
  :root {
    --nav-height: 70px;
  }

  /* Navigation */
  nav {
    padding: 0 2%;
    height: 70px;
  }

  nav .nav-left {
    font-size: 1rem;
    gap: 0.3rem;
  }

  .nav-logo {
    height: 30px;
  }

  nav .nav-left span {
    display: none;
  }

  nav .nav-right {
    gap: 1rem;
  }

  nav .nav-right > a {
    font-size: 0.85rem;
    padding: 0 0.4rem;
  }

  nav .socials {
    gap: 0.6rem;
    padding-left: 0.8rem;
    margin-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }

  nav .socials a {
    font-size: 1rem;
  }

  /* Banner */
  header.banner {
    padding: 2rem 1rem !important;
    min-height: 60vh;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  header.banner h1 {
    font-size: 2rem !important;
    margin: 0 0 0.8rem 0 !important;
  }

  header.banner p {
    font-size: 1rem !important;
    margin: 0 0 1.5rem 0 !important;
  }

  /* Sections */
  section {
    padding: 2rem 1rem !important;
  }

  section h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  section h3 {
    font-size: 1.2rem !important;
  }

  /* Project showcase */
  .project-showcase {
    margin: 1.5rem 0 !important;
  }

  .project-showcase h3 {
    font-size: 1.15rem !important;
    margin-bottom: 1.5rem !important;
  }

  .project-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .project-sidebar,
  .project-media {
    width: 100% !important;
  }

  /* Featured cards */
  .featured-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }

  .featured-card {
    height: 250px !important;
  }

  /* Skills section */
  .skill-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .skill-card {
    padding: 1.5rem !important;
  }

  .skill-card h4 {
    font-size: 1rem !important;
  }

  .skill-card p {
    font-size: 0.9rem !important;
  }

  .skill-items {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .skill-item {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.9rem !important;
  }

  /* Contact form */
  .contact-form {
    padding: 0 !important;
  }

  .form-group label {
    font-size: 0.9rem !important;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.7rem 0.8rem !important;
    font-size: 1rem !important;
  }

  .form-group textarea {
    min-height: 120px;
  }

  /* Stats */
  .stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.2rem !important;
  }

  .stat-card {
    padding: 1.5rem !important;
  }

  .stat-card .number {
    font-size: 1.8rem !important;
  }

  .stat-card .label {
    font-size: 0.8rem !important;
  }

  /* Cards */
  .card {
    padding: 1.5rem !important;
    margin: 1rem 0 !important;
  }

  .card h4 {
    font-size: 1.05rem !important;
    margin-bottom: 1rem !important;
  }

  .card p {
    font-size: 0.95rem !important;
    margin-bottom: 0.8rem !important;
  }

  .card.highlight {
    padding: 1.5rem !important;
  }

  /* Sidebar */
  .sidebar {
    display: none !important;
  }

  /* Buttons */
  .cta-btn,
  .btn {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.95rem !important;
  }

  .portfolio-link {
    font-size: 0.95rem !important;
    padding: 0.7rem 1.2rem !important;
  }

  /* Dividers */
  .section-separator {
    margin: 2rem 0 !important;
  }

  /* Contact wrapper */
  .contact-wrapper {
    padding: 0 !important;
  }

  .contact-wrapper p {
    font-size: 0.95rem !important;
  }

  /* Banner background image */
  .banner-bg {
    background-size: cover !important;
    background-position: center !important;
    opacity: 0.8;
  }

  /* Medical Sim section images on mobile */
  img[src*="FinalDemoMenigitisProject"],
  img[src*="com.oculus.browser"],
  img[src*="Ai_pVL"] {
    height: 200px !important;
  }

  /* Video containers */
  #games .youtube-video,
  #youtube .youtube-video,
  #uni-projects .youtube-video,
  #work .youtube-video {
    height: 200px !important;
  }

  #games .video-itch-container {
    grid-template-columns: 1fr !important;
  }

  #games .video-itch-container iframe[src*="itch.io"] {
    width: 250px !important;
    height: 200px !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* YouTube featured items */
  .youtube-featured-item {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .youtube-video-wrapper,
  .youtube-text-wrapper {
    width: 100% !important;
  }

  .youtube-intro {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
}

