/* ===== Variables ===== */
:root {
  --color-bg: #faf8f5;
  --color-bg-alt: #f5f2ed;
  --color-text: #4a4540;
  --color-text-muted: #8a8580;
  --color-accent: #c9b8a8;
  --color-accent-light: #e8e0d8;
  --color-border: #e5e0da;
  --color-card: rgba(255, 255, 255, 0.7);
  --font-main: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
  --radius: 12px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero-content {
  text-align: center;
  max-width: 480px;
}

.hero-image-wrapper {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-accent-light);
  box-shadow: var(--shadow-soft);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.scroll-hint {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== Sections ===== */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.section-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ===== About ===== */
.about-content {
  background: var(--color-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.about-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.about-text h3.about-sub {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.about-text p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== App Filters ===== */
.app-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
}

.filter-btn.active {
  background: var(--color-accent-light);
  color: var(--color-text);
  border-color: var(--color-accent);
}

/* ===== Apps Grid ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.app-card-icon {
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.app-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card-inner {
  padding: 1.5rem;
}

.app-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: var(--color-accent-light);
  color: var(--color-text-muted);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.app-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.app-tech {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.app-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.app-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  transition: color 0.2s;
}

.app-link:hover {
  color: var(--color-text);
}

.app-link--soon {
  color: var(--color-text-muted);
  cursor: default;
  font-weight: 400;
}

/* ===== Links Grid ===== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.link-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.link-card:hover .link-icon {
  color: var(--color-text);
}

.link-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.link-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section {
    padding: 4rem 1.25rem;
  }
}
