* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background-color: #191919;
    color: #b2b2b2;  
    font-size: 13px;
}

.layout {
    display: flex;
}

.sidebar {
    width: 200px;
    height: 100vh;
    position: sticky;
    top: 0;

    padding: 1.8rem 1.2rem;
    border-right: 1px solid #2a2a2a;
}

.logo {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #e6e6e6;
}

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

nav li {
    margin-bottom: 0.2rem;
}

nav a {
    display: block;
    padding: 0.25rem 0.5rem;

    color: #8a8a8a;
    text-decoration: none;
    border-radius: 3px;

    transition: color 0.15s ease, background-color 0.15s ease;
}

nav a:hover {
    color: #e0e0e0;
    background-color: #1a1a1a;
}

nav a.active {
    color: #fff;
    background-color: #222;
}

.content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: 720px;

    letter-spacing: 0.01em;
}

h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #e0e0e0;
}

h2 + p {
    margin-top: 0.2rem;
}

p {
    color: #b2b2b2;
    line-height: 1.7;
    margin: 0;
}

p + p {
    margin-top: 0.8rem;
}

a {
    color: #ca82ff;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #e2b7ff;
    text-decoration: underline;
}

section {
    margin-bottom: 3rem;
    padding-bottom: 0.5rem;
}
::selection {
    background: #333;
    color: #fff;
}

hr {
    border: none;
    border-top: 1px solid #2a2a2a;
    margin: 2rem 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #b48ead;
    width: 0%;
    z-index: 1000;
}

pre {
    background-color: #151515;
    border: 1px solid #2a2a2a;

    padding: 0.8rem;
    margin: 1rem 0;

    overflow-x: auto;
    border-radius: 4px;
}

code {
    font-family: inherit;
    font-size: 12px;
    color: #dcdcdc;
}

p code {
    background-color: #222;
    padding: 2px 4px;
    border-radius: 3px;
    color: #e6e6e6;
}   


code {
    color: #dcdcdc;
}

.code-keyword {
    color: #c586c0;
}

.code-type {
    color: #4ec9b0;
}

.code-number {
    color: #b5cea8;
}

.code-const {
    color: #569cd6;
}

.code-comment {
    color: #6a9955;
}
pre code {
    display: block;
    line-height: 1.5;
}

.register {
    display: flex;
    gap: 4px;
    margin: 1rem 0;
}

.bit {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #222;
    border: 1px solid #2a2a2a;
    cursor: pointer;

    font-size: 12px;
    user-select: none;
}

.bit.active {
    background: #ca82ff;
    color: #000;
}

.bit:hover {
    background: #333;
}

#pi {
    height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;

    background: #151515;
    border: 1px solid #2a2a2a;
    padding: 0.8rem;
    border-radius: 4px;

    font-size: 12px;
}

.spin {
    width: 800px;
    height: auto;

    animation: spin 4s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

details {
    margin-top: 0.5rem;
}


.project-img {
    width: calc(100% + 4rem);
    margin-left: -2rem;

    border: 1px solid #2a2a2a;
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
}

.contact-form {
    margin-top: 1rem;
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: #151515;
    border: 1px solid #2a2a2a;
    color: #b2b2b2;

    padding: 0.5rem;
    font-family: inherit;
    font-size: 12px;

    margin-bottom: 0.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ca82ff;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    background: #ca82ff;
    color: #000;
    border: none;

    padding: 0.4rem 0.8rem;
    font-size: 12px;

    cursor: pointer;
}

.contact-form button:hover {
    background: #e2b7ff;
}

#lightbox {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.85);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 2000;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;

    border: 1px solid #2a2a2a;
}

.project-img {
    cursor: zoom-in;
}
.hero {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.hero-prompt {
  font-size: 11px;
  color: #555;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
}

.hero-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #ca82ff;
  margin-left: 4px;
  opacity: 0.8;
  animation: hero-blink 1.1s step-end infinite;
}

@keyframes hero-blink {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 0; }
}

.hero-name {
  font-size: 3.2rem;
  font-weight: 600;
  color: #e6e6e6;
  margin: 0 0 0.8rem 0;
  line-height: 1;
  letter-spacing: -1px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.8rem;
}

.hero-tag {
  font-size: 11px;
  color: #8a8a8a;
  background: #151515;
  border: 1px solid #2a2a2a;
  padding: 2px 7px;
  border-radius: 3px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-tag:hover { color: #e0e0e0; }

.hero-tag.accent {
  color: #ca82ff;
  border-color: #3a2a4a;
}

.hero-tag.accent:hover { color: #e2b7ff; }

.hero-status {
  font-size: 11px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-dot {
  width: 5px;
  height: 5px;
  background: #b48ead;
  border-radius: 50%;
  animation: hero-pulse 2.5s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.tree {
    position: relative;
    padding-left: 14px;
}

.tree::before {
    content: "";
    position: absolute;

    left: 5px;
    top: 18px;
    bottom: 0;

    width: 1px;
    background: #2a2a2a;
}

.tree .tree {
    margin-left: 12px;
}

.tree summary {
    position: relative;
}

.tree summary::after {
    content: "";
    position: absolute;

    left: -9px;
    top: 50%;

    width: 8px;
    height: 1px;

    background: #2a2a2a;
}
.tree > *:not(summary) {
    margin-left: 4px;
}

summary {
    cursor: pointer;
    position: relative;
    padding-left: 14px;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::marker {
    content: "";
}

summary::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #888;
    transition: transform 0.15s ease;
}

details[open] > summary::before {
    transform: rotate(90deg);
    color: #ca82ff;
}