/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --c-bg:         #ebebeb;
  --c-surface:    #f5f5f5;
  --c-card:       #fcfcfc;
  --c-card-hover: #ffffff;
  --c-text:       #141414;
  --c-text-2:     #4f4f4f;
  --c-text-3:     #757575;
  --c-text-4:     #9e9e9e;
  --c-border:     rgba(20, 20, 20, 0.08);
  --c-border-strong: rgba(20, 20, 20, 0.14);
  --c-accent:     #141414;
  --c-active:     #2d9e5f;
  --c-hover:      #103BF9;

  /* Fonts */
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Figtree', sans-serif;

  /* Font sizes — 4 sizes only */
  --fs-h1:        clamp(2rem, 7.5vw, 5.64rem);   /* hero name */
  --fs-display-l: 4.5rem;    /* large section titles */
  --fs-h2:        1.125rem;  /* card titles, roles */
  --fs-body:      1rem;      /* all body text */

  /* Font weights */
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  /* Letter spacing */
  --ls-tight:    -0.05em;
  --ls-snug:     -0.03em;
  --ls-normal:    0em;
  --ls-wide:      0.04em;
  --ls-wider:     0.08em;

  /* Line height */
  --lh-tight:    0.85;
  --lh-snug:     1;
  --lh-normal:   1.4;
  --lh-relaxed:  1.6;

  /* Spacing */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Border radius */
  --r-sm:   8px;
  --r-md:   24px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card:       0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 2px 4px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);

  /* Transitions */
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:  0.18s;
  --t-base:  0.35s;
  --t-slow:  0.6s;
  --t-xslow: 0.9s;

  /* Layout */
  --container:   1200px;
  --gap-cards:   10px;
  --ticker-height: 52px;
  --nav-height:  64px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  overflow: hidden;   /* no page scroll — flip is driven by wheel/touch events */
  height: 100dvh;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow: hidden;
  height: 100dvh;
}

/* Display font applied to all headings */
h1, h2, h3, h4, h5, h6,
.hero-name, .hero-role,
.contact-heading,
.profile-name, .exp-role, .project-name,
.nav-logo {
  font-family: var(--font-display);
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: var(--ticker-height);
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  transition:
    background var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.nav.scrolled {
  background: rgba(235, 235, 235, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--c-border), 0 4px 20px rgba(0,0,0,0.04);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--sp-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-normal);
  color: var(--c-text);
  transition: opacity var(--t-fast) var(--ease);
}
.nav-logo:hover { opacity: 0.55; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-link {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-3);
  letter-spacing: var(--ls-normal);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.nav-link:hover { color: var(--c-hover); }
.nav-link:hover::after { transform: scaleX(1); }

/* ============================================================
   HERO
   ============================================================ */

/* Full-viewport container — no scroll, flip is wheel/touch driven */
.hero-wrap {
  position: relative;
  height: 100dvh;
  padding-top: var(--ticker-height);  /* push content below fixed ticker */
  z-index: 1;
}

/* Centered column: logo → card → role+links */
.hero-sticky {
  height: calc(100dvh - var(--ticker-height));
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-8) clamp(var(--sp-6), 4vw, var(--sp-12));
}

.hero-glass {
  position: absolute;
  inset: 0;
  z-index: 10;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: rgba(235, 235, 235, 0);
  pointer-events: none;
  will-change: backdrop-filter, background;
  transform: translateZ(0);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--c-bg);
  background-image:
    radial-gradient(ellipse 70% 60% at 75% 35%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 15% 85%, rgba(0,0,0,0.025) 0%, transparent 60%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--c-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 100%);
}

/* ── Trading Card ─────────────────────────────────────────── */
@keyframes tcParticleFloat {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 0.9; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

/* Background particles */
#tc-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.tc-particle {
  position: absolute;
  border-radius: 50%;
  bottom: -12px;
  animation: tcParticleFloat linear infinite;
}

/* Positioning wrapper */
#tc-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

/* Perspective container */
.tc-scene {
  perspective: 1000px;
  width: 380px;
  height: 540px;
  pointer-events: auto;
}

/* 3D rotating card */
.tc-card {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  cursor: pointer;
  will-change: transform;
  filter: drop-shadow(0 28px 65px rgba(0,0,0,0.55));
}

