:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e8e8e8;
  --accent: #111111;
  --max-width: 640px;
  --page-padding: 1rem;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--safe-top) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: max(var(--page-padding), var(--safe-left));
  padding-right: max(var(--page-padding), var(--safe-right));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem max(var(--page-padding), var(--safe-left)) 0.75rem max(var(--page-padding), var(--safe-right));
  padding-top: calc(0.75rem + var(--safe-top));
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.logo {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.site-header.is-open .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .menu-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.site-header.is-open .nav {
  display: flex;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text);
  border-radius: 10px;
  transition: background 0.15s;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--bg);
}

.nav a[aria-current="page"] {
  background: var(--bg);
  font-weight: 600;
}

/* Hero / Profile */
.hero {
  padding: 2rem 0 3rem;
  text-align: center;
}

.profile-image-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.profile-image {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.profile-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.profile-name {
  font-size: clamp(1.375rem, 5.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.profile-tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 0.875rem;
}

.profile-bio {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto 1.25rem;
  line-height: 1.65;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color 0.15s, border-color 0.15s;
}

.social-link:active {
  transform: scale(0.96);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* Apps */
.apps-section {
  padding-bottom: 2rem;
}

.section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.15s;
}

.app-row:not(.app-row--static):active {
  transform: scale(0.985);
}

.app-row--static {
  opacity: 0.65;
}

.app-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.app-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.app-description {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.app-meta {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.25rem 0.45rem;
  background: var(--bg);
  border-radius: 999px;
}

.app-arrow {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--muted);
}

.apps-empty {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 1rem 0;
}

/* Contact */
.contact-section {
  padding-bottom: calc(2rem + var(--safe-bottom));
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.contact-item {
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.375rem;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}

.contact-link {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-shrink: 0;
  min-height: 32px;
  padding: 0.3rem 0.55rem;
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #ffffff;
  background: #111111;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, transform 0.15s;
}

.copy-btn svg {
  width: 11px;
  height: 11px;
}

.copy-btn:active {
  transform: scale(0.96);
}

.copy-btn.copied {
  background: #16a34a;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.25rem max(var(--page-padding), var(--safe-right)) calc(1.5rem + var(--safe-bottom)) max(var(--page-padding), var(--safe-left));
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* Legal / Privacy Policy */
.legal-page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem max(var(--page-padding), var(--safe-right)) calc(2.5rem + var(--safe-bottom)) max(var(--page-padding), var(--safe-left));
}

.legal-title {
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.legal-content ul {
  padding-left: 1.125rem;
  margin-top: 0.375rem;
}

.legal-content li {
  margin-bottom: 0.3rem;
}

.legal-content a {
  border-bottom: 1px solid var(--border);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Desktop */
@media (min-width: 640px) {
  :root {
    --page-padding: 1.5rem;
  }

  .site-header {
    position: sticky;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 0.125rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .nav a {
    min-height: 36px;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--muted);
    border-radius: 999px;
  }

  .nav a:hover,
  .nav a:focus-visible {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
  }

  .nav a[aria-current="page"] {
    color: var(--text);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
    font-weight: 500;
  }

  .hero {
    padding: 2.5rem 0 3.5rem;
  }

  .profile-image {
    width: 128px;
    height: 128px;
  }

  .app-name {
    font-size: 0.9375rem;
  }

  .app-description {
    font-size: 0.8125rem;
  }
}
