html {
  scroll-behavior: smooth;
}

:root, [data-theme='light'] {
  --primary-color: #1a73e8;
  --primary-gradient: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
  --text-color: #3c4043;
  --bg-color: #f8f9fa;
  --secondary-text: #70757a;
  --border-color: #dadce0;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #58a6ff;
    --primary-gradient: linear-gradient(135deg, #58a6ff 0%, #7ee787 100%);
    --text-color: #e8eaed;
    --bg-color: #121212;
    --secondary-text: #9aa0a6;
    --border-color: #3c4043;
    --card-bg: #1e1e1e;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.18);
    --hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
  }
}

[data-theme='dark'] {
  --primary-color: #58a6ff;
  --primary-gradient: linear-gradient(135deg, #58a6ff 0%, #7ee787 100%);
  --text-color: #e8eaed;
  --bg-color: #121212;
  --secondary-text: #9aa0a6;
  --border-color: #3c4043;
  --card-bg: #1e1e1e;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.18);
  --hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s;
}

a:hover {
  opacity: 0.8;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem 2rem;
}

.banner-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  margin-bottom: -100px;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

header {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(var(--card-bg), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  background-color: var(--card-bg);
}

@media (max-width: 768px) {
  .banner-container {
    height: 200px;
    margin-bottom: -50px;
  }
  
  header {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    margin-top: 0;
  }
  
  .profile-pic {
    width: 150px;
    height: 150px;
    margin-top: -75px;
  }
}

.bio-text {
  flex: 1;
}

.name {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--card-shadow);
  border: 4px solid var(--card-bg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-pic:hover {
  transform: scale(1.05) rotate(2deg);
}

.links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 600px) {
  .links {
    justify-content: center;
  }
}

.links a {
  background: var(--bg-color);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.2s;
}

.links a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  text-decoration: none;
  transform: translateY(-2px);
}

.links span {
  font-size: 0.9rem;
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Sticky Header Styles */
.sticky-nav {
  position: fixed;
  top: -100px;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(var(--card-bg), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: top 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-nav.visible {
  top: 0;
}

.sticky-nav-content {
  max-width: 1000px;
  width: 100%;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-name {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.sticky-links {
  margin-top: 0 !important;
  gap: 0.5rem !important;
}

.sticky-links a {
  padding: 0.3rem 0.75rem !important;
  font-size: 0.8rem !important;
}

.sticky-location {
  font-size: 0.8rem !important;
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

@media (max-width: 850px) {
  .sticky-links {
    display: none;
  }
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  font-size: 1.4rem;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--hover-shadow);
  }
}

.theme-toggle:active {
  transform: scale(0.9);
}

.jump-up {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  font-size: 1.4rem;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  color: var(--text-color);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.jump-up.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) {
  .jump-up:hover {
    transform: scale(1.1);
    box-shadow: var(--hover-shadow);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
}

.jump-up:active {
  transform: scale(0.9);
}

/* Project Hover Animations */
.project-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-color);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.isodde-video-container {
  background: #000;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 2;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 4rem 0 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.project-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-color);
}

@media (max-width: 850px) {
  .project-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .project-img {
    height: 200px;
  }
}

.project-img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-info h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.project-info h3 a {
  color: var(--text-color);
}

.project-info h3 a:hover {
  color: var(--primary-color);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: lowercase;
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}

.project-links a:hover {
  text-decoration: underline;
  background: none;
  transform: none;
}

.project-authors {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 0.75rem;
}

.project-venue {
  display: inline-block;
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.latest-badge {
  display: inline-block;
  background: var(--bg-color);
  color: var(--secondary-text);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.project-info h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.toggle-button {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin: 2rem 0;
  transition: all 0.2s;
  color: var(--text-color);
}

.toggle-button:hover {
  background: var(--border-color);
  transform: scale(1.01);
}

.retrospective-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--secondary-text);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.retrospective-button:hover {
  color: var(--primary-color);
}

.collapsible-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.collapsible-content.show {
  display: block;
}

.open-source-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.open-source-list li a {
  display: block;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s;
}

.open-source-list li a:hover {
  border-color: var(--primary-color);
  background: rgba(26, 115, 232, 0.05);
  text-decoration: none;
  transform: translateX(5px);
}

footer {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--secondary-text);
  text-align: center;
}

.retrospective {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(138, 180, 248, 0.08);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  font-size: 0.95rem;
}

.retrospective h4 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.retrospective ul {
  margin: 0;
  padding-left: 1.2rem;
}

.retrospective li {
  margin-bottom: 0.5rem;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

