/* =========================================================
   Sailesh Singh — Portfolio
   Palette: #87D900 (accent) · #69716D (slate) · #17201D (base)
   ========================================================= */

:root {
  --accent: #87d900;
  --accent-soft: #a6e83d;
  --accent-deep: #5f9900;
  --accent-glow: rgba(135, 217, 0, 0.35);
  --accent-tint: rgba(135, 217, 0, 0.08);
  --accent-fill: #87d900;          /* button/fill colour, same in both themes */
  --accent-fill-hover: #a6e83d;
  --on-accent: #0e1412;            /* text on accent fills */

  --slate: #69716d;
  --slate-light: #8d9590;

  --base: #17201d;
  --base-deep: #0e1412;
  --panel: rgba(28, 38, 34, 0.82);
  --card: #1f2a26;
  --card-hover: #25322d;
  --line: #2c3833;
  --line-strong: #3a4842;

  --text: #e4ebe7;
  --text-dim: #a9b2ad;
  --text-mute: var(--slate-light);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --nav-h: 68px;

  --bg-top: #121a17;
  --bg-glow-1: rgba(135, 217, 0, 0.07);
  --bg-glow-2: rgba(105, 113, 109, 0.16);
  --vignette: rgba(0, 0, 0, 0.55);
  --nav-solid: rgba(18, 26, 23, 0.94);
  --chip-bg: rgba(31, 42, 38, 0.6);
  --rain-head: 135, 217, 0;        /* r, g, b for the canvas */
  --rain-tail: 105, 113, 109;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --accent: #4f8a00;
  --accent-soft: #5f9e00;
  --accent-deep: #87d900;
  --accent-glow: rgba(95, 153, 0, 0.28);
  --accent-tint: rgba(135, 217, 0, 0.14);
  --accent-fill-hover: #9be52a;

  --slate-light: #6f7773;

  --base: #f3f6f2;
  --base-deep: #e9eee9;
  --panel: rgba(255, 255, 255, 0.8);
  --card: #ffffff;
  --card-hover: #f6f9f4;
  --line: #dde4df;
  --line-strong: #c8d1cb;

  --text: #17201d;
  --text-dim: #48514d;
  --text-mute: #69716d;

  --shadow: 0 18px 44px -22px rgba(23, 32, 29, 0.22);

  --bg-top: #f5f8f3;
  --bg-glow-1: rgba(135, 217, 0, 0.14);
  --bg-glow-2: rgba(105, 113, 109, 0.14);
  --vignette: rgba(23, 32, 29, 0.06);
  --nav-solid: rgba(255, 255, 255, 0.94);
  --chip-bg: rgba(255, 255, 255, 0.75);
  --rain-head: 95, 153, 0;

  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 28px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--base-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
strong { color: var(--text); font-weight: 600; }
::selection { background: var(--accent-fill); color: var(--on-accent); }

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 15% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, var(--bg-glow-2), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--base-deep) 100%);
}
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--vignette) 100%);
}
.bg-glyphs .g {
  position: absolute;
  font-family: "Times New Roman", serif;
  font-style: italic;
  color: var(--slate);
  opacity: 0.32;
  white-space: nowrap;
  user-select: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.bg-glyphs .g1 { top: 30%; left: 2%;  font-size: 2.2rem; }
.bg-glyphs .g2 { top: 55%; left: 3%;  font-size: 1.6rem; animation-delay: -4s; }
.bg-glyphs .g3 { top: 22%; right: 3%; font-size: 2rem;   animation-delay: -8s; }
.bg-glyphs .g4 { top: 80%; left: 2%;  font-size: 1.5rem; animation-delay: -2s; }
.bg-glyphs .g5 { bottom: 6%; right: 2%; font-family: var(--mono); font-style: normal; font-size: 2rem; animation-delay: -6s; }
.bg-glyphs .g6 { bottom: 3%; left: 2%; font-family: var(--font); font-style: normal; font-size: 1.4rem; animation-delay: -10s; }
.bg-glyphs .g7 { top: 62%; right: 3%; font-size: 1.7rem; animation-delay: -12s; }
.bg-glyphs .g8 { top: 12%; left: 3%; font-family: var(--mono); font-style: normal; font-size: 0.95rem; animation-delay: -3s; }

@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-18px); }
}

