:root {
  --bg: #0c0b0a;
  --bg-2: #131110;
  --text: #ece9e3;
  --muted: #9d978b;
  --faint: #6c665b;
  --line: rgba(236, 233, 227, 0.10);
  --line-2: rgba(236, 233, 227, 0.18);
  --accent: #e0a96d;
  --accent-soft: rgba(224, 169, 109, 0.14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #0c0b0a; }

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

/* film grain texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0c0b0a;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* shell: sidebar + content */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 60px;
  position: relative;
  z-index: 2;
}

/* SIDEBAR */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 0 60px;
}
.side__top { display: flex; flex-direction: column; }

.avatar {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-2);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.avatar__initial {
  display: none;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--accent);
}
.avatar--empty .avatar__initial { display: block; }

.name {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.role {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 22px;
}
.tagline {
  font-size: 17px;
  color: var(--muted);
  max-width: 30ch;
  line-height: 1.55;
  margin-bottom: 52px;
}

/* nav with growing line */
.nav { display: flex; flex-direction: column; gap: 14px; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
}
.nav__line {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--faint);
  margin-right: 14px;
  transition: width 0.28s cubic-bezier(0.3, 0.7, 0.3, 1), background 0.28s, margin 0.28s;
}
.nav__txt {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.28s;
}
.nav a:hover .nav__line,
.nav a.active .nav__line { width: 56px; margin-right: 20px; background: var(--text); }
.nav a:hover .nav__txt,
.nav a.active .nav__txt { color: var(--text); }
.nav a.active .nav__line { background: var(--accent); }
.nav a.active .nav__txt { color: var(--text); }

/* socials */
.socials { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.socials a {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  position: relative;
  transition: color 0.2s;
}
.socials a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.socials a:hover { color: var(--text); }
.socials a:hover::after { width: 100%; }

/* CONTENT */
.content { padding: 100px 0 120px; max-width: 580px; }
.block { margin-bottom: 110px; scroll-margin-top: 100px; }
.block:last-of-type { margin-bottom: 70px; }
.block__label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 30px;
}

.prose p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 18px;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 500; }

/* building entries */
.entries { display: flex; flex-direction: column; }
.entry {
  padding: 26px 22px;
  margin: 0 -22px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.entry:hover {
  background: rgba(236, 233, 227, 0.025);
  border-color: var(--line);
}
.entry__kind {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.entry__name {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  transition: color 0.25s;
}
.entry:hover .entry__name { color: var(--accent); }
.entry__desc { font-size: 15.5px; color: var(--muted); margin-bottom: 18px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 30px;
}

.entry__repo {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  transition: color 0.2s;
}
.entry:hover .entry__repo { color: var(--muted); }
.entry__repo:hover { color: var(--accent); }

.skills {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skills__row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  align-items: baseline;
}
.skills__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.skills__items {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* contact */
.contact__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.cta, .ghost {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 10px;
  transition: transform 0.18s ease, background 0.2s, border-color 0.2s, color 0.2s;
}
.cta { background: var(--accent); color: #0c0b0a; }
.cta:hover { transform: translateY(-2px); background: #ecbb83; }
.ghost { border: 1px solid var(--line-2); color: var(--text); }
.ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* footer */
.foot {
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot p { font-family: var(--mono); font-size: 12px; color: var(--faint); line-height: 1.6; }

/* reveal */
.block, .entry { opacity: 1; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding: 0 28px; }
  .side {
    position: relative;
    height: auto;
    max-height: none;
    padding: 80px 0 10px;
  }
  .tagline { margin-bottom: 36px; }
  .nav { display: none; }
  .content { padding: 50px 0 90px; max-width: 100%; }
  .block { margin-bottom: 80px; }
  .name { font-size: clamp(38px, 11vw, 52px); }
}

@media (max-width: 480px) {
  .shell { padding: 0 20px; }
  .entry { margin: 0 -14px; padding: 22px 14px; }
  .contact__links { flex-direction: column; align-items: flex-start; }
  .cta, .ghost { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav__line, .entry, .cta, .ghost { transition: none; }
}


/* email toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* availability status */
.availability {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 42px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
  animation: statuspulse 2.4s ease-in-out infinite;
}
@keyframes statuspulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
