/* ==========================================================================
   Shahriar Rahman Rubayet — portfolio
   Design system + layout. No frameworks, no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Light theme is the base definition; dark overrides below. */
  --bg:            #fbfaf8;
  --bg-veil:       rgba(251, 250, 248, 0.72);
  --surface:       #ffffff;
  --surface-2:     #f5f3ef;
  --surface-3:     #edeae3;
  --border:        #e6e2d9;
  --border-strong: #d5cfc2;

  --text:          #14161b;
  --text-2:        #565b66;
  --text-3:        #858a94;

  --accent:        #a96a00;   /* AA on --bg, safe for text + icons */
  --accent-solid:  #f0ab1d;   /* decorative fills, never behind small text */
  --accent-fg:     #1a1204;   /* text on --accent-solid */
  --accent-soft:   rgba(169, 106, 0, 0.10);
  --accent-line:   rgba(169, 106, 0, 0.28);

  --shadow-sm: 0 1px 2px rgba(20, 22, 27, 0.05), 0 1px 3px rgba(20, 22, 27, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 22, 27, 0.06), 0 12px 32px rgba(20, 22, 27, 0.07);
  --shadow-lg: 0 8px 24px rgba(20, 22, 27, 0.08), 0 24px 64px rgba(20, 22, 27, 0.10);

  --grid-line:  rgba(20, 22, 27, 0.045);
  --glow:       rgba(240, 171, 29, 0.20);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, monospace;

  /* Spacing / rhythm */
  --shell:   1180px;
  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(5rem, 11vw, 9rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

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

:root:not([data-theme="light"]) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg:            #0a0a0c;
    --bg-veil:       rgba(10, 10, 12, 0.72);
    --surface:       #131418;
    --surface-2:     #191b21;
    --surface-3:     #21242b;
    --border:        #262931;
    --border-strong: #363a44;

    --text:          #edeef2;
    --text-2:        #a4aab6;
    --text-3:        #6f747f;

    --accent:        #f4b942;
    --accent-solid:  #f4b942;
    --accent-fg:     #14100a;
    --accent-soft:   rgba(244, 185, 66, 0.12);
    --accent-line:   rgba(244, 185, 66, 0.30);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40), 0 12px 32px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.46), 0 24px 64px rgba(0, 0, 0, 0.40);

    --grid-line:  rgba(255, 255, 255, 0.038);
    --glow:       rgba(244, 185, 66, 0.16);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #0a0a0c;
  --bg-veil:       rgba(10, 10, 12, 0.72);
  --surface:       #131418;
  --surface-2:     #191b21;
  --surface-3:     #21242b;
  --border:        #262931;
  --border-strong: #363a44;

  --text:          #edeef2;
  --text-2:        #a4aab6;
  --text-3:        #6f747f;

  --accent:        #f4b942;
  --accent-solid:  #f4b942;
  --accent-fg:     #14100a;
  --accent-soft:   rgba(244, 185, 66, 0.12);
  --accent-line:   rgba(244, 185, 66, 0.30);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40), 0 12px 32px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.46), 0 24px 64px rgba(0, 0, 0, 0.40);

  --grid-line:  rgba(255, 255, 255, 0.038);
  --glow:       rgba(244, 185, 66, 0.16);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

* { margin: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

::selection { background: var(--accent-solid); color: var(--accent-fg); }

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 640;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--accent-solid);
  color: var(--accent-fg);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(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;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }

.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: clamp(2.75rem, 6vw, 4.25rem);
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent-line);
}

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}

.section-lede {
  color: var(--text-2);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  max-width: 58ch;
}

