@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-MediumItalic.woff') format('woff');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-BlackItalic.woff') format('woff');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=swap');

::-moz-selection {
  background: var(--border-color);
}

::selection {
  background: var(--border-color);
}

.profile-name,
.profile-bio,
.about-content,
.popup-title,
.popup-description,
.popup-details,
.project-link,
.project-title,
.contact-text,
.footer-form input,
.footer-form textarea,
.footer-form-submit {
  font-family: var(--font-satoshi);
}

:root {
  --background: #141414;
  --foreground: #ebebeb;
  --kbd-background: #222;
  --text-primary: #d4d4d8;
  --text-secondary: #737373;
  --border-color: #404040;
  --border-subtle: #262626;
  --hover-bg: rgba(64, 64, 64, 0.2);
  --font-geist-sans: "geistSans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-geist-mono: "Geist Mono", monospace;
  --font-satoshi: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --background: #f5f5f5;
  --foreground: #171717;
  --text-primary: #171717;
  --text-secondary: #525252;
  --border-color: #d4d4d4;
  --border-subtle: #e5e5e5;
  --kbd-background: #d4d4d4;
  --hover-bg: rgba(0, 0, 0, 0.05);
}

.geist-mono-font {
  font-family: "Geist Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--hover-bg);
}

.scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
  background: var(--hover-bg);
  border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--hover-bg);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--hover-bg);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

body {
  background-color: var(--background);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(120, 120, 255, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(34, 197, 94, 0.12), transparent 35%);
  color: var(--foreground);
  font-family: var(--font-geist-sans);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: stretch;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 42rem;
  margin: 0 auto;
  padding-top: 1.5rem;
  position: relative;
  min-height: 100vh;
  padding-left: 1rem;
  padding-right: 1rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .container {
    padding-top: 3.7rem;
    overflow: visible;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.3rem 0;
  width: 100%;
  font-size: 0.875rem;
  font-family: var(--font-geist-mono);
  color: #525252;
}

.clock {
  display: flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
}

.clock-time {
  margin-right: 0.5rem;
  z-index: 10;
}

.hover-bg {
  position: absolute;
  inset: -0.25rem;
  scale: 0.75;
  opacity: 0;
  min-width: 100%;
  min-height: 100%;
  border-radius: 0.75rem;
  background-color: #40404033;
  transition: all 0.15s;
}

.profile {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.profile-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
}

.profile-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  margin-bottom: 0.5rem;
}

.profile-bio {
  width: auto;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-satoshi);
  padding-top: 1.5rem;
  font-weight: 400;
  line-height: 25px;
}

.italic-serif {
  font-style: italic;
  font-family: var(--font-geist-sans);
}

.underline {
  text-decoration: underline;
}

.sections {
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .sections {
    flex-direction: row;
    gap: 3rem;
  }
}

.section {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  padding-bottom: 0.5rem;
}

.projects-title {
  margin-left: auto;
  width: fit-content;
  padding-bottom: 0.75rem;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.project {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  cursor: pointer;
  border-color: var(--border-subtle);
}

@media (min-width: 480px) {
  .project {
    max-width: calc(50% - 0.75rem);
  }
}

@media (min-width: 768px) {
  .project-grid {
    gap: 2rem;
  }
  .project {
    max-width: calc(50% - 1rem);
  }
}

.project-hover {
  position: absolute;
  inset: -0.5rem;
  transform: translate(var(--tx, 0), var(--ty, 0));
  opacity: 0;
  min-width: 100%;
  min-height: 100%;
  border-radius: 0.5rem;
  background-color: rgba(64, 64, 64, 0.103);
  transition: opacity 0.25s ease-out, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  pointer-events: none;
  will-change: background;
}

.footer-form-row input,
.footer-form-row textarea {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-form-row input:focus,
.footer-form-row textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.footer-form-submit {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-form-submit:hover {
  transform: translateY(-2px);
}

.project:hover .project-hover {
  opacity: 1;
  border-color: var(--border-color);
}

.project:hover .project-header,
.project:hover .project-description {
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
}

/* Quote: keep original kbd look elsewhere, but not inside the quote container */
.quote-container kbd {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  font-style: italic;
  transition: text-shadow 0.25s ease, color 0.25s ease;
}

.quote-container kbd:hover {
  text-shadow: 0 0 14px rgba(212, 212, 216, 0.55), 0 0 6px rgba(212, 212, 216, 0.35);
}

/* removed quote-card styling */

/* Availability indicator */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.availability .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

/* Header badge version */
.availability-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  margin-left: 6px;
}
.availability-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.availability-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--background);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-geist-mono);
  font-size: 0.65rem;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.availability-badge:hover .availability-tooltip {
  opacity: 1;
  transform: translateY(0);
}
.status-dot--available { background-color: #22c55e; animation: dotPulseGreen 2s ease-in-out infinite; }
.status-dot--employed  { background-color: #f59e0b; animation: dotPulseAmber 2s ease-in-out infinite; }

@keyframes dotPulseGreen {
  0%, 100% { box-shadow: 0 0 5px rgba(34,197,94,0.6), 0 0 0 0 rgba(34,197,94,0.18); }
  50% { box-shadow: 0 0 8px rgba(34,197,94,0.9), 0 0 0 5px rgba(34,197,94,0.10); }
}
@keyframes dotPulseAmber {
  0%, 100% { box-shadow: 0 0 5px rgba(245,158,11,0.6), 0 0 0 0 rgba(245,158,11,0.18); }
  50% { box-shadow: 0 0 8px rgba(245,158,11,0.9), 0 0 0 5px rgba(245,158,11,0.10); }
}

.project-header {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  z-index: 10;
  position: relative;
  flex-wrap: wrap;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

@media (max-width: 340px) {
  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-line {
    display: none;
  }
  .project-date {
    margin-top: 0.25rem;
  }
}

.project-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: #313131;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.3px;
  transition: text-decoration-color 0.15s;
}

.project:hover .project-title {
  text-decoration-color: #404040;
}

.project-line {
  width: 100%;
  height: 0.125rem;
  background-color: #404040;
  border-radius: 9999px;
}

.project-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: #737373;
  font-family: var(--font-geist-mono);
  white-space: nowrap;
}

.project-description {
  font-size: 0.75rem;
  font-weight: 600;
  color: #737373;
  font-family: var(--font-geist-mono);
  margin-top: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.view-all {
  width: 100%;
  margin-top: 1rem;
}

.view-all-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #737373;
  font-family: var(--font-geist-mono);
  width: fit-content;
}

.view-all-right {
  margin-left: auto;
}

.about {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.about-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  margin-bottom: 0.75rem;
}

.about-content {
  width: auto;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-satoshi);
  font-weight: 400;
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: auto;
  position: relative;
  margin-bottom: 70px;
}

