/* Refined design — Sweat Diary-aligned aesthetic */

:root {
  /* Gray scale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Accent — Sweat Diary palette */
  --accent: #34C759;
  --accent-hover: #2DA44E;
  --sport-running: #34C759;
  --sport-surfing: #5AC8FA;
  --sport-yoga: #AF52DE;

  /* Borders & surfaces */
  --border: rgba(0, 0, 0, 0.07);
  --bg-color: #ffffff;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-900);
  background-color: var(--bg-color);
  scrollbar-gutter: stable;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media screen and (max-width: 640px) {
  body {
    font-size: 17px;
  }
}

/* Header — Frosted glass */
.header-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

@media screen and (max-width: 640px) {
  .header {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

.header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  background: linear-gradient(135deg, var(--sport-running), var(--sport-surfing));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header h1 a {
  text-decoration: none;
}

.header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header nav a:hover {
  color: var(--gray-900);
}

.header nav a.brand-link {
  background: linear-gradient(135deg, var(--sport-running), var(--sport-surfing));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header nav a.brand-link:hover {
  background: linear-gradient(135deg, var(--sport-surfing), var(--sport-yoga));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Main content */
main {
  flex: 1;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Hero */
.hero {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.hero a {
  color: var(--gray-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.hero a:hover {
  color: var(--gray-900);
}

.hero-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.hero-links a {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Sweat Diary promo */
.sweat-diary-promo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.promo-glow {
  position: absolute;
  top: -100px;
  left: -200px;
  right: -200px;
  bottom: -100px;
  background: radial-gradient(ellipse at 30% 50%, rgba(52, 199, 89, 0.08), transparent 70%),
              radial-gradient(ellipse at 70% 50%, rgba(90, 200, 250, 0.06), transparent 70%),
              radial-gradient(ellipse at 50% 80%, rgba(175, 82, 222, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(30px);
}

.promo-icon {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin: 0;
}

.promo-text {
  position: relative;
  z-index: 1;
}

.promo-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  margin-top: 0;
}

.promo-text p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.promo-link {
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--sport-running), var(--sport-surfing));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.promo-link:hover {
  text-decoration: none;
  background: linear-gradient(135deg, var(--sport-surfing), var(--sport-yoga));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media screen and (max-width: 480px) {
  .sweat-diary-promo {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .promo-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }
}

/* Posts section */
.posts-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.content {
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

@media screen and (max-width: 640px) {
  main, .content {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

/* Links */
a {
  color: #3AAED8;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2E96BA;
  text-decoration: underline;
}

/* Blog post cards */
.clickable-card {
  display: block;
  padding: 2rem;
  margin-bottom: 1.25rem;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--gray-900);
  background: var(--bg-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
}

@media screen and (max-width: 640px) {
  .clickable-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--r-md);
  }
}

.clickable-card,
.clickable-card * {
  text-decoration: none;
}

.clickable-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}

.clickable-card .title {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  transition: color 0.2s ease;
}

.clickable-card:hover .title {
  color: #3AAED8;
}

.clickable-card > div {
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.6;
}

.clickable-card p {
  color: var(--gray-600);
}

.clickable-card .date {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: var(--r-md);
}

@media screen and (max-width: 640px) {
  img {
    margin: 1rem 0;
    border-radius: var(--r-sm);
  }
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--gray-700);
}

li {
  margin-bottom: 0.5rem;
}

/* Date */
.date {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  max-width: 100%;
  width: 100%;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 13.5px;
}

.footer-inner a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-inner a:hover {
  color: var(--gray-600);
}

/* Legacy footer (pages without .footer-inner) */
footer:not(:has(.footer-inner)) {
  text-align: center;
  font-size: 13.5px;
  color: var(--gray-400);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

footer:not(:has(.footer-inner)) a {
  color: var(--gray-400);
  margin: 0 1rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer:not(:has(.footer-inner)) a:hover {
  color: var(--gray-600);
  text-decoration: none;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .header nav .brand-link {
    display: none;
  }

  body {
    font-size: 17px;
  }

  .header {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    flex-wrap: wrap;
  }

  .header h1 {
    font-size: 16px;
  }

  .header nav {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .header nav a {
    font-size: 14px;
    padding: 0.25rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  h3 {
    font-size: 1.125rem;
    line-height: 1.3;
  }

  .clickable-card .title {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  footer {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  .footer-inner {
    gap: 1rem;
  }

  footer:not(:has(.footer-inner)) a {
    display: inline-block;
    margin: 0.5rem 0.75rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media screen and (max-width: 480px) {
  .header {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  .header h1 {
    font-size: 15px;
  }

  .header nav {
    gap: 1rem;
    width: 100%;
  }

  .header nav a {
    font-size: 14px;
  }

  main, .content {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.05rem;
  }

  .clickable-card {
    padding: 1rem;
    margin-bottom: 0.875rem;
  }

  .clickable-card .title {
    font-size: 1.1rem;
  }

  body {
    font-size: 16.5px;
  }

  footer {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  ul, ol {
    padding-left: 1.25rem;
  }
}

.profile-pic {
  display: none;
}
