@import url('https://api.fontshare.com/v2/css?f[]=clash-grotesk@400,500,600,700&display=swap');

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

:root {
  --primary: #b17b47;
  --bg: #f8f7f4;
  --text: #232825;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-900: #171717;
  --dark-card: #171717;
  --max-w: 48rem;
  --radius: 1.5rem;
}

html, body {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; transition: opacity 0.2s; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HERO ─────────────────────────────── */
.hero { padding: 4rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }

.hero-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}

.hero-avatar {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 0% 30%;
  border: 3px solid rgba(255,255,255,0.1);
  margin: 0 auto 2rem;
  display: block;
}

.hero-card h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 400;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-card h1 span { font-weight: 600; color: var(--primary); }

.hero-card p {
  color: var(--neutral-300);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 auto 2rem;
  white-space: pre-line;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-socials a {
  color: #fff;
  display: flex;
  align-items: center;
}

.hero-socials svg { width: 1.25rem; height: 1.25rem; }

/* ── NOW ─────────────────────────────── */
.now { padding: 2rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }

.section-header { margin-bottom: 2rem; }

.section-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
  position: relative;
  display: inline-block;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.6;
}

.section-meta {
  font-size: 0.8rem;
  color: var(--neutral-500);
  font-family: monospace;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

.section-desc a { color: var(--primary); }
.section-desc a:hover { text-decoration: underline; opacity: 1; }

.now-list {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.now-list::before {
  content: '';
  position: absolute;
  left: 0.65rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--neutral-200);
}

.now-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  position: relative;
}