.external-icon {
  width: 14px;
  height: 14px;
  stroke: #737373;
  display: inline-block;
  margin-left: 0.25rem;
  margin-bottom: 0.125rem;
}

.contact {
  position: relative;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  padding: 0.625rem 0.25rem;
  width: 100%;
}

.contact-border-top {
  position: absolute;
  top: 0;
  left: -1.5rem;
  width: 13rem;
  height: 0.125rem;
  background: linear-gradient(to top right, rgba(38, 38, 38, 0.5), rgba(38, 38, 38, 0.5), var(--background));
}

.social {
  position: absolute;
  display: flex;
  top: -1.75rem;
  left: 0.25rem;
  gap: 0.5rem;
}

.github-icon {
  width: 18px;
  height: 18px;
  color: white;
}

.contact-content {
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
}

.contact-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
}

.email-hover {
  position: relative;
  cursor: pointer;
}

.email-hover-bg {
  position: absolute;
  inset: -0.125rem;
  scale: 0.75;
  opacity: 0;
  min-width: 100%;
  min-height: 100%;
  border-radius: 0.375rem;
  background-color: rgba(64, 64, 64, 0.2);
  transition: all 0.15s;
  cursor: pointer;
  pointer-events: none;
  z-index: 2;
}

.email-hover:hover .email-hover-bg {
  opacity: 1;
  scale: 1;
}

.email-text {
  position: relative;
  z-index: 3;
}

.copyright {
  position: absolute;
  bottom: 0.5rem;
  right: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #d4d4d8;
  font-family: var(--font-geist-sans);
  margin-top: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-color: #404040;
  transition: all 0.15s;
}

.project-link:hover {
  color: #e4e4e7;
  text-decoration-color: #525252;
}

.project-link svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke: currentColor;
}

@media (max-width: 768px) {
  .project-popup {
    height: auto;
    max-height: 80vh;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .popup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .project-popup {
    padding: 1.25rem;
  }
}

.technology-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .technology-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.tech-item:hover {
  background-color: rgba(23, 23, 23, 0.4);
}

.tech-icon {
  min-height: 1rem;
  min-width: 1rem;
  border-radius: 0.25rem;
  overflow: clip;
}

.tech-icon img {
  height: 1rem;
  width: 1rem;
  object-fit: cover;
}

.tech-item p {
  font-size: 0.75rem;
  font-weight: 600;
  color: #737373;
  font-family: var(--font-geist-mono);
  white-space: nowrap;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-button,
.project-link,
.text-hover {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-button:hover,
.project-link:hover {
  transform: translateY(-2px);
}

.social-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #d4d4d8;
  text-decoration: none;
  border-radius: 0.375rem;
  border: 1px solid #363636;
  background-color: transparent;
  transition: all 0.15s ease;
  overflow: hidden;
}

.social-button-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-button-bg {
  position: absolute;
  inset: 0;
  background-color: rgba(64, 64, 64, 0.2);
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.15s ease;
  border-radius: 0.25rem;
}

.social-button:hover .social-button-bg {
  transform: scale(1);
  opacity: 1;
}

.social-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
}

.location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-geist-mono);
  font-size: 0.875rem;
  color: #737373;
}

.location svg {
  flex-shrink: 0;
  position: relative;
  top: -0.025rem;
}

.popup-button {
  position: relative;
  overflow: visible;
}