/* ── Outer clear-acrylic frame ── */
.tc-frame {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  padding: 20px;                          /* thick acrylic border */
  background: rgba(255,255,255,0.04);     /* nearly transparent — shows background through */
  backdrop-filter: blur(40px) saturate(220%) brightness(1.14);
  -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.14);
  border: 1.5px solid rgba(255,255,255,0.55);
  box-shadow:
    /* Beveled top-left edge — light source catches the thick plastic rim */
    inset  5px  5px 0 rgba(255,255,255,0.80),
    inset  4px  0   0 rgba(255,255,255,0.60),
    inset  0    4px 0 rgba(255,255,255,0.60),
    /* Beveled bottom-right shadow */
    inset -3px -3px 0 rgba(0,0,0,0.30),
    /* Outer depth */
    0 90px 180px rgba(0,0,0,0.52),
    0 35px 70px  rgba(0,0,0,0.28),
    0 0 0 0.5px  rgba(255,255,255,0.08);
}

/* Prismatic refraction + circuit traces etched in the acrylic material */
.tc-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 44px;
  padding: 20px;
  background:
    /* Fine circuit-trace grid etched in the material */
    linear-gradient(rgba(60,130,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,130,255,0.10) 1px, transparent 1px);
  background-size: 13px 13px, 13px 13px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask:         linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.tc-scene:hover .tc-frame::before { opacity: 0.9; }

/* White bevel highlight + mouse-reactive specular */
.tc-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 44px;
  padding: 20px;
  background:
    /* Mouse-tracking specular — light gliding across the glass surface */
    radial-gradient(
      ellipse 65% 55% at var(--mx, 22%) var(--my, 18%),
      rgba(255,255,255,0.60),
      rgba(255,255,255,0.14) 38%,
      transparent 62%
    ),
    /* Static directional bevel: bright top-left, dark bottom-right */
    linear-gradient(
      148deg,
      rgba(255,255,255,0.82) 0%,
      rgba(255,255,255,0.38)  6%,
      rgba(255,255,255,0.08) 22%,
      transparent            48%,
      rgba(0,0,0,0.06)       78%,
      rgba(0,0,0,0.16)      100%
    );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask:         linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── Inner dark card face ── */
.tc-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
}

/* ── Avatar photo ── */
.tc-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.tc-photo img {
  width: 100%;
  height: 64%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(1);
}


/* ── SVG corner bracket decorations ── */
.tc-border {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}
.tc-border svg {
  width: 100%;
  height: 100%;
}

/* ── Top bar: type badge + HP ── */
.tc-topbar {
  position: absolute;
  top: 13px;
  left: 14px;
  right: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tc-type-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(6,6,15,0.58);
  border: 1px solid rgba(77,140,255,0.45);
  border-radius: 20px;
  padding: 4px 10px 4px 7px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tc-type-badge img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(200deg);
}
.tc-type-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(100,165,255,0.95);
  text-transform: uppercase;
}
.tc-hp {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(220,235,255,0.85);
  background: rgba(6,6,15,0.58);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 11px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tc-hp strong {
  color: #fff;
  font-size: 0.95rem;
}

/* ── Name block ── */
.tc-namebar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 57%;
  z-index: 30;
}
.tc-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 24px rgba(16,59,249,0.85);
}
.tc-role-line {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(100,160,255,0.8);
  text-transform: uppercase;
}

/* ── Ability + moves + footer block ── */
.tc-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 30;
}
.tc-ability {
  padding: 7px 10px;
  margin-bottom: 7px;
  background: transparent;
  border-left: 2px solid rgba(77,140,255,0.7);
  border-radius: 0 6px 6px 0;
}
.tc-ability-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(100,165,255,1);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.tc-ability-name::before { content: '◆ '; color: rgba(16,59,249,0.9); }
.tc-ability-text {
  font-family: var(--font-body);
  font-size: 0.58rem;
  color: rgba(160,190,255,0.7);
  line-height: 1.4;
}
.tc-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(16,59,249,0.45), rgba(16,59,249,0.12), transparent);
  margin: 6px 0;
}
.tc-move {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.tc-move + .tc-move { border-top: 1px solid rgba(255,255,255,0.045); }
.tc-move-cost { display: flex; gap: 3px; }
.tc-move-pip {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(100,170,255,1), rgba(16,59,249,0.9));
  border: 1px solid rgba(100,165,255,0.5);
  box-shadow: 0 0 7px rgba(16,59,249,0.55);
}
.tc-move-pip.grey {
  background: radial-gradient(circle at 35% 35%, rgba(180,185,200,0.7), rgba(90,95,115,0.5));
  border-color: rgba(160,165,185,0.3);
  box-shadow: none;
}
.tc-move-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(215,228,255,0.95);
}
.tc-move-dmg {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 14px rgba(100,165,255,0.65);
}
.tc-footer {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tc-footer-id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: rgba(110,135,190,0.6);
  text-transform: uppercase;
}
.tc-flower-icon {
  width: 13px;
  height: 13px;
  opacity: 0.45;
  filter: brightness(0) invert(1);
}

