/* Global Styles */
:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --accent-color: #58a6ff;
    --hover-color: #1f6feb;
    --font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    animation: fadeInBody 1s ease-in;
}

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

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

/* Navigation Bar */
header {
    background-color: #161b22;
    padding: 1rem 2rem;
    border-bottom: 1px solid #30363d;
}

.navbar {
    list-style-type: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 1rem 0;
    background-color: var(--nav-bg);
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.8px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.4s ease-in-out;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.navbar a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    text-shadow: 0 0 5px var(--accent-color);
}


/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 10%;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    padding-right: 2rem;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(90deg, #64ffda, #00ffe1, #64ffda);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s ease infinite;
}

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

.hero-text p {
    font-size: 1.2rem;
    margin-top: 1rem;
    color: #8b949e;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 2rem;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-color);
}

/* Footer (Optional) */
footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #6e7681;
}

.blog-container {
  padding: 2rem 10%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  border: 1px solid #30363d;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: #161b22;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 12px var(--accent-color);
}

.blog-title {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.blog-date {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 1rem;
}

.blog-summary {
  color: #c9d1d9;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--hover-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--accent-color);
}

.blog-post {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #0d1117;
  border: 1px solid #30363d;
  border-radius: 12px;
}

.blog-post .blog-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.blog-post .blog-date {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 2rem;
}

.blog-content p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #c9d1d9;
}


.research-page {
  max-width: 800px;
  margin: auto;
  padding: 2rem;
}

.projects h1, .publications h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ccc;
}

.project {
  margin-bottom: 2rem;
}

.project-meta {
  font-size: 0.9rem;
  color: #777;
}

