/* Design System & Styling */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&display=swap");

/* ==============================
   DARK THEME (default)
   ============================== */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-color: #0c0b09;
  --text-color: #f5f2eb;
  --text-muted: rgba(245, 242, 235, 0.6);
  --text-muted-faint: rgba(245, 242, 235, 0.35);
  --accent-color: #9FE871;
  --accent-color-hover: #b4f090;
  --hairline: rgba(245, 242, 235, 0.08);
  --selection-bg: rgba(196, 181, 157, 0.25);
  --theme-picker-bg: #1a1a1a;
  --theme-picker-border: rgba(255, 255, 255, 0.1);
  --theme-btn-active-bg: rgba(255, 255, 255, 0.1);
  --theme-btn-active-color: #f5f2eb;
  --logo-filter: none;
  /* white logo on dark bg */

  --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Newsreader', serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================
   LIGHT THEME
   ============================== */
[data-theme="light"] {
  color-scheme: light;
  --bg-color: #fafaf8;
  --text-color: #1a1915;
  --text-muted: rgba(26, 25, 21, 0.6);
  --text-muted-faint: rgba(26, 25, 21, 0.35);
  --accent-color: #2d8c3c;
  --accent-color-hover: #27762e;
  --hairline: rgba(26, 25, 21, 0.1);
  --selection-bg: rgba(60, 60, 40, 0.15);
  --theme-picker-bg: #ffffff;
  --theme-picker-border: rgba(0, 0, 0, 0.1);
  --theme-btn-active-bg: rgba(0, 0, 0, 0.08);
  --theme-btn-active-color: #1a1915;
  --logo-filter: invert(1);
  /* white logo inverted = black on light bg */

  --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Newsreader', serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & scrollbars */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-y: scroll;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Page Layout */
.container {
  max-width: 42rem;
  /* 672px, centered on wide screens */
  margin: 0 auto;
  min-height: 100vh;
  padding: 3rem 1.5rem 5rem 1.5rem;
}


@media (min-width: 640px) {
  .container {
    padding-top: 4rem;
    padding-bottom: 6rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding-top: 5rem;
    padding-bottom: 7rem;
  }
}

/* Navigation Bar */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3.5rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted-faint);
}

@media (min-width: 640px) {
  nav {
    margin-bottom: 4rem;
  }
}

/* Logo in nav */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 1;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}

/* Nav links group */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

nav a {
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

nav a.active {
  color: var(--text-color);
}

nav a:hover:not(.active):not(.nav-logo) {
  color: var(--text-muted);
}

nav .separator {
  user-select: none;
  opacity: 0.25;
}

/* Header Section */
header {
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  header {
    margin-bottom: 5rem;
  }
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.125rem, 8vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-color);
}

.role-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 28rem;
  line-height: 1.5;
}

.bio-paragraph {
  font-size: 0.875rem;
  /* text-sm */
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 28rem;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .bio-paragraph {
    white-space: nowrap;
  }
}

.bio-paragraph a {
  color: var(--text-color);
}

.bio-paragraph a:hover {
  color: var(--accent-color);
}

.bio-paragraph svg {
  margin-right: 0.15rem;
  transition: transform 0.2s ease;
}

.bio-paragraph a:hover svg {
  transform: scale(1.05);
}

.underline-hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  transition: text-decoration-color 0.2s ease;
}

.bio-paragraph a:hover .underline-hover {
  text-decoration-color: rgba(159, 232, 113, 0.6);
}

