/* Google Sans loaded via <link> in each HTML file */

/* --- reset --- */

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


/* highlighting */
.highlight{
  color:black;
  font-weight: bolder;
  background-color: yellow;
}

highlight::selection{
  color:white;
  background-color: rgb(0, 0, 0);
}
/* --- tokens --- */

:root {
  --bg: #0a0a0a;
  --bg-subtle: #111;
  --text: #b0b0b0;
  --text-bright: #d0d0d0;
  --text-muted: #555;
  --accent: #7a8f65;
  --accent-dim: #5a6f4a;
  --border: #1a1a1a;
  --border-subtle: #252525;
  --font: 'Google Sans', sans-serif;
  --max-width: 660px;
}

[data-theme="light"] {
  --bg: #e3e1de;
  --bg-subtle: #e8e5e0;
  --text: #4a4a4a;
  --text-bright: #1a1a1a;
  --text-muted: #999;
  --accent: #5a7a45;
  --accent-dim: #7a9965;
  --border: #d5d0c8;
  --border-subtle: #c5c0b8;
}

/* --- base --- */

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* --- layout --- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- nav --- */

nav {
  padding-bottom: 3rem;
  position: relative; /* needed for pill absolute positioning */
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}

nav li {
  position: relative;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  transition: color 0.2s ease;
  position: relative;
  overflow: hidden; /* contain ripple */
  z-index: 1;
}

nav a:hover {
  color: var(--text-bright);
}

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

/* --- liquid-glass pill --- */

.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: 6px;
  z-index: 0;

  /* glass layers */
  background: linear-gradient(
    135deg,
    rgba(122, 143, 101, 0.12) 0%,
    rgba(122, 143, 101, 0.06) 100%
  );
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  border: 1px solid rgba(122, 143, 101, 0.2);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 0 rgba(122, 143, 101, 0);
}

[data-theme="light"] .nav-pill {
  background: linear-gradient(
    135deg,
    rgba(90, 122, 69, 0.10) 0%,
    rgba(90, 122, 69, 0.05) 100%
  );
  border: 1px solid rgba(90, 122, 69, 0.18);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* --- nav click ripple --- */

.nav-ripple {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(122, 143, 101, 0.5);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: nav-ripple-burst 0.55s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

[data-theme="light"] .nav-ripple {
  background: rgba(90, 122, 69, 0.4);
}

@keyframes nav-ripple-burst {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  60%  { opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

/* --- theme toggle --- */

.theme-toggle {
  margin-left: auto;
}

.theme-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  height: 14px;
  width: 14px;
  display: flex;
  align-items: flex-start;
}

.toggle-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .toggle-track {
  transform: translateY(-20px);
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  width: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toggle-icon svg {
  display: block;
}

.theme-toggle button:hover .toggle-icon {
  color: var(--accent);
}

/* --- headings --- */

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
  min-height: 2.5rem;
}

h1 .dud {
  color: var(--accent-dim);
  opacity: 0.5;
}

/* --- bio --- */

.bio {
  margin-bottom: 3rem;
}

.bio p {
  margin-bottom: 1.2rem;
  font-size: 0.875rem;
  font-weight: 300;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio em {
  color: var(--accent);
  font-style: italic;
}

/* --- bio quote --- */

.bio-quote {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 2px solid var(--accent-dim);
  margin: 1rem 0 1.5rem;
  line-height: 1.8;
}

.bio-quote-author {
  color: var(--accent-dim);
  font-style: italic;
}

.bio-closing {
  margin-top: 2rem;
}

/* --- links --- */

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

a:hover {
  color: var(--text-bright);
}

/* --- footer --- */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
}

/* --- social list (contact/socials page) --- */

.social-list {
  list-style: none;
  margin-top: 1.5rem;
}

.social-list li {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  padding-left: 1rem;
  border-left: 1px solid transparent;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.social-list li:hover {
  border-left-color: var(--accent-dim);
  transform: translateX(4px);
}

.social-list li::before {
  content: '~ ';
  color: var(--text-muted);
}

.social-note {
  font-size: 0.55rem;
  color: var(--text-muted);
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

/* --- 404 page --- */

.error-page {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  min-height: 6rem;
}

.error-art {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin: 2rem 0;
  animation: float 3s ease-in-out infinite;
  user-select: none;
}

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

.error-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.error-link {
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: border-color 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.error-link:hover {
  border-color: var(--accent);
  color: var(--text-bright);
}

/* --- page descriptions --- */

.page-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
  min-height: 1.6rem;
}

/* --- typewriter cursor --- */

.typewriter-active::after {
  content: '▌';
  color: var(--accent);
  animation: cursorBlink 0.7s step-end infinite;
  margin-left: 1px;
  font-weight: 400;
}

.typewriter-done::after {
  content: '▌';
  color: var(--accent);
  animation: cursorBlink 0.7s step-end infinite;
  margin-left: 1px;
  font-weight: 400;
  opacity: 0.4;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* --- project categories --- */

.project-category {
  margin-bottom: 3rem;
}

.project-category h2 {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-category h2::before {
  /* content: '// '; */
  color: var(--text-muted);
}

/* --- project items --- */

.project-item {
  margin-bottom: 1.8rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.project-item:hover {
  border-left-color: var(--accent-dim);
}

.project-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

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

.project-lang {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-left: 0.75rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.project-desc {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 0.4rem;
  font-weight: 300;
  line-height: 1.7;
}

.page-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2rem;
  font-weight: 300;
}

/* --- wip block (placeholder pages) --- */

.wip-block {
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.wip-block p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.8;
}

/* --- fade-in animation --- */

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: var(--delay, 0s);
}

/* --- blog content --- */

.back-nav {
  margin-bottom: 2rem;
}

.back-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.blog-content {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
  margin-top: 1.5rem;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: var(--text-bright);
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.blog-content h2 { font-size: 1.25rem; }
.blog-content h3 { font-size: 1.1rem; }
.blog-content h4 { font-size: 0.95rem; }

.blog-content p {
  margin-bottom: 1.2rem;
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content a:hover {
  color: var(--text-bright);
}

.blog-content blockquote {
  border-left: 2px solid var(--accent-dim);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
  display: block;
}

.blog-content pre {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content code {
  font-family: var(--font);
  font-size: 0.8rem;
  background-color: var(--bg-subtle);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.blog-content pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.blog-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2.5rem 0;
}

/* --- responsive --- */

@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  .project-item {
    padding-left: 0.75rem;
  }

  .project-name {
    font-size: 0.9rem;
  }

  .bio-quote {
    padding-left: 0.75rem;
  }
}

/* --- donate page --- */

.donate-card {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-subtle);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease;
}

.donate-card:hover {
  border-color: var(--accent-dim);
}

.qr-placeholder-wrapper {
  width: 370px;
  height: 370px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  background-color: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.qr-svg {
  width: 100%;
  height: 100%;
}

.scan-line {
  animation: scan 3.5s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% {
    y1: 5;
    y2: 5;
    opacity: 0.1;
  }
  50% {
    y1: 95;
    y2: 95;
    opacity: 0.8;
  }
}

.upi-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.upi-id-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.upi-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background-color: var(--bg);
  padding: 0.4rem 0.6rem;
}

.upi-id {
  font-size: 0.75rem;
  color: var(--text-bright);
  font-family: var(--font);
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}

.upi-id::-webkit-scrollbar {
  display: none;
}

.copy-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.6rem;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  transition: all 0.2s ease;
  user-select: none;
  margin-left: 0.75rem;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.copy-btn.copied {
  color: var(--accent-dim);
  border-color: var(--border-subtle);
  background: transparent;
}

.qr-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}