body {
  /* Set line height to 1.5 times the font size
       and use the OS’s UI font as the website font
     */
  font: 100%/1.5 system-ui;
  max-width: 100ch;
  margin-inline: auto;
  padding: 1em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul{
  display: contents;
}

nav {
  --border-color: oklch(50% 10% 200 / 40%);
  display: flex;
  margin-bottom: 1em;
  border-bottom: 1px solid var(--border-color);
}

a {
  flex: 1;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 0.5em;
}

nav a.current {
  border-bottom-width: 0.4em;
  border-bottom-style: solid;
  padding-bottom: 0.1em;
  border-bottom-color: oklch(80% 3% 200);
}


/* Default Theme Variables */
:root {
  --primary-color: #0066cc;
  --secondary-color: #555;
  --background-light: #fff;
  --text-light: #333;
  --background-dark: #1e1e1e;
  --text-dark: #f0f0f0;
  --accent-light: #f5f5f5;
  --accent-dark: #2a2a2a;
  --border-light: #ddd;
  --border-dark: #444;
  --card-bg-light: #f8f8f8;
  --card-bg-dark: #292929;
  --card-text-light: #222;
  --card-text-dark: #66aaff; /* Blue text for dark mode */
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

:root[color-scheme="light"] {
  color: var(--text-light);
  background-color: var(--background-light);
}

/* Dark Theme */
:root[color-scheme="dark"] {
  color: var(--text-dark);
  background-color: var(--background-dark);
}

@media (prefers-color-scheme: dark) {
  :root {
      color: var(--text-dark);
      background-color: var(--background-dark);
  }
}


html {
  accent-color: var(--color-accent)
}

nav a:hover {
  border-bottom-width: 0.4em;
  border-bottom-style: solid;
  padding-bottom: 0.1em;
  border-bottom-color: var(--color-accent);
  background-color: color-mix(in oklch, var(--color-accent), canvas 85%);
}

form {
  display: grid;
  grid-template-columns: auto 1fr; 
  gap: 1em; 
}

label {
  grid-column: 1; 
  text-align: right; 
  padding-right: 1em; 
}

input, textarea {
  grid-column: 2; 
  width: 100%; 
  box-sizing: border-box; 
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  grid-column: 1 / -1; 
  padding: 0.7em 1.5em;
  border: none;
  border-radius: 4px;
  background-color: #007BFF; 
  color: white;
  cursor: pointer;
  text-align: center;
}

button:hover {
  background-color: #0056b3; 
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
  gap: 2em;

  padding: 1rem;
} 

/* Hover effect for project cards */
.projects article {
  background: var(--card-bg-light);
  color: var(--card-text-light);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.projects article:hover {
  background: var(--primary-color); /* Highlight with primary color */
  color: white; /* Change text color for contrast */
  transform: translateY(-5px); /* Slight lift effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Deeper shadow */
}

article {
  grid-template-rows: subgrid;
  grid-row: span 3;
  gap: 1em;
}

article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

h2 {
  margin: 0;
}

h1 {
  font-size: 400%; 
  font-weight: bold;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1; 
  text-wrap: balance; 
  margin: 0.5em 0; 
}

main section {
  margin-bottom: 2em;
}

section h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

section article {
  margin-bottom: 1.5em;
  padding: 1em;
  border: 1px solid var(--color-gray);
  border-radius: 0.5em;
  background-color: color-mix(in oklch, #ffff, canvas 85%);
  }

section article h3 {
  margin: 0 0 0.5em;
}

section ul, li {
  list-style: disc; 
  margin-left: 2em; 
  padding-left: 1em; 
}

ul li {
  margin-bottom: 0.5em; 
}

.skills-list {
  list-style: disc !important; 
  margin-left: 20px; 
  padding-left: 20px;
}

html {
  color-scheme: light dark;
}

label.color-scheme {
  position: absolute;
  top: 1rem;
  right: 4rem;
  font-size: 85%;
  font-family: inherit;
}
#profile-stats {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#profile-stats h1 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
}

#profile-stats dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

#profile-stats dt {
  color: #666;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: normal;
}

#profile-stats dd {
  font-size: 36px;
  font-weight: bold;
  margin: 0;
  color: #24292e;
}

footer.year {
  font-family: Baskerville;
  font-variant-numeric: oldstyle-nums
}

#projects-pie-plot {
  max-width: 20em;
  margin-block: 2em;

  /* Do not clip shapes outside the viewBox */
  overflow: visible;
}

.legend {
  display: flex;
  flex-wrap: wrap; 
  gap: 1rem;
  padding: 0.4rem;
  margin-top: 1.5rem;
  list-style: none;
  border: 2px solid #ddd; 
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: fit-content; 
  flex: 1;
  align-items: right;
}

