/* ==========================================================================
   rhea-shah23.github.io — shared styles
   To re-theme the whole site, change the variables in :root below.
   ========================================================================== */

:root {
    /* base */
    --bg:        #faf8f3;   /* warm paper */
    --surface:   #ffffff;
    --ink:       #23272e;
    --muted:     #6b7078;
    --rule:      #e3dfd5;

    /* accents: pastel / retro-terminal. swap these four to re-theme. */
    --accent:        #3f7d6b;   /* prompt, links (deep sage) */
    --accent-soft:   #dcebe4;   /* sage wash */
    --accent-2:      #c9805f;   /* terracotta, used sparingly */
    --accent-2-soft: #f6e3d9;
    --accent-3-soft: #e6e2f3;   /* lavender wash */
    --accent-4-soft: #f4ecc9;   /* butter wash */
    /* constellation node colors (one per topic cluster) */
    --c-letters: #c9805f;
    --c-minds:   #7a6bb8;
    --c-eyes:    #b39428;
    --c-systems: #3f7d6b;

    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --font-read: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
    --maxw: 1240px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    font-family: var(--font-mono);
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
a:hover { border-bottom-color: var(--accent); }

::selection { background: var(--accent-soft); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }

/* ---------- top bar ---------- */
.bar {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; }
.bar .path { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bar .path b { color: var(--ink); font-weight: 500; }
.bar nav { min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a {
    color: var(--muted); font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 0; white-space: nowrap;
}
.bar nav a:hover, .bar nav a.on { color: var(--ink); background: var(--accent-soft); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 40px; }
.hero .prompt { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.hero .prompt span { color: var(--accent); }
.hero h1 { font-size: clamp(34px, 7vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.cursor {
    display: inline-block; width: .5ch; height: .9em; margin-left: 6px; vertical-align: -0.08em;
    background: var(--accent); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .sub { margin-top: 18px; color: var(--muted); }
.hero .sub + .sub { margin-top: 4px; }
.hero .sub b { color: var(--ink); font-weight: 500; }
.hero .contact { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-size: 13.5px; }
.hero .contact span { color: var(--muted); }

/* ---------- sections ---------- */
section { padding: 40px 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 48px; }
section > :not(.sh) { grid-column: 2; }
.sh {
    grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: 76px;
    display: flex; flex-direction: column; gap: 4px; padding-top: 2px;
}
.sh .cmd { color: var(--muted); font-size: 12px; order: 2; }
.sh .cmd i { color: var(--accent); font-style: normal; }
.sh h2 { font-size: 13px; font-weight: 500; color: var(--ink); order: 1; }
.sh h2::before { content: '# '; color: var(--accent-2); }

.about p { margin-bottom: 14px; max-width: 92ch; }
.about p:last-child { margin-bottom: 0; }
.about em { font-style: normal; background: var(--accent-4-soft); padding: 0 3px; border-radius: 3px; }

.facts {
    margin-top: 22px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--rule);
    border-radius: 8px; font-size: 13px; display: grid; grid-template-columns: max-content 1fr; gap: 2px 18px;
}
.facts dt { color: var(--accent); }
.facts dd { color: var(--ink); }

/* ---------- entries (work / communities) ---------- */
.entry { padding: 20px 0; border-top: 1px dashed var(--rule); }
.sh + .entry { border-top: 0; padding-top: 0; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; }
.entry-head h3 { font-size: 15px; font-weight: 700; }
.entry-head h3 .role { font-weight: 400; color: var(--muted); }
.entry-head .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.entry ul { margin: 10px 0 0; padding: 0; list-style: none; }
.entry li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.entry li::before { content: '>'; position: absolute; left: 0; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
    font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: #2d5a4c;
}
.chip:nth-child(4n+2) { background: var(--accent-2-soft); color: #8a4e33; }
.chip:nth-child(4n+3) { background: var(--accent-3-soft); color: #51467e; }
.chip:nth-child(4n+4) { background: var(--accent-4-soft); color: #6f5f16; }

/* ---------- projects ---------- */
.feat { display: grid; grid-template-columns: 200px 1fr; gap: 8px 36px; padding: 26px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.sh + .feat { border-top: 0; padding-top: 4px; }
.feat .stat b { display: block; font-size: clamp(40px, 5vw, 58px); line-height: 1; letter-spacing: -0.04em; color: var(--accent); font-weight: 700; }
.feat .stat b.txt { font-size: clamp(28px, 3vw, 34px); letter-spacing: -0.03em; padding-top: 10px; }
.feat .stat span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.feat h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }
.feat h3 code { font-family: inherit; color: var(--accent); }
.feat h3 a { color: var(--ink); border: 0; }
.feat h3 a:hover { color: var(--accent); }
.feat .when { color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; }
.feat p { max-width: 70ch; }
.feat .go { display: inline-block; margin-top: 10px; font-size: 12.5px; }
.feat .go::after { content: ' →'; display: inline-block; transition: transform .2s; }
.feat:hover .go::after { transform: translateX(4px); }
.more { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 13px; }
.more .label { color: var(--muted); margin-bottom: 6px; }
.more a { display: grid; grid-template-columns: 200px 1fr; gap: 0 36px; padding: 5px 0; color: var(--ink); border: 0; }
.more a span { color: var(--muted); }
.more a:hover b { color: var(--accent); }

/* ---------- constellation ---------- */
.const { position: relative; }
.const svg { width: 100%; height: auto; display: block; overflow: visible; }
.const .edge { stroke: var(--rule); stroke-width: 1.2; fill: none; transition: stroke .2s, opacity .2s; }
.const .edge.hot { stroke: var(--ink); stroke-width: 1.6; }
.const .node { cursor: pointer; outline: none; transition: opacity .2s; }
.const .node circle { fill: var(--surface); stroke: var(--c); stroke-width: 2; transition: r .2s; }
.const .node.now circle { fill: var(--c); }
.const .node text { font: 13px var(--font-mono); fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.const .hub text { font-weight: 700; font-size: 12.5px; }
.const .zone { font: 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }
.const.focus .node, .const.focus .edge { opacity: .22; }
.const.focus .node.on, .const.focus .edge.hot { opacity: 1; }
.const .node:hover circle, .const .node:focus-visible circle { stroke-width: 3.5; }
.readout { margin-top: 14px; min-height: 3.2em; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; font-size: 13px; }
.readout .p { color: var(--accent); }
.readout .k { color: var(--muted); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c-systems); vertical-align: -1px; margin-right: 6px; }
.legend i.f { background: var(--c-systems); }
.topic-list { display: none; }
.topic-list h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; font-weight: 500; }
.topic-list li { list-style: none; padding: 4px 0 4px 18px; position: relative; }
.topic-list li::before { content: ''; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--c); }
.topic-list li.now::before { background: var(--c); }
.topic-list small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
footer { margin-top: 40px; padding: 28px 0 56px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 64px 0 18px; }
.page-head h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 60ch; }

/* ---------- blog ---------- */
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0; }
.tools input {
    font: inherit; font-size: 13px; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 6px;
    background: var(--surface); color: var(--ink); width: min(280px, 100%);
}
.tools input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: inherit; font-size: 12px; padding: 3px 11px; border-radius: 99px; border: 1px solid var(--rule); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.post-card { padding: 20px 0; border-top: 1px dashed var(--rule); display: flex; flex-direction: column; gap: 6px; }
.post-meta { color: var(--muted); font-size: 12px; }
.post-title { font-size: 16px; font-weight: 700; }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--accent); border-color: transparent; }
.post-excerpt { max-width: 68ch; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.post-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: #2d5a4c; }
.read-more { font-size: 12.5px; align-self: flex-start; }
.empty { color: var(--muted); padding: 24px 0; }
.load-more { font: inherit; font-size: 13px; margin-top: 18px; padding: 8px 18px; border-radius: 6px; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; display: block; }
.load-more:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- article ---------- */
.article { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.article .content { font-family: var(--font-read); font-size: 18px; line-height: 1.75; margin-top: 28px; }
.article .content p { margin-bottom: 1.25em; }
.article .content a { border-bottom: 1px solid var(--accent-soft); }

/* ---------- photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 22px; margin-top: 24px; }
.photo-item figure { margin: 0; }
.photo-frame { aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; background: var(--rule); border: 1px solid var(--rule); cursor: zoom-in; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.photo-frame:hover img { transform: scale(1.04); }
.photo-caption { margin-top: 10px; font-size: 13px; }
.photo-location { font-size: 12px; color: var(--muted); }

.lightbox { position: fixed; inset: 0; background: rgba(250,248,243,.96); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 24px; z-index: 50; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 6px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); }
.lightbox .cap { font-size: 13px; text-align: center; }
.lightbox .cap span { color: var(--muted); display: block; font-size: 12px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
    section { display: block; }
    .sh { position: static; flex-direction: row; align-items: baseline; gap: 12px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
    .sh .cmd { order: 0; }
    .feat, .more a { grid-template-columns: 1fr; }
    .feat .stat { display: flex; align-items: baseline; gap: 14px; }
    .feat .stat span { margin: 0; }
    .const { display: none; }
    .topic-list { display: block; padding: 0; }
}
@media (max-width: 640px) {
    body { font-size: 14px; }
    .bar .path { display: none; }
    .hero { padding-top: 56px; }
    .facts { grid-template-columns: 1fr; gap: 0; }
    .facts dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