.popup-indicator {
  position: absolute;
  bottom: -1.25rem;
  left: 50%;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.popup-button:hover .popup-indicator {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.popup-text {
  font-family: var(--font-geist-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  letter-spacing: 0.05em;
}

.popup-button:hover .popup-progress::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.offline-pill {
  display: none;
  border: 1px dashed var(--border-color);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-geist-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.offline-pill--visible {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* Nudge search button slightly to the right */
.header-right .spotlight-trigger {
  margin-left: 6px;
}

.btn-shine {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 48px;
  color: var(--text-primary);
  background: linear-gradient(to right, #9f9f9f 0, #fff 10%, #868686 20%);
  background-position: 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s infinite linear;
  animation-fill-mode: forwards;
  -webkit-text-size-adjust: none;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-geist-mono);
}

@-moz-keyframes shine {
  0% {
    background-position: 0;
  }
  60% {
    background-position: 180px;
  }
  100% {
    background-position: 180px;
  }
}

@-webkit-keyframes shine {
  0% {
    background-position: 0;
  }
  60% {
    background-position: 180px;
  }
  100% {
    background-position: 180px;
  }
}

@-o-keyframes shine {
  0% {
    background-position: 0;
  }
  60% {
    background-position: 180px;
  }
  100% {
    background-position: 180px;
  }
}

@keyframes shine {
  0% {
    background-position: 0;
  }
  60% {
    background-position: 180px;
  }
  100% {
    background-position: 180px;
  }
}

.theme-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid var(--background);
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.theme-switch:hover {
  background-color: var(--hover-bg);
}

.theme-icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-switch:hover .theme-icon {

}

.sun-circle {
  transform-origin: center;
  transition: opacity 0.3s ease, r 0.3s ease;
}

.moon-path {
  transform-origin: center;
  transition: opacity 0.3s ease, d 0.3s ease;
}

.sun-rays line {
  transform-origin: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="light"] .sun-circle {
  opacity: 1;
  r: 5;
}

[data-theme="light"] .moon-path {
  opacity: 0;
  d: path("M12 12a0 0 0 0 0 0 0 0 0 0 0-0-0Z");
}

[data-theme="light"] .sun-rays line {
  opacity: 1;
  transform: scale(1);
}

[data-theme="dark"] .sun-circle {
  opacity: 0;
  r: 0;
}

[data-theme="dark"] .moon-path {
  opacity: 1;
  d: path("M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z");
}

[data-theme="dark"] .sun-rays line {
  opacity: 0;
  transform: scale(0);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.project-popup {
  width: 40rem;
  max-width: 90vw;
  height: 30rem;
  max-height: 90vh;
  background-color: var(--background);
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: auto;
  position: relative;
  
  transform: scale(0.97);
  transition: background-color var(--transition-time) var(--transition-ease),
              border-color var(--transition-time) var(--transition-ease);
}

.popup-overlay.active .project-popup {
  transform: scale(1);
  animation: plop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes plop {
  0% {
    transform: scale(0.97);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

[data-theme="light"] .popup-overlay {
  background-color: rgba(0, 0, 0, 0.5);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-time) var(--transition-ease);
}

.popup-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  letter-spacing: -0.015em;
  transition: color var(--transition-time) var(--transition-ease);
}

.popup-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  transition: color var(--transition-time) var(--transition-ease);
}

.popup-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow-y: hidden;
}

.popup-description {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  line-height: 1.5;
  transition: color var(--transition-time) var(--transition-ease);
}

.popup-details {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  font-family: var(--font-geist-sans);
  line-height: 1.6;
  white-space: pre-line;
  transition: color var(--transition-time) var(--transition-ease);
}

.popup-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tech-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  background-color: var(--border-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  transition: background-color var(--transition-time) var(--transition-ease),
    color var(--transition-time) var(--transition-ease);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  margin-top: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-color: var(--border-color);
  transition: color var(--transition-time) var(--transition-ease),
    text-decoration-color var(--transition-time) var(--transition-ease);
}

.project-link:hover {
  color: var(--text-primary);
  text-decoration-color: var(--text-secondary);
}

.project-link svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke: currentColor;
}

[data-theme="light"] .project-popup {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 5px 10px -5px rgba(0, 0, 0, 0.05);
}

.scroll-top {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
  transition: color 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.3rem;
}

.scroll-top:hover {
  color: var(--text-primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealWord {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes fadeInScroll {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: pageEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform, filter;
}

.fade-element {
  opacity: 0;
  animation: fadeUpSmooth 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform, filter;
}

.fade-scroll {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(8px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), filter 0.85s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.reveal-word {
  display: inline-block;
  opacity: 0;
  animation: revealWord 0.5s ease forwards;
}

html kbd {
  display: inline-block;
  min-width: 16px;
  padding: 2px 3px;
  margin-left: 3px;
  margin-right: 3px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  background: var(--kbd-background);
  border-radius: 4px;
  box-shadow: 0 0 0 1px #2a2a2a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 0.8rem;
  white-space: normal;
  word-wrap: break-word;
  height: auto;
}

kbd {
  background-color: var(--hover-bg);
  border-radius: 5px;
}

kbd svg {
  vertical-align: middle;
  display: inline-block;
}

kbd svg:first-child {
  margin-right: 6px;
}

kbd svg:last-child {
  margin-left: 6px;
}

.footer-form {
  width: 100%;
  max-width: 27rem;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  margin: 0 auto;
  position: relative;
  right: auto;
  font-family: var(--font-geist-sans);
  z-index: 5;
}

.footer-form-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  margin-bottom: 0.5rem;
}

.footer-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-form-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.7rem;
}

.form-field {
  position: relative;
  flex: 1;
}

.message-field {
  flex: 1;
}

.footer-form-row input,
.footer-form-row textarea {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  font-size: 0.75rem;
  padding: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
}

.footer-form-row textarea {
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  resize: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--background) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.footer-form-row input:not(:placeholder-shown),
.footer-form-row textarea:not(:placeholder-shown) {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
}

.footer-form-row input:focus,
.footer-form-row textarea:focus {
  outline: none;
  border-color: var(--text-secondary);
  background-color: var(--hover-bg);
}

.footer-form-row input:invalid:not(:placeholder-shown),
.footer-form-row textarea:invalid:not(:placeholder-shown) {
  border-color: #e53e3e;
}

.error-message {
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  color: #e53e3e;
  font-size: 0.65rem;
  font-family: var(--font-geist-mono);
  opacity: 0;
  transform: translateY(-0.25rem);
  transition: all 0.2s ease;
  pointer-events: none;
}

.form-field input:invalid:not(:placeholder-shown) + .error-message,
.form-field textarea:invalid:not(:placeholder-shown) + .error-message {
  opacity: 1;
  transform: translateY(0);
}

.footer-form-submit {
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-primary);
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  height: 2.5rem;
}

.footer-form-submit:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-secondary);
}

.footer-form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.footer-form-response {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  margin-top: 0.5rem;
  min-height: 1rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

@media (max-width: 640px) {
  .footer-form {
    width: 100%;
  }
  .footer-form-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-form-submit {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin: 0 auto;
    overflow: hidden;
  }
  .footer {
    padding-bottom: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .profile-bio,
  .about-content,
  .project-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 768px) {
  .footer-form {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
  }
}

[data-theme="dark"] .footer-form-row input:not(:placeholder-shown),
[data-theme="dark"] .footer-form-row textarea:not(:placeholder-shown) {
  background-color: rgba(64, 64, 64, 0.2);
  color: #e4e4e7;
}

[data-theme="light"] .footer-form-row input:not(:placeholder-shown),
[data-theme="light"] .footer-form-row textarea:not(:placeholder-shown) {
  background-color: rgba(0, 0, 0, 0.05);
  color: #171717;
}

.styled-divider-1 {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-secondary),
    var(--text-secondary),
    var(--text-secondary),
    transparent
  );
  margin: 2rem auto;
  width: 80%;
  opacity: 1;
  transition: background 0.3s ease;
  position: relative;
}

.styled-divider-2 {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-secondary),
    var(--text-secondary),
    var(--text-secondary),
    transparent
  );
  margin: 2rem auto;
  width: 80%;
  opacity: 1;
  transition: background 0.3s ease;
  position: relative;
}

.styled-divider-3 {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-secondary),
    var(--text-secondary),
    var(--text-secondary),
    transparent
  );
  margin: 2rem auto;
  width: 80%;
  opacity: 1;
  transition: background 0.3s ease;
  position: relative;
}