/* ── Holographic shimmer (mouse-reactive) ── */
.tc-holo {
  position: absolute;
  inset: 0;
  z-index: 28;
  border-radius: 26px;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at var(--mx, 50%) var(--my, 50%),
    rgba(255, 20, 100, 0.38),
    rgba(255, 140, 0,  0.32),
    rgba(250, 235, 0,  0.28),
    rgba( 20, 240, 120, 0.32),
    rgba(  0, 180, 255, 0.38),
    rgba(150,  20, 255, 0.35),
    rgba(255,   0, 180, 0.32),
    rgba(255,  20, 100, 0.38)
  );
  opacity: 0;
  mix-blend-mode: color-dodge;
  transition: opacity 0.3s ease;
}
.tc-scene:hover .tc-holo { opacity: 0.5; }

/* ── Specular light highlight ── */
.tc-shine {
  position: absolute;
  inset: 0;
  z-index: 29;
  border-radius: 26px;
  pointer-events: none;
  background: radial-gradient(
    ellipse 55% 60% at var(--mx, 50%) var(--my, 30%),
    rgba(255,255,255,0.18),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tc-scene:hover .tc-shine { opacity: 1; }

/* Mobile */
@media (max-width: 560px) {
  #tc-wrap { transform: translate(-50%, -50%) scale(0.60); }
}

/* Left text column */
.flip-area {
  flex-shrink: 0;
  width: clamp(280px, 55vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero-top {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-name {
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-text);
  display: flex;
  flex-direction: column;
}

.hero-logo {
  width: auto;
  height: calc(var(--fs-h1) * 1.7);
  display: block;
  object-fit: contain;
  object-position: center;
}

.hero-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  margin-top: var(--sp-4);
}

.hero-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-2);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}

.hero-link span {
  position: relative;
  display: inline-block;
}

.hero-link span::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.hero-link svg {
  color: var(--c-text-4);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.hero-link:hover { color: var(--c-hover); }
.hero-link:hover span::after { transform: scaleX(1); }
.hero-link:hover svg { color: var(--c-hover); transform: translate(2px, -2px); }

.hero-name-line {
  display: block;
  overflow: hidden;
}

.hero-name-line:nth-child(1) { animation: slideUp 0.85s var(--ease) 0.08s both; }
.hero-name-line:nth-child(2) { animation: slideUp 0.85s var(--ease) 0.22s both; }

.hero-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 7px var(--sp-3);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-2);
  white-space: nowrap;
  margin-top: var(--sp-3);
  animation: fadeIn 0.7s var(--ease) 0.5s both;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-active);
  animation: pulse 2.5s ease-in-out infinite;
}

.hero-bottom {
  text-align: center;
  position: relative;
  z-index: 2;
  animation: fadeIn 0.8s var(--ease) 0.3s both;
}

.hero-role {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: var(--c-text);
  margin-bottom: var(--sp-4);
}

.hero-role em {
  font-style: italic;
  font-weight: var(--fw-extrabold);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-body);
  color: var(--c-text-3);
  font-weight: var(--fw-medium);
}

.hero-meta-sep { opacity: 0.4; }

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  height: var(--ticker-height);
  overflow: hidden;
  background: #103BF9;
  color: #FFF5E6;
  padding: 12px 0;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
  animation: none;
}

.ticker-item {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  padding: 0 var(--sp-5);
}

.ticker-sep {
  font-size: 7px;
  opacity: 0.4;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main {
  position: relative;
  z-index: 2;
  background: transparent;
  border-radius: 0;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
  box-shadow: none;
}

.main-inner {
  width: 100%;
  padding: 0 var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0;
  margin-top: var(--sp-6);
  margin-bottom: calc(var(--gap-cards) * -0.5);
}

.cards-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--gap-cards);
}

.cards-row--halves {
  grid-template-columns: 1fr 1fr;
}

.card-with-header {
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
  background: var(--c-card);
  border-radius: var(--r-md);
  border: none;
  padding: var(--sp-6);
}


.card-label {
  display: inline-block;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: #141414;
  margin-bottom: var(--sp-5);
}

.section-label {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--c-text-3);
}

/* ============================================================
   PROFILE CARD
   ============================================================ */
.card--profile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-8);
  position: relative;
  overflow: hidden;
}

.profile-flower {
  position: absolute;
  top: -80px;
  right: -100px;
  width: 300px;
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.92;
}

.card--profile > *:not(.profile-flower) {
  position: relative;
  /* z-index removed — it was creating compositing sub-layers inside the
     overflow:hidden flat layer, causing Chrome to miscalculate hit areas
     under perspective. DOM order already keeps content above the flower. */
}