/* ---------- Shared ---------- */
.container {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
  padding-top: calc(var(--nav-h) + 40px);
  display: grid;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-title {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--text-dim);
  font-size: 0.94rem;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.card:hover { border-color: var(--line-strong); background: var(--card-hover); }
.card p + p { margin-top: 12px; }
.card h3 { color: var(--text); font-size: 1.08rem; font-weight: 600; margin-bottom: 12px; }
.card.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.card-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
}

.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.93rem;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.22s ease;
}
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-fill-hover); box-shadow: 0 8px 24px -6px var(--accent-glow); transform: translateY(-2px); }

/* GNOME foot logo via mask so it takes our colours */
.gnome-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/gnome.svg") center / contain no-repeat;
          mask: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/gnome.svg") center / contain no-repeat;
}
.gnome-mark.sm { width: 14px; height: 14px; }
.gnome-mark.lg { width: 64px; height: 64px; color: var(--text); }
.gnome-mark.xl { width: 110px; height: 110px; color: var(--text); }

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  padding-inline: 16px;
}
.nav {
  width: min(1240px, 100%);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-radius: 16px;
  transition: background 0.3s, border-color 0.3s;
}
.nav-wrap.scrolled .nav { background: var(--nav-solid); border-color: var(--line-strong); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:active { transform: rotate(-30deg); }
/* Show the icon of the theme you'd switch to */
.theme-toggle .fa-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .fa-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.brand { font-weight: 700; letter-spacing: 0.04em; font-size: 1.08rem; }
.brand:hover { color: var(--accent); }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 13px;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 56px;
  padding: 56px 64px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse at 25% 50%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 25% 50%, #000 0%, transparent 65%);
  pointer-events: none;
}

/* Circuit lines echoing the inspo */
.circuit { position: absolute; pointer-events: none; border-color: var(--line-strong); border-style: solid; }
.circuit.c-left { left: 0; top: 50%; width: 40px; height: 110px; border-width: 1px 1px 0 0; transform: translateY(-80%); border-top-right-radius: 4px; }
.circuit.c-left::after { content: ""; position: absolute; left: 0; bottom: -30px; width: 22px; height: 30px; border-right: 1px solid var(--line-strong); }
.circuit.c-right { right: 0; top: 0; width: 70px; height: 70%; border-width: 0 0 1px 1px; border-bottom-left-radius: 4px; }

/* Glow lives on the wrapper: clip-path on the frame would cut a filter off */
.hex-wrap { position: relative; z-index: 1; animation: hexGlow 5s ease-in-out infinite alternate; }
.hex-frame {
  width: 250px;
  aspect-ratio: 0.866;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(150deg, var(--accent), var(--slate) 55%, var(--line-strong));
  padding: 3px;
}
.hex-photo {
  position: relative;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, var(--card-hover), var(--base));
  display: grid;
  place-items: center;
}
.hex-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  z-index: 1;
}
.hex-initials {
  font-family: var(--mono);
  font-size: 4.2rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}
@keyframes hexGlow {
  from { filter: drop-shadow(0 0 18px rgba(135, 217, 0, 0.1)); }
  to   { filter: drop-shadow(0 0 34px rgba(135, 217, 0, 0.28)); }
}

.hero-text { position: relative; z-index: 1; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.eyebrow .sep { color: var(--accent); margin: 0 6px; }
.hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 21ch;
}
.hl { color: var(--accent); }
.hero-sub { margin-top: 16px; color: var(--text-dim); font-size: 0.98rem; }

