/* ============================================================
   TEODOR STOYANOV — portfolio
   warm paper, seafoam accent, quiet confidence
   ============================================================ */
:root {
  --bg: #faf8f3;          /* warm paper */
  --warm: #f2ede3;        /* warm section band */
  --panel: #ffffff;
  --ink: #1c2b28;
  --muted: #5e6d69;
  --line: #e6e0d3;

  --mint: #2fb39c;        /* seafoam / bluish mint */
  --mint-deep: #0e8474;   /* accessible on light backgrounds */
  --mint-soft: #ddf2ec;   /* tinted fills */
  --amber: #d98e4a;       /* warm secondary */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --on-accent: #ffffff;   /* text on filled mint buttons */
  --footer-bg: #1c2b28;
  --rail-string: #c8c1b1;

  --radius: 16px;
  --shadow: 0 2px 6px rgba(28, 43, 40, .05), 0 14px 34px rgba(28, 43, 40, .07);
  --shadow-hover: 0 4px 10px rgba(28,43,40,.06), 0 22px 44px rgba(28,43,40,.1);

  color-scheme: light;
}

/* ============ dark mode ============
   follows the system setting unless the toggle has picked one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1614;
    --warm: #131c19;
    --panel: #18221f;
    --ink: #e4ece8;
    --muted: #93a39e;
    --line: #26332f;
    --mint: #3cc9b0;
    --mint-deep: #5fd6c0;
    --mint-soft: #16302a;
    --on-accent: #0b1a17;
    --footer-bg: #0a100e;
    --rail-string: #3a4743;
    --shadow: 0 2px 6px rgba(0, 0, 0, .25), 0 14px 34px rgba(0, 0, 0, .3);
    --shadow-hover: 0 4px 10px rgba(0, 0, 0, .3), 0 22px 44px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1614;
  --warm: #131c19;
  --panel: #18221f;
  --ink: #e4ece8;
  --muted: #93a39e;
  --line: #26332f;
  --mint: #3cc9b0;
  --mint-deep: #5fd6c0;
  --mint-soft: #16302a;
  --on-accent: #0b1a17;
  --footer-bg: #0a100e;
  --rail-string: #3a4743;
  --shadow: 0 2px 6px rgba(0, 0, 0, .25), 0 14px 34px rgba(0, 0, 0, .3);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, .3), 0 22px 44px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16.5px;
}

::selection { background: var(--mint-soft); color: var(--mint-deep); }

.mono { font-family: var(--font-mono); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

a { color: var(--mint-deep); }

/* ============ nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1.1rem, 4vw, 2.4rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
}
.nav__links { display: flex; gap: clamp(.9rem, 2.5vw, 1.8rem); }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  transition: color .2s;
}
.nav__links a:hover { color: var(--mint-deep); }
@media (max-width: 700px) { .nav__links { display: none; } }
.nav__actions { display: flex; align-items: center; gap: .6rem; }

/* theme toggle: shows a moon in light mode, a sun in dark mode */
.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--mint-deep); border-color: color-mix(in srgb, var(--mint) 50%, var(--line)); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* smooth color change when toggling */
body, .nav, .card, .footer, .section--warm { transition: background-color .3s, border-color .3s, color .3s; }

/* ============ buttons ============ */
.btn {
  display: inline-block;
  font-weight: 600; font-size: .95rem;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: 12px;
  transition: transform .18s, box-shadow .2s, background .2s, color .2s;
}
.btn--primary {
  background: var(--mint-deep); color: var(--on-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--mint) 35%, transparent);
}
.btn--primary:hover { background: var(--mint); transform: translateY(-2px); }
.btn--ghost {
  color: var(--mint-deep);
  border: 1.5px solid color-mix(in srgb, var(--mint) 55%, transparent);
}
.btn--ghost:hover { background: var(--mint-soft); transform: translateY(-2px); }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; border-radius: 10px; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.05rem; font-family: var(--font-mono); }

/* ============ hero ============ */
.hero { padding: clamp(3.5rem, 9vh, 6.5rem) 0 clamp(2.5rem, 6vh, 4rem); }
.hero__grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

