@import './theme.css';

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: float 15s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

* {
  border-color: rgba(229, 229, 229, 1);
  outline-color: rgba(59, 130, 246, 0.5);
}

.dark * {
  border-color: rgba(38, 38, 38, 1);
}

html,
body {
  min-height: 100%;
}

body {
  background: #ffffff;
  color: #121212;
}

.dark body {
  background: #000000;
  color: #f0f0f0;
}

::selection {
  background: color-mix(in srgb, var(--theme-primary) 20%, transparent);
  color: var(--theme-primary);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.4s;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-name: none;
  mix-blend-mode: normal;
}

.dark::view-transition-old(root) {
  z-index: 1;
}

.dark::view-transition-new(root) {
  z-index: 999;
}

:root:not(.dark)::view-transition-old(root) {
  z-index: 999;
}

:root:not(.dark)::view-transition-new(root) {
  z-index: 1;
}

.theme-transitioning * {
  animation-play-state: paused !important;
  transition: none !important;
}

.custom-cursor,
.custom-cursor * {
  cursor: none !important;
}

.cursor-dot {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  width: 8px;
  height: 8px;
  background-color: var(--theme-primary);
  border-radius: 50%;
  will-change: transform;
  filter: drop-shadow(0 0 4px var(--theme-primary));
}

.cursor-ring {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--theme-primary);
  border-radius: 50%;
  will-change: transform;
  transition: opacity 200ms ease;
}

.dark .cursor-dot {
  background-color: var(--theme-secondary);
}

.dark .cursor-ring {
  border-color: var(--theme-secondary);
}

@media (max-width: 768px) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
  .custom-cursor,
  .custom-cursor * {
    cursor: auto !important;
  }
}

.prose h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 2rem 0 1.5rem;
  color: #121212;
}

.dark .prose h1 {
  color: #ffffff;
}

.prose h2 {
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  color: #121212;
}

.dark .prose h2 {
  color: #ffffff;
}

.prose h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 1.25rem 0 0.75rem;
  color: #121212;
}

.dark .prose h3 {
  color: #ffffff;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 1rem;
  color: rgba(18, 18, 18, 0.8);
  line-height: 1.7;
}

.dark .prose p,
.dark .prose ul,
.dark .prose ol {
  color: rgba(255, 255, 255, 0.8);
}

.prose ul,
.prose ol {
  margin-left: 1.5rem;
}

.prose ul > li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.prose ol > li {
  list-style: decimal;
  margin-bottom: 0.5rem;
}