.project-links {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.project-links li {
  display: inline;
  margin-right: 1rem;
}

.pub-list {
  padding-left: 1.2rem;
}

.pub-list li {
  margin-bottom: 1.5rem;
}


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

.filter-button {
  display: inline-block;
  background: #161515;
  padding: 0.4rem 0.8rem;
  margin: 0.3rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background: #4fb136;
  color: rgb(26, 25, 25);
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.card {
  background: #1e1d1d;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1.2rem;
  flex: 1 1 calc(48% - 1rem);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card h2 {
  margin-top: 0;
}

.card-meta {
  font-size: 0.85rem;
  color: #666;
}

.card-links {
  margin-top: 0.6rem;
}

.card-links a,
.card-links button {
  margin-right: 0.7rem;
  font-size: 0.85rem;
  text-decoration: none;
  background: #2a2828;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.card-links button:hover,
.card-links a:hover {
  background: #ccc;
}

.tags {
  margin-top: 0.8rem;
}

.tags span {
  display: inline-block;
  background: #d4e5ff;
  color: #004080;
  padding: 0.25rem 0.5rem;
  margin: 0.2rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.bibtex {
  background: #121212;
  padding: 0.8rem;
  margin-top: 0.5rem;
  border-left: 3px solid #ede5e5;
  font-family: monospace;
  white-space: pre-wrap;
  font-size: 0.8rem;
}

.hidden {
  display: none;
}


.skills-page {
    padding: 40px;
    max-width: 1000px;
    margin: auto;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.skills-tags span {
    background: #1a1919;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.skills-tags span:hover {
    background: #55bf2c;
}

.course-toggle {
    text-align: center;
    margin: 30px 0;
}

.course-toggle button {
    margin: 0 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: #272a2c;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.course-toggle button:hover {
    background: #31af4e;
}

.course-view {
    display: none;
}

.course-view.active-view {
    display: block;
}

.course-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.course-box {
    flex: 1 1 calc(45% - 20px);
    background: #272525;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.course-box:hover {
    transform: translateY(-4px);
}

.course-box h4 {
    margin-top: 0;
}

.course-code {
    font-size: 0.9rem;
    color: #666;
}

.course-link {
    display: inline-block;
    margin-top: 10px;
    color: #007acc;
    text-decoration: none;
    font-weight: bold;
}

.course-link:hover {
    text-decoration: underline;
}


.resource-main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.resource-main h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.course-meta {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.resource-category {
  margin-bottom: 2rem;
}

.resource-category h2 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
  border-left: 4px solid #3498db;
  padding-left: 10px;
}

.resource-category ul {
  list-style-type: square;
  padding-left: 1.5rem;
}

.resource-category li {
  margin-bottom: 0.6rem;
}

.resource-category a {
  text-decoration: none;
  color: #2a7ae2;
}

.resource-category a:hover {
  text-decoration: underline;
}

.contact-main {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: 'Fira Sans', sans-serif;
}

.contact-main h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
}

.contact-details p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.socials {
  margin: 1rem 0 2rem;
  font-size: 1rem;
}

.socials a {
  color: #2a7ae2;
  text-decoration: none;
  margin: 0 10px;
}

.socials a:hover {
  text-decoration: underline;
}

.message-form {
  margin-top: 2rem;
}

.message-form h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.message-form form {
  display: flex;
  flex-direction: column;
}

.message-form input,
.message-form textarea {
  padding: 10px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.message-form button {
  background-color: #2a7ae2;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.message-form button:hover {
  background-color: #155fb0;
}

/* --- Triangle Game Section --- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #006494;
}

#triangle-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.triangle-row {
  display: flex;
  justify-content: center;
}

.token {
  width: 40px;
  height: 40px;
  margin: 6px;
  background-color: #0077b6;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.token:hover {
  background-color: #023e8a;
}

.token.removed {
  background-color: #ccc;
  cursor: default;
}

.game-controls {
  margin-top: 1.5rem;
}

#game-status {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  color: #222;
}


.game-rules, .game-area {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #ccc;
  background-color: #fefefe;
  border-radius: 8px;
}

#heap-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.heap {
  padding: 10px 14px;
  border: 2px solid #333;
  border-radius: 6px;
  background-color: #f0f0f0;
  cursor: pointer;
  font-weight: bold;
}

.heap:hover {
  background-color: #e0e0e0;
}

.controls {
  margin-top: 10px;
}

.controls input {
  width: 180px;
  padding: 6px;
  margin-right: 10px;
}


.difficulty-buttons {
  margin-bottom: 15px;
}

.difficulty-buttons button {
  margin: 5px;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #e2e2e2;
  transition: 0.2s;
}

.difficulty-buttons button:hover {
  background-color: #222020;
}
.difficulty-buttons button {
  margin: 5px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
}

#heap-display span {
  padding: 10px;
  margin: 5px;
  background: #3a3737;
  border: 1px solid #ccc;
  display: inline-block;
}

.player-controls {
  margin-top: 20px;
}

#game-status {
  margin-top: 20px;
  font-weight: bold;
  color: green;
}

/* --- Binary Split Game Styling --- */
.difficulty-btn {
  margin: 0.3rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #eee;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.difficulty-btn:hover {
  background-color: #3b3838;
}

.difficulty-btn.selected {
  background-color: #0077cc;
  color: white;
}

.heap-button {
  padding: 0.6rem 1.2rem;
  margin: 0.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px solid #444;
  background-color: #f5f5f5;
  cursor: pointer;
  transition: 0.2s ease;
}

.heap-button:hover {
  background-color: #3ac854;
}

.slider-container {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#move-slider {
  width: 60%;
}

.game-status {
  font-weight: bold;
  margin: 1rem 0;
}

.heaps-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.rules {
  background-color: #1c1b1b;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.no-bullets {
  list-style-type: none;
  padding-left: 0;
}

.action-button {
  background-color: #4CAF50; /* A nice green */
  color: white;
  padding: 10px 20px;
  margin-top: 10px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.action-button:hover {
  background-color: #1f5022;
}

.action-button:active {
  transform: scale(0.98);   
}


/* Mobile Styles */

@media (max-width: 768px) {
  .navbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    scrollbar-width: none; /* Firefox */
  }

  .navbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .navbar li {
    flex-shrink: 0;
    margin: 0 12px;
  }

  .navbar a {
    font-size: 1rem;
    padding: 6px 10px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    padding: 0;
    margin-bottom: 2rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .hero-image {
    padding-top: 1rem;
  }

  .hero-image img {
    width: 90%;
    max-width: 350px;
  }
}