/* The terminal stays dark in both themes */
.terminal {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #e4ebe7;
  background: #131b18;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-height: 42px;
}
.terminal .prompt { color: #87d900; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: #87d900;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
  margin-left: -4px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
}
.badges i, .badges .gnome-mark { color: var(--accent); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 22px 24px; border-radius: var(--radius); }
.stat .num, .stat .plus { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; font-family: var(--mono); }
.stat p { color: var(--text-mute); font-size: 0.86rem; margin-top: 8px; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 24px;
  align-items: start;
}
.col { padding: 40px 38px; display: grid; gap: 52px; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 34px;
  padding-bottom: 28px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 147px;
  top: 6px;
  bottom: -6px;
  width: 2px;
  background: linear-gradient(var(--slate), var(--line));
}
.tl-item:last-child::before { bottom: 0; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 142px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
.tl-date { text-align: right; color: var(--text-dim); font-size: 0.86rem; padding-top: 1px; font-family: var(--mono); }
.tl-body h3 { font-size: 1.1rem; font-weight: 600; }
.tl-org { color: var(--accent); font-size: 0.9rem; margin-top: 2px; }
.tl-points { margin-top: 10px; display: grid; gap: 6px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tl-item:last-child .tl-points { border-bottom: 0; padding-bottom: 0; }
.tl-points li { position: relative; padding-left: 16px; color: var(--text-dim); font-size: 0.9rem; }
.tl-points li::before { content: "›"; position: absolute; left: 0; color: var(--slate-light); }

.ticks { display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.75rem;
  color: var(--accent);
}

/* ---------- Talks ---------- */
.talks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.talk { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; }
.talk h3 { margin: 0; font-size: 0.98rem; }
.talk p { font-size: 0.82rem; color: var(--text-mute); }
.talk-year {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid rgba(135, 217, 0, 0.35);
  background: var(--accent-tint);
  padding: 3px 8px;
  border-radius: 6px;
}
.talk-icon { font-size: 1.6rem; width: 1.6rem; height: 1.6rem; color: var(--slate-light); transition: color 0.25s; }
.talk:hover .talk-icon { color: var(--accent); }

/* ---------- Membership ---------- */
.membership { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.member-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.member-name { font-weight: 700; font-size: 1.6rem; letter-spacing: 0.02em; }
.member-text { color: var(--text-dim); font-size: 0.93rem; display: grid; gap: 12px; }

/* ---------- Skills ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skill {
  aspect-ratio: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.skill i { font-size: 2.2rem; color: var(--text); transition: color 0.25s; }
.skill span { font-size: 0.8rem; color: var(--text-dim); }
.skill:hover {
  transform: translateY(-4px);
  border-color: rgba(135, 217, 0, 0.5);
  background: linear-gradient(160deg, var(--card-hover), var(--card));
  box-shadow: 0 10px 26px -12px var(--accent-glow);
}
.skill:hover i { color: var(--accent); }

.skill-groups { margin-top: 26px; display: grid; gap: 18px; }
.sg h3 { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.sg h3 i { color: var(--accent); font-size: 0.85rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  font-size: 0.78rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  background: var(--chip-bg);
  transition: all 0.2s;
}
.tags li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Community ---------- */
.big-icon { font-size: 4rem; color: var(--text); }
.community-cards .card:hover .gnome-mark,
.community-cards .card:hover .big-icon { color: var(--accent); }
.community-cards .gnome-mark, .big-icon { transition: color 0.25s; }

.roles { margin-top: 18px; display: grid; gap: 2px; }
.roles li {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}
.roles li:last-child { border-bottom: 0; }
.roles span { color: var(--slate-light); font-family: var(--mono); font-size: 0.78rem; padding-top: 2px; }

/* ---------- Certs & languages ---------- */
.certs { display: grid; gap: 10px; }
.certs li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-dim);
}
.certs i { color: var(--accent); font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }

.langs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 22px; }
.langs li { display: grid; grid-template-columns: 1fr auto; row-gap: 7px; }
.langs span { font-weight: 500; font-size: 0.92rem; }
.langs em { font-style: normal; color: var(--text-mute); font-size: 0.78rem; }
.langs .bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.langs .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1) 0.2s;
}
.reveal.visible .langs .bar::after,
.langs.visible .bar::after { transform: scaleX(1); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  gap: 32px;
  padding: 48px 52px;
}
.contact-intro > p { color: var(--text-dim); max-width: 60ch; }
.contact-list { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.contact-list a, .contact-list span { display: inline-flex; align-items: center; gap: 12px; color: var(--text); transition: color 0.2s; }
.contact-list i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--accent); }
.contact-list a:hover { color: var(--accent); }