.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-surface);
  flex-shrink: 0;
}

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

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--sp-2);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--c-text);
}

.profile-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--c-text-3);
}

.profile-bio {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--c-text-2);
  line-height: var(--lh-normal);
  margin-top: var(--sp-1);
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--sp-3);
}

.profile-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: var(--fw-regular);
  color: var(--c-text-2);
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}

.profile-link:first-child { border-top: none; }
.profile-link:last-child  { border-bottom: none; }
.profile-link:hover { color: var(--c-hover); }

/* text column: title + description */
.profile-link-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* sliding underline on the title only */
.profile-link-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
}

.profile-link-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.profile-link:hover .profile-link-title::after { transform: scaleX(1); }

.profile-link-desc {
  font-size: 0.78rem;
  font-weight: var(--fw-regular);
  color: var(--c-text-2);
  opacity: 0.80;
}

.profile-link svg {
  color: var(--c-text-4);
  flex-shrink: 0;
  align-self: center;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.profile-link:hover svg {
  color: var(--c-hover);
  transform: translate(2px, -2px);
}

/* ============================================================
   ABOUT CARD
   ============================================================ */
.card--about {
  display: flex;
  flex-direction: column;
}

.about-text {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--c-text-2);
}

.about-text + .about-text { margin-top: var(--sp-4); }

/* ============================================================
   SKILLS CARD
   ============================================================ */
.card--skills { display: flex; flex-direction: column; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.skill-tag {
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  border: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-2);
  cursor: default;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}


/* ============================================================
   INFO CARD
   ============================================================ */
.card--info { display: flex; flex-direction: column; }

.info-list {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-border);
  gap: var(--sp-4);
}

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

.info-key {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-3);
  white-space: nowrap;
}

.info-val {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-2);
  text-align: right;
}

.status-active {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-active) !important;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-active);
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

.card--exp {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}

.exp-title-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.exp-role {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
  color: var(--c-text);
  line-height: 1.2;
}

.exp-company {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-3);
}

.exp-date {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-4);
  white-space: nowrap;
  padding-top: 2px;
}

.exp-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--c-text-2);
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.exp-tags span {
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  border: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-3);
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-cards);
}

.card--project {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  flex-shrink: 0;
  transition: filter var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.card--project:hover .project-thumb {
  filter: brightness(0.97);
}

.project-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  color: var(--c-text-2);
  transition: color var(--t-fast) var(--ease);
}

.project-head:hover { color: var(--c-hover); }

.project-name {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
  color: var(--c-text);
  line-height: 1.2;
  position: relative;
  display: inline-block;
  transition: color var(--t-fast) var(--ease);
}

.project-name::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.project-head:hover .project-name { color: var(--c-hover); }
.project-head:hover .project-name::after { transform: scaleX(1); }

.project-head svg {
  flex-shrink: 0;
  color: var(--c-text-4);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.project-head:hover svg {
  color: var(--c-hover);
  transform: translate(2px, -2px);
}

.project-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--c-text-2);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
}

.project-tags span {
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  border: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-3);
}

/* ============================================================
   CONTACT CARD
   ============================================================ */
.card--contact {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--sp-6);
  padding: var(--sp-10);
  min-height: 480px;
  background: #103BF9;
  border: none;
  position: relative;
  overflow: hidden;
}

.contact-flower {
  position: absolute;
  top: -80px;
  left: -100px;
  width: 300px;
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.95;
  transform: scaleX(-1);
}

.card--contact > *:not(.contact-flower) {
  position: relative;
  z-index: 1;
}

.contact-heading em { font-style: italic; }

.contact-heading {
  font-size: var(--fs-display-l);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: #FFF5E6;
  text-transform: uppercase;
  margin-top: auto;
}

