/* Base Variables */
:root,
[data-theme="dark"] {
  --bg-color: #080a0c;
  --card-bg: rgba(18, 22, 28, 0.45);
  --card-border: rgba(100, 140, 200, 0.1);
  --card-border-hover: rgba(100, 150, 220, 0.25);
  --text-primary: #f0f4f8;
  --text-secondary: #9aa8b6;
  --accent: #b0cceb;
  --accent-hover: #ffffff;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", serif;
  --glow-opacity: 0.18;
}

[data-theme="light"] {
  --bg-color: #f7f9fb;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(100, 130, 180, 0.15);
  --card-border-hover: rgba(100, 130, 180, 0.35);
  --text-primary: #12161a;
  --text-secondary: #5c6a7a;
  --accent: #2e5b8e;
  --accent-hover: #0a2540;
  --glow-opacity: 0.12;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.5s ease;
}

/* Background Gradients - Adjusted for elegant faint blue/teal tints */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-blob {
  position: absolute;
  filter: blur(120px);
  border-radius: 50%;
  opacity: var(--glow-opacity);
  animation: float 25s infinite ease-in-out alternate;
}

.blob-1 {
  top: -15%;
  right: -10%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(
    circle,
    rgba(50, 110, 220, 0.8) 0%,
    rgba(50, 110, 220, 0) 70%
  );
}

.blob-2 {
  bottom: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(
    circle,
    rgba(60, 180, 200, 0.7) 0%,
    rgba(60, 180, 200, 0) 70%
  );
  animation-delay: -12s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-8%, 8%) scale(1.05);
  }
}

/* Layout */
.container {
  width: 100%;
  max-width: 800px;
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

/* Typography */
.name-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

h1.name {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2rem;
}

.bio {
  font-size: 1.05rem;
  color: var(--text-primary);
  max-width: 680px;
  margin-top: 2rem;
  line-height: 1.75;
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.github-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(91, 164, 181, 0.1);
  text-decoration: none;
  transition: all 0.3s ease;
}

.github-link:hover {
  background: rgba(91, 164, 181, 0.2);
  color: var(--accent-hover);
}

[data-theme="light"] .github-link {
  background: rgba(46, 91, 142, 0.1);
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #3fb950;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.6);
}

/* Links */
a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

.links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

.link::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.muted-link {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

/* Cards & Sections */
.grid-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2.5rem;
  transition:
    transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.5s ease,
    box-shadow 0.5s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 50, 100, 0.08);
}

/* Generated CV Tables styling */
.cv-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.cv-content th,
.cv-content td {
  text-align: left !important;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-secondary);
  vertical-align: top;
  overflow-wrap: break-word;
}

/* Mobile responsivness for CV tables */
@media screen and (max-width: 768px) {
  .cv-content {
    padding: 1.5rem;
  }

  .cv-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
    box-shadow: none;
    margin-bottom: 1.5rem;
  }

  .cv-content th,
  .cv-content td {
    min-width: 150px;
    /* Prevent aggressive squashing */
  }
}

/* Prevent specific date columns from wrapping */
.cv-content .cv-date {
  white-space: nowrap !important;
  text-align: right !important;
}

.cv-content th {
  font-weight: 500;
  color: var(--text-primary);
}

.cv-content tr:last-child th,
.cv-content tr:last-child td {
  border-bottom: none;
}

.cv-content p {
  margin-bottom: 0.5rem;
  color: inherit;
}

.cv-content p:last-child {
  margin-bottom: 0;
}

.cv-content a {
  color: var(--accent);
  text-decoration: none;
}

