/* ═══════════════════════════════════════════════════════════════
   LOKSUNDAR.COM — WARM PAPER BENTO DESIGN SYSTEM
   Palette A · Editorial · Interactive
═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --paper:    #f7f3ec;
  --paper-2:  #efe9de;
  --paper-3:  #e6ddcc;
  --card:     #fefcf7;
  --card-2:   #faf6ed;

  --ink:      #1a1612;
  --ink-2:    #3d3530;
  --ink-3:    #6b5f55;
  --ink-4:    #9a8d81;

  --coral:      #ff5a3c;
  --coral-2:    #e84826;
  --coral-soft: rgba(255, 90, 60, 0.12);
  --coral-line: rgba(255, 90, 60, 0.28);

  --sage:       #7a9477;
  --sage-soft:  rgba(122, 148, 119, 0.14);
  --sage-line:  rgba(122, 148, 119, 0.32);

  --gold:       #d4a574;
  --gold-soft:  rgba(212, 165, 116, 0.18);

  --ocean:      #3d6b8a;
  --ocean-soft: rgba(61, 107, 138, 0.12);

  --border:    rgba(26, 22, 18, 0.09);
  --border-2:  rgba(26, 22, 18, 0.16);
  --shadow-xs: 0 1px 2px rgba(80, 50, 30, 0.05);
  --shadow-sm: 0 2px 6px rgba(80, 50, 30, 0.06), 0 1px 2px rgba(80, 50, 30, 0.04);
  --shadow-md: 0 8px 24px rgba(80, 50, 30, 0.08), 0 2px 6px rgba(80, 50, 30, 0.05);
  --shadow-lg: 0 16px 48px rgba(80, 50, 30, 0.14), 0 4px 12px rgba(80, 50, 30, 0.08);
  --shadow-coral: 0 8px 24px rgba(255, 90, 60, 0.25);

  --r-sm:  10px;
  --r:     18px;
  --r-lg:  28px;
  --r-xl:  36px;

  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-display: 'Fraunces', Georgia, serif;
  --f-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce:cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:     180ms;
  --t-med:      320ms;
  --t-slow:     600ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { border: none; cursor: pointer; font: inherit; color: inherit; background: none; }
img, svg { display: block; max-width: 100%; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--coral); color: #fff; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.25  0 0 0 0 0.15  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}
main { position: relative; z-index: 2; }

/* ─── TYPOGRAPHY ─── */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.mono { font-family: var(--f-mono); font-feature-settings: 'ss01','cv11'; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all var(--t-med) var(--ease);
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(247, 243, 236, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1320px; margin: 0 auto;
  padding: 0 28px;
}
.nav-logo {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.nav-logo::before {
  content: '';
  width: 10px; height: 10px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--coral-soft);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--coral-soft); }
  50%      { box-shadow: 0 0 0 7px rgba(255,90,60,0.02); }
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: all var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.active { color: var(--ink); background: var(--card); box-shadow: var(--shadow-sm); }
.nav-links a.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 9px 18px;
  margin-left: 8px;
}
.nav-links a.nav-cta:hover { background: var(--coral); transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.nav-hamburger span {
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--t-fast);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; top: 64px; left: 20px; right: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--t-med) var(--ease);
  z-index: 99;
  display: flex; flex-direction: column; gap: 4px;
}
.nav-mobile.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-mobile a { padding: 12px 16px; font-weight: 500; color: var(--ink-2); border-radius: 10px; }
.nav-mobile a.active { background: var(--paper-2); color: var(--ink); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--coral); transform: translateY(-2px); box-shadow: var(--shadow-coral); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 6px 16px rgba(255,90,60,0.25); }
.btn-coral:hover { background: var(--coral-2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,90,60,0.35); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }

.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.btn-icon:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px) rotate(-4deg); }

/* ═══ BENTO GRID — HOME ═══ */
.bento-shell { padding: 90px 0 60px; }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 16px;
}

.tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  overflow: hidden;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  box-shadow: var(--shadow-sm);
  will-change: transform;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.tile-clickable { cursor: pointer; }
.tile-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
}
.tile-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

.t-hero    { grid-column: span 3; grid-row: span 2; }
.t-now     { grid-column: span 2; grid-row: span 1; }
.t-clock   { grid-column: span 1; grid-row: span 1; }
.t-stats   { grid-column: span 3; grid-row: span 1; }
.t-graph   { grid-column: span 3; grid-row: span 2; }
.t-feat    { grid-column: span 3; grid-row: span 2; }
.t-skills  { grid-column: span 2; grid-row: span 2; }
.t-chat    { grid-column: span 2; grid-row: span 1; }
.t-certs   { grid-column: span 2; grid-row: span 1; }
.t-pub     { grid-column: span 2; grid-row: span 2; }
.t-contact { grid-column: span 4; grid-row: span 1; }

/* HERO TILE */
.t-hero {
  background: linear-gradient(135deg, #1a1612 0%, #2a2119 100%);
  color: var(--paper);
  padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 360px;
}
.t-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 30%), rgba(255,90,60,0.28), transparent 50%);
  opacity: 0; transition: opacity var(--t-med);
  pointer-events: none;
}
.t-hero:hover::before { opacity: 1; }
.hero-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 14px;
  border-radius: 999px;
  width: fit-content;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-status-dot {
  width: 8px; height: 8px;
  background: #8ce88c;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(140,232,140,0.5);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(140,232,140,0.5); }
  70%,100% { box-shadow: 0 0 0 10px rgba(140,232,140,0); }
}
.hero-name {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 18px 0 8px;
}
.hero-name em { font-style: italic; color: var(--coral); font-weight: 400; }
.hero-typed {
  font-family: var(--f-mono);
  font-size: 0.95rem;
  color: rgba(247,243,236,0.7);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.hero-typed-cursor {
  display: inline-block; width: 9px; height: 1.1em;
  background: var(--coral);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 28px;
  position: relative; z-index: 2;
}
.hero-actions .btn-primary { background: var(--paper); color: var(--ink); }
.hero-actions .btn-primary:hover { background: var(--coral); color: #fff; }
.hero-actions .btn-ghost { background: rgba(255,255,255,0.06); color: var(--paper); border-color: rgba(255,255,255,0.14); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* NOW TILE */
.t-now {
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #fefcf7, #f5ebd9);
}
.now-role {
  font-family: var(--f-display);
  font-size: 1.8rem;
  line-height: 1.05;
  margin-top: 4px;
  letter-spacing: -0.02em;
}
.now-company { margin-top: 8px; color: var(--ink-2); font-size: 0.9rem; }
.now-footer {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--sage);
  margin-top: 14px;
}
.now-footer::before {
  content: ''; width: 7px; height: 7px;
  background: var(--sage);
  border-radius: 50%;
  animation: pulse-dot 2s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* CLOCK TILE */
.t-clock {
  background: var(--ink);
  color: var(--paper);
  padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.t-clock .tile-label::before { background: var(--coral); }
.t-clock .tile-label { color: rgba(247,243,236,0.55); }
.clock-time {
  font-family: var(--f-mono);
  font-size: 1.85rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
  line-height: 1;
  margin-top: auto;
}
.clock-city { font-size: 0.78rem; color: rgba(247,243,236,0.55); font-family: var(--f-mono); margin-top: 6px; }

/* STATS TILE */
.t-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 22px 24px;
  background: var(--card-2);
}
.stat-cell { padding: 10px 6px; display: flex; flex-direction: column; border-left: 1px solid var(--border); color: inherit; text-decoration: none; }
a.stat-cell:hover { opacity: 0.75; }
.stat-cell:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: var(--f-display);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-num em { color: var(--coral); font-style: italic; }
.stat-lbl { font-size: 0.72rem; color: var(--ink-3); margin-top: 6px; line-height: 1.35; }

/* GRAPH MINI TILE */
.t-graph {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--card) 0%, #f5efe3 100%);
  position: relative;
  display: flex; flex-direction: column;
}
.graph-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 6px; }
.graph-title { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }
.graph-sub { color: var(--ink-3); font-size: 0.82rem; margin-top: 4px; }
.graph-canvas-wrap { flex: 1; min-height: 280px; position: relative; }
#graph-mini-svg { width: 100%; height: 100%; display: block; }
.graph-cta {
  position: absolute;
  bottom: 16px; right: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  transform: translateY(6px);
  pointer-events: none;
}
.t-graph:hover .graph-cta { opacity: 1; transform: translateY(0); pointer-events: auto; }

.node circle {
  stroke: var(--paper);
  stroke-width: 2px;
  cursor: grab;
  transition: all var(--t-fast) var(--ease);
}
.node:hover circle { stroke-width: 3px; filter: brightness(1.08); }
.node text { font-family: var(--f-mono); font-size: 10px; fill: var(--ink-2); pointer-events: none; user-select: none; }
.link { stroke: var(--ink-4); stroke-opacity: 0.3; stroke-width: 1.2; }

/* FEATURED PROJECT TILE */
.t-feat {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2e4e56 0%, #1a3a44 100%);
  color: var(--paper);
  display: flex; flex-direction: column;
  min-height: 320px;
  cursor: pointer;
}
.feat-mesh {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,90,60,0.3), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(122,148,119,0.4), transparent 55%);
  pointer-events: none;
}
.feat-body { position: relative; z-index: 2; padding: 32px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.feat-tag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.6);
  display: flex; align-items: center; gap: 8px;
}
.feat-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8ce88c; box-shadow: 0 0 8px #8ce88c; }
.feat-title {
  font-family: var(--f-display);
  font-size: 2.2rem;
  line-height: 1.05;
  margin-top: 10px;
  letter-spacing: -0.02em;
}
.feat-desc { color: rgba(247,243,236,0.75); font-size: 0.92rem; margin-top: 14px; max-width: 40ch; line-height: 1.55; }
.feat-meta { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.72rem; color: rgba(247,243,236,0.55); margin-top: 20px; }
.feat-meta span::before { content: '◆ '; color: var(--coral); }
.feat-launch {
  position: absolute;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  background: var(--coral);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-med) var(--ease-bounce);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(255,90,60,0.4);
}
.t-feat:hover .feat-launch { transform: scale(1.12) rotate(-12deg); box-shadow: 0 12px 32px rgba(255,90,60,0.55); }
.feat-launch svg { width: 22px; height: 22px; color: #fff; }

/* SKILLS TILE */
.t-skills { display: flex; flex-direction: column; background: var(--card); }
.skills-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.skills-title { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.2; }
.skills-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.skills-chip {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  cursor: default;
}
.skills-chip:hover { background: var(--coral-soft); border-color: var(--coral-line); color: var(--coral-2); transform: translateY(-2px); }
.skills-chip.sage:hover { background: var(--sage-soft); border-color: var(--sage-line); color: var(--sage); }
.skills-chip.ocean:hover { background: var(--ocean-soft); border-color: var(--ocean); color: var(--ocean); }
.skills-chip.gold:hover { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }

#skills-radar { flex: 1; min-height: 180px; margin: 10px 0 6px; }

/* CHAT CTA TILE */
.t-chat {
  background: linear-gradient(135deg, var(--coral) 0%, #ff8b61 100%);
  color: #fff;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.t-chat .tile-label { color: rgba(255,255,255,0.7); }
.t-chat .tile-label::before { background: #fff; }
.chat-tile-body { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.chat-tile-avatar {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.22);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.chat-tile-avatar svg { width: 22px; height: 22px; color: #fff; }
.chat-tile-text { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.15; letter-spacing: -0.01em; }
.chat-tile-sample {
  margin-top: auto;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 12px 12px 12px 4px;
  font-size: 0.83rem;
  font-family: var(--f-mono);
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 2.5em;
}
.chat-tile-sample::after {
  content: '▎';
  color: #fff;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* CERTS TEASER TILE */
.t-certs { display: flex; flex-direction: column; background: var(--card); padding: 20px 22px; }
.certs-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cert-badge-mini {
  flex: 1;
  min-width: 72px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  transition: all var(--t-fast);
}
.cert-badge-mini:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: var(--shadow-sm); }
.cert-badge-count { font-family: var(--f-display); font-size: 1.5rem; color: var(--coral); }
.cert-badge-issuer { font-family: var(--f-mono); font-size: 0.66rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.certs-link {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.certs-link:hover { color: var(--coral); }

/* PUB FLIP TILE */
.t-pub {
  perspective: 1000px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  overflow: visible;
}
.pub-flipper {
  position: relative;
  width: 100%; height: 100%;
  min-height: 296px;
  transition: transform 0.7s var(--ease);
  transform-style: preserve-3d;
  cursor: pointer;
}
.t-pub:hover { transform: none; box-shadow: none; border-color: transparent; }
.t-pub:hover .pub-flipper, .t-pub.flipped .pub-flipper { transform: rotateY(180deg); }
.pub-face {
  position: absolute; inset: 0;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--border);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.pub-back { transform: rotateY(180deg); background: var(--ink); color: var(--paper); }
.pub-back .tile-label { color: rgba(247,243,236,0.55); }
.pub-count { font-family: var(--f-display); font-size: 2.8rem; color: var(--coral); line-height: 1; margin-top: 6px; }
.pub-count em { font-style: italic; }
.pub-heading { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.2; margin-top: 12px; letter-spacing: -0.01em; }
.pub-face p { font-size: 0.85rem; line-height: 1.55; color: var(--ink-2); margin-top: 10px; }
.pub-back p { color: rgba(247,243,236,0.75); font-size: 0.84rem; line-height: 1.55; }
.pub-flip-hint {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* CONTACT TILE */
.t-contact { background: var(--paper-3); display: flex; flex-direction: column; justify-content: space-between; }
.contact-tile-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-top: 8px; }
.contact-tile-h { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.02em; }
.contact-tile-h em { font-style: italic; color: var(--coral); }
.contact-tile-email {
  font-family: var(--f-mono);
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 10px;
}
.contact-copy-btn {
  padding: 4px 10px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  transition: all var(--t-fast);
}
.contact-copy-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact-copy-btn.copied { background: var(--sage); color: #fff; border-color: var(--sage); }

.contact-socials-row { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-socials-row a {
  width: 44px; height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease-bounce);
}
.contact-socials-row a:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px) scale(1.05); }
.contact-socials-row a svg { width: 18px; height: 18px; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero { padding: 120px 0 30px; position: relative; }
.page-hero-body { max-width: 780px; }
.page-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-top: 14px;
}
.page-hero h1 em { font-style: italic; color: var(--coral); }
.page-hero p { color: var(--ink-2); font-size: 1.05rem; margin-top: 16px; max-width: 60ch; line-height: 1.6; }

/* ─── ABOUT ─── */
.about-canvas { padding: 40px 0 80px; }

.about-intro {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 56px;
  box-shadow: var(--shadow-sm);
}
.about-avatar {
  width: 220px; height: 220px;
  background: linear-gradient(135deg, var(--coral) 0%, #ff8b61 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--f-display);
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.about-avatar::after {
  content: '';
  position: absolute; inset: 10px;
  border: 1.5px dashed rgba(255,255,255,0.35);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about-intro-text h2 { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 16px; }
.about-intro-text p { color: var(--ink-2); margin-bottom: 14px; line-height: 1.7; font-size: 0.98rem; }
.about-intro-text strong { color: var(--ink); font-weight: 600; }

.about-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-chip {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  padding: 7px 13px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
}
.quick-chip::before { content: ''; width: 6px; height: 6px; background: var(--coral); border-radius: 50%; }

.sec-head {
  margin: 48px 0 28px;
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.sec-head h2 { font-family: var(--f-display); font-size: 2rem; letter-spacing: -0.02em; font-weight: 400; }
.sec-head h2 em { font-style: italic; color: var(--coral); }
.sec-head-meta { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.14em; }

.tl {
  display: flex; flex-direction: column; gap: 2px;
  border-left: 2px solid var(--border);
  padding-left: 0;
  position: relative;
}
.tl-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 22px 22px 22px 28px;
  position: relative;
  border-radius: var(--r);
  transition: background var(--t-fast);
}
.tl-row:hover { background: var(--card); }
.tl-row::before {
  content: '';
  position: absolute;
  left: -7px; top: 30px;
  width: 12px; height: 12px;
  background: var(--paper);
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  transition: all var(--t-fast);
}
.tl-row:hover::before { background: var(--coral); border-color: var(--coral); transform: scale(1.15); }
.tl-date { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; padding-top: 4px; }
.tl-role { font-family: var(--f-display); font-size: 1.4rem; letter-spacing: -0.01em; line-height: 1.2; }
.tl-company { font-size: 0.9rem; color: var(--ink-2); margin-top: 4px; font-weight: 500; }
.tl-desc { color: var(--ink-2); font-size: 0.92rem; line-height: 1.65; margin-top: 10px; }

/* Skills grid (about) */
.skills-full { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 24px; }
.skills-block {
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.skills-block-h {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.skills-block-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── CERT TROPHY WALL ─── */
.trophy-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.trophy {
  position: relative;
  padding: 26px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all var(--t-med) var(--ease);
  display: flex; flex-direction: column; min-height: 230px;
  overflow: hidden;
}
.trophy::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--coral-soft) 100%);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}
.trophy:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: var(--shadow-lg); border-color: var(--coral-line); }
.trophy:hover::before { opacity: 1; }
.trophy.sage:hover { border-color: var(--sage-line); }
.trophy.sage::before { background: linear-gradient(135deg, transparent 50%, var(--sage-soft) 100%); }
.trophy.gold:hover { border-color: var(--gold); }
.trophy.gold::before { background: linear-gradient(135deg, transparent 50%, var(--gold-soft) 100%); }

.trophy-issuer {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--coral);
  margin-bottom: 16px;
}
.trophy.sage .trophy-issuer { color: var(--sage); }
.trophy.gold .trophy-issuer { color: #b8853f; }
.trophy.ocean .trophy-issuer { color: var(--ocean); }

.trophy-medal {
  position: absolute;
  top: 20px; right: 20px;
  width: 38px; height: 38px;
  background: var(--coral);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255,90,60,0.3);
  transition: transform var(--t-med) var(--ease-bounce);
}
.trophy.sage .trophy-medal { background: var(--sage); box-shadow: 0 4px 12px rgba(122,148,119,0.3); }
.trophy.gold .trophy-medal { background: var(--gold); box-shadow: 0 4px 12px rgba(212,165,116,0.4); color: #5a3e1a; }
.trophy.ocean .trophy-medal { background: var(--ocean); box-shadow: 0 4px 12px rgba(61,107,138,0.3); }
.trophy:hover .trophy-medal { transform: rotate(-15deg) scale(1.08); }

.trophy-title { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.01em; margin-top: 4px; padding-right: 48px; }
.trophy-focus { font-size: 0.82rem; color: var(--ink-2); margin-top: 10px; line-height: 1.55; flex: 1; }
.trophy-verify {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  transition: color var(--t-fast);
}
.trophy:hover .trophy-verify { color: var(--ink); }

/* ─── PUBLICATIONS (about) ─── */
.pubs-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.pub-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all var(--t-med) var(--ease);
}
.pub-row:hover { transform: translateX(6px); border-color: var(--coral-line); box-shadow: var(--shadow-md); }
.pub-row-num { font-family: var(--f-display); font-size: 2.6rem; color: var(--coral); line-height: 1; font-style: italic; }
.pub-row-body h3 { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.pub-row-body p { color: var(--ink-2); font-size: 0.88rem; line-height: 1.6; margin-top: 10px; }
.pub-row-meta { font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-3); margin-top: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.pub-row-cta { align-self: center; }

/* ─── PROJECTS GRAPH PAGE ─── */
.graph-stage { padding: 20px 0 40px; }
.graph-canvas {
  position: relative;
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 520px;
  background: linear-gradient(180deg, var(--card) 0%, var(--paper-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
#graph-full { width: 100%; height: 100%; display: block; }

.graph-legend {
  position: absolute;
  top: 20px; left: 20px;
  background: rgba(254, 252, 247, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  z-index: 2;
  max-width: 240px;
}
.graph-legend-title { font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: 10px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 0.83rem; margin-bottom: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-2); line-height: 1.5; }

.graph-panel {
  position: absolute;
  top: 20px; right: 20px; bottom: 20px;
  width: 360px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transform: translateX(calc(100% + 30px));
  transition: transform var(--t-med) var(--ease);
  z-index: 3;
}
.graph-panel.open { transform: translateX(0); }
.graph-panel-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.graph-panel-close:hover { background: var(--ink); color: var(--paper); }
.graph-panel-kind { font-family: var(--f-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--coral); margin-bottom: 10px; }
.graph-panel h3 { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 14px; }
.graph-panel p { color: var(--ink-2); font-size: 0.92rem; line-height: 1.65; margin-bottom: 14px; }
.graph-panel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.graph-panel-tags span { font-family: var(--f-mono); font-size: 0.72rem; padding: 4px 10px; background: var(--paper-2); border-radius: 6px; color: var(--ink-2); }

.graph-controls { position: absolute; bottom: 20px; left: 20px; display: flex; gap: 8px; z-index: 2; }
.graph-ctrl-btn {
  padding: 8px 14px;
  background: rgba(254, 252, 247, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  transition: all var(--t-fast);
}
.graph-ctrl-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.graph-ctrl-btn.active { background: var(--coral); color: #fff; border-color: var(--coral); }

/* ─── LAB ─── */
.lab-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 20px 0 80px; }
.lab-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-med) var(--ease);
  box-shadow: var(--shadow-sm);
}
.lab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.lab-xl { grid-column: span 4; grid-row: span 2; min-height: 360px; }
.lab-lg { grid-column: span 3; min-height: 260px; }
.lab-md { grid-column: span 2; min-height: 220px; }
.lab-sm { grid-column: span 2; min-height: 180px; }

.lab-label { font-family: var(--f-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-3); margin-bottom: 10px; }
.lab-title { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }
.lab-desc { color: var(--ink-2); font-size: 0.88rem; margin-top: 8px; line-height: 1.55; }

.markov-output {
  margin-top: 18px;
  padding: 18px;
  background: var(--paper-2);
  border-radius: var(--r);
  font-family: var(--f-mono);
  font-size: 1.05rem;
  color: var(--ink);
  min-height: 62px;
  line-height: 1.5;
  border: 1px dashed var(--border-2);
}
.markov-output .ghost { color: var(--ink-4); }
.markov-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.sentiment-wrap textarea {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--paper-2);
  font-family: var(--f-mono);
  font-size: 0.88rem;
  margin-top: 14px;
  resize: vertical;
}
.sentiment-wrap textarea:focus { outline: none; border-color: var(--coral); }
.sentiment-meter {
  position: relative;
  height: 10px;
  background: var(--paper-2);
  border-radius: 999px;
  margin-top: 14px;
  overflow: hidden;
}
.sentiment-bar {
  position: absolute; top: 0; bottom: 0; left: 50%;
  background: var(--sage);
  border-radius: 999px;
  transition: all var(--t-med) var(--ease);
  transform-origin: left;
  width: 0;
}
.sentiment-bar.neg { left: auto; right: 50%; background: var(--coral); transform-origin: right; }
.sentiment-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-3); margin-top: 8px; }
.sentiment-verdict { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-2); margin-top: 10px; }
.sentiment-verdict strong { color: var(--coral); }

.mini-term {
  margin-top: 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  padding: 18px;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
}
.mini-term-prompt { color: var(--sage); }
.mini-term-cmd { color: var(--coral); }
.mini-term-line { white-space: pre-wrap; }
.mini-term-form { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.mini-term-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
  font: inherit;
  flex: 1;
  caret-color: var(--coral);
}
.mini-term-suggestions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mini-term-suggestions button {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  padding: 4px 9px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  color: var(--ink-2);
  border-radius: 6px;
  cursor: pointer;
}
.mini-term-suggestions button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cruncher { margin-top: 18px; display: grid; gap: 12px; }
.cruncher input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--paper-2);
  font-family: var(--f-mono);
  font-size: 0.88rem;
}
.cruncher input:focus { outline: none; border-color: var(--coral); }
.cruncher-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cruncher-stat { padding: 10px 12px; background: var(--paper-2); border-radius: var(--r); text-align: center; }
.cruncher-stat-val { font-family: var(--f-display); font-size: 1.3rem; color: var(--ink); font-feature-settings: 'tnum'; }
.cruncher-stat-lbl { font-family: var(--f-mono); font-size: 0.66rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }

.dice-display {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.dice {
  width: 56px; height: 56px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 1.7rem;
  color: var(--ink);
  transition: transform var(--t-med) var(--ease-bounce);
}
.dice.rolling { animation: dice-roll 0.6s var(--ease) infinite; }
@keyframes dice-roll {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(360deg); }
}
.dice-total { font-family: var(--f-display); font-size: 2rem; color: var(--coral); margin-left: auto; }

/* ─── CONTACT ─── */
.contact-grid-big { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; padding: 20px 0 80px; }
.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-card-big { background: var(--ink); color: var(--paper); }
.contact-card-big h2 { font-family: var(--f-display); font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; }
.contact-card-big h2 em { font-style: italic; color: var(--coral); }
.contact-card-big p { color: rgba(247,243,236,0.7); margin-top: 14px; font-size: 0.95rem; line-height: 1.6; }
.contact-info-list { display: flex; flex-direction: column; gap: 14px; }
.contact-info-row { display: flex; align-items: center; gap: 14px; }
.contact-info-ico {
  width: 38px; height: 38px;
  background: var(--coral-soft);
  color: var(--coral);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info-ico svg { width: 18px; height: 18px; }
.contact-info-name { font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-info-val { color: var(--ink); font-size: 0.95rem; font-weight: 500; }
.contact-info-val a { color: var(--coral); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-lbl { font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.form-input, .form-textarea {
  padding: 13px 16px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.95rem;
  transition: all var(--t-fast);
}
.form-textarea { min-height: 150px; resize: vertical; font-family: inherit; }
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--coral-soft);
}
.form-err { color: var(--coral-2); font-size: 0.8rem; display: none; }
.form-group.invalid .form-err { display: block; }
.form-group.invalid .form-input, .form-group.invalid .form-textarea { border-color: var(--coral); }
.form-status { margin-top: 16px; padding: 12px 16px; border-radius: var(--r); font-size: 0.88rem; display: none; }
.form-status.show { display: block; }
.form-status.success { background: var(--sage-soft); color: #2a4e27; border: 1px solid var(--sage-line); }
.form-status.error { background: var(--coral-soft); color: var(--coral-2); border: 1px solid var(--coral-line); }

/* ─── FOOTER ─── */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 28px;
  margin-top: 60px;
  position: relative;
  z-index: 2;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.foot-brand-h { font-family: var(--f-display); font-size: 1.8rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.foot-brand-h em { font-style: italic; color: var(--coral); }
.foot-tag { color: rgba(247,243,236,0.6); font-size: 0.92rem; line-height: 1.6; max-width: 36ch; }
.foot-col-h { font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(247,243,236,0.5); margin-bottom: 14px; }
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-links a { color: rgba(247,243,236,0.75); font-size: 0.9rem; transition: color var(--t-fast); }
.foot-links a:hover { color: var(--coral); }
.foot-bottom {
  border-top: 1px solid rgba(247,243,236,0.1);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: rgba(247,243,236,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── REVEAL ─── */
.reveal, .reveal-child {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in, .reveal-child.in { opacity: 1; transform: translateY(0); }
.reveal-group .reveal-child:nth-child(1) { transition-delay: 0ms; }
.reveal-group .reveal-child:nth-child(2) { transition-delay: 60ms; }
.reveal-group .reveal-child:nth-child(3) { transition-delay: 120ms; }
.reveal-group .reveal-child:nth-child(4) { transition-delay: 180ms; }
.reveal-group .reveal-child:nth-child(5) { transition-delay: 240ms; }
.reveal-group .reveal-child:nth-child(6) { transition-delay: 300ms; }
.reveal-group .reveal-child:nth-child(7) { transition-delay: 360ms; }
.reveal-group .reveal-child:nth-child(8) { transition-delay: 420ms; }
.reveal-group .reveal-child:nth-child(9) { transition-delay: 480ms; }
.reveal-group .reveal-child:nth-child(10) { transition-delay: 540ms; }
.reveal-group .reveal-child:nth-child(11) { transition-delay: 600ms; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .t-hero    { grid-column: span 4; grid-row: span 2; }
  .t-now     { grid-column: span 2; }
  .t-clock   { grid-column: span 2; }
  .t-stats   { grid-column: span 4; }
  .t-graph   { grid-column: span 4; grid-row: span 2; }
  .t-feat    { grid-column: span 4; grid-row: span 2; }
  .t-skills  { grid-column: span 2; grid-row: span 2; }
  .t-chat    { grid-column: span 2; }
  .t-certs   { grid-column: span 2; }
  .t-pub     { grid-column: span 2; grid-row: span 2; }
  .t-contact { grid-column: span 4; }

  .lab-grid { grid-template-columns: repeat(4, 1fr); }
  .lab-xl { grid-column: span 4; }
  .lab-lg { grid-column: span 2; }
  .lab-md { grid-column: span 2; }
  .lab-sm { grid-column: span 2; }

  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-intro { grid-template-columns: 1fr; gap: 28px; }
  .about-avatar { margin: 0 auto; }
  .trophy-wall { grid-template-columns: repeat(2, 1fr); }
  .contact-grid-big { grid-template-columns: 1fr; }
  .pub-row { grid-template-columns: 50px 1fr; }
  .pub-row-cta { grid-column: 1 / -1; }
  .tl-row { grid-template-columns: 1fr; gap: 6px; }
  .skills-full { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .bento > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .t-hero { padding: 28px 22px; min-height: 320px; }
  .hero-name { font-size: 3rem; }
  .t-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(3) { border-left: none; padding-left: 0; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .lab-grid { grid-template-columns: 1fr; }
  .lab-grid > * { grid-column: 1 / -1; }

  .sec-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sec-head h2 { font-size: 1.6rem; }
  .trophy-wall { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }

  .graph-panel {
    top: auto; right: 20px; bottom: 20px; left: 20px;
    width: auto; max-height: 60vh;
    transform: translateY(calc(100% + 30px));
  }
  .graph-panel.open { transform: translateY(0); }
  .graph-legend { position: static; margin-bottom: 12px; max-width: none; }
  .graph-canvas { height: calc(100vh - 260px); min-height: 400px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-child { opacity: 1 !important; transform: none !important; }
}
