/* =========================================================================
   arsenie.eu — carte de vizită digitală
   Fonturi self-hosted, zero dependențe externe.
   ========================================================================= */

/* ---------- Fonturi (variable, self-hosted) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg:            #05070f;
  --bg-2:          #080c18;
  --ink:           #e9eefb;
  --ink-soft:      #b3c0da;
  --ink-mute:      #7f8fad;

  --glass:         rgba(255, 255, 255, 0.045);
  --glass-2:       rgba(255, 255, 255, 0.02);
  --edge:          rgba(255, 255, 255, 0.09);
  --edge-strong:   rgba(255, 255, 255, 0.18);
  --sheen:         rgba(255, 255, 255, 0.55);
  --spot:          rgba(120, 170, 255, 0.13);

  --blue:          #4f8dff;
  --cyan:          #35d6f0;
  --violet:        #a878ff;
  --accent:        var(--blue);
  --accent-ink:    #ffffff;

  --aurora-1:      #1d4ed8;
  --aurora-2:      #06b6d4;
  --aurora-3:      #7c3aed;
  --aurora-4:      #0ea5e9;
  --aurora-alpha:  0.48;
  --grain-alpha:   0.045;

  --shadow-sm:     0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow:        0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --shadow-lg:     0 40px 90px -30px rgba(0, 0, 0, 0.85);

  --r-sm:          10px;
  --r:             16px;
  --r-lg:          24px;
  --r-xl:          32px;

  --pad:           clamp(1.15rem, 3.5vw, 2rem);
  --gap:           clamp(0.9rem, 2vw, 1.25rem);
  --wrap:          1120px;

  --font-display:  'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body:     'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg:            #f4f7fd;
  --bg-2:          #eaf0fb;
  --ink:           #0d1524;
  --ink-soft:      #3d4a63;
  --ink-mute:      #64718c;

  --glass:         rgba(255, 255, 255, 0.80);
  --glass-2:       rgba(255, 255, 255, 0.55);
  --edge:          rgba(13, 21, 36, 0.11);
  --edge-strong:   rgba(13, 21, 36, 0.22);
  --sheen:         rgba(255, 255, 255, 0.95);
  --spot:          rgba(79, 141, 255, 0.12);

  --blue:          #1257d6;
  --cyan:          #0a90ad;
  --violet:        #6d3fd6;

  --aurora-alpha:  0.30;
  --grain-alpha:   0.025;

  --shadow-sm:     0 2px 10px rgba(19, 38, 77, 0.08);
  --shadow:        0 14px 40px -16px rgba(19, 38, 77, 0.28), 0 2px 6px -2px rgba(19, 38, 77, 0.10);
  --shadow-lg:     0 40px 80px -34px rgba(19, 38, 77, 0.38);
}

/* ---------- Reset / bază ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.975rem, 0.94rem + 0.18vw, 1.0625rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--blue); color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--blue);
  color: #fff;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Fundal: aurora + grain ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-2) 0%, var(--bg) 60%);
}

.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--aurora-alpha);
  will-change: transform;
}

.aurora span:nth-child(1) {
  width: 52vmax; height: 52vmax;
  top: -18vmax; left: -12vmax;
  background: radial-gradient(circle at 50% 50%, var(--aurora-1), transparent 68%);
  animation: drift-a 34s var(--ease) infinite alternate;
}
.aurora span:nth-child(2) {
  width: 44vmax; height: 44vmax;
  top: -8vmax; right: -14vmax;
  background: radial-gradient(circle at 50% 50%, var(--aurora-2), transparent 68%);
  animation: drift-b 42s var(--ease) infinite alternate;
}
.aurora span:nth-child(3) {
  width: 48vmax; height: 48vmax;
  bottom: -20vmax; left: 12%;
  background: radial-gradient(circle at 50% 50%, var(--aurora-3), transparent 68%);
  animation: drift-c 38s var(--ease) infinite alternate;
}
.aurora span:nth-child(4) {
  width: 34vmax; height: 34vmax;
  top: 42%; right: 4%;
  background: radial-gradient(circle at 50% 50%, var(--aurora-4), transparent 70%);
  animation: drift-d 46s var(--ease) infinite alternate;
  opacity: calc(var(--aurora-alpha) * 0.75);
}

@keyframes drift-a { to { transform: translate3d(14vw, 8vh, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-12vw, 12vh, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(16vw, -10vh, 0) scale(0.9); } }
@keyframes drift-d { to { transform: translate3d(-10vw, -14vh, 0) scale(1.2); } }

/* granulație fină — scoate aspectul „plastic" din glassmorphism */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-alpha);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Sticlă ---------- */
.glass {
  position: relative;
  background: linear-gradient(160deg, var(--glass), var(--glass-2));
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;
}

