/* =========================================================
   Sudhara — minimal profile (static, GitHub Pages)
   Dark by default · light via [data-theme="light"]
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg: #0b0b0c;
  --ink: #fafafa;
  --text: #cfcfd1;
  --muted: #7d7d82;
  --chip: #18181b;
  --chip-hover: #222226;
  --card: #111113;
  --line: #26262a;
  --line-strong: #34343a;
  --btn-bg: #fafafa;
  --btn-ink: #0b0b0c;
  --shadow: rgba(0, 0, 0, 0.6);
  --badge-green-bg: rgba(34, 197, 94, 0.14);  --badge-green: #4ade80;
  --badge-blue-bg: rgba(56, 189, 248, 0.14);  --badge-blue: #7dd3fc;
  --badge-orange-bg: rgba(251, 146, 60, 0.14); --badge-orange: #fdba74;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #ffffff;
  --ink: #111111;
  --text: #2a2a2a;
  --muted: #8a8a8a;
  --chip: #f4f4f3;
  --chip-hover: #ecebea;
  --card: #ffffff;
  --line: #e6e6e6;
  --line-strong: #d6d6d6;
  --btn-bg: #111111;
  --btn-ink: #ffffff;
  --shadow: rgba(0, 0, 0, 0.3);
  --badge-green-bg: #dcfce7;  --badge-green: #15803d;
  --badge-blue-bg: #e0f2fe;   --badge-blue: #0369a1;
  --badge-orange-bg: #ffedd5; --badge-orange: #c2410c;
  color-scheme: light;
}

:root {
  --accent: #f5a524;
  --green: #22c55e;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* Overlay scrollbar (shown only while scrolling) */