.prose pre {
  background: rgba(18, 18, 18, 0.05);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.dark .prose pre {
  background: rgba(255, 255, 255, 0.05);
}

.prose code {
  background: rgba(18, 18, 18, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
}

.dark .prose code {
  background: rgba(255, 255, 255, 0.05);
}

.prose pre code {
  background: transparent;
  padding: 0;
}

.prose blockquote {
  border-left: 4px solid rgba(18, 18, 18, 0.2);
  padding-left: 1rem;
  font-style: italic;
  margin: 1rem 0;
  color: rgba(18, 18, 18, 0.7);
}

.dark .prose blockquote {
  border-left-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.dark .prose a {
  color: #60a5fa;
}

.prose a:hover {
  color: #1d4ed8;
}

.duck-theme-toggle {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background-color: #ffffff !important;
}

.dark .duck-theme-toggle {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background-color: #121212 !important;
}

.duck-theme-icon {
  color: #121212 !important;
}

.dark .duck-theme-icon {
  color: #ffffff !important;
}

.duck-avatar-frame {
  border-color: rgba(18, 18, 18, 0.2) !important;
}

.dark .duck-avatar-frame {
  border-color: #ffffff !important;
}

.duck-social-link {
  background-color: #ffffff !important;
}

.dark .duck-social-link {
  background-color: rgba(26, 26, 26, 0.5) !important;
}

.duck-social-icon,
.duck-social-icon svg,
.duck-social-icon i,
.duck-social-icon img {
  width: 1.25rem !important;
  height: 1.25rem !important;
  display: inline-block !important;
}

.duck-social-icon svg {
  stroke: currentColor !important;
  fill: none !important;
}

.duck-social-icon img {
  object-fit: contain !important;
}

.duck-social-icon i {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.duck-theme-icon {
  align-items: center !important;
  justify-content: center !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
}

.duck-theme-icon.hidden {
  display: none !important;
}

.duck-theme-icon:not(.hidden) {
  display: inline-flex !important;
}

.duck-theme-icon-svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
  display: block !important;
}

.duck-nav-indicator {
  background-color: var(--theme-primary) !important;
  opacity: 0.9 !important;
}

.dark .duck-nav-indicator {
  background-color: var(--theme-secondary) !important;
  opacity: 1 !important;
}

.duck-links-card {
  background-color: #ffffff !important;
  border-color: rgba(18, 18, 18, 0.12) !important;
}

.duck-links-card:hover {
  border-color: color-mix(in srgb, var(--theme-primary) 40%, #121212) !important;
}

.duck-links-title {
  color: #121212 !important;
}

.duck-links-desc {
  color: rgba(18, 18, 18, 0.72) !important;
}

.duck-links-arrow {
  color: rgba(18, 18, 18, 0.45) !important;
}

.dark .duck-links-card {
  background-color: #1a1a1a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark .duck-links-card:hover {
  border-color: color-mix(in srgb, var(--theme-secondary) 45%, #ffffff) !important;
}

.dark .duck-links-title {
  color: #ffffff !important;
}

.dark .duck-links-desc {
  color: rgba(255, 255, 255, 0.72) !important;
}

.dark .duck-links-arrow {
  color: rgba(255, 255, 255, 0.45) !important;
}

.duck-comments-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 18, 18, 0.1);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.92) 100%);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.duck-comments-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 18%, transparent), color-mix(in srgb, var(--theme-secondary) 14%, transparent));
  opacity: 0.95;
  pointer-events: none;
}

.duck-comments-section > * {
  position: relative;
  z-index: 1;
}

.dark .duck-comments-section {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(12, 16, 22, 0.96) 0%, rgba(17, 24, 39, 0.92) 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.dark .duck-comments-section::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 24%, transparent), color-mix(in srgb, var(--theme-secondary) 18%, transparent));
}

.duck-comments-section .bio-comment-heading {
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.duck-comments-section .bio-comment-heading::before {
  content: "COMMENTS";
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--theme-primary) 72%, #0f172a);
}

.dark .duck-comments-section .bio-comment-heading {
  color: #f8fafc;
}