/* Social links list */
.socials-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.socials-list a {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.socials-list a:hover {
  color: var(--accent-color);
  text-decoration-color: rgba(159, 232, 113, 0.6);
}

.socials-list .dot {
  user-select: none;
  opacity: 0.35;
  font-size: 0.75rem;
}

/* Spotify Widget */
.spotify-widget-wrapper {
  margin-top: 2rem;
  max-width: 28rem;
}

.spotify-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  background: rgba(245, 242, 235, 0.03);
  border: 1px solid var(--hairline);
  font-size: 0.75rem;
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.spotify-widget:hover {
  background: rgba(245, 242, 235, 0.05);
  border-color: rgba(245, 242, 235, 0.15);
  transform: translateY(-1px);
}

.spotify-widget:active {
  transform: translateY(0);
}

/* Equalizer wave bars */
.wave-container {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  width: 14px;
  height: 14px;
}

.wave-bar {
  width: 2px;
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 1px;
  transform-origin: bottom;
  animation: now-playing-wave 1s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(3) {
  animation-delay: 0.0s;
}

.wave-bar:nth-child(4) {
  animation-delay: 0.2s;
}

.spotify-widget.paused .wave-bar {
  animation-play-state: paused;
  transform: scaleY(0.45);
  opacity: 0.6;
}

@keyframes now-playing-wave {
  0% {
    transform: scaleY(0.3);
    opacity: 0.4;
  }

  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.spotify-info {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.spotify-widget:hover .spotify-info {
  color: var(--text-color);
}

.spotify-track {
  font-weight: 500;
  color: var(--text-color);
}

.spotify-artist {
  opacity: 0.8;
}

/* Content Container & Transitions */
.view-section {
  animation: viewFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-color);
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.5rem;
  }
}

/* Projects Listing */
.projects-list {
  list-style: none;
}

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

.project-item:last-child {
  border-bottom: 0;
}

.project-link {
  display: block;
  padding: 1.5rem 0.25rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  border-left: 2px solid transparent;
  transition: var(--transition-smooth);
}

@media (min-width: 640px) {
  .project-link {
    padding: 1.75rem 0.5rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.project-link:hover {
  background: rgba(245, 242, 235, 0.01);
  border-left-color: rgba(159, 232, 113, 0.55);
}

.project-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .project-meta-row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-color);
  transition: color 0.2s ease;
}

@media (min-width: 640px) {
  .project-title {
    font-size: 1.125rem;
    /* text-lg */
  }
}

.project-link:hover .project-title {
  color: var(--accent-color);
}

.project-domain {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  /* text-2xs */
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted-faint);
  transition: color 0.2s ease;
}

.project-link:hover .project-domain {
  color: var(--text-muted);
}

.project-arrow {
  display: none;
  font-size: 0.875rem;
  color: var(--text-muted-faint);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translate(-3px, 3px);
}

@media (min-width: 640px) {
  .project-arrow {
    display: block;
  }
}

.project-link:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
  color: var(--accent-color);
}

.project-desc {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  /* ~15px */
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 36rem;
}

/* Guestbook Section styling */
.guestbook-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.guestbook-form {
  background: rgba(245, 242, 235, 0.015);
  border: 1px solid var(--hairline);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  font-family: var(--font-sans);
  background: rgba(12, 11, 9, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  color: var(--text-color);
  font-size: 0.875rem;
  transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(159, 232, 113, 0.5);
  background: rgba(12, 11, 9, 0.8);
  box-shadow: 0 0 0 2px rgba(159, 232, 113, 0.1);
}

.form-textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.submit-btn {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background-color: var(--accent-color);
  color: #0c0b09;
  font-weight: 500;
  border: 0;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.submit-btn:hover {
  background-color: var(--accent-color-hover);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Signatures / Entries list */
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}

.entry-card {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
  animation: entryFadeIn 0.3s ease-out forwards;
}

.entry-card:last-child {
  border-bottom: 0;
}

@keyframes entryFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.entry-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-color);
}

.entry-date {
  font-size: 0.7rem;
  color: var(--text-muted-faint);
}

.entry-message {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.no-entries {
  text-align: center;
  padding: 2.5rem 0;
  color: var(--text-muted-faint);
  font-size: 0.875rem;
  border: 1px dashed var(--hairline);
  border-radius: 8px;
}

/* Footer styling */
footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

@media (min-width: 640px) {
  footer {
    margin-top: 6rem;
  }
}

.footer-text {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--text-muted-faint);
}

/* GitHub Activity Contribution Graph Styling */
.github-activity-wrapper {
  /* GitHub's dark panel background color */
  background: #0d1117;
  border: 1px solid #30363d;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Match GitHub's muted gray month/day labels */
.github-activity-wrapper svg text {
  fill: #8b949e !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 9px !important;
}

/* Ensure the SVG width fits and scales cleanly */
.github-activity-wrapper svg {
  min-width: 620px;
  width: 100%;
  height: auto;
}

.github-loading {
  font-size: 0.875rem;
  color: #8b949e;
  text-align: center;
  padding: 1.5rem 0;
}


.github-activity-img {
  width: 100%;
  min-width: 620px;
  display: block;
  border-radius: 4px;
}

/* ==============================
   VERCEL-STYLE THEME PICKER
   ============================== */

.theme-picker {
  display: inline-flex;
  align-items: center;
  /* background: var(--theme-picker-bg);
  border: 1px solid var(--theme-picker-border); */
  border-radius: 999px;
  padding: 2px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn+.theme-btn {
  margin-left: 2px;
}

.theme-btn .theme-icon-path {
  fill: var(--text-muted-faint);
  transition: fill 0.15s ease;
}

.theme-btn:hover .theme-icon-path {
  fill: var(--text-muted);
}

.theme-btn.active .theme-icon-path {
  fill: var(--text-color);
}

.theme-btn.active {
  background: var(--theme-btn-active-bg);
}

#footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}