.legend ul {
  align-items: right;
  padding: 0.4rem;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 0.2rem; 
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  padding: 0.4rem 0.6rem;
}

.legend .swatch {
  width: 16px;
  height: 16px;
  aspect-ratio: 1 / 1;
  border-radius: 50%; 
  background: var(--color);
  display: inline-block;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.15);
  align-items: right;
  gap: 0.2rem;
  padding: 0.4rem;
  flex-shrink: 0;
}

.container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex: 1;
}

&:has(path:hover) {
  path:not(:hover) {
    opacity: 0.5;
  }
}

path {
  transition: 300ms;
}

.selected {
  --color: oklch(60% 45% 0) !important;

  &:is(path) {
    fill: var(--color);
  }
}

path {
  cursor: pointer;
}

#stats {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#stats dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

#stats dt {
  color: #666;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: normal;
}

#stats dd {
  font-size: 36px;
  font-weight: bold;
  margin: 0;
  color: #24292e;
}


#stats h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
}


.gridlines line {
  stroke: #ddd; 
  stroke-width: 2px;
  stroke-dasharray: 0; 
}


.gridlines line.night {
  stroke: #4a90e2;
  opacity: 0.6;
}

.gridlines line.day {
  stroke: #e89f47; 
  opacity: 0.6;
}

.tooltip {
  position: fixed;
  top: 1em;
  left: 1em;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.8);
  color: white;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
  opacity: 0; 
  transition: opacity 0.2s ease-in-out;
  backdrop-filter: blur(8px);
}
 

dl.info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 0;
}

dl.info dt {
  font-weight: bold;
  opacity: 0.8;
}

dl.info dd {
  margin: 0;
}

circle {
  transition: transform 200ms ease;
  transform-origin: center;
  transform-box: fill-box;
}

circle:hover {
  transform: scale(1.5);
}

dl.info {
  transition-duration: 500ms;
  transition-property: opacity, visibility;
}

dl.info[hidden]:not(:hover, :focus-within) {
  opacity: 0;
  visibility: hidden;
}

@keyframes marching-ants {
  to {
    stroke-dashoffset: -8; /* 5 + 3 */
  }
}

.selection {
  fill-opacity: 0.1;
  stroke: black;
  stroke-opacity: 0.7;
  stroke-dasharray: 5 3;
  animation: marching-ants 2s linear infinite;
}

circle.selected {
  fill: #ff6b6b !important;
}

#selection-count {
  margin-top: 1em;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  color: #007BFF;
}

#language-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin-top: 1em;
  padding: 1em;
  background-color: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#language-breakdown dt {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 5px;
  text-align: center;
  flex: 1;
}

#language-breakdown dd {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  text-align: center;
  flex: 1;
}

#filter-container {
  display: flex;
  align-items: baseline;
  margin-bottom: 10px;
}

#commit-slider {
  margin-left: 10px;
}

#selectedTime {
  margin-left: auto;
  font-weight: bold;
}
/* Wrapper: Two-column layout */
.wrapper {
  display: flex;
  align-items: flex-start; /* Aligns content at the top */
  justify-content: center;
  max-width: 1200px;
  margin: 40px auto;
  gap: 3rem; /* Space between profile and content */
}

/* Profile container (left sidebar) */
.profile-container {
  width: 300px; /* Fixed width */
  text-align: center;
}

/* Profile image */
.profile-pic {
  width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: contain; /* Change from 'cover' to 'contain' */
    object-position: center; /* Center the image */
    background-color: white; /* Prevent transparency issues */
    border: 3px solid #ccc;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Profile links */
.profile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}

/* Content (right side) */
.content {
  flex: 1; /* Takes up the remaining space */
  max-width: 800px;
  text-align: center; /* Centers project & GitHub stats */
}

/* Projects and GitHub Stats styling */
.projects, #profile-stats {
  margin-top: 20px;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Icon styling */
.icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
  margin: 8px 0;
}

.icon img {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

/* Right section (text) */
.profile-right {
  flex: 1;
  padding-left: 30px;
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Light Mode (default) */
.icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-light); /* Ensures contrast in light mode */
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: color 0.3s ease;
}

/* Adjust the text color in dark mode */
:root[style*="color-scheme: dark"] .icon {
  color: var(--text-dark); /* Ensures better readability in dark mode */
}

/* Adjust icon size for clarity */
.icon img {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  filter: invert(0); /* Keeps original colors in light mode */
}

/* Invert icons in dark mode for better visibility */
:root[style*="color-scheme: dark"] .icon img {
  filter: invert(1); /* Makes dark icons appear white in dark mode */
}

:root[color-scheme="light"] body {
  background-color: var(--background-light);
  color: var(--text-light);
}