/* --------------------------------------------------------------------------
   4. Buttons & chips
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent-solid);
  color: var(--accent-fg);
  box-shadow: 0 6px 20px var(--glow);
}
.btn--primary:hover { box-shadow: 0 10px 28px var(--glow); }

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

.btn--bare {
  padding-inline: 0.35rem;
  color: var(--text-2);
}
.btn--bare:hover { color: var(--accent); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* --------------------------------------------------------------------------
   5. Header / nav
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.masthead.is-stuck {
  background: var(--bg-veil);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: var(--accent-solid);
  color: var(--accent-fg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex: none;
}
.brand__text { font-size: 0.95rem; }
.brand__text span { color: var(--text-3); font-weight: 450; }

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

.nav__link {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav__link[aria-current="true"] { color: var(--text); }
.nav__link[aria-current="true"]::after { transform: scaleX(1); }

.masthead__actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
              background-color 0.2s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun  { display: none; }
}

.nav-toggle { display: none; }

/* Mobile nav */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__link { padding: 0.85rem 0.25rem; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
  .nav__link[aria-current="true"] { color: var(--accent); }
  .nav-toggle { display: grid; }
  .masthead__actions .btn { display: none; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero__backdrop {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 78%);
}

.hero__aura {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
}
.hero__aura--a {
  width: 44vw; height: 44vw;
  max-width: 620px; max-height: 620px;
  top: -14%; right: -6%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
}
.hero__aura--b {
  width: 34vw; height: 34vw;
  max-width: 460px; max-height: 460px;
  bottom: -18%; left: -10%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  opacity: 0.35;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.status__dot {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
}
.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

.hero__name {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.hero__title {
  margin-top: 0.9rem;
  font-size: clamp(2.4rem, 6.2vw, 4.15rem);
  letter-spacing: -0.038em;
  font-weight: 660;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.09em;
  background: var(--accent-line);
  border-radius: 2px;
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 54ch;
  font-size: clamp(1.02rem, 1.7vw, 1.15rem);
  color: var(--text-2);
}
.hero__lede strong { color: var(--text); font-weight: 580; }

.hero__cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero__socials {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero__socials .divider {
  width: 1px; height: 1.4rem;
  background: var(--border);
  margin-inline: 0.5rem;
}
.hero__socials .mail {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  transition: color 0.2s var(--ease);
}
.hero__socials .mail:hover { color: var(--accent); }

/* Portrait */
.portrait { position: relative; justify-self: center; width: min(100%, 380px); }

.portrait__frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1.06;
}
.portrait__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.5s var(--ease), transform 0.7s var(--ease);
}
.portrait:hover .portrait__frame img { filter: grayscale(0.15) contrast(1); transform: scale(1.03); }
.portrait__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(165deg, transparent 45%, var(--accent-soft) 100%);
  pointer-events: none;
}

.portrait__badge {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.portrait__badge b {
  font-size: 1.05rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-family: var(--font-mono);
}
.portrait__badge span {
  font-size: 0.7rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.portrait__badge--tl { top: 1.25rem; left: -1.75rem; animation: float 6s ease-in-out infinite; }
.portrait__badge--br { bottom: 1.5rem; right: -1.5rem; animation: float 6s ease-in-out 1.6s infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(100%, 260px); justify-self: start; }
  .portrait__badge--tl { left: auto; right: -1rem; top: -1rem; }
  .portrait__badge--br { right: auto; left: -1rem; }
}
@media (max-width: 480px) {
  .portrait__badge--tl, .portrait__badge--br { display: none; }
}

/* --------------------------------------------------------------------------
   7. Metrics strip
   -------------------------------------------------------------------------- */

.metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 5rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--border);
  overflow: hidden;
}
.metric {
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.metric__value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric__value i { font-style: normal; color: var(--accent); }
.metric__label {
  font-size: 0.8125rem;
  color: var(--text-3);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   8. Experience timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  padding-left: 2.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-line), var(--border) 42%, transparent);
}

