@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --bg: #fafafa;
  --text-primary: #171717;
  --text-secondary: #737373;
  --border: #e5e5e5;
  --nav-bg: rgba(250, 250, 250, 0.85);
  --nav-border: rgba(229, 229, 229, 0.7);
  --card-bg: #ffffff;
  --card-border: #e5e5e5;
  --card-hover-border: #a3a3a3;
  --accent: #171717;
  --accent-contrast: #fafafa;
  --accent-hover: #404040;
  --tint-glow: rgba(0, 0, 0, 0.02);
  --selection-bg: #e5e5e5;
  --selection-color: #171717;
}

.dark {
  --bg: #09090b;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --border: #27272a;
  --nav-bg: rgba(9, 9, 11, 0.85);
  --nav-border: rgba(39, 39, 42, 0.7);
  --card-bg: #18181b;
  --card-border: #27272a;
  --card-hover-border: #52525b;
  --accent: #f4f4f5;
  --accent-contrast: #09090b;
  --accent-hover: #e4e4e7;
  --tint-glow: rgba(255, 255, 255, 0.02);
  --selection-bg: #27272a;
  --selection-color: #f4f4f5;
}

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

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Single column layout container */
.container {
  max-width: 660px;
  margin: 0 auto;
  padding: 7rem 1.5rem 8rem 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dividers */
hr.divider {
  border: 0;
  height: 1px;
  background-color: var(--border);
  margin: 2.5rem 0;
  transition: background-color 0.4s ease;
}

/* Typography styles */
h1, h2, h3, h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  transition: color 0.4s ease;
}

p.lead {
  font-size: 1rem;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--text-primary);
}

/* Header & Hero Section */
.hero {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-img-container {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--border);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease;
  flex-shrink: 0;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.hero-meta {
  display: flex;
  flex-direction: column;
}

.hero-title-row {
  display: flex;
  flex-direction: column;
}

.job-title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.location-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Text highlights */
.highlight {
  color: var(--text-primary);
  font-weight: 500;
}

/* Lists styling */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.experience-item, .project-card, .pub-box {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.4s ease;
}

/* Cards minimal styling */
.project-card, .pub-box {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background-color: var(--card-bg);
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.4s ease;
}

.project-card:hover, .pub-box:hover {
  border-color: var(--card-hover-border);
}

.project-header, .pub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.project-title, .pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.project-title svg, .pub-title svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

a:hover .project-title svg, a:hover .pub-title svg {
  transform: translate(1px, -1px);
}

.project-desc, .pub-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--tint-glow);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Experience styling */
.experience-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.experience-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.experience-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.experience-company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.experience-desc {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Publication details styling */
.pub-box {
  margin-bottom: 0.75rem;
}

.pub-action {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
}

.pub-box:hover .pub-action {
  border-bottom-color: var(--text-primary);
}

/* Certs & Awards */
.awards-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.award-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  transition: border-color 0.4s ease;
}

.award-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.award-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
  gap: 1rem;
}

.award-card-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.award-card-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.award-card-issuer {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.award-card-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Quote styling */
.quote-block {
  margin: 3rem 0;
  padding: 1.5rem;
  border-left: 2px solid var(--border);
  background-color: var(--tint-glow);
  border-radius: 0 8px 8px 0;
}

.quote-text {
  font-family: 'Outfit', sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.quote-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: right;
  font-weight: 500;
}

/* Footer Section */
footer.site-footer {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Floating Bottom/Top Navbar */
.navbar-fixed {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  width: max-content;
  max-width: 90vw;
}

.navbar-top {
  top: 1.5rem;
  bottom: auto;
}

.navbar-pill {
  display: flex;
  align-items: center;
  background-color: var(--nav-bg);
  border: 1px solid var(--nav-border);
  padding: 0.375rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 0.25rem;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.dark .navbar-pill {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color 0.2s ease, background-color 0.2s ease;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: var(--tint-glow);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border);
  margin: 0 0.25rem;
}

/* Theme Toggle styles */
.theme-toggle-btn {
  position: relative;
}

.theme-toggle-btn svg {
  position: absolute;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.dark .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.dark .moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Responsive adjust */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 5rem 1.25rem 7rem 1.25rem;
  }
  h1 {
    font-size: 1.85rem;
  }
  .experience-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
  .experience-meta {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  .navbar-fixed {
    bottom: 1rem;
  }
  .nav-item {
    width: 34px;
    height: 34px;
  }
  .nav-item svg {
    width: 16px;
    height: 16px;
  }
}
