/* ==========================================================================
   Onkar K. Pawar — portfolio stylesheet
   Hand-written, no framework. Light + dark themes driven by [data-theme].
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light;

  --navy-950: #050f24;
  --navy-900: #0a1f44;
  --navy-800: #102a56;

  --accent: #1b6df0;
  --accent-2: #4d95ff;
  --accent-strong: #1557c7;
  --accent-soft: rgba(27, 109, 240, 0.1);
  --accent-line: rgba(27, 109, 240, 0.28);

  --bg: #ffffff;
  --bg-tint: #f5f8fd;
  --surface: #ffffff;
  --surface-2: #f2f6fc;
  --border: #e2e8f2;
  --border-strong: #cfd9e8;

  --text: #0d1b34;
  --text-2: #33425e;
  --muted: #5a6a86;
  --on-dark: #eef3fb;
  --on-dark-muted: #a3b2cc;

  --shadow-sm: 0 1px 2px rgba(13, 27, 52, 0.05), 0 2px 8px rgba(13, 27, 52, 0.04);
  --shadow-md: 0 2px 4px rgba(13, 27, 52, 0.05), 0 12px 28px rgba(13, 27, 52, 0.08);
  --shadow-lg: 0 8px 20px rgba(13, 27, 52, 0.08), 0 28px 60px rgba(13, 27, 52, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shell: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4.25rem, 9vw, 7.5rem);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --arch-line: #94a6c4;
  --header-h: 68px;
}

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

  --accent: #4d95ff;
  --accent-2: #7fb2ff;
  --accent-strong: #6ba6ff;
  --accent-soft: rgba(77, 149, 255, 0.14);
  --accent-line: rgba(77, 149, 255, 0.32);

  --bg: #070d1a;
  --bg-tint: #0b1425;
  --surface: #101a2e;
  --surface-2: #16223a;
  --border: #1e2b45;
  --border-strong: #2b3b5c;

  --text: #e9eefa;
  --text-2: #c3cee2;
  --muted: #97a5c0;
  --on-dark: #eef3fb;
  --on-dark-muted: #a3b2cc;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

  --arch-line: #5b6d8e;
}

/* ------------------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.003em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
h4 { font-size: 0.83rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

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

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

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

/* --------------------------------------------------------------- sections */

.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: var(--bg-tint); }

.section--dark {
  background:
    radial-gradient(120% 120% at 15% 0%, #14315f 0%, transparent 55%),
    radial-gradient(90% 90% at 90% 100%, #123064 0%, transparent 60%),
    var(--navy-900);
  color: var(--on-dark);
}
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .section-lead { color: var(--on-dark-muted); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.735rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.section--dark .eyebrow { color: var(--accent-2); }

.section-lead {
  margin-top: 0.9rem;
  font-size: clamp(1rem, 1.4vw, 1.075rem);
  color: var(--muted);
  max-width: 60ch;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.05rem; height: 1.05rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 109, 240, 0.28);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; box-shadow: 0 8px 22px rgba(27, 109, 240, 0.34); }

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

.btn-ghost--onDark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: none;
}
.btn-ghost--onDark:hover { background: rgba(255, 255, 255, 0.13); color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.icon-btn .icon { width: 1.15rem; height: 1.15rem; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(13, 27, 52, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); }
.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--navy-900), var(--accent));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-mark--sm { width: 30px; height: 30px; font-size: 0.7rem; border-radius: 9px; }

.brand-text { display: grid; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.02em; }
.brand-role { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.01em; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 0.15rem; }
.site-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.885rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a.is-active { color: var(--accent); font-weight: 600; }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-toggle { display: none; }
.nav-toggle-close { display: none; }

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

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.1s linear;
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) 0;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 20%, transparent 78%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.hero-glow--a {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -14%; right: -8%;
  background: radial-gradient(circle, rgba(27, 109, 240, 0.35), transparent 68%);
}
.hero-glow--b {
  width: 34vw; height: 34vw; max-width: 460px; max-height: 460px;
  bottom: 4%; left: -10%;
  background: radial-gradient(circle, rgba(10, 31, 68, 0.18), transparent 70%);
}
[data-theme='dark'] .hero-glow--b {
  background: radial-gradient(circle, rgba(77, 149, 255, 0.18), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.3rem;
  padding: 0.42rem 0.95rem 0.42rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #17b26a;
  box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.18);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(23, 178, 106, 0.05); }
}