.eyebrow {
  color: var(--mint-deep); font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.12; letter-spacing: -.01em;
  margin-bottom: 1.3rem;
}
.hero__title em {
  font-style: italic; color: var(--mint-deep);
}
.hero__lead { color: var(--muted); max-width: 34rem; margin-bottom: 1.4rem; }
.hero__roles { font-size: .88rem; color: var(--muted); margin-bottom: 2rem; }
.typer { color: var(--mint-deep); font-weight: 500; }
.caret { color: var(--mint); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; }

/* EFFECT 11: interactive whoami terminal */
.terminal {
  background: #16211d;
  border: 1px solid #2b3a35;
  border-radius: var(--radius);
  box-shadow: 0 6px 14px rgba(28,43,40,.12), 0 24px 48px rgba(28,43,40,.18);
  overflow: hidden;
}
.terminal__bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .65rem .95rem;
  background: #101915;
  border-bottom: 1px solid #2b3a35;
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--r { background: #ff5f56; }
.terminal__dot--y { background: #ffbd2e; }
.terminal__dot--g { background: #27c93f; }
.terminal__title { margin-left: auto; font-size: .72rem; color: #74847e; }
.terminal__screen {
  height: 280px; overflow-y: auto;
  padding: .95rem 1.05rem;
  font-size: .8rem; cursor: text;
}
.t-line { line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: #d7e8e1; font-family: var(--font-mono); }
.t-muted { color: #74847e; }
.t-accent { color: #e8b477; }
.t-prompt { color: var(--mint); }
.terminal__line { display: flex; align-items: center; gap: .5rem; margin-top: .15rem; }
.terminal__prompt { color: var(--mint); font-size: .8rem; }
.terminal__input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: #eaf5f0; font-size: .8rem;
  caret-color: var(--mint);
}
.terminal__input::placeholder { color: #566560; }

/* ============ highlights strip ============ */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.strip__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; padding-top: 1.6rem; padding-bottom: 1.6rem;
}
.strip__num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--mint-deep);
}
.strip__label { color: var(--muted); font-size: .85rem; }
.strip__unit { color: var(--muted); font-size: .6em; }

/* ============ sections (shared) ============ */
.section { padding: clamp(3.5rem, 9vh, 6rem) 0; }
.section--warm { background: var(--warm); }
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: .7rem;
}
.section__sub { color: var(--muted); max-width: 40rem; margin-bottom: 2.4rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--mint) 45%, var(--line));
  box-shadow: var(--shadow-hover);
}

/* scroll reveal (subtle) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ projects ============ */
.projects {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.3rem;
}
.project__type { font-size: .72rem; color: var(--mint-deep); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .45rem; }
.project__name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: .5rem; }
.project__desc { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.tags li {
  font-family: var(--font-mono); font-size: .72rem;
  background: var(--mint-soft); color: var(--mint-deep);
  border-radius: 999px; padding: .2rem .65rem;
}
.project { display: flex; flex-direction: column; }
.project__links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: auto; }
.project__link { font-size: .88rem; font-weight: 600; text-decoration: none; }
.project__link:hover { text-decoration: underline; }

