@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;1,400&family=Fraunces:ital,wght@0,500;0,600;0,700;1,500&display=swap");

:root {
  color-scheme: light;
  --background: oklch(0.97 0.014 78);
  --foreground: oklch(0.29 0.02 45);
  --card: oklch(0.99 0.008 78);
  --card-foreground: oklch(0.29 0.02 45);
  --primary: oklch(0.58 0.12 40);
  --primary-foreground: oklch(0.98 0.01 78);
  --secondary: oklch(0.93 0.02 75);
  --muted-foreground: oklch(0.52 0.03 50);
  --accent: oklch(0.88 0.04 60);
  --accent-foreground: oklch(0.32 0.04 45);
  --border: oklch(0.88 0.02 70);
  --ring: oklch(0.58 0.12 40);

  --radius: 0.625rem;
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);

  --font-sans: "Nunito", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --border: oklch(1 0 0 / 10%);
    --ring: oklch(0.556 0 0);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Layout ── */

.page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.25rem;
}

.container {
  width: 100%;
  max-width: 28rem;
}

/* ── Profile header ── */

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scale(1.1);
  border-radius: 9999px;
  background: color-mix(in oklch, var(--accent) 50%, transparent);
  filter: blur(24px);
}

.avatar {
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  border: 4px solid var(--card);
  object-fit: cover;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.08);
}

@media (min-width: 640px) {
  .avatar {
    width: 8rem;
    height: 8rem;
  }
}

.profile-header h1 {
  margin: 1.25rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .profile-header h1 {
    font-size: 1.875rem;
  }
}

.profile-header p {
  margin: 0.5rem 0 0;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .profile-header p {
    font-size: 1rem;
  }
}

/* ── Category link list (homepage) ── */

.link-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.link-button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklch, var(--primary) 40%, transparent);
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.08);
}

.icon-badge {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-xl);
  background: var(--accent);
  color: var(--accent-foreground);
  transition: background 0.2s, color 0.2s;
}

.link-button:hover .icon-badge {
  background: var(--primary);
  color: var(--primary-foreground);
}

.icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

.link-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.link-text .title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--card-foreground);
}

.link-text .desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
  transition: transform 0.2s, color 0.2s;
}

.link-button:hover .chevron {
  transform: translateX(2px);
  color: var(--primary);
}

/* ── Social links ── */

.social-section {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.social-section > p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: var(--accent-foreground);
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.08);
}

.social-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ── Footer ── */

.site-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ── Category page ── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.back-link svg {
  width: 1rem;
  height: 1rem;
}

.category-header {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-header .icon-badge {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-xl);
}

.category-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--foreground);
}

.category-header p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* ── Product grid ── */

.product-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.08);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--secondary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.product-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.375rem;
}

.product-text h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--card-foreground);
}

.product-text p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-xl);
  background: var(--primary);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: transform 0.2s, opacity 0.2s;
}

.buy-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.buy-button svg {
  width: 1rem;
  height: 1rem;
}