.job {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.job:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.job::before {
  content: "";
  position: absolute;
  left: -2.02rem;
  top: 2rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.job--current::before {
  border-color: var(--accent);
  background: var(--accent-solid);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.job__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.job__role {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 620;
  letter-spacing: -0.02em;
}
.job__company {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.95rem;
  color: var(--text-2);
}
.job__company b { color: var(--accent); font-weight: 580; }
.job__company .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.job__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-3);
  white-space: nowrap;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.job--current .job__meta {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.job__points {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.job__points li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.62;
}
.job__points li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.66em;
  width: 5px; height: 5px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.job__points strong { color: var(--text); font-weight: 580; }
.job__points em {
  font-style: normal;
  color: var(--accent);
  font-weight: 580;
  font-family: var(--font-mono);
  font-size: 0.94em;
}

.job__stack { margin-top: 1.35rem; padding-top: 1.15rem; border-top: 1px dashed var(--border); }

@media (max-width: 560px) {
  .timeline { padding-left: 1.6rem; }
  .timeline::before { left: 0.28rem; }
  .job::before { left: -1.45rem; top: 1.7rem; }
}

/* --------------------------------------------------------------------------
   9. Skills
   -------------------------------------------------------------------------- */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.skill-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.skill-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }

.skill-card__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}
.skill-card__icon {
  display: grid;
  place-items: center;
  width: 2.15rem; height: 2.15rem;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.skill-card__icon svg { width: 1.1rem; height: 1.1rem; }
.skill-card__title { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.015em; }

/* --------------------------------------------------------------------------
   10. Work / project cards
   -------------------------------------------------------------------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 1.85rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.work-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-solid), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.work-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.work-card:hover::before { transform: scaleX(1); }

.work-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.work-card__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.work-card__org {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  white-space: nowrap;
}
.work-card__title {
  font-size: 1.12rem;
  font-weight: 620;
  letter-spacing: -0.022em;
  margin-bottom: 0.6rem;
}
.work-card__body {
  color: var(--text-2);
  font-size: 0.9125rem;
  line-height: 1.62;
  margin-bottom: 1.25rem;
}
.work-card__body strong { color: var(--text); font-weight: 580; }

.work-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding: 0.85rem 0;
  margin-top: auto;
  border-top: 1px dashed var(--border);
  margin-bottom: 0.9rem;
}
.work-card__stat { display: flex; flex-direction: column; }
.work-card__stat b {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.work-card__stat span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   11. About / education
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.prose { display: flex; flex-direction: column; gap: 1.15rem; }
.prose p { color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.075rem); }
.prose strong { color: var(--text); font-weight: 580; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.quote {
  margin-top: 0.75rem;
  padding: 1.25rem 1.4rem;
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.quote p { font-size: 1.02rem; color: var(--text); font-style: italic; }
.quote cite { display: block; margin-top: 0.5rem; font-size: 0.82rem; font-style: normal; color: var(--text-3); }

.side-card {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.side-card + .side-card { margin-top: 1rem; }
.side-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.edu__degree { font-size: 1.02rem; font-weight: 620; letter-spacing: -0.02em; }
.edu__school { margin-top: 0.35rem; color: var(--accent); font-size: 0.9rem; font-weight: 540; }
.edu__meta {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

.fact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.fact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-list dt, .fact-list span:first-child { color: var(--text-3); }
.fact-list b { font-weight: 560; text-align: right; }

/* --------------------------------------------------------------------------
   12. Contact + footer
   -------------------------------------------------------------------------- */

.contact { text-align: center; }
.contact__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-inline: auto;
}
.contact__title em { font-style: normal; color: var(--accent); }
.contact__lede {
  margin: 1.35rem auto 0;
  max-width: 50ch;
  color: var(--text-2);
  font-size: clamp(1rem, 1.7vw, 1.1rem);
}
.contact__cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.copy-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.6rem 0.95rem;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-2);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.copy-mail:hover { border-color: var(--accent); color: var(--accent); }
.copy-mail svg { width: 0.95rem; height: 0.95rem; flex: none; }

.site-foot {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
}
.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-3);
}
.site-foot__links { display: flex; align-items: center; gap: 0.3rem; }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.2s var(--ease);
}
.to-top:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   13. Scroll reveal
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.no-js [data-reveal] { opacity: 1; transform: none; }

@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;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .portrait__badge--tl, .portrait__badge--br { animation: none; }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .hero__aura, .hero__backdrop, .contact__cta, .site-foot__links,
  .theme-toggle, .nav-toggle, .copy-mail { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
  .job, .work-card, .skill-card, .side-card { break-inside: avoid; border-color: #ccc; }
}