/* ---------- Footer ---------- */
.footer {
  width: min(1240px, 100% - 32px);
  margin: 24px auto 0;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.social { display: flex; justify-content: center; gap: 14px; margin-bottom: 12px; }
.social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 1.25rem;
  color: var(--text);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.social a:hover { color: var(--accent); border-color: var(--line-strong); background: var(--card); }
.footer p { font-size: 0.8rem; color: var(--text-mute); }

/* Sits above the chat launcher */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 92px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--nav-solid);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 40;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent-fill); color: var(--on-accent); }

/* ---------- Interactive effects (driven by effects.js) ---------- */
/* Same motion as .reveal, slightly delayed so it trails its section */
.title-slide {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.12s, transform 0.7s ease 0.12s;
}
.title-slide.in { opacity: 1; transform: none; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 70;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-fill));
  box-shadow: 0 0 10px var(--accent-glow);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* Behind the panels (which are translucent), above the background */
.cursor-glow {
  position: fixed;
  top: -260px;
  left: -260px;
  width: 520px;
  height: 520px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.cursor-glow.on { opacity: 0.45; }

.tilt {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease-out, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.skill.tilt:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
}
/* Spotlight that follows the pointer inside the card */
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent-tint), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.tilt:hover::after { opacity: 1; }

.magnetic {
  transform: translate(var(--tx, 0px), var(--ty, 0px));
}
.btn.magnetic:hover {
  transform: translate(var(--tx, 0px), calc(var(--ty, 0px) - 2px));
}
.theme-toggle.magnetic:active {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(-30deg);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .bg-glyphs { display: none; }
}

@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .hero { padding: 48px 44px; gap: 40px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav { padding: 0 14px 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--nav-solid);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a::after { display: none; }
  .nav-links a.active { background: var(--accent-tint); color: var(--accent); }

  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 40px 28px; }
  .hero h1 { margin-inline: auto; }
  .hero-actions, .badges { justify-content: center; }
  .circuit { display: none; }
  .hex-frame { width: 200px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact { padding: 36px 28px; gap: 28px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { gap: 16px; padding-top: calc(var(--nav-h) + 30px); }
  .col { padding: 28px 18px; gap: 40px; }
  .hero { padding: 34px 18px; }
  .hex-frame { width: 170px; }
  .hex-initials { font-size: 3rem; }
  .terminal { font-size: 0.78rem; }

  .cards-2, .talks, .langs { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .skill i { font-size: 1.8rem; }
  .stat { padding: 18px; }
  .stat .num, .stat .plus { font-size: 1.8rem; }

  .membership { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; }
  .gnome-mark.xl { width: 80px; height: 80px; }

  /* Timeline collapses to a single rail on the left */
  .timeline { padding: 22px 18px; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding-left: 26px; }
  .tl-item::before { left: 5px; }
  .tl-item::after { left: 0; }
  .tl-date { text-align: left; font-size: 0.78rem; }

  .roles li { grid-template-columns: 1fr; gap: 2px; }
  .contact { padding: 28px 18px; }
  .contact-list { flex-direction: column; }
}

@media (max-width: 380px) {
  .skill-grid { gap: 8px; }
  .skill i { font-size: 1.6rem; }
  .skill span { font-size: 0.72rem; }
  .brand { font-size: 0.95rem; }
}

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