/* Split layout: fixed profile on the left, scrolling content on the right. */
:root {
  --bg: #0b1220;
  --text: #94a3b8;
  --heading: #e2e8f0;
  --muted: #64748b;
  --line: rgba(148, 163, 184, .14);
  --card: rgba(148, 163, 184, .06);
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, .1);
  --spot: rgba(29, 78, 216, .13);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f8fafc;
  --text: #475569;
  --heading: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .1);
  --card: rgba(15, 23, 42, .04);
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, .08);
  --spot: rgba(15, 118, 110, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--heading); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; color: var(--heading); line-height: 1.25; }
p { margin: 0 0 16px; }
strong { color: var(--heading); font-weight: 600; }
::selection { background: var(--accent-soft); color: var(--heading); }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--accent); color: var(--bg); border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }

.spotlight {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--x, 20%) var(--y, 10%), var(--spot), transparent 80%);
}

.layout {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px;
}

/* Left column */
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-block: 44px 28px;
  overflow-y: auto; scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.portrait {
  display: block; width: min(240px, 24vh); height: auto; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: center 20%;
  border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28), 0 0 0 6px var(--accent-soft);
  margin-bottom: 28px;
}
:root[data-theme="light"] .portrait { box-shadow: 0 14px 32px rgba(15, 23, 42, .14), 0 0 0 6px var(--accent-soft); }
.side h1 { font-size: clamp(2.3rem, 3.8vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.side h1 a:hover { color: var(--heading); }
.title { margin: 14px 0 12px; font-size: 1.2rem; font-weight: 500; color: var(--heading); }
.tagline { max-width: 330px; margin: 0 0 18px; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

.toc { display: flex; flex-direction: column; margin-top: 32px; }
.toc a {
  display: inline-flex; align-items: center; gap: 16px; padding: 7px 0; width: max-content;
  font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.toc .line { display: inline-block; width: 32px; height: 1px; background: var(--muted); transition: width .25s, background .25s; }
.toc a:hover, .toc a.active { color: var(--heading); }
.toc a:hover .line, .toc a.active .line { width: 64px; background: var(--heading); }

.side-bottom { display: flex; align-items: center; gap: 20px; padding-top: 24px; }
@media (min-width: 1024px) and (max-height: 940px) {
  .tagline { display: none; }
  .title { margin-bottom: 14px; }
}
.icon-link { color: var(--muted); display: inline-flex; }
.icon-link:hover { color: var(--heading); }
.cv-link { font-size: 14px; font-weight: 600; color: var(--heading); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.cv-link:hover { border-color: var(--accent); }
.theme-toggle {
  margin-left: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--heading); border-color: var(--muted); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* Right column */
main { padding-block: 88px 64px; }
.block { margin-bottom: 112px; scroll-margin-top: 88px; }
.block-title {
  font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--heading);
  margin-bottom: 28px; display: none;
}

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  padding: 20px; margin-inline: -20px; border-radius: 10px;
  transition: background .2s, box-shadow .2s;
}
.item:hover { background: var(--card); box-shadow: inset 0 1px 0 var(--line); }
.item-date { font: 500 12px/1.9 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 0; }
.item h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.item:hover h3 { color: var(--accent); }
.at { color: var(--text); font-weight: 500; }
.item p { font-size: 16px; margin-bottom: 0; }

.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 12px/1 var(--mono); padding: 7px 11px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); }

.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.edu h3 { font-size: 1rem; margin-top: 2px; }
.muted { color: var(--muted); margin: 2px 0 0; }
.small { font-size: 14px; }

.more-link { display: inline-flex; gap: 8px; margin-top: 32px; font-weight: 600; }
.more-link span { transition: transform .2s; }
.more-link:hover span { transform: translateX(4px); }

/* Featured project */
.featured {
  padding: 28px; margin: 0 -20px 24px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.eyebrow { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.featured h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.featured p { font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 4px; }
.stats div { padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.stats strong { display: block; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
.stats span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 4px; }

/* Skills */
.skills { display: grid; grid-template-columns: 160px 1fr; gap: 14px 20px; margin: 0; }
.skills dt { font: 500 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.skills dd { margin: 0; font-size: 16px; }
.sub { font-size: 1rem; margin: 40px 0 14px; }
.certs { margin: 0; padding-left: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; font-size: 15px; }
.certs li::marker { color: var(--accent); }

/* Contact */
.contact-lead { font-size: 1.1rem; color: var(--heading); max-width: 520px; }
.contact-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
.btn-linkedin {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 12px;
  background: #0a66c2; color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 24px rgba(10, 102, 194, .3); transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-linkedin:hover { color: #fff; background: #0959aa; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 102, 194, .38); }
.btn-mail {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px;
  color: var(--heading); border: 1px solid var(--line); background: var(--card); transition: border-color .2s, color .2s, transform .2s;
}
.btn-mail:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.foot { font-size: 13px; color: var(--muted); }

/* Narrow screens: stack the columns */
@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding: 0 24px; max-width: 720px; }
  .side { position: static; height: auto; padding-block: 48px 24px; gap: 8px; overflow: visible; }
  .portrait { width: min(240px, 62vw); }
  .toc { display: none; }
  main { padding-top: 32px; }
  .block { margin-bottom: 80px; }
  .block-title {
    display: block; position: sticky; top: 0; z-index: 5;
    margin: 0 -24px 20px; padding: 16px 24px;
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px);
  }
}
@media (max-width: 560px) {
  .layout { padding: 0 16px; }
  .block-title { margin-inline: -16px; padding-inline: 16px; }
  .item { grid-template-columns: 1fr; gap: 4px; margin-inline: 0; padding: 16px 0; }
  .item:hover { background: none; box-shadow: none; }
  .featured { margin-inline: 0; padding: 20px; }
  .stats { grid-template-columns: 1fr; }
  .edu, .certs { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
