:root {
  --bg-color: #ffffff;
  --text-primary: #121212;
  --text-secondary: #888888;
  --accent-color: #e63946;
  /* A refined, sophisticated red */
  --border-color: #f2f2f2;
  --font-serif: "Playfair Display", serif;
  --font-mono: "JetBrains Mono", monospace;
  --container-width: 580px;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  justify-content: center;
  padding: 60px 24px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  opacity: 0;
  animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

header {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.flourish {
  margin-bottom: 32px;
  width: 48px;
  height: 48px;
  background-color: var(--accent-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flourish:hover {
  transform: scale(1.05);
}

.flourish svg {
  width: 32px;
  height: 32px;
  display: block;
}

h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text-primary);
}

.subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle span {
  color: var(--text-primary);
}

.projects {
  display: flex;
  flex-direction: column;
}

.group-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 48px;
  margin-bottom: 8px;
}

.projects .group-title:first-child {
  margin-top: 0;
}

.project-group {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  margin: 0 -16px;
  border-top: 1px solid var(--border-color);
  transition: background 0.2s ease;
  border-radius: 6px;
}

.project-item:last-child {
  border-bottom: 1px solid var(--border-color);
}

.content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  /* Better vertical alignment for technical text */
  gap: 32px;
}

.title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-item h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  margin: 0;
  transition: color 0.2s ease;
}

.description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.4;
}

.url {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  opacity: 0.6;
}

.project-item:hover {
  background-color: #fcfcfc;
}

.project-item:hover h2 {
  color: var(--accent-color);
}

.project-item:hover .url {
  color: var(--text-primary);
  opacity: 1;
}

/* Buy Me A Coffee Button Styles */
.bmc-link {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: #ffdd00;
  color: #000000;
  border-radius: 50%;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bmc-link:hover {
  transform: scale(1.1) rotate(-6deg);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.bmc-link:active {
  transform: scale(0.95);
}

.bmc-icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.bmc-link:hover .bmc-icon-wrapper {
  transform: translateY(-4px);
}

.bmc-icon {
  width: 32px;
  height: 32px;
  color: #000000;
}

.bmc-heart {
  position: absolute;
  top: -4px;
  right: 0;
  opacity: 0;
  color: #ef4444; /* red-500 */
  transition: all 0.5s ease;
}

.bmc-link:hover .bmc-heart {
  opacity: 1;
  transform: translateY(-8px);
}

@media (min-width: 768px) {
  .bmc-link {
    width: 64px;
    height: 64px;
    bottom: 24px;
    right: 24px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 40px 24px;
  }

  h1 {
    font-size: 2.8rem;
  }

  .content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-item {
    padding: 24px 16px;
  }
}