/* linia de lumină de pe muchia de sus */
.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sheen), transparent);
  opacity: 0.5;
  pointer-events: none;
}

/* spotlight care urmărește cursorul (coordonate din JS) */
.spot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 0%),
    var(--spot),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.spot:hover::after,
.spot:focus-within::after { opacity: 1; }

/* ---------- Layout ---------- */
.wrap {
  width: min(100% - 2.2rem, var(--wrap));
  margin-inline: auto;
}

section { position: relative; }

.section {
  padding-block: clamp(3rem, 7vw, 5.25rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.section-head h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.15rem);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::before {
  content: '';
  width: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.section-head .eyebrow { flex: 1 0 100%; margin-bottom: 0.15rem; }

.lead {
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Controale (limbă + temă) ---------- */
.controls {
  position: fixed;
  top: clamp(0.75rem, 2vw, 1.4rem);
  right: clamp(0.75rem, 2vw, 1.4rem);
  z-index: 60;
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--glass), var(--glass-2));
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-sm);
}

.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  touch-action: manipulation;
}
.ctrl:hover { background: rgba(127, 160, 220, 0.14); color: var(--ink); }
.ctrl svg { width: 15px; height: 15px; }

.ctrl .icon-sun { display: none; }
:root[data-theme='light'] .ctrl .icon-sun  { display: block; }
:root[data-theme='light'] .ctrl .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(4.5rem, 12vw, 7.5rem);
  padding-bottom: clamp(1rem, 4vw, 2rem);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border-radius: var(--r-xl);
}

.hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.5rem);
  letter-spacing: -0.032em;
  margin: 0.55rem 0 0.35rem;
  background: linear-gradient(180deg, var(--ink) 30%, color-mix(in oklab, var(--ink) 55%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .role {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--blue), var(--cyan) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .bio {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.35rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--glass-2);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; opacity: 0.75; }

.chip.live { color: var(--ink); }
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* portret */
.portrait {
  position: relative;
  width: clamp(9rem, 22vw, 13.5rem);
  aspect-ratio: 1;
  flex: none;
  justify-self: center;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  border: 1px solid var(--edge-strong);
}

/* inel de lumină rotitor */
.portrait::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), var(--cyan), var(--violet), var(--blue));
  opacity: 0.65;
  filter: blur(7px);
  animation: spin 14s linear infinite;
}
.portrait::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--bg);
  opacity: 0.55;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Butoane ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
  touch-action: manipulation;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(100deg, var(--blue), color-mix(in oklab, var(--cyan) 55%, var(--blue)));
  color: var(--accent-ink);
  box-shadow: 0 10px 26px -10px color-mix(in oklab, var(--blue) 85%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 16px 34px -12px color-mix(in oklab, var(--blue) 90%, transparent);
}

.btn-ghost {
  background: var(--glass);
  border-color: var(--edge);
  color: var(--ink);
}
.btn-ghost:hover {
  background: color-mix(in oklab, var(--glass) 70%, var(--sheen) 8%);
  border-color: var(--edge-strong);
}

