/* ═══════════════════════════════════════════
   Design Tokens
═══════════════════════════════════════════ */
:root {
  --bg:          #f7f5f2;
  --surface:     #ffffff;
  --ink:         #0f0e0d;
  --ink-muted:   #6b6860;
  --ink-faint:   #b5b3ae;
  --border:      rgba(15,14,13,0.08);
  --border-md:   rgba(15,14,13,0.14);
  --r-sm:        10px;
  --r-md:        18px;
  --r-lg:        26px;
  --r-xl:        100px;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --t:           0.35s var(--ease);
  --font-d:      'DM Serif Display', Georgia, serif;
  --font-b:      'DM Sans', system-ui, sans-serif;
}

/* ═══════════════════════════════════════════
   Reset
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { background: var(--bg); color: var(--ink); font-family: var(--font-b); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a     { text-decoration: none; color: inherit; }
img   { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════════
   Scroll Progress
═══════════════════════════════════════════ */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--ink); width: 0%; z-index: 9999;
  transition: width 0.1s linear; pointer-events: none;
}

/* ═══════════════════════════════════════════
   Layout wrapper
═══════════════════════════════════════════ */
.section-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

/* ═══════════════════════════════════════════
   Header
═══════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 24px;
  background: rgba(247,245,242,0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}

.header-left {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.email-text {
  font-size: 14px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em;
}

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: var(--r-xl);
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-md);
  transition: var(--t); white-space: nowrap; line-height: 1;
}
.pill-btn:hover {
  background: var(--ink); color: #fff; border-color: var(--ink);
  transform: translateY(-1px);
}

.header-nav {
  display: flex; align-items: center; gap: 2px;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--ink-muted);
  padding: 6px 11px; border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--ink); background: var(--border); }
.nav-sep { color: var(--ink-faint); font-size: 12px; padding: 0 2px; }

/* ═══════════════════════════════════════════
   Hero
═══════════════════════════════════════════ */
.hero {
  display: flex; justify-content: center;
  padding: 80px 32px 64px;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 640px; width: 100%;
}

/* Status badge */
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border-md);
  font-size: 12px; font-weight: 500; color: var(--ink-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.5s var(--ease) both;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}

/* Avatar flip */
.avatar-wrap {
  width: 148px; height: 148px; margin-bottom: 32px;
  animation: fadeUp 0.6s var(--ease) both;
}
.avatar-ring {
  width: 100%; height: 100%; border-radius: 50%; perspective: 800px;
}
.avatar-flipper {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transform: rotateY(180deg);
  transition: transform 0.65s var(--ease);
}
.avatar-wrap:hover .avatar-flipper { transform: rotateY(0deg); }

.avatar-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 20px rgba(15,14,13,0.12);
}
.avatar-face img, .avatar-face video {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.avatar-face-back { transform: rotateY(180deg); }
.avatar-video { position: absolute; inset: 0; display: none; pointer-events: none; }

/* Hero text */
.hero-title {
  font-family: var(--font-d);
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.04; letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 18px;
  animation: fadeUp 0.7s 0.08s var(--ease) both;
}
.hero-title em { font-style: italic; color: var(--ink-muted); }

.hero-desc {
  font-size: clamp(16px, 2vw, 19px); font-weight: 300;
  color: var(--ink-muted); line-height: 1.7;
  max-width: 500px; margin-bottom: 36px;
  animation: fadeUp 0.7s 0.15s var(--ease) both;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--r-xl);
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; line-height: 1;
  transition: var(--t);
  animation: fadeUp 0.7s 0.22s var(--ease) both;
}
.hero-cta:hover {
  background: #1c1b1a; transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,14,13,0.18);
}
.hero-cta svg { transition: transform 0.25s; flex-shrink: 0; }
.hero-cta:hover svg { transform: translate(2px,-2px); }

/* ═══════════════════════════════════════════
   Projects Section
═══════════════════════════════════════════ */
.projects-section { padding-bottom: 16px; }

.section-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ═══════════════════════════════════════════
   Project Card
═══════════════════════════════════════════ */
.project-card {
  background: var(--card-bg, #111);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: row; align-items: stretch;
  min-height: 330px;
  transition: transform var(--t), box-shadow var(--t);
  box-shadow: 0 2px 10px rgba(15,14,13,0.07);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 42px rgba(15,14,13,0.15);
}
.project-card:hover .card-img img { transform: scale(1.04); transform-origin: bottom center; }

/* Coming soon muted state */
.project-card--soon {
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.project-card--soon::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.00) 100%);
  z-index: 1;
}
.soon-blur { filter: blur(7px); opacity: 0.25; user-select: none; }

