/* CSS Custom Properties */
:root {
  /* Blue default */
  --primary: #06b6d4;
  --primary-dark: #0e7490;
  --accent: #67e8f9;

  --accent-clicky: #22d3ee;
  --accent-clicky-hover: #a5f3fc;

  /* dark background */
  --background: #0f172a;
  --card: #1e293b;
  --secondary: #1e293b;

  --muted: #334155;
  --muted-fg: #94a3b8;

  --foreground: #f8f8f2;
  --text: #f8f8f2;
  --sidebar-width: 250px;
  --transition: all 0.3s ease;
}

/* THEMES */
html[data-theme='dracula'] {
  --primary: #bd93f9; 
  --primary-dark: #8be9fd;
  --accent: #8be9fd; 

  --accent-clicky: #ff79c6;
  --accent-clicky-hover: #ffff92df;

  --background: #282a36;
  --card: #343746;
  --secondary: #44475a;

  --muted: #6272a4;
  --muted-fg: #6272a4;

  --foreground: #f8f8f2;
  --text: #f8f8f2;
}

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

html {
  background-color: var(--background);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--card);
  border-right: 1px solid var(--muted);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1030;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.sidebar-content {
  flex: 1;
}

.sidebar-header {
  margin-bottom: 4rem;
}

.sidebar-title {
  font-size: 2.25rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.sidebar-subtitle {
  color: var(--foreground);
  font-size: 1rem;
}

.nav-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
}

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  display: inline-block;
}

.nav-link:hover {
  color: var(--accent-clicky-hover);
}

.sidebar-footer {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: var(--accent-clicky);
  font-size: 1.25rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--accent-clicky-hover);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1040;
  background-color: var(--card);
  border: 1px solid var(--muted);
  color: var(--foreground);
}

.mobile-menu-btn:hover {
  background-color: var(--secondary);
  color: var(--accent);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
background-color: color-mix(in srgb, var(--background), transparent 10%);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--muted);
  padding: 1rem 1.5rem;
  z-index: 100;
  top: 0;
}

.header-title {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--primary);
  margin: 0;
}

.header-subtitle {
  color: var(--foreground);
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
}

.content-wrapper {
  flex: 1;
  padding: 3rem 1.5rem;
  max-width: 56rem;
}

.section-content {
  margin-bottom: 6rem;
  scroll-margin-top: 100px;
}

.unsupported-access-card {
  padding: 2rem;
  border-radius: 1.25rem;
  background: var(--card);
  border: 1px solid var(--muted);
  box-shadow: 0 24px 60px rgba(40, 42, 54, 0.45);
  text-align: center;
}

.unsupported-access-eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

.unsupported-access-btn {
  border-color: var(--accent);
  color: var(--foreground);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.unsupported-access-btn:hover {
  background-color: var(--accent);
  color: #282a36;
  border-color: var(--accent);
}

.section-space {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-text {
  color: var(--text);
  line-height: 1.6;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", sans-serif;
  font-size: 1rem;
}

.sidebar-subtitle {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", sans-serif;
}

/* Experience Section */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-item {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  padding-bottom: 1.5rem;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.experience-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.experience-company {
  color: var(--accent);
  font-size: 0.875rem;
  margin: 0;
}

.experience-period {
  color: var(--muted-fg);
  font-size: 0.875rem;
  white-space: nowrap;
}

.experience-description {
  color: var(--text);
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.experience-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.highlight-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* Projects Section */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-item {
  background-color: var(--card);
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: var(--transition);
}

.project-item:hover {
  border-color: var(--accent);
}

.project-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  user-select: none;
}

.project-header:hover {
  background-color: rgba(68, 71, 90, 0.35);
}

.project-header.expanded {
  background-color: rgba(68, 71, 90, 0.35);
}

.project-info {
  flex: 1;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.25rem 0;
  transition: var(--transition);
}

.project-impact {
  color: var(--accent);
  font-size: 0.75rem;
  margin: 0.25rem 0;
}

.project-description {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.project-chevron {
  color: var(--accent-clicky);
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  margin-top: 0.25rem;
}

.project-header.expanded .project-chevron {
  transform: rotate(180deg);
}

.project-expanded {
  border-top: 1px solid var(--muted);
  background-color: rgba(52, 55, 70, 0.15);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.expanded-section-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.expanded-text {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.6;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-item {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  gap: 0.5rem;
}

.result-bullet {
  color: var(--accent);
  flex-shrink: 0;
}

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

.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-image:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

/* Research Section */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.research-item {
  background-color: var(--card);
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: var(--transition);
}

.research-item:hover {
  border-color: var(--accent);
}

.research-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.research-meta {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 0.25rem;
}

.research-journal {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.research-summary {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.research-tag {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.research-paper-link {
    color: var(--accent-clicky);
    font-size: 1.5rem;
    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

.research-paper-link:hover {
    color: var(--accent-clicky-hover);
    transform: translateY(-2px);
}

.research-paper-link:active {
    transform: translateY(0);
}

.research-paper-link i {
    line-height: 1;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-category {
  background-color: var(--card);
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.skill-category-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

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

.skill-item {
  background-color: rgba(255, 121, 198, 0.12);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: default;
}

/* tags */
.skill-item,
.research-tag,
.highlight-tag,
.project-tag {
  background-color: var(--secondary);
  border: 1px solid var(--muted);
  color: var(--primary);
}

.skill-item:hover {
  background-color: rgba(139, 233, 253, 0.15);
  border-color: var(--accent);
}

.skill-item:hover {
  /* color: var(--accent); */
  border-color: var(--accent);
}

/* Footer */
.footer {
  border-top: 1px solid var(--muted);
  margin-top: auto;
  padding: 2rem 1.5rem;
  background-color: rgba(52, 55, 70, 0.2);
}

.footer-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--accent-clicky);
  text-decoration: none;
  font-size: 1.5rem;
  margin: 0 0.75rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent-clicky-hover);
}

.blur-container {
  filter: blur(10px);
  pointer-events: none;
}

/* Game section namespace */
#game {
  position: relative;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .sidebar {
    width: 320px;
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: block !important;
  }

  .main-content {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 1.5rem 1rem;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .experience-header,
  .footer > .container-lg > .row {
    flex-direction: column;
  }

  .footer .text-md-end {
    margin-top: 1rem;
  }

  .project-tags {
    margin-top: 0.5rem;
  }

  .section-text {
    font-size: 0.95rem;
  }

  .header {
    padding: 1rem;
  }

  .header-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  :root {
    --sidebar-width: 0;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .project-item {
    border-radius: 0.25rem;
  }

  .project-header {
    padding: 1rem;
    flex-direction: column;
  }

  .project-chevron {
    order: -1;
    align-self: flex-start;
  }

  .project-description {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }

  .skills-grid {
    gap: 1rem;
  }

  .skill-category {
    padding: 1rem;
  }

}
/* Hide game section if not on pc or (res too low)*/
@media (max-width: 1400px) {
  #game {
    display: none;
  }

  #skip-to-content{
    display: inline-block;
  }
}

@media (min-width: 1400px) {
    #skip-to-content{
    display: none;
  }
}

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

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

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.fade-out {
  animation: fadeOut 0.5s ease-in-out;
}

/* Utility Classes */
.text-muted {
  color: var(--foreground) !important;
}

.container-lg {
  max-width: 56rem;
}

/* Bootstrap Overrides */
.modal-content {
  background-color: var(--background);
}