.styled-divider-4 {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-secondary),
    var(--text-secondary),
    var(--text-secondary),
    transparent
  );
  margin: 2rem auto;
  width: 80%;
  opacity: 1;
  transition: background 0.3s ease;
  position: relative;
}

[data-theme="dark"] .styled-divider-1 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    transparent
  );
}

[data-theme="dark"] .styled-divider-2 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    transparent
  );
}

[data-theme="dark"] .styled-divider-3 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    transparent
  );
}

[data-theme="dark"] .styled-divider-4 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    rgba(60, 60, 60, 0.8),
    transparent
  );
}

[data-theme="light"] .styled-divider-1 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    transparent
  );
}

[data-theme="light"] .styled-divider-2 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    transparent
  );
}

[data-theme="light"] .styled-divider-3 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    transparent
  );
}

[data-theme="light"] .styled-divider-4 {
  background: linear-gradient(
    to right,
    transparent,
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    rgba(213, 213, 213, 0.7),
    transparent
  );
}

@media (max-width: 480px) {
  .button-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
  }
  .contact {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .copyright {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }
}

.text-hover:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  position: relative;
  margin-top: 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  margin-left: 0;
  border: none;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.styled-divider-1, .styled-divider-2, .styled-divider-3, .styled-divider-4 {
  opacity: 0;
  animation: fadeIn 0.7s ease forwards;
}

@keyframes dividerExpand {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

.bio-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  padding-bottom: 0.5rem;
}

.popup-text svg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

.sticky-blur {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 35px;
  z-index: 100;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0) 100%
  );
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  mask-image: linear-gradient(to bottom, 
    var(--background) 0%, 
    var(--background) 20%, 
    rgba(0, 0, 0, 0.98) 30%,
    rgba(0, 0, 0, 0.95) 40%,
    rgba(0, 0, 0, 0.9) 50%,
    rgba(0, 0, 0, 0.8) 60%,
    rgba(0, 0, 0, 0.6) 70%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(0, 0, 0, 0.2) 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    var(--background) 0%, 
    var(--background) 20%, 
    rgba(0, 0, 0, 0.98) 30%,
    rgba(0, 0, 0, 0.95) 40%,
    rgba(0, 0, 0, 0.9) 50%,
    rgba(0, 0, 0, 0.8) 60%,
    rgba(0, 0, 0, 0.6) 70%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(0, 0, 0, 0.2) 90%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.3s ease;
}

.spotlight-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1100;
  display: none;
}

.spotlight-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="light"] .spotlight-backdrop {
  background-color: rgba(0, 0, 0, 0.2);
}