/* Coming soon badge — replaces card-tag */
.soon-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  width: fit-content; margin-bottom: 14px;
  backdrop-filter: blur(6px);
}
.soon-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  animation: soonPulse 2s ease-in-out infinite;
}
@keyframes soonPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

/* Animated lock icon area */
.soon-visual {
  flex: 0 0 45%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  padding: 20px 14px;
  position: relative;
}
.soon-lock-wrap {
  width: 72px; height: 72px; border-radius: 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.soon-lock-icon {
  width: 30px; height: 30px; opacity: 0.5;
  stroke: rgba(255,255,255,0.8);
}
.soon-lines {
  display: flex; flex-direction: column; gap: 6px; width: 80px; margin-top: 8px;
}
.soon-line {
  height: 6px; border-radius: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}
.soon-line:nth-child(1) { width: 100%; }
.soon-line:nth-child(2) { width: 70%; }
.soon-line:nth-child(3) { width: 85%; }

/* Card body */
.card-body {
  display: flex; flex-direction: column;
  padding: 26px 22px; flex: 0 0 55%;
}

.card-tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.16); color: rgba(255,255,255,0.7);
  width: fit-content; margin-bottom: auto; margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-d);
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.1; letter-spacing: -0.01em;
  color: #fff; margin-bottom: 10px;
}

.card-desc {
  font-size: 13px; font-weight: 300; line-height: 1.6;
  color: rgba(255,255,255,0.68); margin-bottom: 18px; flex: 1;
}

.card-stores { display: flex; flex-direction: column; gap: 7px; }

.store-btn {
  display: inline-flex; align-items: center;
  transition: opacity 0.2s, transform 0.2s; width: fit-content;
}
.store-btn:hover { opacity: 0.82; transform: scale(1.04); }
.store-btn img { height: 33px; width: auto; }

/* Card image */
.card-img {
  flex: 0 0 45%;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; padding: 20px 12px 0;
  position: relative;
}
.card-img img {
  max-height: 290px; width: auto; max-width: 100%;
  object-fit: contain; border-radius: 12px 12px 0 0;
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.28));
  display: block;
  margin-bottom: -1px;
}

/* ═══════════════════════════════════════════
   GitHub Card
═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   GitHub Card
═══════════════════════════════════════════ */
.github-card {
  background: #111210; border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 48px 36px;
  min-height: 330px;
  transition: transform var(--t), box-shadow var(--t);
  box-shadow: 0 2px 10px rgba(15,14,13,0.07);
}
.github-card:hover { transform: translateY(-4px); box-shadow: 0 16px 42px rgba(15,14,13,0.18); }

.github-icon { width: 52px; height: 52px; margin-bottom: 16px; opacity: 0.9; }

.github-title {
  font-family: var(--font-d);
  font-size: 26px; color: #fff; letter-spacing: -0.01em; margin-bottom: 10px;
}

.github-desc {
  font-size: 14px; font-weight: 300;
  color: rgba(255,255,255,0.5); line-height: 1.6;
  max-width: 240px; margin-bottom: 24px;
}

.github-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 14px; font-weight: 500; color: #fff;
  transition: var(--t);
}
.github-link:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); }
.github-link svg { transition: transform 0.25s; }
.github-link:hover svg { transform: translate(2px,-2px); }

/* ═══════════════════════════════════════════
   YouTube Section
═══════════════════════════════════════════ */
.youtube-section { padding-bottom: 16px; }

.youtube-inner {
  display: flex; align-items: center; gap: 32px;
  padding: 44px 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t);
  width: 100%;
}
.youtube-inner:hover { box-shadow: 0 6px 24px rgba(15,14,13,0.08); }