/* featured project spans the full row */
.project--featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.7fr 1fr;
  gap: 2rem; align-items: center;
}
.project--featured .project__name { font-size: 1.75rem; }
.project__points { list-style: none; color: var(--muted); font-size: .93rem; margin-bottom: 1.1rem; }
.project__points li { position: relative; padding-left: 1.1rem; margin-bottom: .45rem; }
.project__points li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
}
.project__steps {
  list-style: none;
  background: var(--mint-soft); border-radius: 12px;
  padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.project__steps li { display: flex; gap: .8rem; align-items: baseline; font-size: .93rem; font-weight: 500; }
.project__steps span { color: var(--mint-deep); font-size: .75rem; }
@media (max-width: 760px) { .project--featured { grid-template-columns: 1fr; } }

/* heading row: title on the left, toaster on the right */
.projects__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
@media (max-width: 640px) {
  .projects__head { flex-direction: column; align-items: center; gap: 0; }
  .projects__head .toaster { margin: 8.5rem 0 2.4rem; }
}

/* toaster — a slice of toast pops up on hover, and once on its own when first seen */
.toaster {
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077,
    1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%,
    0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --elastic: linear(0, 0.01566 4.55%, 0.0625 9.091%, 0.25, 0.5625, 1, 0.8125 45.455%, 0.76566 49.995%,
    0.75, 0.76566 59.096%, 0.8125 63.636%, 1 72.727%, 0.95316 77.268%, 0.9375 81.818%,
    0.95309 86.359%, 1 90.909%, 0.98438 95.45%, 1);
  position: relative; isolation: isolate;
  flex-shrink: 0;
  margin: 0 3.2rem 2.4rem 0;   /* the toast pops up into the empty space beside the heading */
  cursor: pointer;
  outline: none;
}
.toaster:focus-visible .toaster__body { outline: 2px solid var(--mint); outline-offset: 6px; border-radius: 8px; }

.toaster__body { position: relative; z-index: 1; display: block; width: 180px; }
.toaster__body svg { display: block; width: 100%; height: auto; }
.toaster__body::after {   /* soft shadow underneath */
  content: ""; position: absolute; left: 6%; bottom: -8px; z-index: -1;
  width: 82%; height: 12px; border-radius: 50%;
  background: rgba(0, 0, 0, .3); filter: blur(9px);
}
.toaster__block { fill: #34443f; stroke: #c3cfcb; transition: fill .15s ease-out; }
.toaster__base { fill: #9fb0aa; stroke: #c3cfcb; }
.toaster__knob { fill: #9fb0aa; }
.toaster__lever {
  fill: var(--mint); stroke: #c3cfcb;
  translate: 0 45%;
  transition: translate .3s var(--spring), fill .3s ease-out;
}
.toaster__timer {
  outline: 2px dashed var(--mint); border-radius: 50%;
  animation: toasterTimer 1s ease-out infinite;
}
@keyframes toasterTimer { to { outline-color: var(--mint-deep); outline-offset: -2px; } }

/* the slice of toast: crust border, golden middle, toasted bottom */
.toaster__toast {
  position: absolute; left: 46%; bottom: 30%; z-index: -1;
  transform: translateX(-50%) rotate(-3deg);
  width: 150px; min-height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: 1.4rem .9rem 1.6rem;
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; line-height: 1.2;
  text-align: center; color: #4b3d14;
  text-shadow: -1px 0 rgba(183, 162, 130, .6);
  background: linear-gradient(#efe3b8 0%, #dcc98c 55%, #a8863a 100%);
  border: 7px solid #8a6a25;
  outline: 2px solid rgba(100, 86, 32, .3); outline-offset: -11px;
  border-radius: 46% 46% 14% 14% / 34% 34% 10% 10%;   /* bread-slice shape */
  opacity: 0; pointer-events: none;
  transition: bottom .55s var(--spring), opacity .3s ease, transform .55s var(--spring);
}
.toaster__toast small {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500; color: #6d561c; text-shadow: none;
}

/* popped state: hover, keyboard focus, or the automatic first pop */
.toaster:hover .toaster__toast,
.toaster:focus-visible .toaster__toast,
.toaster.is-popped .toaster__toast { bottom: 86%; opacity: 1; transform: translateX(-50%) rotate(-5deg); }
.toaster:hover .toaster__lever,
.toaster:focus-visible .toaster__lever,
.toaster.is-popped .toaster__lever { translate: 0; fill: var(--mint-deep); }
.toaster:hover .toaster__block,
.toaster:focus-visible .toaster__block,
.toaster.is-popped .toaster__block { fill: var(--mint); }
.toaster:hover .toaster__timer,
.toaster.is-popped .toaster__timer { animation-play-state: paused; }
.toaster:hover .toaster__body svg,
.toaster.is-popped .toaster__body svg { animation: toasterJump 2s var(--elastic) forwards -.5s; }
@keyframes toasterJump {
  0%, 50% { transform: translateY(0); }
  25% { transform: translateY(-.7em) rotate(-4deg); }
}

/* ============ experience timeline ============ */
.timeline { border-left: 2px solid color-mix(in srgb, var(--mint) 45%, var(--line)); }
.timeline__item {
  position: relative;
  display: grid; grid-template-columns: 130px 1fr; gap: 1.4rem;
  padding: 0 0 2rem 1.6rem;
}
.timeline__item::before {
  content: "";
  position: absolute; left: -7px; top: .45em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--mint); border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--mint);
}
.timeline__date { color: var(--muted); font-size: .78rem; padding-top: .2em; }
.timeline__role { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: .3rem; }
.timeline__role span { color: var(--mint-deep); }
.timeline__desc { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .timeline__item { grid-template-columns: 1fr; gap: .2rem; }
}
.timeline-group {
  font-family: var(--font-mono); font-weight: 500; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
}
.timeline + .timeline-group { margin-top: 1.4rem; }

/* ============ skills ============ */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
@media (max-width: 720px) { .skills { grid-template-columns: 1fr; } }
.skill-group__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: .9rem; }
.tags--lg { gap: .5rem; margin-bottom: 0; }
.tags--lg li { font-size: .8rem; padding: .3rem .8rem; }
.lang-list { list-style: none; }
.lang-list li {
  display: flex; justify-content: space-between;
  padding: .45rem 0; border-bottom: 1px dashed var(--line);
}
.lang-list li:last-child { border-bottom: none; }
.lang-list .mono { color: var(--mint-deep); font-size: .8rem; }

/* ============ footer ============ */
.footer {
  background: var(--footer-bg); color: #f2efe8;
  padding: clamp(3.5rem, 9vh, 6rem) 0 2.5rem;
}
.footer__inner { text-align: center; }
.footer__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: .8rem;
}
/* social buttons — layered icon, profile card above, label below */
.socials {
  display: flex; justify-content: center; gap: 2.6rem;
  margin: 7.6rem 0 3.6rem;   /* room for the profile card to open above */
}
.social { position: relative; }

.social__icon { display: block; position: relative; text-decoration: none; color: var(--mint); }
.social__layer { position: relative; width: 55px; height: 55px; transition: transform .3s; }
.social__layer span {
  position: absolute; inset: 0;
  border: 1px solid var(--mint);
  border-radius: 6px;
  transition: all .3s;
}
.social__glyph {
  display: flex; align-items: center; justify-content: center;
  background: #0a100e;
}
.social__glyph svg { width: 26px; height: 26px; }
.social__glyph svg:not([fill="none"]) { fill: currentColor; }

.social__label {
  position: absolute; left: 50%; bottom: -5px;
  transform: translateX(-50%);
  font-size: .85rem; font-weight: 500; white-space: nowrap;
  color: var(--mint);
  opacity: 0;
  transition: bottom .3s ease, opacity .3s ease;
}

.social__icon:hover .social__layer,
.social__icon:focus-visible .social__layer { transform: rotate(-35deg) skew(20deg); }
.social__icon:hover .social__layer span,
.social__icon:focus-visible .social__layer span { box-shadow: -1px 1px 3px var(--mint); }
.social__icon:hover .social__layer span:nth-child(1),
.social__icon:focus-visible .social__layer span:nth-child(1) { opacity: .2; }
.social__icon:hover .social__layer span:nth-child(2),
.social__icon:focus-visible .social__layer span:nth-child(2) { opacity: .4; transform: translate(5px, -5px); }
.social__icon:hover .social__layer span:nth-child(3),
.social__icon:focus-visible .social__layer span:nth-child(3) { opacity: .6; transform: translate(10px, -10px); }
.social__icon:hover .social__layer span:nth-child(4),
.social__icon:focus-visible .social__layer span:nth-child(4) { opacity: .8; transform: translate(15px, -15px); }
.social__icon:hover .social__layer span:nth-child(5),
.social__icon:focus-visible .social__layer span:nth-child(5) { opacity: 1; transform: translate(20px, -20px); }
.social__icon:hover .social__label,
.social__icon:focus-visible .social__label { bottom: -35px; opacity: 1; }
.social__icon:focus-visible { outline: none; }

.social__card {
  position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 5;
  transform: translate(-50%, 10px);
  padding: 10px;
  border-radius: 15px;
  opacity: 0; pointer-events: none;
  transition: all .3s;
  box-shadow: inset 5px 5px 5px rgba(0, 0, 0, .2), inset -5px -5px 15px rgba(255, 255, 255, .06),
    5px 5px 15px rgba(0, 0, 0, .3), -5px -5px 15px rgba(255, 255, 255, .04);
  text-align: left;
}
.social:hover .social__card,
.social:focus-within .social__card { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.social__profile {
  background: #16211d;
  border: 1px solid color-mix(in srgb, var(--mint) 55%, transparent);
  border-radius: 10px 15px;
  padding: 10px 12px;
  white-space: nowrap;
}
.social__user { display: flex; gap: 10px; align-items: center; }
.social__avatar {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  color: #0b1a17; background: var(--mint);
  border-radius: 10px;
}
.social__name { font-weight: 700; font-size: .95rem; color: var(--mint); line-height: 1.3; }
.social__handle { font-family: var(--font-mono); font-size: .72rem; color: #d7e8e1; }
.social__about { color: #aebab6; font-size: .8rem; padding-top: 6px; }
@media (max-width: 480px) {
  .socials { gap: 1.8rem; }
  /* keep the outer cards on screen: open them inward instead of centred */
  .social:first-child .social__card { left: 0; transform: translate(0, 10px); }
  .social:last-child .social__card { left: auto; right: 0; transform: translate(0, 10px); }
  .social:first-child:hover .social__card, .social:first-child:focus-within .social__card,
  .social:last-child:hover .social__card, .social:last-child:focus-within .social__card { transform: translate(0, 0); }
}
.footer .btn--primary { background: var(--mint); color: #10221e; }
.footer .btn--primary:hover { background: #4ecdb6; }
.footer__fine { color: #7d8a86; font-size: .74rem; }
.footer__fine a { color: #7d8a86; }
.footer__fine a:hover { color: var(--mint); }

/* ============================================================
   OPTIONAL EFFECTS — each block is numbered; delete any block
   (plus its HTML/JS with the same number) to remove the effect
   ============================================================ */

/* EFFECT 1: scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; z-index: 70;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--mint), var(--mint-deep));
  border-radius: 0 3px 3px 0;
}

/* EFFECT 2: section rail — every topic is a (silent) guitar string.
   Thin strings up top, wound strings at the bottom, like a real neck. */
.rail {
  position: fixed; right: 1rem; top: 50%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; gap: .55rem;
}
.rail a {
  position: relative;
  display: block;
  width: 42px; height: 16px;
}
.rail__string {
  position: absolute; left: 0; right: 0; top: 50%;
  height: var(--gauge, 2px);
  transform: translateY(-50%);
  background: var(--rail-string);
  border-radius: 2px;
  transition: background .2s, box-shadow .2s;
}
.rail a:nth-child(1) .rail__string { --gauge: 1px; }
.rail a:nth-child(2) .rail__string { --gauge: 1.5px; }
.rail a:nth-child(3) .rail__string { --gauge: 2px; }
.rail a:nth-child(4) .rail__string { --gauge: 2.5px; }
.rail a:nth-child(5) .rail__string { --gauge: 3px; }
.rail a:nth-child(6) .rail__string { --gauge: 3.5px; }
.rail a:nth-child(7) .rail__string { --gauge: 4px; }
.rail a:hover .rail__string { background: color-mix(in srgb, var(--mint) 55%, var(--rail-string)); }
.rail a.active .rail__string {
  background: var(--mint);
  box-shadow: 0 0 8px color-mix(in srgb, var(--mint) 55%, transparent);
}
/* silent pluck wobble when a string becomes the active topic */
.rail a.plucked .rail__string { animation: railPluck .6s ease-out; }
@keyframes railPluck {
  0%   { transform: translateY(-50%); }
  12%  { transform: translateY(calc(-50% - 4px)); }
  28%  { transform: translateY(calc(-50% + 3px)); }
  45%  { transform: translateY(calc(-50% - 2px)); }
  62%  { transform: translateY(calc(-50% + 1.5px)); }
  80%  { transform: translateY(calc(-50% - 1px)); }
  100% { transform: translateY(-50%); }
}
.rail a::after {
  content: attr(data-label);
  position: absolute; right: calc(100% + .55rem); top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: .7rem;
  color: var(--mint-deep); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .2rem .6rem; white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .18s;
}
.rail a:hover::after { opacity: 1; }
@media (max-width: 900px) { .rail { display: none; } }

/* EFFECT 3: gentle scroll snap between topics */
html { scroll-snap-type: y proximity; }
.hero, .section, .footer { scroll-snap-align: start; }
.hero, .section, .footer, .strip { scroll-margin-top: 3.6rem; }

/* EFFECT 5: tilt + cursor glow on project cards (JS drives transform) */
.project { position: relative; overflow: hidden; }
.project::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--mint) 11%, transparent), transparent 65%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.project:hover::after { opacity: 1; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
  .rail a.plucked .rail__string { animation: none; }
  .toaster__timer, .toaster:hover .toaster__body svg, .toaster.is-popped .toaster__body svg { animation: none; }
  .toaster__toast, .toaster__lever { transition: none; }
}