.now-emoji {
  font-size: 1.1rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.now-text { color: var(--neutral-700); line-height: 1.6; }

/* ── BLOG ─────────────────────────────── */
.blog { padding: 4rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) and (min-width: 641px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }

.blog-card { display: flex; flex-direction: column; }

.blog-card a { display: flex; flex-direction: column; height: 100%; }

.blog-img {
  aspect-ratio: 4/3;
  background: var(--neutral-200);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.blog-card:hover .blog-img img { transform: scale(1.04); }

.blog-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-desc {
  font-size: 0.85rem;
  color: var(--neutral-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--neutral-400);
  margin-top: 0.5rem;
  font-family: monospace;
}

.blog-view-all {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

.blog-view-all:hover { opacity: 0.8; text-decoration: underline; }

.loading-text { color: var(--neutral-500); text-align: center; padding: 3rem 0; }

/* ── CONTACT ─────────────────────────── */
.contact { padding: 1rem 1.5rem 4rem; max-width: var(--max-w); margin: 0 auto; }

.contact-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}

.contact-card h2 { font-size: 1.5rem; font-weight: 500; color: #fff; margin-bottom: 1rem; }
.contact-card p { color: var(--neutral-300); font-size: 1rem; margin-bottom: 2rem; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a { color: #fff; display: flex; align-items: center; }
.contact-links svg { width: 1.25rem; height: 1.25rem; }

/* ── PT BANNER ───────────────────────── */
.pt-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 50;
  background: var(--neutral-900);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pt-banner a { color: #fff; }
.pt-banner a:hover { text-decoration: underline; opacity: 1; }
.pt-banner button {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 0 0.25rem;
}
.pt-banner button:hover { color: #fff; }
.hidden { display: none !important; }

/* ── PORTFOLIO ───────────────────────── */
.portfolio { padding: 2rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }

.portfolio-subsection { margin-bottom: 3rem; }

.subsection-title { font-size: 1rem; font-weight: 500; margin-bottom: 0.25rem; }
.subsection-desc { font-size: 0.85rem; color: var(--neutral-600); margin-bottom: 1.25rem; }

/* videos */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
@media (max-width: 500px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }

.video-card {
  aspect-ratio: 9/16;
  background: var(--neutral-200);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: opacity 0.2s;
}

.video-play-btn svg { width: 2.5rem; height: 2.5rem; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }
.video-card.playing .video-play-btn { opacity: 0; }
.video-card.playing:hover .video-play-btn { opacity: 1; }

/* stories carousel */
.stories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
@media (max-width: 500px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } }

.story-carousel { aspect-ratio: 9/16; position: relative; border-radius: 1rem; overflow: hidden; background: var(--neutral-200); }

.story-carousel img { width: 100%; height: 100%; object-fit: cover; display: block; }

.story-nav {
  position: absolute; top: 0; bottom: 0; width: 50%;
  cursor: pointer; display: flex; align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}
.story-nav.prev { left: 0; justify-content: flex-start; padding-left: 0.5rem; }
.story-nav.next { right: 0; justify-content: flex-end; padding-right: 0.5rem; }

.story-nav svg { width: 1.25rem; height: 1.25rem; color: #fff; opacity: 0; transition: opacity 0.15s; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.story-carousel:hover .story-nav svg { opacity: 1; }

.story-dots { position: absolute; bottom: 0.5rem; left: 0; right: 0; display: flex; justify-content: center; gap: 0.25rem; }
.story-dot { width: 0.35rem; height: 0.35rem; border-radius: 50%; background: rgba(255,255,255,0.5); }
.story-dot.active { background: #fff; }

.story-label { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; font-size: 0.7rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); letter-spacing: 0.05em; text-transform: uppercase; }

/* sites */
.sites-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (max-width: 500px) { .sites-grid { grid-template-columns: 1fr; } }

.site-card {
  border: 1px solid var(--neutral-200);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: border-color 0.15s;
  display: block;
}
.site-card:hover { border-color: var(--neutral-400); opacity: 1; }

.site-img { width: 100%; height: 8rem; object-fit: cover; object-position: top; border-radius: 0.5rem; background: var(--neutral-200); display: block; margin-bottom: 0.6rem; }

.site-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.2rem; }
.site-url { font-size: 0.75rem; color: var(--neutral-400); font-family: monospace; }

/* ── BLOG PAGE ───────────────────────── */
.blog-page { padding: 4rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.blog-back { font-size: 0.9rem; color: var(--primary); margin-bottom: 2rem; display: inline-flex; align-items: center; gap: 0.3rem; }
.blog-back:hover { opacity: 0.8; }
.blog-list { display: flex; flex-direction: column; gap: 2rem; }

.blog-list-item a {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 500px) { .blog-list-item a { grid-template-columns: 1fr; } }

.blog-list-img {
  aspect-ratio: 4/3;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--neutral-200);
}

.blog-list-img img { width: 100%; height: 100%; object-fit: cover; }

.blog-list-title { font-size: 1rem; font-weight: 500; margin-bottom: 0.3rem; }
.blog-list-desc { font-size: 0.875rem; color: var(--neutral-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-list-date { font-size: 0.75rem; color: var(--neutral-400); font-family: monospace; margin-top: 0.4rem; }

/* ── POST PAGE ───────────────────────── */
.post-page { padding: 4rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.post-header { margin-bottom: 3rem; }
.post-title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 600; line-height: 1.3; margin-bottom: 1rem; }
.post-meta { font-size: 0.8rem; color: var(--neutral-400); font-family: monospace; }
.post-cover { width: 100%; border-radius: 1rem; margin-bottom: 2.5rem; }

.post-body { font-size: 1rem; line-height: 1.8; color: var(--neutral-700); }
.post-body h1, .post-body h2, .post-body h3 { color: var(--text); font-weight: 600; margin: 2rem 0 0.75rem; line-height: 1.3; }
.post-body h1 { font-size: 1.6rem; }
.post-body h2 { font-size: 1.3rem; }
.post-body h3 { font-size: 1.1rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body a { color: var(--primary); text-decoration: underline; opacity: 1; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote { border-left: 3px solid var(--primary); padding-left: 1rem; color: var(--neutral-600); font-style: italic; margin: 1.5rem 0; }
.post-body code { background: var(--neutral-200); padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-size: 0.875em; }
.post-body pre { background: #1e1e1e; color: #d4d4d4; padding: 1.25rem; border-radius: 0.75rem; overflow-x: auto; margin: 1.5rem 0; }
.post-body pre code { background: none; padding: 0; }
.post-body img { max-width: 100%; border-radius: 0.5rem; }

/* ── LANG SWITCHER ───────────────────────── */
.lang-switcher {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 0.4rem;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border-radius: 99px;
  padding: 0.35rem 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lang-switcher a, .lang-switcher span {
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
  opacity: 1;
  transition: transform 0.15s;
}
.lang-switcher a { opacity: 0.45; }
.lang-switcher a:hover { opacity: 1; transform: scale(1.15); }
.lang-switcher .lang-active { opacity: 1; }

/* ── GENERATED POST PAGES (blog-publisher) ───────────────────────── */
.post-nav { padding: 1.5rem 1.5rem 0; max-width: var(--max-w); margin: 0 auto; }
.post-nav a { font-size: 0.875rem; color: var(--neutral-500); text-decoration: none; opacity: 1; }
.post-nav a:hover { color: var(--primary); }

.post { padding: 2rem 1.5rem 5rem; max-width: var(--max-w); margin: 0 auto; }

.post .post-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 1rem; margin-bottom: 2rem; display: block; }
.post .post-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem; }

.post .post-header { margin-bottom: 2.5rem; }
.post .post-header h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }

.post-categories { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.post-categories span { font-size: 0.75rem; font-weight: 500; background: var(--primary); color: #fff; padding: 0.2rem 0.6rem; border-radius: 99px; }

.post-date { font-size: 0.8rem; color: var(--neutral-400); font-family: monospace; }

.post-content { font-size: 1rem; line-height: 1.8; color: var(--neutral-700); }
.post-content h1, .post-content h2, .post-content h3 { color: var(--text); font-weight: 600; margin: 2rem 0 0.75rem; line-height: 1.3; }
.post-content h1 { font-size: 1.6rem; }
.post-content h2 { font-size: 1.3rem; }
.post-content h3 { font-size: 1.1rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: var(--primary); text-decoration: underline; opacity: 1; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote { border-left: 3px solid var(--primary); padding-left: 1rem; color: var(--neutral-600); font-style: italic; margin: 1.5rem 0; }
.post-content code { background: var(--neutral-200); padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-size: 0.875em; }
.post-content pre { background: #1e1e1e; color: #d4d4d4; padding: 1.25rem; border-radius: 0.75rem; overflow-x: auto; margin: 1.5rem 0; }
.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; border-radius: 0.5rem; }
