:root {
  --bg-obsidian: #050505;
  --bg-elevated: rgba(14, 14, 15, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.24);
  --text-primary: #f4f2ee;
  --text-secondary: #a8a49e;
  --text-muted: #6f6c67;
  --accent: #e5833e;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html,
body {
  height: 100%;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #050505;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* =========================================================
   PAGE SHELL — SINGLE SCREEN EDITORIAL PROPORTIONS
   ========================================================= */
.page-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg-obsidian);
}

/* =========================================================
   HERO SECTION (DYNAMIC SHADER BACKDROP)
   ========================================================= */
.hero {
  position: relative;
  flex: 1 1 67svh;
  min-height: 430px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #241006;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Subtle architectural grain texture */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Soft bottom transition into the obsidian band */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5, 5, 5, 0.14) 0%, transparent 22%, transparent 78%, rgba(5, 5, 5, 0.34) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(10px, 2vw, 26px) clamp(16px, 3vw, 40px) clamp(32px, 5vh, 56px);
}

/* Giant Editorial Title */
.hero-title {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: clamp(0.18em, 2.2vw, 0.28em);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: rgba(255, 253, 249, 0.96);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  user-select: none;
  white-space: nowrap;
}

.title-sans {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  font-size: clamp(3.3rem, 13.6vw, 13rem);
  letter-spacing: -0.055em;
}

.title-serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.7rem, 15.2vw, 14.5rem);
  letter-spacing: -0.025em;
  padding-right: 0.04em;
}

/* Centered Minimal 3-Line Role Stack */
.hero-roles {
  margin: auto 0;
  padding-top: clamp(18px, 3vh, 36px);
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(5px, 0.9vh, 10px);
  text-align: center;
}

.role-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-size: clamp(0.95rem, 1.45vw, 1.32rem);
  line-height: 1.3;
  color: rgba(255, 252, 247, 0.95);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s var(--ease-out-expo), opacity 0.35s ease;
}

.role-item:hover {
  transform: translateY(-1px);
}

.role-num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 300;
  font-size: 0.72em;
  letter-spacing: 0.02em;
  color: rgba(255, 252, 247, 0.72);
}

.role-label {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Discreet Mood Switcher in Hero Bottom-Right */
.mood-bar {
  position: absolute;
  right: clamp(14px, 2.2vw, 28px);
  bottom: clamp(12px, 1.8vh, 20px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mood-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.mood-dot[data-mood="0"] {
  background: #df7734;
}

.mood-dot[data-mood="1"] {
  background: #7d8b99;
}

.mood-dot[data-mood="2"] {
  background: #355e47;
}

.mood-dot:hover {
  transform: scale(1.25);
}

.mood-dot.is-active {
  transform: scale(1.22);
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.mood-auto {
  margin-left: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.mood-auto.is-on {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   LOWER OBSIDIAN SECTION
   ========================================================= */
.lower-band {
  position: relative;
  flex: 0 0 auto;
  min-height: 33svh;
  background: var(--bg-obsidian);
  padding: clamp(16px, 2.4vh, 26px) clamp(20px, 3.6vw, 48px) clamp(18px, 2.4vh, 26px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(18px, 2.8vh, 28px);
}

/* Right Edge Navigation (Matches screenshot) */
.edge-nav {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.edge-link {
  position: relative;
  font-size: clamp(0.82rem, 0.95vw, 0.94rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(244, 242, 238, 0.88);
  padding: 4px 0;
  transition: color 0.3s ease, transform 0.35s var(--ease-out-expo);
}

.edge-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.38s var(--ease-out-expo);
}

.edge-link:hover {
  color: #ffffff;
}

.edge-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Centered Bio + Say Hi! */
.intro-block {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2vh, 22px);
}

.intro-text {
  font-size: clamp(0.84rem, 1.02vw, 0.96rem);
  line-height: 1.68;
  font-weight: 300;
  color: rgba(244, 242, 238, 0.84);
  letter-spacing: -0.005em;
}

.say-hi-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: clamp(0.8rem, 0.92vw, 0.88rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    color 0.35s ease,
    transform 0.35s var(--ease-out-expo),
    box-shadow 0.35s ease;
}

.say-hi-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px -10px var(--accent);
}

/* Subtle Profile Links Row */
.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-links a {
  position: relative;
  padding: 2px 0;
  transition: color 0.25s ease;
}

.profile-links a:hover {
  color: var(--text-primary);
}

.link-sep {
  opacity: 0.35;
}

/* =========================================================
   ENTRANCE ANIMATIONS
   ========================================================= */
.reveal-text,
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUpReveal 0.95s var(--ease-out-expo) var(--delay, 0s) forwards;
}

@keyframes fadeUpReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   SMOOTH OVERLAY DRAWERS / MODALS
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s var(--ease-smooth);
}

.overlay[hidden] {
  display: none;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 4, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.overlay-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 88svh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: clamp(22px, 3.6vw, 40px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65);
  transform: translateY(24px) scale(0.985);
  transition: transform 0.45s var(--ease-out-expo), border-color 0.35s ease;
}

.overlay-panel--compact {
  width: min(680px, 100%);
}

.overlay.is-open .overlay-panel {
  transform: translateY(0) scale(1);
}

.overlay-panel::-webkit-scrollbar {
  width: 6px;
}

.overlay-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.overlay-kicker {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  transition: color 0.5s ease;
}

.overlay-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.overlay-title em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
}

.overlay-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.overlay-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.close-key {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  opacity: 0.6;
}

.overlay-subtitle {
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Expertise Rows */
.expertise-list {
  display: flex;
  flex-direction: column;
}

.expertise-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.25s ease, padding-left 0.35s var(--ease-out-expo);
}

.expertise-row:last-child {
  border-bottom: none;
}

.expertise-row:hover {
  background: rgba(255, 255, 255, 0.025);
  padding-left: 14px;
}

.exp-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
  transition: color 0.5s ease;
}

.exp-body h3 {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.exp-body p {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Contact Overlay */
.contact-email-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.contact-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-email-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.25s ease;
}

.contact-email-link:hover {
  color: var(--accent);
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.copy-btn,
.mail-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.copy-btn:hover,
.mail-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.25s ease, background 0.25s ease;
}

.social-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.045);
}

.social-name {
  font-size: 0.92rem;
  font-weight: 500;
}

.social-handle {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-secondary);
}

/* =========================================================
   RESPONSIVE & REDUCED MOTION
   ========================================================= */
@media (max-width: 820px) {
  .social-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex: 1 1 60svh;
    min-height: 380px;
  }
}

@media (max-width: 520px) {
  .hero-title {
    gap: 0.18em;
  }

  .mood-bar {
    right: 50%;
    transform: translateX(50%);
  }

  .expertise-row {
    grid-template-columns: 38px 1fr;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-text,
  .reveal-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
