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

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
  transition:
    background 0.6s ease,
    color 0.6s ease;
}

/* ---------------- THEME ---------------- */
:root {
  --bg: #fafafa;
  --text: #111;
  --muted: #555;
}

/* Black / grey dark mode */
[data-theme="dark"] {
  --bg: #0b0d10;
  --text: #e7e7e7;
  --muted: #a1a1aa;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ---------------- FRAME (AGENCY STYLE) ---------------- */
.home_container {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 5rem;

  min-height: calc(100vh - 3rem);
  margin: 1.5rem;
  padding: 3rem;

  border-radius: 18px;
  border: 3px solid color-mix(in srgb, var(--text) 14%, transparent);

  overflow: hidden;
}

/* ---------------- LEFT (STICKY SIDEBAR) ---------------- */
.home_left {
  position: sticky;
  height: calc(100vh - 6rem);

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* BRAND */
.lead {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;

  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 1.2s ease forwards;
}

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

.lead span {
  display: block;
  font-size: 2rem;
  opacity: 0.65;
  margin-top: 0.5rem;
}

/* ---------------- ANIMATED BIO ---------------- */
.heading {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 36ch;
}

/* enhanced animation */
.heading span {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  filter: blur(2px);
  animation: revealWord 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* staggered timing */
.heading span:nth-child(1) {
  animation-delay: 0.15s;
}
.heading span:nth-child(2) {
  animation-delay: 0.25s;
}
.heading span:nth-child(3) {
  animation-delay: 0.35s;
}
.heading span:nth-child(4) {
  animation-delay: 0.45s;
}
.heading span:nth-child(5) {
  animation-delay: 0.55s;
}
.heading span:nth-child(6) {
  animation-delay: 0.65s;
}
.heading span:nth-child(7) {
  animation-delay: 0.75s;
}
.heading span:nth-child(8) {
  animation-delay: 0.85s;
}
.heading span:nth-child(9) {
  animation-delay: 0.95s;
}
.heading span:nth-child(10) {
  animation-delay: 1.05s;
}
.heading span:nth-child(11) {
  animation-delay: 1.15s;
}
.heading span:nth-child(12) {
  animation-delay: 1.25s;
}
.heading span:nth-child(13) {
  animation-delay: 1.35s;
}
.heading span:nth-child(14) {
  animation-delay: 1.45s;
}
.heading span:nth-child(15) {
  animation-delay: 1.55s;
}
.heading span:nth-child(16) {
  animation-delay: 1.65s;
}
.heading span:nth-child(17) {
  animation-delay: 1.75s;
}

/* NAV */
.section_nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav_link {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
}

.nav_link:hover {
  color: var(--text);
}

.nav_link.active {
  color: var(--text);
  transform: translateX(4px);
}

.nav_link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--text);
  border-radius: 2px;
}

/* TOGGLE */
.theme-toggle {
  align-self: flex-start;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
}

/* ---------------- RIGHT CONTENT ---------------- */
.home_right {
  overflow-y: auto;
  scroll-behavior: smooth;
}

.home_right section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(125, 125, 125, 0.15);
  max-width: 65ch;
}

.home_right h2 {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.home_right p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 52ch;
  text-align: justify;
  padding: 0.2rem;
}

.link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ---------------- ANIMATIONS ---------------- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealWord {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
  .home_container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .home_left {
    position: relative;
    height: auto;
  }
}
