/* ==========================================================================
   Juan Porta (@elpolta) — Personal Web & Career Timeline
   Ultra-lightweight, responsive, high-contrast design
   ========================================================================== */

:root,
[data-theme="light"] {
  --bg-base: #f6f4ee;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #efece4;
  --bg-glass: rgba(246, 244, 238, 0.88);

  --text-primary: #12151e;
  --text-secondary: #4a5160;
  --text-muted: #767e8d;

  --accent: #e04320;
  --accent-soft: rgba(224, 67, 32, 0.1);
  --accent-border: rgba(224, 67, 32, 0.35);
  --accent-secondary: #0284c7;
  --status-green: #059669;

  --border-subtle: rgba(18, 21, 30, 0.1);
  --border-strong: rgba(18, 21, 30, 0.2);

  --shadow-card: 0 16px 36px -14px rgba(18, 21, 30, 0.08);
  --grid-line: rgba(18, 21, 30, 0.035);
}

[data-theme="dark"] {
  --bg-base: #0d0f14;
  --bg-surface: #141720;
  --bg-surface-elevated: #1b1f2b;
  --bg-glass: rgba(20, 23, 32, 0.84);

  --text-primary: #f4f1ea;
  --text-secondary: #a6adb9;
  --text-muted: #6e7685;

  --accent: #ff5a36;
  --accent-soft: rgba(255, 90, 54, 0.14);
  --accent-border: rgba(255, 90, 54, 0.42);
  --accent-secondary: #38bdf8;
  --status-green: #34d399;

  --border-subtle: rgba(244, 241, 234, 0.09);
  --border-strong: rgba(244, 241, 234, 0.18);

  --shadow-card: 0 18px 40px -15px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(244, 241, 234, 0.03);
}

:root {
  --font-display: "Syne", system-ui, -apple-system, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --container-max: 1020px;
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Ambient Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 40%, transparent 100%);
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
}

.ambient-glow--primary {
  width: 420px;
  height: 420px;
  background: var(--accent);
  top: -140px;
  right: 10%;
}

.ambient-glow--secondary {
  width: 340px;
  height: 340px;
  background: var(--accent-secondary);
  bottom: 10%;
  left: -100px;
  opacity: 0.1;
}

.container {
  width: min(100% - 2.25rem, var(--container-max));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0.85rem;
  z-index: 100;
  margin-top: 0.85rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.brand-text {
  display: inline-flex;
}

.brand-handle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-toggle {
  height: 36px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.lang-toggle__opt {
  transition: color var(--transition-fast);
}

.lang-toggle__opt.is-active {
  color: var(--accent);
  font-weight: 700;
}

.lang-toggle__sep {
  opacity: 0.4;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle:hover {
  transform: rotate(12deg);
  border-color: var(--accent);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn--sm {
  font-size: 0.82rem;
  padding: 0.42rem 0.9rem;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn--ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Compact Hero
   ========================================================================== */
.hero {
  padding: clamp(2.8rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.hero-compact {
  max-width: 720px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}

.hero-name {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.3vw, 0.98rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.text-accent {
  color: var(--accent);
}

.hero-lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ==========================================================================
   Sections Common
   ========================================================================== */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-header--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* ==========================================================================
   Projects Grid (5 Projects: Weekly Spin, DosisPedia, Baby Tracker, Opositores, PortaGame)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.45rem 1.55rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}

.project-card--featured {
  background:
    radial-gradient(500px circle at 100% 0%, var(--accent-soft), transparent 65%),
    var(--bg-surface);
  border-color: var(--border-strong);
}

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

.project-header {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 0.85rem;
}

.project-logo-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.project-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-card:hover .project-logo-box {
  transform: scale(1.05);
  border-color: var(--accent);
}

.project-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
}

.project-title a:hover {
  color: var(--accent);
}

.project-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--status-green);
}

.project-domain:hover {
  text-decoration: underline;
}

.project-domain--private {
  color: var(--text-muted);
}

.project-domain--private:hover {
  text-decoration: none;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-stats {
  list-style: none;
  margin-top: 0.65rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-stats strong {
  color: var(--text-primary);
  font-weight: 600;
}

.project-card__bottom {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.tech-pill--primary {
  color: var(--text-primary);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.project-action-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.project-action-link:hover {
  text-decoration: underline;
}

.project-private-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Original Curriculum Timeline Section (Logos + Max 2 Tech Tags)
   ========================================================================== */
.cv-timeline {
  position: relative;
  display: grid;
  gap: 1.15rem;
  padding-left: 2.1rem;
}

.cv-timeline__track {
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0.6rem;
  width: 3px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.cv-timeline__progress {
  width: 100%;
  height: 35%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-secondary) 100%);
  border-radius: var(--radius-pill);
  transition: height 200ms ease-out;
}

.cv-node {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: center;
  outline: none;
}

.cv-node__marker {
  position: absolute;
  left: -2.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.cv-node__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2.5px solid var(--text-muted);
  transition: all var(--transition-fast);
}

.cv-node.is-current .cv-node__dot,
.cv-node:hover .cv-node__dot,
.cv-node:focus-within .cv-node__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.cv-node__date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.cv-node__date time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cv-node__badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.48rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.cv-node__badge--active {
  color: var(--status-green);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
}

.cv-node__card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.cv-node:hover .cv-node__card,
.cv-node:focus-within .cv-node__card {
  transform: translateX(4px);
  border-color: var(--accent-border);
}

.cv-node__header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.company-logo-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 3px;
}

.company-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cv-node__role {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.25;
}

.cv-node__company {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.cv-node__tech-pair {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cv-tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  white-space: nowrap;
}

.cv-tech-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.cv-tech-dot--rails { background: #ff4438; }
.cv-tech-dot--react { background: #38bdf8; }
.cv-tech-dot--db { background: #fbbf24; }
.cv-tech-dot--js { background: #facc15; }
.cv-tech-dot--android { background: #34d399; }

.cv-node__body {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.cv-projects {
  margin-top: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cv-projects__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.cv-projects__summary::-webkit-details-marker {
  display: none;
}

.cv-projects__summary:hover {
  color: var(--accent);
}

.cv-projects__chevron {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.cv-projects[open] .cv-projects__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.cv-projects__list {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  display: grid;
}

.cv-projects__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cv-projects__item:last-child {
  border-bottom: none;
}

.cv-projects__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cv-projects__name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

a.cv-projects__name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.cv-projects__desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cv-projects__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Research Publications Section (Cards)
   ========================================================================== */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.paper-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.paper-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}

.paper-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.paper-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.58rem;
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.paper-badge--congress {
  color: var(--accent-secondary);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.paper-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.paper-card__title {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.42;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}

.paper-card__title a:hover {
  color: var(--accent);
}

.paper-card__venue {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.paper-card__bottom {
  padding-top: 0.95rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ==========================================================================
   Socials & Footer
   ========================================================================== */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.social-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.social-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.social-card__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.social-card__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.social-card__handle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-card__arrow {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.social-card:hover .social-card__arrow {
  color: var(--accent);
}

.site-footer {
  padding: 2rem 0 2.8rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.15rem;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
  .projects-grid,
  .papers-grid,
  .project-card__split {
    grid-template-columns: 1fr;
  }

  .socials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-node {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .cv-node__date {
    flex-direction: row;
    align-items: center;
  }

  .cv-node__marker {
    top: 0.6rem;
    transform: none;
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .cv-node__header {
    grid-template-columns: 44px 1fr;
  }

  .cv-node__tech-pair {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .cv-projects__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .socials-grid {
    grid-template-columns: 1fr;
  }
}