.hero h1 { display: grid; gap: 0.35rem; margin-bottom: 1.1rem; }
.hero-name { color: var(--text); }
.hero-title-line {
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  max-width: 44ch;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  font-weight: 500;
  color: var(--text-2);
}

.hero-summary { max-width: 60ch; margin-bottom: 1.9rem; color: var(--muted); font-size: 0.975rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.6rem; }

.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.83rem;
  font-weight: 500;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.link-pill:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }
.link-pill .icon { width: 1rem; height: 1rem; }

/* hero visual */

.hero-visual { display: grid; justify-items: center; gap: 1.5rem; }

.portrait {
  position: relative;
  width: min(360px, 62vw);
  aspect-ratio: 1;
}
.portrait picture, .portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.portrait img {
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.portrait-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px dashed var(--accent-line);
  animation: spin 44s linear infinite;
}
.portrait-ring::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  width: min(420px, 100%);
  margin: 0;
}
.hero-stat {
  padding: 0.85rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.hero-stat dt { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; line-height: 1.35; }
.hero-stat dd {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.hero-marquee {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 2.25rem;
  padding: 1.1rem var(--gutter);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-tint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ about */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.about-lead {
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 2rem;
}

/* min 280px keeps the four facts as a balanced 2x2 instead of 3 + 1 orphan */
.about-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0.75rem;
}
.fact {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.fact:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.fact-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.fact dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact dd { margin: 0.15rem 0 0; font-size: 0.925rem; font-weight: 600; color: var(--text); line-height: 1.45; }

.about-side {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.about-side::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.side-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.side-title .icon { color: var(--accent); }
.side-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.side-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ chips */

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.5;
}
.chips--tech .chip { background: var(--surface-2); }
.chips--stack .chip { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.chips--sec .chip {
  background: rgba(23, 178, 106, 0.09);
  border-color: rgba(23, 178, 106, 0.28);
  color: #0f7a49;
}
[data-theme='dark'] .chips--sec .chip { color: #4fd196; }
[data-theme='dark'] .chips--stack .chip { color: var(--accent-2); }

.section--dark .chip {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--on-dark-muted);
}

/* ----------------------------------------------------------------- impact */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.stat-card {
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.2);
}
.stat-value {
  margin: 0 0 0.35rem;
  font-size: clamp(2.2rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(100deg, #fff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { margin: 0 0 0.4rem; font-weight: 600; color: #fff; font-size: 0.98rem; line-height: 1.4; }
.stat-detail { margin: 0; font-size: 0.855rem; color: var(--on-dark-muted); line-height: 1.6; }

/* --------------------------------------------------------------- timeline */

.timeline { position: relative; display: grid; gap: 1.1rem; padding-left: 1.9rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 65%);
  border-radius: 2px;
}

.tl-item { position: relative; }
.tl-marker {
  position: absolute;
  left: -1.9rem;
  top: 1.55rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--border-strong);
}
.tl-item--current .tl-marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.tl-card {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.tl-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }
.tl-item--current .tl-card {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 42%),
    var(--surface);
}
.tl-item--past .tl-card { background: var(--surface); }

.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  margin-bottom: 0.85rem;
}
.tl-role { font-size: clamp(1.1rem, 2vw, 1.35rem); }
.tl-company { margin: 0.2rem 0 0; font-weight: 600; color: var(--accent); font-size: 0.94rem; }
.tl-period {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge--live { background: rgba(23, 178, 106, 0.12); color: #0f7a49; border: 1px solid rgba(23, 178, 106, 0.3); }
.badge--live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #17b26a;
}
[data-theme='dark'] .badge--live { color: #4fd196; }
.badge--source {
  margin-right: 0.6rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid var(--accent-line);
}
[data-theme='dark'] .badge--source { color: var(--accent-2); }

.tl-summary { color: var(--muted); font-size: 0.94rem; margin-bottom: 1rem; }

.tl-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.tl-metrics li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tl-metrics strong { font-size: 1.02rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.tl-metrics span { font-size: 0.78rem; color: var(--muted); }

.tl-details { margin-bottom: 1.1rem; border-top: 1px solid var(--border); }
.tl-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 0.7rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.18s ease;
}
.tl-details summary::-webkit-details-marker { display: none; }
.tl-details summary:hover { color: var(--accent); }
.tl-chevron {
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}
.tl-details[open] .tl-chevron { transform: rotate(-135deg) translateY(-2px); }

.bullets { display: grid; gap: 0.6rem; padding-bottom: 0.3rem; }
.bullets li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.65;
}
.bullets li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.8;
}
.bullets--sm li { font-size: 0.885rem; }
.bullets--impact li::before {
  border-radius: 50%;
  background: #17b26a;
  opacity: 1;
}

/* --------------------------------------------------------------- projects */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.25rem;
  align-items: start;
}

.project-card {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.28s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.project-card:hover::before { opacity: 1; }

.project-context {
  margin: 0 0 0.5rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-card h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin-bottom: 0.65rem; }
.project-purpose { color: var(--muted); font-size: 0.935rem; margin: 0; }

.project-role {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  font-size: 0.875rem;
  color: var(--text-2);
}
.project-role-key {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.project-block h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-block h4 .icon { width: 0.95rem; height: 0.95rem; color: #17b26a; }

.project-meta { display: grid; gap: 0.55rem; margin: 0; }
.meta-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--border);
}
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.1rem;
}
.meta-row dd { margin: 0; font-size: 0.865rem; color: var(--text-2); font-family: var(--mono); }

/* ----------------------------------------------------------- architecture */

.arch-source {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.87rem;
  color: var(--muted);
}

.arch-figure {
  margin: 0 0 2.25rem;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.arch-svg { width: 100%; min-width: 640px; height: auto; display: block; }
.arch-caption {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.arch-lane text {
  font: 700 11px var(--font);
  letter-spacing: 0.14em;
  fill: var(--muted);
}
.arch-node rect {
  fill: var(--surface-2);
  stroke: var(--border-strong);
  stroke-width: 1.2;
}
.arch-node--accent rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.6; }
.arch-node--sec rect { fill: var(--surface); stroke: var(--border-strong); stroke-dasharray: 5 4; }
.arch-node--data rect { fill: var(--surface-2); stroke: var(--accent-line); }
.arch-title { font: 600 14px var(--font); fill: var(--text); text-anchor: middle; }
.arch-sub { font: 400 11px var(--font); fill: var(--muted); text-anchor: middle; }
.arch-edge path {
  fill: none;
  stroke: var(--arch-line);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.arch-edge-label text {
  font: 600 10.5px var(--font);
  fill: var(--muted);
  letter-spacing: 0.04em;
}

.arch-layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.arch-layer {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.arch-layer:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.arch-layer h3 {
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.arch-layer ul { display: grid; gap: 0.8rem; }
.arch-layer li { display: grid; gap: 0.15rem; }
.arch-layer strong { font-size: 0.905rem; color: var(--text); font-weight: 600; }
.arch-layer span { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

.arch-runtime {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----------------------------------------------------------------- skills */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.skill-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-line); }
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.98rem;
}
.skill-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ------------------------------------------------------------ credentials */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  align-items: start;
}
.cred-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.cred-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.cred-card--wide { grid-column: span 2; }
.cred-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.98rem;
}
.cred-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cred-list { display: grid; gap: 1rem; }
.cred-list--split { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 1.5rem; }
.cred-list li {
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s ease;
}
.cred-list li:hover { border-left-color: var(--accent); }
.cred-name { margin: 0 0 0.2rem; font-weight: 600; font-size: 0.925rem; color: var(--text); line-height: 1.45; }
.cred-meta { margin: 0 0 0.25rem; font-size: 0.855rem; color: var(--text-2); }
.cred-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.79rem;
  color: var(--muted);
}
.cred-foot time { font-weight: 600; color: var(--accent); }
.cred-card--award .cred-icon { background: rgba(240, 176, 27, 0.14); color: #b8860b; }
[data-theme='dark'] .cred-card--award .cred-icon { color: #f0b01b; }

/* ---------------------------------------------------------------- contact */

.section--contact { padding-block: clamp(3.5rem, 7vw, 6rem); }
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.contact-copy h2 { margin-bottom: 0.4rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.75rem; }

.contact-list { display: grid; gap: 0.6rem; }
.contact-list a,
.contact-static {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--on-dark);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.contact-list a:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateX(4px);
  color: #fff;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 10px;
  background: rgba(77, 149, 255, 0.16);
  color: var(--accent-2);
}
.contact-text { display: grid; min-width: 0; }
.contact-text strong { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-muted); }
.contact-text > span { font-size: 0.925rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-arrow { margin-left: auto; color: var(--on-dark-muted); transition: transform 0.2s ease, color 0.2s ease; }
.contact-list a:hover .contact-arrow { color: var(--accent-2); transform: translateX(3px); }

/* ----------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  padding-block: 2.25rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; }
.footer-nav a { font-size: 0.83rem; color: var(--muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-meta { margin: 0; font-size: 0.79rem; color: var(--muted); }

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(27, 109, 240, 0.35);
  transform: translateY(16px) rotate(-90deg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) rotate(-90deg); }
.to-top:hover { background: var(--accent-strong); color: #fff; }

/* -------------------------------------------------------------- animation */

/* Reveal styles apply only when JS is available (the .js class is set inline
   in <head>), so the page is fully visible without JavaScript. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay='1'] { transition-delay: 0.07s; }
.js [data-reveal-delay='2'] { transition-delay: 0.14s; }
.js [data-reveal-delay='3'] { transition-delay: 0.21s; }
.js [data-reveal-delay='4'] { transition-delay: 0.28s; }
.js [data-reveal-delay='5'] { transition-delay: 0.35s; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  /* Flatten the visual column so the portrait can sit above the heading while
     the stats drop below the copy — the name stays high on the page. */
  .hero-visual { display: contents; }
  .portrait { order: -1; width: min(168px, 38vw); }
  .hero-stats { order: 1; width: 100%; max-width: 540px; margin-top: 0.5rem; }
  .cred-card--wide { grid-column: span 1; }
}

@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-panel { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }

  .brand-role { display: none; }
  .nav-toggle { display: inline-grid; }
  .header-cta span { display: none; }
  .header-cta { padding: 0.55rem 0.7rem; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    padding: 0.6rem var(--gutter) 1.1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0.1rem; }
  .site-nav a { padding: 0.8rem 0.9rem; font-size: 0.95rem; border-radius: 10px; }
  .site-nav a.is-active::after { display: none; }
  .site-nav a.is-active { background: var(--accent-soft); }

  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle-open { display: none; }
  body.nav-open .nav-toggle-close { display: block; }
}

@media (max-width: 620px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; text-align: left; }
  .hero-stat dd { margin: 0; font-size: 1.2rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .timeline { padding-left: 1.4rem; }
  .tl-marker { left: -1.4rem; }
  .meta-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .cred-list--split { grid-template-columns: 1fr; }
  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .hero-eyebrow { font-size: 0.74rem; }
  .link-pill { font-size: 0.78rem; }
}

/* --------------------------------------------------------- reduced motion */

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

/* ------------------------------------------------------------------ print */

@media print {
  .site-header, .to-top, .hero-bg, .hero-marquee, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding-block: 1rem; break-inside: avoid; }
  .tl-details[open] > summary { display: none; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #555; }
}
