/* Aspaloyy — Personal Site */

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

:root {
  --bg:      #0d1117;
  --surface: #161b22;
  --border:  #30363d;
  --dot:     rgba(255, 255, 255, 0.05);
  --text:    #e6edf3;
  --muted:   #7d8590;
  --accent:  #a78bfa;
  --amber:   #eab308;
  --green:   #01875f;
  --nav-h:   56px;
}

[data-theme="light"] {
  --bg:      #ffffff;
  --surface: #f6f8fa;
  --border:  #d0d7de;
  --dot:     rgba(0, 0, 0, 0.07);
  --text:    #1f2328;
  --muted:   #636c76;
  --accent:  #7c3aed;
  --amber:   #b45309;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.2s, border-color 0.2s;
}

.nav.solid {
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav.solid {
  background: rgba(246, 248, 250, 0.92);
}

.nav-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  margin-right: 24px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(1, 135, 95, 0.45);
  animation: status-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(1, 135, 95, 0.45); }
  50%      { box-shadow: 0 0 0 4px rgba(1, 135, 95, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

.nav-links {
  display: flex;
  gap: 20px;
  flex: 1;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-btn {
  height: 30px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.nav-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .nav-btn:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

/* ── LAYOUT ── */
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── HOME HERO ── */
.hero {
  padding: 80px 0 80px;
}

.hero-path {
  display: block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.65;
  margin-bottom: 16px;
}

.hero-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.hero-panel-head {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.shelf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}

.shelf-row:last-child { border-bottom: none; }

.shelf-row:hover { background: rgba(255, 255, 255, 0.03); }
[data-theme="light"] .shelf-row:hover { background: rgba(0, 0, 0, 0.025); }

.shelf-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }

.shelf-name { font-size: 14px; font-weight: 600; flex: 1; }

.shelf-tag {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

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

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--green);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s, border-color 0.15s;
}

.btn-play:hover {
  filter: brightness(1.12);
}

.btn-play svg {
  flex-shrink: 0;
}

.btn-play [data-i18n="play.get"] {
  font-weight: 400;
  opacity: 0.8;
}

.btn-play-store {
  font-weight: 700;
}

/* ── PAGE HEADER ── */
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.page-count {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  flex-shrink: 0;
}

/* ── APP LIST ── */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 0;
}

.app-card {
  --card-accent: var(--border);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s;
}

.app-card--purple { --card-accent: var(--accent); }
.app-card--amber   { --card-accent: var(--amber); }

.app-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: var(--card-accent);
}

[data-theme="light"] .app-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
  border-top-color: var(--card-accent);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.app-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--card-accent) 12%, var(--bg));
  border-color: color-mix(in srgb, var(--card-accent) 40%, var(--border));
}

.app-card-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.app-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.app-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.app-index {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.55;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--card-accent);
}

.app-card-meta {
  font-size: 13px;
  color: var(--muted);
}

.app-card-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 460px;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.app-card-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
}

.id-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.id-label {
  font-weight: 700;
  opacity: 0.6;
  letter-spacing: 0.5px;
  margin-right: 5px;
}

/* ── ABOUT PAGE ── */
.about-section {
  padding: 72px 0 80px;
}

.about-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 14px;
}

.meta-chip {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 24px;
  background: var(--surface);
}

.about-bio {
  font-size: 15px;
  color: var(--text);
  line-height: 1.72;
  max-width: 540px;
  margin-bottom: 48px;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.skill-tag {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}

.contact-link:hover { color: var(--text); }

.contact-key {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--muted);
  opacity: 0.55;
  width: 40px;
  flex-shrink: 0;
}

/* ── LINK PREVIEW ── */
a.link-preview {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  background: var(--bg);
  transition: border-color 0.18s;
  min-height: 72px;
}

a.link-preview:hover {
  border-color: var(--card-accent);
}

.link-preview-bar {
  width: 3px;
  flex-shrink: 0;
  background: var(--card-accent);
}

.link-preview-body {
  flex: 1;
  padding: 10px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.link-preview-site {
  display: block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--card-accent);
  opacity: 0.85;
}

.link-preview-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-preview-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.link-preview-thumb {
  width: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.link-preview-emoji {
  font-size: 26px;
  line-height: 1;
}

.link-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

a.link-preview.lp-loaded .link-preview-img  { display: block; }
a.link-preview.lp-loaded .link-preview-emoji { display: none; }

/* ── FOOTER ── */
.footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .hero { padding: 60px 0 48px; }
  .hero-name { font-size: 26px; }
  .hero-tagline { font-size: 15px; }
  .page-head { padding: 56px 0 32px; }
  .page-title { font-size: 22px; }
  .about-name { font-size: 26px; }
  .about-section { padding: 56px 0 60px; }
  .app-list { padding: 24px 0; gap: 12px; }
  .app-card { padding: 18px; gap: 14px; }
  .app-icon { width: 42px; height: 42px; font-size: 19px; }
  .app-card-name { font-size: 16px; }
  .app-card-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}