.sbar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: 12px; opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.sbar.is-visible { opacity: 1; pointer-events: auto; }
.sbar__thumb { position: absolute; top: 0; right: 3px; width: 5px; border-radius: 99px; background: var(--muted); opacity: 0.7; cursor: grab; transition: width 0.2s, opacity 0.2s; will-change: transform; }
.sbar.is-visible .sbar__thumb:hover, .sbar.is-dragging .sbar__thumb { width: 8px; opacity: 1; cursor: grabbing; }body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 14px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
}
.theming body, .theming body * { transition: background-color 0.35s, color 0.35s, border-color 0.35s !important; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #111; }

/* ---------- Entrance: staggered blur-up ---------- */
.in { opacity: 0; animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Top bar ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; }
.logo { font: 700 15px var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.logo span { color: var(--accent); font-style: italic; margin-right: 2px; }
.theme-toggle {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line); background: var(--chip); color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.2s;
}
.theme-toggle:hover { transform: rotate(-15deg) scale(1.05); border-color: var(--line-strong); }
.theme-toggle svg { position: absolute; transition: transform 0.5s var(--ease), opacity 0.3s; }
[data-theme="dark"] .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* ---------- Page ---------- */
.page { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 28px 20px 80px; }
.avatar { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.intro h1 { margin: 22px 0 14px; font: 600 1.6rem/1.25 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.name { position: relative; color: var(--accent); white-space: nowrap; }
.name::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; animation: draw 0.9s var(--ease) 0.9s forwards;
}
@keyframes draw { to { transform: scaleX(1); } }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out 1.2s infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.lines p + p { margin-top: 2px; }

.inline-chip { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 4px; border-radius: 6px; background: var(--chip); color: var(--ink); vertical-align: 1px; line-height: 1.6; }
.inline-chip i, .chip i {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px;
  font: 700 8px var(--sans); font-style: normal; color: #fff; letter-spacing: -0.02em;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px 0 12px; border-radius: 10px;
  font: 500 14px var(--sans); color: var(--ink); border: 1px solid var(--line); background: var(--chip);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 10px 22px -12px var(--shadow); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--primary { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px;
  font: 600 10.5px var(--mono); background: rgba(127, 127, 127, 0.2); border: 1px solid rgba(127, 127, 127, 0.3);
}
.status { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12.5px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }

/* ---------- Blocks ---------- */
.block { margin-top: 52px; }
.block h2 { margin-bottom: 14px; font: 500 11.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.block > p { margin-bottom: 14px; }
.block > p + p { margin-top: -10px; }
.u { color: var(--ink); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1.5px no-repeat; padding-bottom: 1px; transition: background-size 0.3s var(--ease), color 0.2s; }
.u:hover { background-size: 100% 100%; color: #111; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 5px; border-radius: 8px;
  background: var(--chip); font-size: 12.5px; color: var(--ink);
  transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.25s;
}
.chip:hover { transform: translateY(-2px) rotate(-1deg); background: var(--chip-hover); box-shadow: 0 6px 14px -8px var(--shadow); }
.chip i.glyph { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-size: 9px; }
.chip img, .inline-chip img { display: block; width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.inline-chip img { width: 14px; height: 14px; }
/* Dark-colored logos get a light tile in dark mode so they stay visible. */
[data-theme="dark"] .ico--dark { background: #f2f2f2; border-radius: 4px; padding: 2px; }
button.chip { font: inherit; font-size: 12.5px; border: 0; cursor: pointer; }
.chip.is-copied { background: var(--badge-green-bg); color: var(--badge-green); }
.block > p.sub { margin: 18px 0 12px; }
.project__logo { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.soc { display: block; flex-shrink: 0; color: var(--ink); }
.chip img[src$=".png"] { border-radius: 4px; }
.lines em { font-style: normal; color: var(--ink); }

/* ---------- Background art ---------- */
.top, .page, .foot { position: relative; z-index: 1; }
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg__dots {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: radial-gradient(ellipse 140% 110% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 140% 110% at 50% 0%, #000 35%, transparent 100%);
  animation: dots-in 1.6s var(--ease) both;
}
.bg__glow {
  position: absolute; width: 520px; height: 520px; left: 50%; top: -260px; margin-left: -420px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(20px); animation: drift 18s ease-in-out infinite alternate;
}
.bg__glow--b { margin-left: -60px; top: -200px; width: 420px; height: 420px; background: radial-gradient(closest-side, var(--glow-2), transparent); animation-duration: 22s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translate(120px, 60px) scale(1.15); } }
@keyframes dots-in { from { opacity: 0; } to { opacity: 1; } }
[data-theme="dark"] { --dot: 255, 255, 255; --dot-a: 0.05; --dot-hot: 245, 165, 36; --glow: rgba(245, 165, 36, 0.16); --glow-2: rgba(244, 63, 94, 0.08); }
[data-theme="light"] { --dot: 0, 0, 0; --dot-a: 0.07; --dot-hot: 214, 130, 0; --glow: rgba(245, 165, 36, 0.22); --glow-2: rgba(244, 63, 94, 0.08); }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.project {
  display: block; padding: 12px 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  transition: transform 0.3s var(--ease), border-color 0.2s, box-shadow 0.3s;
}
.project:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 14px 30px -18px var(--shadow); }
.project__head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.project__head b { font-weight: 500; color: var(--ink); }
.project__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; }
.project p { font-size: 12.5px; line-height: 1.6; }
.badge { padding: 1px 8px; border-radius: 6px; font-size: 11px; }
.badge--green { background: var(--badge-green-bg); color: var(--badge-green); }
.badge--blue { background: var(--badge-blue-bg); color: var(--badge-blue); }
.badge--orange { background: var(--badge-orange-bg); color: var(--badge-orange); }

/* ---------- Footer ---------- */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 28px; font-size: 12px; }
.heart { color: #f43f5e; display: inline-block; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.25); } 20% { transform: scale(1); } }

@media (max-width: 560px) {
  .projects { grid-template-columns: 1fr; }
  .top, .foot { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .in { opacity: 1; }
  .name::after { transform: none; }
}

.nowrap { white-space: nowrap; }

.flag { display: inline-block; width: 20px; height: 15px; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