.spotlight-modal {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90%;
  background-color: var(--background);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spotlight-container.active .spotlight-modal {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.spotlight-search-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.spotlight-search-icon {
  color: var(--text-secondary);
  margin-right: 12px;
  display: flex;
  align-items: center;
}

#spotlight-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-geist-sans);
  font-size: 14px;
  padding: 8px 0;
  outline: none;
}

#spotlight-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.spotlight-keyboard-shortcut {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.spotlight-keyboard-shortcut kbd {
  font-family: var(--font-geist-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--kbd-background);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.spotlight-results {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.spotlight-section {
  padding: 8px 0;
}

.spotlight-section-header {
  font-family: var(--font-geist-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spotlight-result-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.spotlight-result-item:hover, .spotlight-result-item.selected {
  background-color: var(--hover-bg);
}

.spotlight-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  color: var(--text-secondary);
}

.spotlight-result-content {
  flex: 1;
}

.spotlight-result-title {
  font-family: var(--font-satoshi);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.spotlight-result-description {
  font-family: var(--font-geist-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.spotlight-result-shortcut {
  font-family: var(--font-geist-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 12px;
}

.spotlight-no-results {
  padding: 16px;
  font-family: var(--font-geist-sans);
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 640px) {
  .spotlight-modal {
      width: 90%;
      top: 15%;
  }
  
  .spotlight-results {
      max-height: 300px;
  }
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(5px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.spotlight-result-item {
  animation: fadeIn 0.2s ease forwards;
  opacity: 0;
}

.spotlight-result-item:nth-child(1) { animation-delay: 0.05s; }
.spotlight-result-item:nth-child(2) { animation-delay: 0.1s; }
.spotlight-result-item:nth-child(3) { animation-delay: 0.15s; }
.spotlight-result-item:nth-child(4) { animation-delay: 0.2s; }
.spotlight-result-item:nth-child(5) { animation-delay: 0.25s; }

.spotlight-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-geist-sans);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spotlight-trigger:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.spotlight-trigger svg {
  stroke-width: 3;
}

.spotlight-trigger-shortcut {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.spotlight-trigger-shortcut kbd {
  font-family: var(--font-geist-mono);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--kbd-background);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .spotlight-trigger-text, .spotlight-trigger-shortcut {
      display: none;
  }
  
  .spotlight-trigger {
      padding: 6px;
  }
}

.spotlight-results::-webkit-scrollbar {
  display: none;
}

.keybinds-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1100;
  display: none;
}

.keybinds-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="light"] .keybinds-backdrop {
  background-color: rgba(0, 0, 0, 0.2);
}

.keybinds-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 550px;
  max-width: 90%;
  max-height: 90vh;
  background-color: var(--background);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.keybinds-container.active .keybinds-modal {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.keybinds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.keybinds-title {
  font-family: var(--font-satoshi);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.keybinds-close {
  background: transparent;
  border: none;
  padding: 4px;
  margin: -4px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.keybinds-close:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.keybinds-content {
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.keybinds-content::-webkit-scrollbar {
  display: none;
}

.keybinds-section {
  margin-bottom: 24px;
}

.keybinds-section:last-child {
  margin-bottom: 0;
}

.keybinds-section-title {
  font-family: var(--font-geist-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keybinds-items {
  display: grid;
  gap: 8px;
}

.keybind-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.keybind-description {
  font-family: var(--font-satoshi);
  font-size: 14px;
  color: var(--text-primary);
}

.keybind-combo {
  display: flex;
  align-items: center;
  gap: 4px;
}

.keybind-combo kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--font-geist-mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  background-color: var(--kbd-background);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.keybind-combo span {
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-geist-mono);
}

.keybinds-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: center;
}

.keybinds-button {
  background: transparent;
  border: 0.5px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.keybinds-button:hover {
  background-color: var(--hover-bg);
}

.keybinds-button-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-geist-mono);
  font-size: 12px;
}

.keybinds-button kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-family: var(--font-geist-mono);
  font-size: 10px;
  font-weight: 500;
  border-radius: 3px;
  background-color: var(--kbd-background);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(5px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.keybind-item {
  animation: fadeIn 0.2s ease forwards;
  opacity: 0;
}

.keybinds-section:nth-child(1) .keybind-item:nth-child(1) { animation-delay: 0.05s; }
.keybinds-section:nth-child(1) .keybind-item:nth-child(2) { animation-delay: 0.1s; }
.keybinds-section:nth-child(1) .keybind-item:nth-child(3) { animation-delay: 0.15s; }
.keybinds-section:nth-child(1) .keybind-item:nth-child(4) { animation-delay: 0.2s; }

.keybinds-section:nth-child(2) .keybind-item:nth-child(1) { animation-delay: 0.1s; }
.keybinds-section:nth-child(2) .keybind-item:nth-child(2) { animation-delay: 0.15s; }
.keybinds-section:nth-child(2) .keybind-item:nth-child(3) { animation-delay: 0.2s; }
.keybinds-section:nth-child(2) .keybind-item:nth-child(4) { animation-delay: 0.25s; }

.keybinds-section:nth-child(3) .keybind-item:nth-child(1) { animation-delay: 0.15s; }
.keybinds-section:nth-child(3) .keybind-item:nth-child(2) { animation-delay: 0.2s; }

.keybinds-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
}

.keybinds-trigger:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.keybinds-trigger svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .keybind-item {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
  }
  
  .keybind-combo {
      margin-left: 8px;
  }

  .keybinds-trigger {
    display: none;
  }
}

.secret-code-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 89;
  background-color: var(--background);
  padding: 8px 0;
  box-shadow: 0 -8px 12px -8px var(--background);
}

.code-container {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.code-input {
  width: 28px;
  height: 28px;
  font-size: 16px;
  text-align: center;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-geist-mono);
  transition: all 0.2s ease;
}

.code-input:focus {
  outline: none;
  border-color: var(--text-secondary);
  background-color: var(--hover-bg);
  transform: translateY(-2px);
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.confetti {
  position: absolute;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  opacity: 0;
  top: -20px;
  animation: fall 2.5s linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  5% {
    opacity: 1;
    transform: translateY(0) rotate(45deg) scale(1);
  }
  100% {
    transform: translateY(120vh) rotate(360deg) scale(0.7);
    opacity: 0;
  }
}

.code-hint {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.7;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

.code-hint:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-left {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1;
    margin-bottom: 5px;
  }
  
  .footer-right {
    width: 100%;
    align-items: center;
    order: 2;
    margin-bottom: 5px;
  }
  
  .copyright {
    order: 3;
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 5px;
  }
  
  .scroll-top {
    display: none;
  }
  
  .scroll-top-mobile {
    display: flex;
  }
  
  .footer {
    margin-bottom: 70px;
  }
}

@media (max-width: 640px) {
  .secret-code-wrapper {
    bottom: 10px;
  }
  
  .code-input {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  
  .code-hint {
    font-size: 0.65rem;
  }
  
  .footer-form {
    margin-bottom: 30px;
  }
  
  .footer-content {
    gap: 5px;
  }
  
  .button-row {
    gap: 10px;
  }
  
  .footer {
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .footer {
    margin-bottom: 80px;
  }
  
  .footer-form {
    margin-bottom: 15px;
  }
  
  .form-field {
    margin-bottom: 30px;
  }
  
  .button-row {
    flex-wrap: wrap;
    gap: 8px;
  }
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 1rem;
  width: 1px;
  height: 100%;
  background-color: var(--kbd-background);
  z-index: 0;
}
.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  left: -1.15rem;
  width: 0.45rem;
  height: 0.45rem;
  background-color: var(--border-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  transform: translateX(0);
  z-index: 1;
}
.timeline-content {
  margin-left: 2rem;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  font-family: var(--font-satoshi);
  color: var(--text-primary);
}
.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 400;
  font-family: var(--font-satoshi);
  color: var(--text-secondary);
}
.timeline-content p {
  margin: 0;
  font-size: 0.875rem;
  font-family: var(--font-satoshi);
  color: var(--text-primary);
}

.carousel-container {
  max-width: 30%;
  overflow: hidden;
  position: relative;
  padding: 12px 0;
  border-radius: 8px;
  max-height: 50px;
  background-color: var(--background);
}

.carousel-container::before,
.carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.carousel-container::before {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.carousel-container::after {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

.carousel-wrapper {
  display: flex;
  will-change: transform;
}

.carousel-content {
  display: flex;
  animation: scrollInfinite 12s linear infinite;
}

.carousel-container:hover .carousel-content {
  animation-play-state: paused;
}

.carousel-item {
  flex: 0 0 auto;
  border-radius: 6px;
  min-width: 100px;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  font-size: 12.5px;
}

@keyframes scrollInfinite {
  0% {
      transform: translateX(0);
  }
  100% {
      transform: translateX(-100%);
  }
}

.animation-text-container {
  overflow: hidden;
  width: 100%;
  max-width: 800px;
}

.animation-text {
  position: absolute;
  width: 100%;
  padding-left: 35px;
  font-size: 12.5px;
  bottom: 47px;
  left: 0;
  right: 0;
  opacity: 0;
  text-decoration: underline;
  font-family: var(--font-geist-mono);
  transform: translateY(-20px);
  transition: none;
  color: var(--text-secondary);
  font-weight: 400;
  pointer-events: none;
}

.animation-text-before {
  position: absolute;
  width: 70px;
  padding-left: 7px;
  font-size: 12.5px;
  bottom: 47px;
  left: 0;
  right: 0;
  font-family: var(--font-geist-mono);
  transition: none;
  color: var(--text-secondary);
  font-weight: 400;
}

.animation-text.visible {
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              opacity 0.3s ease,
              color 0.4s ease;
}

.animation-text.visible.normal-color {
  color: var(--text-secondary);
}

.animation-text.exiting {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.4s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
  .animation-text {
    display: none;
  }
  
  .animation-text-before {
    display: none;
  }
}

.blinking {
  animation: blink 1.2s steps(1, end) infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.995);
    filter: blur(6px) saturate(0.9);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes fadeUpSmooth {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-in, .fade-element, .fade-scroll { animation: none !important; transition: none !important; filter: none !important; }
}

/* ========== Dashboard layout ========== */

.dashboard-root {
  width: min(1200px, 100vw);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .dashboard-root {
    padding-top: 2.5rem;
  }
}

.dashboard-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: minmax(210px, auto);
  gap: 1.4rem;
  align-content: start;
  padding-bottom: 2.5rem;
  overflow-y: auto;
  padding-right: 0.35rem;
}

@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }
}

/* ========== Widgets ========== */

.widget-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(23, 23, 23, 0.9), rgba(12, 12, 12, 0.75));
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
  min-height: 220px;
}

[data-theme="light"] .widget-card {
  background: linear-gradient(145deg, rgba(250, 250, 250, 0.9), rgba(240, 240, 240, 0.75));
  box-shadow: 0 25px 60px rgba(15, 15, 15, 0.1);
}

.widget-card:hover {
  border-color: var(--border-color);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.widget-card[draggable="true"] {
  cursor: grab;
}

.widget-card--dragging {
  opacity: 0.65;
  border-style: dashed;
  cursor: grabbing;
}

.widget-card[data-span="2"] {
  grid-column: span 2;
}

.widget-inner {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.widget-title {
  font-family: var(--font-geist-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-edit-controls {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.widget-handle {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.45rem;
  border: 1px dashed var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.widget-handle::before,
.widget-handle::after {
  content: "";
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background-color: currentColor;
  position: absolute;
}

.widget-handle::before {
  transform: translateX(-3px);
}

.widget-handle::after {
  transform: translateX(3px);
}

.widget-icon-btn,
.widget-remove-btn {
  border: 1px solid var(--border-subtle);
  background-color: transparent;
  color: var(--text-secondary);
  border-radius: 0.4rem;
  font-size: 0.7rem;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.widget-icon-btn:hover,
.widget-remove-btn:hover {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.widget-size-btn {
  width: auto;
  padding: 0 0.45rem;
  font-family: var(--font-geist-mono);
  letter-spacing: 0.05em;
}

.widget-body {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-satoshi);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

/* ========== Weekly To-Do ========== */

.weekly-todo {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.weekly-todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.weekly-todo-title {
  text-align: center;
  flex: 1;
}

.todo-week-nav {
  border-radius: 0.35rem;
  border: 1px solid var(--border-subtle);
  background-color: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.todo-week-nav:hover {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.weekly-todo-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  flex: 1;
}

@media (max-width: 900px) {
  .weekly-todo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .weekly-todo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.weekly-todo-day {
  border-radius: 0.5rem;
  border: 1px dashed var(--border-subtle);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 120px;
}

.weekly-todo-day-name {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
}

.weekly-todo-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 150px;
  overflow-y: auto;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.todo-checkbox-label {
  flex-shrink: 0;
}

.todo-checkbox {
  width: 0.85rem;
  height: 0.85rem;
}

.todo-text {
  flex: 1;
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.3rem;
  color: var(--text-primary);
  font-family: var(--font-satoshi);
}

.todo-text:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: var(--hover-bg);
}

.todo-delete-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 0.2rem;
}

.todo-delete-btn:hover {
  color: #ef4444;
}

.todo-add-btn {
  margin-top: 0.15rem;
  border-radius: 0.35rem;
  border: 1px dashed var(--border-subtle);
  background-color: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 0.18rem 0.35rem;
  cursor: pointer;
  font-family: var(--font-geist-mono);
  text-align: left;
}

.todo-add-btn:hover {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.todo-empty {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ========== App Dock ========== */

.dock-bar {
  position: relative;
  margin-top: auto;
  padding: 0 0 1.5rem;
}

.dock-bar-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.75);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .dock-bar-shell {
  background: rgba(255, 255, 255, 0.85);
}

.dock-bar-items {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: calc(100vw - 140px);
}

.dock-bar-item {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.dock-bar-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-color);
}

.dock-bar-item:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.dock-bar-item img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.dock-bar-item span {
  position: absolute;
  bottom: -1.1rem;
  font-size: 0.65rem;
  font-family: var(--font-geist-mono);
  color: var(--text-secondary);
  white-space: nowrap;
}

.dock-bar-delete {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--background);
  color: var(--text-secondary);
  font-size: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dock-bar-delete:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.dock-bar-add {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px dashed var(--border-color);
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dock-bar-add svg {
  width: 20px;
  height: 20px;
}

.dock-bar-add:hover,
.dock-bar-add.is-active {
  background-color: var(--hover-bg);
  border-style: solid;
}

.dock-bar-form {
  margin-top: 0.75rem;
  display: none;
  gap: 0.5rem;
}

.dock-bar-form--visible {
  display: flex;
  flex-wrap: wrap;
}

.dock-bar-form input,
.dock-bar-form button {
  flex: 1 1 140px;
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
}

.dock-bar-form button {
  flex: 0 0 auto;
  cursor: pointer;
  border-color: var(--border-color);
}

.dock-bar-form button:hover {
  background-color: var(--hover-bg);
}

.dock-empty-state {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .dock-bar-shell {
    flex-wrap: wrap;
    justify-content: center;
  }
  .dock-bar-items {
    max-width: 100%;
    justify-content: center;
  }
  .dock-bar-item span {
    display: none;
  }
}

.dock-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dock-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dock-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dock-item {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  min-width: 60px;
  max-width: 90px;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease-out;
}

.dock-item:hover {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

.dock-icon-wrapper {
  width: 22px;
  height: 22px;
  border-radius: 0.4rem;
  overflow: hidden;
  margin-bottom: 0.2rem;
  background-color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon-img {
  width: 16px;
  height: 16px;
  object-fit: cover;
}

.dock-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
}

.dock-delete-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background-color: var(--background);
  color: var(--text-secondary);
  font-size: 0.6rem;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dock-delete-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.dock-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.dock-input-label,
.dock-input-url {
  flex: 1 1 120px;
  background-color: transparent;
  border-radius: 0.3rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-satoshi);
  padding: 0.25rem 0.35rem;
}

.dock-input-label:focus,
.dock-input-url:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: var(--hover-bg);
}

.dock-add-button {
  flex: 0 0 auto;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
  background-color: transparent;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-geist-mono);
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.dock-add-button:hover {
  background-color: var(--hover-bg);
}

/* ========== Pomodoro ========== */

.pomodoro-widget {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pomodoro-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.pomodoro-time {
  font-family: var(--font-geist-mono);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.pomodoro-mode {
  font-family: var(--font-geist-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pomodoro-controls {
  display: flex;
  gap: 0.4rem;
}

.pomodoro-btn,
.pomodoro-btn-secondary {
  flex: 1;
  border-radius: 0.4rem;
  border: 1px solid var(--border-color);
  background-color: transparent;
  font-size: 0.75rem;
  font-family: var(--font-geist-mono);
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pomodoro-btn {
  border-color: var(--text-secondary);
}

.pomodoro-btn:hover,
.pomodoro-btn-secondary:hover {
  background-color: var(--hover-bg);
}

.pomodoro-settings {
  display: flex;
  gap: 0.5rem;
}

.pomodoro-setting-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.75rem;
}

.pomodoro-setting-field label {
  font-family: var(--font-geist-mono);
  color: var(--text-secondary);
}

.pomodoro-input {
  background-color: transparent;
  border-radius: 0.3rem;
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.3rem;
  color: var(--text-primary);
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
}

.pomodoro-input:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: var(--hover-bg);
}

/* ========== Notes ========== */

.notes-widget {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
}

.notes-tabs {
  display: inline-flex;
  gap: 0.35rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.15rem;
  width: fit-content;
}

.notes-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-family: var(--font-geist-mono);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.notes-tab.is-active {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.notes-pane {
  display: none;
  height: 100%;
}

.notes-pane.is-visible {
  display: block;
}

.notes-textarea {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background-color: transparent;
  padding: 0.9rem;
  font-family: var(--font-satoshi);
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: vertical;
  line-height: 1.5;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: var(--hover-bg);
}

.notes-preview {
  border-radius: 0.7rem;
  border: 1px dashed var(--border-subtle);
  padding: 0.9rem;
  font-family: var(--font-satoshi);
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
  max-height: 280px;
  overflow-y: auto;
}

.notes-preview h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.notes-preview ul {
  padding-left: 1.1rem;
  margin: 0.4rem 0;
}

.notes-preview code {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0 0.3rem;
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
}

.notes-preview pre {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 0.5rem;
  padding: 0.6rem;
  overflow-x: auto;
  margin: 0.4rem 0;
}

.notes-empty {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
}

/* ========== Stats ========== */

.stats-widget {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-satoshi);
}

.stats-label {
  color: var(--text-secondary);
}

.stats-value {
  font-family: var(--font-geist-mono);
}

.stats-progress {
  margin-top: 0.35rem;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background-color: var(--border-subtle);
  overflow: hidden;
}

.stats-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* ========== Upcoming Events ========== */

.upcoming-widget {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 240px;
  overflow-y: auto;
}

.upcoming-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  position: relative;
}

.upcoming-item.done {
  opacity: 0.6;
}

.upcoming-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.upcoming-title {
  font-family: var(--font-satoshi);
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.upcoming-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.upcoming-action-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.15rem;
}

.upcoming-action-btn:hover {
  color: var(--text-primary);
}

.upcoming-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.upcoming-tag {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.08rem 0.55rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.upcoming-countdown {
  font-weight: 600;
  color: var(--text-primary);
}

.upcoming-add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.4rem;
}

.upcoming-add-form input,
.upcoming-add-form button {
  border-radius: 0.4rem;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-satoshi);
  padding: 0.35rem 0.5rem;
}

.upcoming-add-form button {
  cursor: pointer;
  border-color: var(--border-color);
}

.upcoming-add-form button:hover {
  background-color: var(--hover-bg);
}

.upcoming-empty {
  font-family: var(--font-geist-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 0.75rem 0;
}

/* ========== Habit Tracker ========== */

.habit-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.habit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-subtle);
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  gap: 0.5rem;
}

.habit-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.habit-toggle {
  width: 0.95rem;
  height: 0.95rem;
}

.habit-name {
  font-family: var(--font-satoshi);
  font-size: 0.8rem;
}

.habit-streak {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.habit-add-form {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.habit-add-form input,
.habit-add-form button {
  flex: 1 1 120px;
  border-radius: 0.4rem;
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.5rem;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.75rem;
}

.habit-add-form button {
  flex: 0 0 auto;
  cursor: pointer;
  border-color: var(--border-color);
}

.habit-add-form button:hover {
  background-color: var(--hover-bg);
}

.habit-empty {
  font-family: var(--font-geist-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 0.5rem 0;
}

/* ========== Daily Brief ========== */

.daily-brief-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brief-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-satoshi);
  font-size: 0.82rem;
}

.brief-label {
  color: var(--text-secondary);
}

.brief-value {
  font-weight: 600;
  color: var(--text-primary);
}

.brief-chip {
  border-radius: 0.6rem;
  border: 1px dashed var(--border-subtle);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-geist-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.brief-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.brief-action-btn {
  flex: 1;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-geist-mono);
  padding: 0.35rem 0.4rem;
  cursor: pointer;
}

.brief-action-btn:hover {
  background-color: var(--hover-bg);
}

/* ========== Auth overlay ========== */

.auth-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.auth-overlay--visible {
  display: flex;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--background);
  padding: 1.4rem 1.5rem 1.2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

.auth-card-header {
  margin-bottom: 0.9rem;
}

.auth-title {
  font-family: var(--font-satoshi);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-subtitle {
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.auth-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.auth-field label {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.auth-field input {
  background-color: transparent;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-satoshi);
  padding: 0.35rem 0.5rem;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--text-secondary);
  background-color: var(--hover-bg);
}

.auth-submit {
  margin-top: 0.4rem;
  width: 100%;
  border-radius: 0.45rem;
  border: 1px solid var(--border-color);
  background-color: transparent;
  color: var(--text-primary);
  font-family: var(--font-geist-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-submit:hover {
  background-color: var(--hover-bg);
}

.auth-offline {
  display: none;
  margin-top: 0.2rem;
  width: 100%;
  border-radius: 0.45rem;
  border: 1px dashed var(--border-color);
  background-color: transparent;
  color: var(--text-secondary);
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-offline:hover {
  background-color: var(--hover-bg);
}

.auth-offline-hint {
  display: none;
  margin-top: -0.2rem;
  color: var(--text-secondary);
}

.auth-hint {
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.auth-error {
  min-height: 1rem;
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: #f97373;
}

/* ========== Widgets FAB & panel ========== */

.widgets-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: var(--background);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.widgets-fab:hover {
  transform: translateY(-2px);
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.widgets-fab--active {
  border-color: #22c55e;
  color: #22c55e;
}

.widgets-fab-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.widgets-fab-icon--check {
  opacity: 0;
  transform: scale(0.8);
}

.widgets-fab--active .widgets-fab-icon--gear {
  opacity: 0;
  transform: scale(0.8);
}

.widgets-fab--active .widgets-fab-icon--check {
  opacity: 1;
  transform: scale(1);
}

.widgets-panel {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 260px;
  max-width: calc(100% - 40px);
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--background);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.18s ease;
  z-index: 85;
}

.widgets-panel--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.widgets-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widgets-panel-title {
  font-family: var(--font-geist-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.widgets-panel-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
}

.widgets-panel-body {
  padding: 0.6rem 0.9rem 0.7rem;
}

.widgets-panel-subtitle {
  font-family: var(--font-satoshi);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.widgets-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.widgets-panel-item {
  border-radius: 0.4rem;
  border: 1px solid var(--border-subtle);
  background-color: transparent;
  padding: 0.35rem 0.45rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.widgets-panel-item-title {
  display: block;
  font-family: var(--font-satoshi);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.widgets-panel-item-desc {
  display: block;
  font-family: var(--font-geist-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.widgets-panel-item:hover {
  background-color: var(--hover-bg);
  border-color: var(--border-color);
}

.widgets-panel-hint {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