.yt-logo-block {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.yt-icon-svg {
  width: 40px; height: 40px; flex-shrink: 0;
}
.yt-name {
  font-size: 17px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.02em;
}

.yt-sep {
  width: 1px; height: 40px;
  background: var(--border-md);
  flex-shrink: 0;
}

.yt-body { flex: 1; }
.yt-title {
  font-size: 14px; font-weight: 400; line-height: 1.6;
  color: var(--ink-muted);
  max-width: 440px; margin-bottom: 14px;
}

.yt-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r-xl);
  border: 1px solid var(--border-md);
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: transparent; transition: var(--t);
}
.yt-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-1px); }
.yt-btn svg { transition: transform 0.25s; }
.yt-btn:hover svg { transform: translate(2px,-2px); stroke: #fff; }

/* ═══════════════════════════════════════════
   Footer
═══════════════════════════════════════════ */
.footer { background: var(--ink); color: #fff; }

.footer-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 72px 32px 52px;
}

.footer-emoji { font-size: 54px; margin-bottom: 24px; display: block; line-height: 1; }

.footer-headline {
  font-family: var(--font-d);
  font-size: clamp(34px, 5.5vw, 68px);
  line-height: 1.06; letter-spacing: -0.02em;
  max-width: 680px; margin-bottom: 32px;
}
.footer-headline em { font-style: italic; color: rgba(255,255,255,0.4); }

.footer-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--r-xl);
  background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500; line-height: 1;
  transition: var(--t);
}
.footer-cta:hover { background: #e9e7e3; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.12); }
.footer-cta svg { transition: transform 0.25s; }
.footer-cta:hover svg { transform: translate(2px,-2px); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.38);
  flex-wrap: wrap; gap: 10px;
}
.footer-nav { display: flex; align-items: center; gap: 4px; }
.footer-nav a { color: rgba(255,255,255,0.45); padding: 4px 10px; border-radius: 6px; font-size: 13px; transition: color 0.2s; }
.footer-nav a:hover { color: #fff; }
.footer-nav span { color: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════
   Scroll Reveal
═══════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* Stagger children inside grid */
.projects-grid .reveal:nth-child(2n)   { transition-delay: 0.07s; }
.projects-grid .reveal:nth-child(3n)   { transition-delay: 0.12s; }
.projects-grid .reveal:nth-child(4n)   { transition-delay: 0.17s; }

/* ═══════════════════════════════════════════
   Keyframes
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════
   Responsive — Tablet (≤ 960px)
═══════════════════════════════════════════ */
@media (max-width: 960px) {
  .section-wrap { padding: 0 24px; }
  .header { padding: 12px 24px; }
  .hero { padding: 64px 24px 52px; }

  .projects-grid { gap: 12px; }
  .card-title { font-size: 22px; }

  .youtube-inner { gap: 28px; padding: 30px 32px; }
  .yt-title { font-size: 15px; }

  .footer-inner { padding: 60px 24px 44px; }
  .footer-bottom { padding: 20px 24px; }
}

/* ═══════════════════════════════════════════
   Responsive — Mobile (≤ 680px)
═══════════════════════════════════════════ */
@media (max-width: 680px) {
  .section-wrap { padding: 0 16px; }
  .header { padding: 10px 16px; gap: 10px; }
  .email-text { display: none; }
  .hero { padding: 48px 16px 40px; }

  /* Grid: single column */
  .projects-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Card: text on top, image below */
  .project-card {
    flex-direction: column;
    min-height: unset;
  }
  .card-body {
    flex: unset;
    padding: 20px 20px 18px;
    order: 1;
    align-items: center;
    text-align: center;
  }
  .card-img {
    flex: unset;
    order: 2;
    height: 220px;
    padding: 0 16px 0;
    justify-content: center;
    align-items: flex-end;
  }
  .card-img img {
    max-height: 210px;
    width: auto;
  }
  .card-tag { margin-bottom: 10px; }
  .card-title { font-size: 22px; }
  .card-desc { font-size: 13px; margin-bottom: 14px; }

  /* Coming soon mobile */
  .soon-visual {
    order: 2;
    height: 180px;
    flex: unset;
    width: 100%;
  }

  /* GitHub card */
  .github-card { padding: 40px 24px; min-height: 260px; }

  /* YouTube */
  .youtube-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 20px; }
  .yt-sep { display: none; }
  .yt-body { width: 100%; }
  .yt-title { max-width: 100%; margin-bottom: 14px; }
  .yt-btn { width: 100%; justify-content: center; }

  /* Store buttons centered on mobile */
  .card-stores { align-items: center; }

  /* Footer */
  .footer-inner { padding: 52px 16px 40px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 16px;
  }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
  .footer-headline { font-size: clamp(28px, 8vw, 44px); }
}

/* ═══════════════════════════════════════════
   Responsive — Small Mobile (≤ 420px)
═══════════════════════════════════════════ */
@media (max-width: 420px) {
  .hero-title { font-size: 36px; }
  .hero-desc { font-size: 15px; }
  .pill-btn { padding: 6px 12px; font-size: 12px; }
  .card-title { font-size: 20px; }
  .footer-headline { font-size: 28px; }
  .avatar-wrap { width: 120px; height: 120px; }
}