.dark .duck-comments-section .bio-comment-heading::before {
  color: color-mix(in srgb, var(--theme-secondary) 72%, #ffffff);
}

.duck-comments-section .bio-comment-status,
.duck-comments-section .bio-comment-empty,
.duck-comments-section .bio-comment-tip,
.duck-comments-section .bio-comment-meta,
.duck-comments-section .bio-comment-text {
  color: rgba(15, 23, 42, 0.82);
}

.dark .duck-comments-section .bio-comment-status,
.dark .duck-comments-section .bio-comment-empty,
.dark .duck-comments-section .bio-comment-tip,
.dark .duck-comments-section .bio-comment-meta,
.dark .duck-comments-section .bio-comment-text {
  color: rgba(241, 245, 249, 0.84);
}

.duck-comments-section .bio-comment-status.is-success,
.duck-comments-section .bio-comment-tip.is-success {
  color: #166534;
}

.duck-comments-section .bio-comment-status.is-error,
.duck-comments-section .bio-comment-tip.is-error {
  color: #b91c1c;
}

.duck-comments-section .bio-comment-status.is-waiting,
.duck-comments-section .bio-comment-tip.is-waiting {
  color: #92400e;
}

.dark .duck-comments-section .bio-comment-status.is-success,
.dark .duck-comments-section .bio-comment-tip.is-success {
  color: #86efac;
}

.dark .duck-comments-section .bio-comment-status.is-error,
.dark .duck-comments-section .bio-comment-tip.is-error {
  color: #fca5a5;
}

.dark .duck-comments-section .bio-comment-status.is-waiting,
.dark .duck-comments-section .bio-comment-tip.is-waiting {
  color: #fcd34d;
}

.duck-comments-section .bio-comment-empty,
.duck-comments-section .bio-comment-form {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dark .duck-comments-section .bio-comment-empty,
.dark .duck-comments-section .bio-comment-form {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.duck-comments-section .bio-comment-empty,
.duck-comments-section .bio-comment-form {
  padding: 1rem 1.05rem;
}

.duck-comments-section .bio-comment-list {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.duck-comments-section .bio-comment-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.dark .duck-comments-section .bio-comment-item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.72);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.duck-comments-section .bio-comment-item:first-child {
  padding-top: 1rem;
}

.duck-comments-section .bio-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.duck-comments-section .bio-comment-author {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.dark .duck-comments-section .bio-comment-author {
  color: #f8fafc;
}

.duck-comments-section .bio-comment-time,
.duck-comments-section .bio-comment-reply-label {
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.72rem;
}

.dark .duck-comments-section .bio-comment-time,
.dark .duck-comments-section .bio-comment-reply-label {
  color: rgba(241, 245, 249, 0.46);
}

.duck-comments-section .bio-comment-replyto {
  color: color-mix(in srgb, var(--theme-primary) 74%, #0f172a);
  font-size: 0.76rem;
  font-weight: 600;
}

.dark .duck-comments-section .bio-comment-replyto {
  color: color-mix(in srgb, var(--theme-secondary) 72%, #ffffff);
}

.duck-comments-section .bio-comment-text {
  color: #111827;
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 500;
}

.dark .duck-comments-section .bio-comment-text {
  color: rgba(241, 245, 249, 0.94);
}

.duck-comments-section .bio-comment-children {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: 1rem;
  margin-top: 0.9rem;
  padding-left: 0.95rem;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
}

.dark .duck-comments-section .bio-comment-children {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.duck-comments-section .bio-comment-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.duck-comments-section .bio-comment-form-row > * {
  min-width: 0;
}

.duck-comments-section .bio-comment-field {
  margin: 12px 0 0;
  min-width: 0;
}

.duck-comments-section .bio-comment-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.58);
}

.dark .duck-comments-section .bio-comment-field label {
  color: rgba(241, 245, 249, 0.56);
}

.duck-comments-section .bio-comment-form input,
.duck-comments-section .bio-comment-form textarea {
  width: 100%;
  display: block;
  box-sizing: border-box;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  padding: 11px 13px;
}

.dark .duck-comments-section .bio-comment-form input,
.dark .duck-comments-section .bio-comment-form textarea {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f0;
}

.duck-comments-section .bio-comment-form input:focus,
.duck-comments-section .bio-comment-form textarea:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-primary) 24%, transparent);
}

.dark .duck-comments-section .bio-comment-form input:focus,
.dark .duck-comments-section .bio-comment-form textarea:focus {
  border-color: var(--theme-secondary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-secondary) 24%, transparent);
}

.duck-comments-section .bio-comment-actions {
  margin-top: 14px;
}

.duck-comments-section .bio-comment-submit {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--theme-primary), color-mix(in srgb, var(--theme-secondary) 62%, var(--theme-primary)));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 22px color-mix(in srgb, var(--theme-primary) 22%, transparent);
}

.dark .duck-comments-section .bio-comment-submit {
  color: #121212;
  box-shadow: 0 12px 22px color-mix(in srgb, var(--theme-secondary) 20%, transparent);
}

.duck-comments-section .bio-comment-tip {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .duck-comments-section {
    padding: 1.15rem;
  }

  .duck-comments-section .bio-comment-form-row {
    grid-template-columns: 1fr;
  }

  .duck-comments-section .bio-comment-item,
  .duck-comments-section .bio-comment-form,
  .duck-comments-section .bio-comment-empty {
    padding: 0.95rem;
  }

  .duck-comments-section .bio-comment-children {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }
}

.dark .prose a:hover {
  color: #93c5fd;
}

.prose strong {
  font-weight: 700;
  color: #121212;
}

.dark .prose strong {
  color: #ffffff;
}

.prose hr {
  margin: 2rem 0;
  border-color: rgba(18, 18, 18, 0.1);
}

.dark .prose hr {
  border-color: rgba(255, 255, 255, 0.1);
}