.contact-email {
  display: inline-block;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: #FFF5E6;
  position: relative;
  cursor: pointer;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: #FFF5E6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.contact-email:hover::after { transform: scaleX(1); }

.contact-socials {
  display: flex;
  flex-direction: row;
  gap: var(--sp-8);
  align-items: center;
  flex-wrap: wrap;
}

.contact-social {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: #FFF5E6;
  cursor: pointer;
}

.contact-social span {
  position: relative;
  display: inline-block;
}

.contact-social span::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: #FFF5E6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.contact-social:hover span::after { transform: scaleX(1); }

.contact-social svg { color: #FFF5E6; opacity: 1; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.contact-social:hover svg { opacity: 1; transform: translate(2px, -2px); }

/* ============================================================
   FLIP CARD
   ============================================================ */

/* Perspective wrapper */
.flip-scene {
  width: 100%;
}

/* The card container — no 3D transform here, no preserve-3d.
   Each face gets its own perspective() rotateY() applied directly by JS.
   This means overflow:hidden on a face never creates a "flat group" that
   breaks hit-testing — each face is its own independent 3D context. */
.flip-card {
  width: 100%;
  position: relative;
}

/* Both faces — each transforms independently; will-change hints the GPU */
.flip-face {
  width: 100%;
  will-change: transform;
}

/* Front face stays in normal flow — its height sets .flip-card's height */
.flip-face--front {
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.14);
}

/* Back face: hidden by default (JS sets opacity:1 when it becomes visible).
   No initial rotateY — JS owns the entire transform every frame. */
.flip-face--back {
  position: absolute;
  inset: 0;
  opacity: 0;
  box-shadow: 0 24px 48px rgba(0,0,0,0.14);
}

/* Remove the fixed min-height; the front-face height sets the size */
.flip-face.card--contact {
  min-height: unset;
  height: 100%;
}

/* The back face sits on top in 2D (position:absolute) so disable it by default.
   It only becomes interactive when JS adds .showing-back to the card. */
.flip-face--back,
.flip-face--back * {
  pointer-events: none;
}

/* When back is showing: enable back face, lock out front face entirely */
.flip-card.showing-back .flip-face--back,
.flip-card.showing-back .flip-face--back * {
  pointer-events: auto;
}
.flip-card.showing-back .flip-face--front,
.flip-card.showing-back .flip-face--front * {
  pointer-events: none !important;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top-wrap {
  position: relative;
  z-index: 2;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-10) var(--sp-10);
  display: flex;
  justify-content: center;
}

.scroll-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border: none;
  border-radius: 100px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  color: #ffffff;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.scroll-top-btn:hover {
  color: #ffffff;
  background: #2a2a2a;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  background: transparent;
  border-top: 1px solid var(--c-border);
  padding: var(--sp-6) var(--sp-10);
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.footer-inner {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--c-text-4);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.4; transform: scale(0.82); }
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --fs-h1:         4.51rem;
    --fs-display-l:  3.6rem;
  }

  .nav-inner    { padding: 0 var(--sp-8); }
  .main         { padding: var(--gap-cards) var(--sp-8) var(--sp-16); }
  .cards-row    { grid-template-columns: 300px 1fr; }
}

/* ============================================================
   RESPONSIVE — SMALL TABLET  (≤ 810px)
   ============================================================ */
@media (max-width: 810px) {
  :root {
    --fs-h1:         3.6rem;
    --fs-display-l:  2.88rem;
  }

  .cards-row,
  .cards-row--halves,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .card--contact { min-height: 360px; }
  .contact-socials { gap: var(--sp-5); }

  .hero {
    min-height: 500px;
    height: 100dvh;
    padding-bottom: 0;
  }

  .hero-badge { margin-top: var(--sp-5); }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 560px)
   ============================================================ */
@media (max-width: 560px) {
  :root {
    --fs-h1:         3rem;
    --fs-display-l:  2.25rem;
    --nav-height:    56px;
  }

  .nav-inner    { padding: 0 var(--sp-5); }
  .main         { padding: var(--gap-cards) 8px var(--sp-12); }
  .main-inner   { padding: 0 16px; }
  .hero-content { padding: var(--sp-8) var(--sp-5); }

  .card         { padding: var(--sp-5); }
  .card--contact { padding: var(--sp-6); }

  .exp-header { flex-direction: column; gap: var(--sp-1); }

  /* On mobile: hide link descriptions and re-centre the icon */
  .profile-link-desc { display: none; }
  .profile-link { align-items: center; }
  .profile-link svg { margin-top: 0; }

  /* On mobile: hide the footer role + links entirely */
  .hero-bottom { display: none; }

  /* Take the logo out of the flex flow so only the card + footer share
     the full height. The card covers the logo; the footer stays visible. */
  .hero-sticky {
    position: relative;
  }

  .hero-top {
    position: absolute;
    top: var(--sp-8);
    left: 0;
    right: 0;
    z-index: 0;
  }

  .flip-area {
    position: relative;
    z-index: 1;
  }

  .hero-bottom {
    position: relative;
    z-index: 1;
  }

  .profile-flower {
    width: 100px;
    top: -27px;
    right: -33px;
  }

  .contact-flower {
    width: 100px;
    top: -27px;
    left: -33px;
  }

  .project-thumb {
    border-radius: 16px;
  }

  .project-body {
    padding-left: 0;
    padding-right: 0;
  }
}
