/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500&family=Lora:wght@400;600&display=swap');

:root {
  --ivory-base: #F9F9F9;
  --paper-1: #F4F2ED;
  --paper-2: #EBE8E1;
  --accent-blue: #2B5876;
  --accent-coral: #E84A5F;
  --slate-gray: #4A4A4A;
  --chart-grid: rgba(74, 74, 74, 0.1);
  --text-light: var(--ivory-base);
  --text-dark: var(--slate-gray);
  --primary-dark: #2E4053;      /* Deep academic blue */
  --primary-light: #566573;     /* Medium slate */
  --deep-purple: #E83F6F;       /* Updated to gender-pink */
  --light-purple: #3498DB;      /* Updated to gender-blue */
  --soft-beige: #F4F6F7;        /* Updated to neutral-light */
  --pale-yellow: #F4F6F7;       /* Updated to neutral-light */
  --gradient-mid: #4A6FA5;      /* Transition color */
}

/* Base styles */
body {
  background: linear-gradient(180deg, 
    var(--ivory-base) 0%,
    var(--paper-1) 100%
  );
  color: var(--slate-gray);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, .navbar-brand {
  font-family: 'Lora', serif;
  font-weight: 600;
  color: var(--accent-blue);
}

h2, h3 {
  border-bottom: 2px solid var(--accent-blue);
  display: inline-block;
  padding-bottom: 0.25em;
}

p {
  color: var(--slate-gray);
}

/* Navbar styling */
.navbar {
  background: white !important;
  border-bottom: 1px solid var(--paper-2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.navbar .navbar-brand.top-left-name {
  color: var(--accent-blue);
}

.nav-link {
  position: relative;
  color: var(--slate-gray) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-coral);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Graph and analysis containers */
.graph-container {
  background: white;
  border: 1px solid var(--paper-2);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin: 2rem 0;
  transition: transform 0.2s ease;
}

.graph-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.key-insight {
  background: white;
  border-left: 4px solid var(--accent-coral);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Table styling */
.table-analysis {
  border: 1px solid var(--paper-2);
  background: white;
  color: var(--slate-gray);
  border-radius: 8px;
  overflow: hidden;
}

.table-analysis thead {
  background: var(--accent-blue);
  color: white;
  font-family: 'Lora', serif;
}

/* Gender specific elements */
.gender-male { 
  color: var(--accent-blue); 
}

.gender-female { 
  color: var(--accent-coral); 
}

.gender-balance-bar {
  height: 4px;
  background: linear-gradient(
    to right,
    var(--accent-coral) 50%,
    var(--accent-blue) 50%
  );
  margin: 1rem 0;
}

/* Footer styling */
.footer {
  background-color: var(--paper-2);
  color: var(--slate-gray);
}

.footer a {
  color: var(--accent-blue);
}

/* Responsive layout */
@media (min-width: 992px) {
  .analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

/* Updated styles for the About Me section */
#about {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  width: 100%;
}

#greeting {
  font-size: 2.5em;
  font-weight: bold;
  color: #ffffff;
  padding: 20px;
  animation: slideUp 1.5s ease-out forwards; /* Apply the animation */
}

.img-thumbnail-container {
  padding: 10px; /* Adds some padding around images */
  display: flex; /* Ensures content is centered if needed */
  justify-content: center; /* Center horizontally in the container */
}

.img-fluid {
  width: 100%; /* Full width of their respective container */
  height: auto; /* Maintain aspect ratio */
}

/* Image styling to maintain aspect ratio and cover the container */
.img-thumbnail {
  height: 100%;  /* Make image fill the container height */
  width: auto;  /* Auto-adjust the width to maintain aspect ratio */
  min-width: 100%;  /* Ensure the image covers the width */
  object-fit: cover;  /* Cover the container maintaining aspect ratio without distortion */
  transition: transform 0.5s ease;  /* Smooth transition for any transformations */
  cursor: pointer;  /* Indicates the image can be interacted with */
}

.img-thumbnail:hover {
  transform: scale(1.1); /* Scales up the image slightly on hover */
}

.mywork_title, .mywork_title_1 {
  color: rgba(236, 240, 241, 0.1);
  font-size: 12em;
  text-align: left;
  margin-top: 10%;
  margin-bottom: -40px;
  transition: all 0.3s ease;
}

.work-heading {
  font-size: 2.2rem; 
  color: #806A8A;
  margin-bottom: 10px; /* Space between the heading and paragraph */
  font-weight: bold;
}

.work-description {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  margin: 1rem 0;
}

.work-image img {
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: auto;
}

.work-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.row_work{
  padding-top: 10%
}

.blinking-cursor {
  border-right: 2px solid black; /* Simulates the blinking cursor */
  animation: blink-animation 1s steps(2, start) infinite;
}

.imageLink{
  color: #24292e;
}

.experience_title{
  color: #E5E4E2;
}

.education_title{
  color: #5E2750;
}

#skills ul {
  list-style: none; /* Removes default list styling */
  padding: 0; /* Removes default padding */
}

#skills li {
  font-size: 16px; /* Adjusts font size */
  margin-bottom: 10px; /* Space between items */
  line-height: 24px; /* Ensures proper line spacing */
}

.fa-star {
  margin-right: 10px; /* Adds space between the star icon and text */
}

.list-group-item {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.background-title {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5em;
  color: rgba(255, 255, 255, 0.091); /* Very light for a watermark effect */
  z-index: -1; /* Keep behind the content */
  display: none; /* Start with hidden titles */
}

.highlight-img {
  width: 300px;  /* Specify the width */
  height: 300px; /* Specify the height */
  object-fit: cover; /* Ensures the image covers the area without distorting aspect ratio */
  display: block;  /* Ensures images are block-level elements */
  margin: auto;    /* Centers the image if the parent container is larger */
}

.footer i {
  font-size: 54px; 
  transition: transform 0.3s ease; 
}

.footer a:hover i {
  transform: scale(1.2); /* Slightly enlarge icons on hover */
}

.final-name{
  font-size: 150px;
  margin-top: 3%;
}

@keyframes blink-animation {
  from { border-right-color: black; }
  to { border-right-color: transparent; }
}

/* Blinking animation */
@keyframes blink {
  50% {
      border-color: transparent;
  }
}
#greeting {
  animation: blink 0.75s step-end infinite;
}

@media (min-width: 992px) { /* Adjust based on the breakpoint at which your navbar expands */
  .nav-link.others{
      position: relative;
      left: 50%;
      transform: translateX(-50%);
  }
}

@keyframes slideUp {
  from {
      transform: translateY(20%); /* Start from below the final position */
      opacity: 0; /* Start with the text being transparent */
  }
  to {
      transform: translateY(0); /* Move to the final position */
      opacity: 1; /* Fully visible */
  }
}

@media (min-width: 1200px) { /* Adjust this breakpoint as needed */
  .container {
      max-width: 1400px; /* Or any other width that suits your design */
  }
}
@media (max-width: 768px) {
  .mywork_title, .mywork_title_1 {
    font-size: 8em;
    margin-top: 15%;
  }
  
  .work-image img {
    height: 300px;
  }
  
  .navbar-brand.top-left-name {
    font-size: 2rem;
  }
  
  .work-description {
    padding: 1rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.analysis-section {
  margin: 3rem 0;
  padding: 2rem 0;
  border-bottom: 1px solid var(--paper-2);
}

.subsection-header {
  color: var(--accent-blue);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-coral);
}

.analysis-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  height: var(--card-height, auto); /* Default auto, can be overridden */
}

.analysis-card:hover {
  transform: translateY(-3px);
}

.card-title {
  color: var(--primary-dark);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: var(--show-title, block); /* Default visible, can be hidden */
}

.graph-iframe {
  width: 100%;
  height: var(--graph-height, 400px); /* Default 400px, can be overridden */
  border: none;
  border-radius: 6px;
}

.trend-card .graph-iframe {
  height: 500px;
}

.gender-card {
  position: relative;
  overflow: hidden;
}

.gender-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.gender-card.female::before {
  background: var(--deep-purple);  /* Using existing gender-pink variable */
}

.gender-card.male::before {
  background: var(--light-purple);  /* Using existing gender-blue variable */
}

.graph-annotation {
  padding: 1rem;
  background: var(--paper-1);
  margin-top: 1rem;
  border-radius: 4px;
}

.trend-label {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.trend-label.female {
  background: rgba(232,63,111,0.1);
  color: var(--deep-purple);
}

.trend-label.male {
  background: rgba(52,152,219,0.1);
  color: var(--light-purple);
}

.stat-highlight {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.table-analysis td {
  padding: 1.2rem;
}

.analysis-alert {
  background: rgba(236, 240, 241, 0.1);
  border-left: 4px solid var(--deep-purple);
  color: var(--text-light);
  padding: 1.2rem;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* Responsive Graph Grid */
@media (min-width: 992px) {
  .graph-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: start;
  }
}

/* Icon Styling */
.analysis-icon {
  margin-right: 0.8rem;
  color: var(--light-purple);
}

/* Table Responsive Wrapper */
.table-wrapper {
  overflow-x: auto;
  background: linear-gradient(
    to right,
    rgba(44, 62, 80, 0.9) 30%,
    rgba(255,255,255,0) 100%
  );
  padding: 1rem 0;
  border-radius: 8px;
}

/* Analysis Modules */
.analysis-module {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.module-img {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  max-height: 400px;
  object-fit: cover;
}

.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--paper-1);
  border-radius: 12px;
  overflow: hidden;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.insight-card {
  background: white;
  padding: 1.5rem;
  border-left: 4px solid var(--accent-blue);
  transition: transform 0.2s ease;
}

.timeline-container {
  border-left: 3px solid var(--accent-coral);
  padding-left: 2rem;
  margin-left: 1rem;
}

.tabbed-interface {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

/* Update existing media queries */
@media (max-width: 768px) {
  .split-panel {
    grid-template-columns: 1fr;
  }
  
  .analysis-module .row {
    flex-direction: column-reverse;
  }
  
  .reverse .row {
    flex-direction: column;
  }
}

/* Academic Theme Components */
.bg-academic {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.academic-container {
  background: var(--ivory-base);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.section-header {
  color: var(--accent-blue);
  border-bottom: 3px solid var(--accent-coral);
  padding-bottom: 0.5rem;
}

.academic-card {
  border: 1px solid var(--paper-2);
  border-radius: 8px;
  overflow: hidden;
}

.academic-card-header {
  background: var(--accent-blue);
  color: white;
  padding: 1.2rem;
  border-bottom: 2px solid var(--accent-coral);
}

.institution-list .list-group-item {
  background: var(--paper-1);
  border: 1px solid var(--paper-2);
  margin: 0.5rem 0;
  padding: 1rem;
  border-radius: 6px;
}

.table-special {
  border: 1px solid var(--paper-2);
}

.table-special thead {
  background: var(--accent-blue);
  color: white;
}

.table-special th,
.table-special td {
  padding: 1rem;
  vertical-align: middle;
}

.table-special tbody tr:nth-child(even) {
  background: var(--paper-1);
}

.academic-footer {
  background: var(--primary-dark);
  color: white;
  padding: 2rem;
  margin-top: 4rem;
}

.lead-text {
  color: var(--slate-gray);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Update media queries */
@media (max-width: 768px) {
  .split-panel {
    grid-template-columns: 1fr;
  }
  
  .analysis-module .row {
    flex-direction: column-reverse;
  }
  
  .reverse .row {
    flex-direction: column;
  }
}

/* Code Guide Specific Styles */
.code-guide-container {
  max-width: 1200px;
  padding: 2rem;
}

.code-guide-title {
  color: var(--accent-blue);
  border-bottom: 3px solid var(--accent-coral);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.code-block {
  background: var(--ivory-base);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin: 1.5rem 0;
}

.code-header {
  background: var(--paper-2);
  padding: 0.8rem 1rem;
  border-radius: 6px 6px 0 0;
  display: flex;
  justify-content: space-between;
  font-family: monospace;
}

.lang-badge {
  background: var(--accent-blue);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.file-path {
  color: var(--slate-gray);
  font-size: 0.9em;
}

pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.table-file-ref {
  border: 1px solid var(--paper-2);
  margin: 1rem 0;
}

.table-file-ref th {
  background: var(--accent-blue);
  color: white;
}

.uni-badge {
  background: var(--primary-dark);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.file-type {
  font-family: monospace;
  color: var(--accent-coral);
}

.alert-guide {
  background: var(--paper-1);
  border-left: 4px solid var(--accent-blue);
  color: var(--slate-gray);
}
.full-view-container {
  position: relative;
  width: 100vw;
  margin-left: -50vw;
  left: 50%;
  height: 120vh;
  overflow: hidden;
}
.full-view-trend {
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--trend-height, 800px); /* Default 800px, can be overridden */
}

.full-view-trend .card-title {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.full-view-graph {
  flex: 1;
  width: 100%;
  border: none;
  margin-bottom: 1rem;
}

.trend-note {
  background: var(--paper-1);
  border-left: 4px solid var(--accent-coral);
  padding: 1.5rem;
  margin: 1rem 0;
}

.trend-note p {
  margin-bottom: 1rem; /* Space between paragraphs */
}

.trend-note p:last-child {
  margin-bottom: 0; /* Remove margin from last paragraph */
}

.trend-note h3 {
  color: var(--primary-dark);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.trend-note h4 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.toc-container {
  position: fixed;
  left: 0;
  top: 80px;
  height: calc(100vh - 80px);
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  transform: translateX(-100%);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
}

.toc-container.active {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 3rem; /* Increased top padding to 2rem */
  border-bottom: 1px solid var(--paper-2);
  margin-bottom: 1.5rem;
}

.toc-close {
  background: none;
  border: none;
  color: var(--slate-gray);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.toc-close:hover {
  color: var(--accent-coral);
}

.toc-content {
  padding: 2rem 1.5rem;
  overflow-y: auto;
  max-height: 80vh;
}

.toc-content h2 {
  color: var(--accent-blue);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-coral);
}

.toc-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.toc-content ul ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.toc-content li {
  margin-bottom: 0.75rem;
}

.toc-content a {
  color: var(--slate-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.toc-content a:hover {
  color: var(--accent-coral);
}

.toc-content ul ul a {
  font-size: 0.85rem;
  color: var(--primary-light);
}

.toc-trigger {
  position: fixed;
  left: 20px;
  top: 100px; /* Changed from 50% */
  background: rgba(43, 88, 118, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001; /* Increased to ensure it's above other elements */
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toc-trigger:hover {
  background: var(--accent-blue);
  transform: scale(1.1);
}

/* Update responsive styles */
@media (max-width: 768px) {
  .toc-container {
    width: 100%;
    max-width: 300px;
  }
  
  .toc-trigger {
    left: 10px;
    width: 40px;
    height: 40px;
  }
}

.toc-content a.active {
  color: var(--accent-coral);
  font-weight: 500;
}