/* ---------- Grile ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Ce fac ---------- */
.tile {
  padding: var(--pad);
  border-radius: var(--r);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.tile:hover { transform: translateY(-4px); border-color: var(--edge-strong); }

.tile .ico {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: linear-gradient(150deg,
    color-mix(in oklab, var(--blue) 22%, transparent),
    color-mix(in oklab, var(--violet) 12%, transparent));
  color: var(--ink);
}
.tile .ico svg { width: 19px; height: 19px; }

.tile h3 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.tile p {
  font-size: 0.905rem;
  line-height: 1.6;
  color: var(--ink-mute);
}

/* ---------- Proiecte ---------- */
.project {
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  border-radius: var(--r);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.project:hover { transform: translateY(-4px); border-color: var(--edge-strong); }

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.project h3 {
  font-size: 1.16rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tag {
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  color: var(--ink-mute);
  white-space: nowrap;
  flex: none;
}
.tag-live {
  color: color-mix(in oklab, var(--cyan) 78%, var(--ink));
  border-color: color-mix(in oklab, var(--cyan) 35%, transparent);
  background: color-mix(in oklab, var(--cyan) 9%, transparent);
}

.project p {
  color: var(--ink-mute);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--edge);
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.project-links a:hover { color: var(--ink); gap: 0.62rem; }
.project-links svg { width: 14px; height: 14px; opacity: 0.8; }

.project.wide { grid-column: span 2; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.4rem, 4vw, 2.75rem);
  border-radius: var(--r-lg);
}

.rows { display: grid; gap: 0.4rem; }

.row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.72rem 0.85rem;
  margin-inline: -0.85rem;
  border-radius: var(--r-sm);
  transition: background 0.25s var(--ease);
}
.row:hover { background: rgba(127, 160, 220, 0.09); }

.row .ico {
  display: grid;
  place-items: center;
  width: 2.15rem; height: 2.15rem;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--glass-2);
  color: var(--ink-soft);
}
.row .ico svg { width: 16px; height: 16px; }

.row .txt { min-width: 0; }
.row .k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.row .v {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--edge);
}

.social {
  display: grid;
  place-items: center;
  width: 2.55rem; height: 2.55rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--glass-2);
  color: var(--ink-soft);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.social svg { width: 17px; height: 17px; }
.social:hover {
  transform: translateY(-3px);
  color: var(--ink);
  border-color: var(--edge-strong);
  background: var(--glass);
}

/* panoul QR / vCard */
.vcard-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.75rem);
  border-radius: var(--r);
  border: 1px solid var(--edge);
  background: var(--glass-2);
  text-align: center;
}

.qr {
  width: clamp(8.5rem, 20vw, 10.5rem);
  padding: 0.85rem;
  border-radius: 14px;
  background: #fff;
  color: #05070f;
  box-shadow: var(--shadow-sm);
}
.qr svg { width: 100%; height: auto; }

.vcard-panel p {
  font-size: 0.83rem;
  color: var(--ink-mute);
  max-width: 26ch;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--edge);
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  font-size: 0.83rem;
  color: var(--ink-mute);
}

.footer a { transition: color 0.25s var(--ease); }
.footer a:hover { color: var(--ink); }

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

/* ---------- Bara mobilă ---------- */
.mobilebar { display: none; }

/* ---------- Reveal la scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: clamp(1.75rem, 6vw, 2.5rem);
  }
  .hero-card .portrait { grid-row: 1; margin-bottom: 0.35rem; }
  .hero .eyebrow, .hero .chips, .hero .actions { justify-content: center; }
  .hero .eyebrow { display: inline-flex; }
  .hero .bio { margin-inline: auto; }

  .contact-card { grid-template-columns: 1fr; }
  .row { margin-inline: 0; }
}

@media (max-width: 620px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .project.wide { grid-column: span 1; }

  body { padding-bottom: 4.75rem; }

  .footer-in { flex-direction: column; text-align: center; }

  /* bară de acțiune fixă, ca într-o aplicație */
  .mobilebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    display: flex;
    justify-content: space-around;
    gap: 0.25rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--bg) 82%, transparent);
    border-top: 1px solid var(--edge);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
  }
  .mobilebar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0;
    border-radius: 12px;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
  }
  .mobilebar a svg { width: 19px; height: 19px; }
  .mobilebar a:active { background: rgba(127, 160, 220, 0.12); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Safari vechi fără backdrop-filter: fundal mai opac ca textul să rămână lizibil */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .controls { background: color-mix(in oklab, var(--bg) 72%, var(--sheen) 6%); }
}
