/* Visual layer: home hero, story chapters, project showcase. All classes prefixed v-. */

.v-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  padding: 4rem 2.75rem 2.5rem;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  isolation: isolate;
}
.v-aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.v-aurora i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: v-float 14s ease-in-out infinite;
}
.v-aurora i:nth-child(1) { width: 380px; height: 380px; background: rgba(0,208,132,.35); top: -140px; left: -80px; }
.v-aurora i:nth-child(2) { width: 340px; height: 340px; background: rgba(88,166,255,.30); bottom: -160px; right: 8%; animation-delay: -5s; }
.v-aurora i:nth-child(3) { width: 260px; height: 260px; background: rgba(167,139,250,.28); top: 10%; right: -60px; animation-delay: -9s; }
@keyframes v-float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-24px); } }

.v-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.v-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem;
  border: 1px solid var(--accent-border); border-radius: 999px; background: var(--accent-glow);
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: var(--accent); margin-bottom: 1.25rem;
}
.v-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.v-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 900; letter-spacing: -.045em; line-height: .98; margin-bottom: 1.1rem;
}
.v-grad {
  background: linear-gradient(120deg, var(--accent), var(--blue) 55%, var(--purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.v-hero-copy { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-sub); max-width: 620px; line-height: 1.7; }
.v-hero .hero-actions { margin-top: 1.75rem; }

.v-photo { position: relative; width: 210px; height: 210px; flex: none; }
.v-photo::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--blue), var(--purple), var(--accent));
  animation: v-spin 10s linear infinite; filter: blur(1px);
}
.v-photo img {
  position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 5px solid var(--bg); display: block;
}
@keyframes v-spin { to { transform: rotate(360deg); } }

.v-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 2.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--border);
}
.v-stats div { padding: 1rem 1.1rem; background: var(--bg-elevated); text-align: center; }
.v-stats b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.v-stats span { font-size: .7rem; color: var(--text-sub); text-transform: uppercase; letter-spacing: .08em; }

/* Section teasers on home */
.v-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 4rem 0 1.25rem; }
.v-section-head h2 { margin: 0; }
.v-more { font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.v-more:hover { text-decoration: underline; }

.v-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.v-tile {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 1.2rem; min-height: 170px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%), var(--bg-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.v-tile:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 22%, transparent); }
.v-tile small { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.v-tile strong { font-size: 1.08rem; line-height: 1.3; }
.v-tile em { margin-top: auto; font-style: normal; font-size: .78rem; color: var(--text-sub); }

/* Pages */
.v-page-hero { text-align: center; padding: 2.5rem 1rem 1rem; }
.v-page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.04em; margin-bottom: .6rem; }
.v-page-hero p { color: var(--text-sub); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.v-chapter { --c: var(--accent); margin: 3.5rem 0 0; }
.v-chapter-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.v-chapter-head .v-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 18px var(--c); flex: none; }
.v-chapter-head h2 { margin: 0; font-size: 1.5rem; }
.v-chapter-head span { margin-left: auto; font-family: var(--font-mono); font-size: .75rem; color: var(--text-sub); }
.v-chapter-head::after { content: none; }

.v-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.v-card {
  --c: var(--accent);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .9rem; padding: 1.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 55%), var(--bg-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.v-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent); }
.v-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 40px color-mix(in srgb, var(--c) 20%, transparent); }
.v-card .v-ico { font-size: 1.9rem; line-height: 1; }
.v-card h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
.v-card p { color: var(--text-sub); line-height: 1.6; font-size: .95rem; }
.v-card .v-kicker { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }

.v-metrics { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.v-metric { padding: .5rem .8rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.v-metric b { display: block; font-size: 1.05rem; color: var(--c); line-height: 1.2; }
.v-metric span { font-size: .68rem; color: var(--text-sub); text-transform: uppercase; letter-spacing: .06em; }

.v-pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; list-style: none; padding: 0; }
.v-pillars li { display: flex; gap: .55rem; align-items: center; font-size: .85rem; padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--soft-bg); }
.v-pillars li span { font-size: 1.05rem; }

.v-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.v-chips span { font-family: var(--font-mono); font-size: .68rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--border-hover); color: var(--text-sub); }

.v-card.wide { grid-column: 1 / -1; }

/* Project showcase */
.v-proj { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.v-proj .v-card { min-height: 300px; text-decoration: none; color: var(--text); }
.v-proj .v-card h3 a { color: inherit; text-decoration: none; }
.v-proj .v-card h3 a::after { content: ''; position: absolute; inset: 0; }
.v-go { margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--c); }
.v-glyph {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; font-size: 1.6rem;
  background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}

@media (max-width: 860px) {
  .v-hero { padding: 2.5rem 1.4rem 1.5rem; }
  .v-hero-grid { grid-template-columns: 1fr; }
  .v-photo { order: -1; width: 150px; height: 150px; }
  .v-stats { grid-template-columns: repeat(2, 1fr); }
  .v-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .v-tiles, .v-pillars { grid-template-columns: 1fr; }
  .v-cards, .v-proj { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .v-aurora i, .v-photo::before { animation: none; }
}

/* Refinements */
.v-chapter-head h2::after, .v-chapter-head h2::before { content: none; display: none; }
.v-chapter-head h2 { border: 0; padding: 0; }
.story-toc { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 1.5rem 0 0; }
.story-toc a {
  padding: .45rem 1.1rem; border: 1px solid var(--border-hover); border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none; background: var(--bg-card);
  transition: border-color var(--transition), color var(--transition);
}
.story-toc a:hover { border-color: var(--accent); color: var(--accent); }
.v-pillars { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.v-pillars li { align-items: flex-start; }