.cv-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.cv-content ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.cv-content li {
  margin-bottom: 0.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.flex-between {
  justify-content: space-between;
}

.flex-align {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Colored Dots - adjusted specifically for the blue tint request while keeping variety */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.blue {
  background-color: #5ba4b5;
  box-shadow: 0 0 12px rgba(91, 164, 181, 0.5);
}

.purple {
  background-color: #8da3d4;
  box-shadow: 0 0 12px rgba(141, 163, 212, 0.5);
}

.yellow {
  background-color: #b5cca5;
  box-shadow: 0 0 12px rgba(181, 204, 165, 0.5);
}

.green {
  background-color: #79b8a0;
  box-shadow: 0 0 12px rgba(121, 184, 160, 0.5);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.tools {
  margin-top: 2rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  background: rgba(91, 164, 181, 0.06);
  border: 1px solid rgba(91, 164, 181, 0.15);
  border-radius: 99px;
  color: var(--accent);
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(91, 164, 181, 0.12);
  border-color: rgba(91, 164, 181, 0.3);
  color: var(--accent-hover);
}

[data-theme="light"] .tag {
  background: rgba(46, 91, 142, 0.05);
  border-color: rgba(46, 91, 142, 0.15);
  color: var(--accent);
}

[data-theme="light"] .tag:hover {
  background: rgba(46, 91, 142, 0.1);
  border-color: rgba(46, 91, 142, 0.25);
}

/* GitHub Activity Feed */
.activity-section {
  width: 100%;
}

.activity-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.github-graph-container {
  padding: 1.5rem !important;
  /* Slightly tighter padding for the image container */
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

/* Custom Elements & Integrations */
.profile-pic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  /* For smooth fade-in matching the hero */
  animation: fadeIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: all 0.3s ease;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--card-border-hover);
}

.calendar {
  width: 100%;
  font-family: var(--font-sans);
  color: var(--text-primary);
  border: none !important;
  padding: 0 !important;
}

/* Fix text contrast in calendar component on dark mode */
[data-theme="dark"] .calendar .text-muted,
[data-theme="dark"] .calendar {
  color: var(--text-secondary);
}

[data-theme="dark"] .calendar svg text {
  fill: var(--text-secondary);
}

/* Base calendar widget overrides to remove default white backgrounds */
.calendar {
  background: transparent !important;
  border: none !important;
}

/* Change Default Green to Blue Tint */
.calendar .ContributionCalendar-day[data-level="0"] {
  fill: #ebedf0;
  background-color: #ebedf0;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

.calendar .ContributionCalendar-day[data-level="1"] {
  fill: #c0dce3;
  background-color: #c0dce3;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

.calendar .ContributionCalendar-day[data-level="2"] {
  fill: #79bfce;
  background-color: #79bfce;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

.calendar .ContributionCalendar-day[data-level="3"] {
  fill: #5ba4b5;
  background-color: #5ba4b5;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

.calendar .ContributionCalendar-day[data-level="4"] {
  fill: #3f7b88;
  background-color: #3f7b88;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

/* Dark Mode Grid Colors */
[data-theme="dark"] .calendar .ContributionCalendar-day[data-level="0"] {
  fill: #161b22;
  background-color: #161b22;
  outline: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar .ContributionCalendar-day[data-level="1"] {
  fill: #1b3d4a;
  background-color: #1b3d4a;
  outline: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar .ContributionCalendar-day[data-level="2"] {
  fill: #2c6375;
  background-color: #2c6375;
  outline: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar .ContributionCalendar-day[data-level="3"] {
  fill: #5ba4b5;
  background-color: #5ba4b5;
  outline: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar .ContributionCalendar-day[data-level="4"] {
  fill: #8ed0e0;
  background-color: #8ed0e0;
  outline: 1px solid rgba(255, 255, 255, 0.05);
}

/* Clean up GitHub Calendar Library layout quirks */
/* JS handles removing the inner text titles */

/* Fix text contrast in calendar component on dark mode */
[data-theme="dark"] .calendar .text-muted {
  color: var(--text-secondary);
}

/* Clean up elements not pruned by JS if any */
.calendar .contrib-footer {
  display: none !important;
}

/* Hide broken streaks specifically, keeping ONLY the first column (yearly total) */
.calendar .contrib-column-table {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.5rem;
}

.calendar .contrib-column {
  display: none !important;
}

.calendar .contrib-column:first-child {
  display: block !important;
  text-align: center;
  padding: 1rem 0;
}

/* Make the GitHub Calendar completely responsive without scrolling */
.github-graph-container {
  padding: 1.5rem !important;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.calendar {
  transform-origin: center;
  width: max-content !important;
  max-width: none !important;
}

@media (max-width: 800px) {
  .calendar {
    transform: scale(0.95);
  }
}

@media (max-width: 700px) {
  .calendar {
    transform: scale(0.85);
  }
}

@media (max-width: 600px) {
  .calendar {
    transform: scale(0.75);
  }

  .github-graph-container {
    padding: 1rem 0 !important;
  }
}

@media (max-width: 500px) {
  .calendar {
    transform: scale(0.6);
  }
}

@media (max-width: 400px) {
  .calendar {
    transform: scale(0.5);
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding-top: 2.5rem;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-hover);
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start !important;
  }
}

/* Animations */
.slide-up {
  animation: slideUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.fade-in {
  animation: fadeIn 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

.slide-up-delay-1 {
  animation: slideUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.1s;
  opacity: 0;
  transform: translateY(20px);
}

.slide-up-delay-2 {
  animation: slideUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.2s;
  opacity: 0;
  transform: translateY(20px);
}

.slide-up-delay-3 {
  animation: slideUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.slide-up-delay-4 {
  animation: slideUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.4s;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
