/* ============================================
   Harry Kapoor — harrykapoor.com
   White, typography-first, mature.
   Inspired by: michaelvillar, paco.me,
   leerob, brianlovin, molly.info
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
    background: #ffffff;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

::selection {
    background: #1a1a1a;
    color: #ffffff;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    border-bottom: 1px solid #e8e8e8;
}

.hero-content {
    /* vertically centered by flexbox */
}

.hero-statement {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 2.8rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.hero-intro {
    font-size: 1.1rem;
    color: #666666;
    font-weight: 300;
    line-height: 1.6;
}

.hero-socials {
    display: flex;
    gap: 20px;
    margin-top: 28px;
}

.hero-social-link {
    font-size: 0.8rem;
    color: #999999;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

.hero-social-link:hover {
    color: #1a1a1a;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: #cccccc;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Hot Take --- */
.hot-take {
    margin-bottom: 32px;
    padding: 24px 0;
    border-bottom: 1px solid #e8e8e8;
}

.hot-take p {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.7;
    color: #1a1a1a;
}

/* --- Currently --- */
.section-currently {
    padding: 48px 0;
    border-bottom: 1px solid #e8e8e8;
}

.currently-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    margin-bottom: 12px;
}

.currently-text {
    font-size: 0.95rem;
    color: #444444;
    line-height: 1.75;
    margin-bottom: 12px;
}

.last-updated {
    font-size: 0.75rem;
    color: #cccccc;
}

.typing-container {
    display: inline;
}

.typing-text {
    color: #1a1a1a;
    font-weight: 400;
}

.cursor {
    font-weight: 300;
    color: #999999;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* --- Floating Nav Indicator --- */
.nav-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.nav-dot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    text-decoration: none;
    color: #cccccc;
    transition: color 0.3s ease;
}

.nav-dot span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cccccc;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-dot:hover span {
    opacity: 1;
    transform: translateX(0);
}

.nav-dot:hover::after,
.nav-dot.active::after {
    background: #1a1a1a;
    transform: scale(1.4);
}

.nav-dot.active {
    color: #1a1a1a;
}

.nav-dot.active span {
    opacity: 1;
    transform: translateX(0);
}

/* --- Sections --- */
.section {
    padding: 80px 0;
    border-bottom: 1px solid #e8e8e8;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    margin-bottom: 20px;
}

.subsection {
    margin-bottom: 56px;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* --- Typography --- */
.body-text {
    font-size: 0.95rem;
    color: #444444;
    line-height: 1.75;
    margin-bottom: 24px;
}

.body-text em {
    font-style: italic;
    color: #1a1a1a;
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    margin-bottom: 16px;
}

.aside {
    color: #999999;
    font-size: 0.85rem;
}

.subtle {
    color: #888888;
    font-style: italic;
    font-size: 0.9rem;
}

.placeholder-text {
    color: #bbbbbb;
    font-style: italic;
    font-size: 0.9rem;
}

/* --- Company Logos --- */
.company-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.company-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #999999;
    letter-spacing: 0.04em;
}

.company-sep {
    font-size: 0.8rem;
    color: #d0d0d0;
}

/* --- Lists --- */
.ordered-list {
    list-style: none;
    counter-reset: item;
    padding: 0;
    margin-bottom: 24px;
}

.ordered-list li {
    counter-increment: item;
    font-size: 0.95rem;
    color: #444444;
    line-height: 1.75;
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
}

.ordered-list li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #999999;
    font-weight: 500;
    font-size: 0.85rem;
}

.minimal-list {
    list-style: none;
    padding: 0;
}

.minimal-list li {
    font-size: 0.95rem;
    color: #444444;
    line-height: 1.75;
    padding-left: 16px;
    position: relative;
    margin-bottom: 8px;
}

.minimal-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #cccccc;
}

/* --- Social Proof --- */
.social-proof {
    margin: 48px 0;
    padding-left: 24px;
    border-left: 2px solid #e8e8e8;
}

.pull-quote {
    margin-bottom: 32px;
}

.pull-quote:last-child {
    margin-bottom: 0;
}

.pull-quote p {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 8px;
}

.pull-quote cite {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 0.8rem;
    color: #999999;
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.project-card {
    padding: 20px 24px;
    background: #ffffff;
    transition: background 0.2s ease;
}

.project-card:hover {
    background: #fafafa;
}

.project-card.muted {
    background: #fafafa;
}

.project-card.muted:hover {
    background: #f5f5f5;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.project-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
}

.project-badge {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    color: #999999;
    background: #f5f5f5;
}

.project-badge.live {
    color: #1a1a1a;
    background: #f0f0f0;
}

.project-badge.wip {
    color: #999999;
    background: #f5f5f5;
}

.project-desc {
    font-size: 0.85rem;
    color: #888888;
    line-height: 1.5;
}

.project-detail {
    font-size: 0.8rem;
    color: #aaaaaa;
    line-height: 1.6;
    margin-top: 8px;
}

.in-the-works {
    margin-top: 48px;
}

/* --- Stack Grid --- */
.stack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.stack-item {
    padding: 14px 20px;
    background: #ffffff;
    transition: background 0.2s ease;
}

.stack-item:hover {
    background: #fafafa;
}

.stack-item.primary {
    background: #fafafa;
}

.stack-item.primary:hover {
    background: #f5f5f5;
}

.stack-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
}

.stack-meta {
    display: block;
    font-size: 0.7rem;
    color: #999999;
    margin-top: 2px;
}

/* --- Mental Models --- */
.mental-models {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.model-card {
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.model-card:hover {
    background: #fafafa;
}

.model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.model-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
}

.model-toggle {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 300;
    transition: transform 0.3s ease, color 0.3s ease;
    user-select: none;
}

.model-card.expanded .model-toggle {
    transform: rotate(45deg);
    color: #999999;
}

.model-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 24px;
}

.model-card.expanded .model-body {
    max-height: 300px;
    padding: 0 24px 20px;
}

.model-list {
    list-style: none;
    padding: 0;
}

.model-list li {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.7;
    margin-bottom: 6px;
}

.model-list li strong {
    color: #1a1a1a;
    font-weight: 500;
}

.model-text {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.7;
}

/* --- Bets --- */
.bets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bet-card {
    padding: 20px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
}

.bet-text {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
    color: #333333;
}

/* --- Culture --- */
.culture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.culture-item {
    padding: 24px 0;
}

.culture-value {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.culture-line {
    width: 32px;
    height: 1px;
    background: #cccccc;
}

/* --- Advice --- */
.advice-list {
    list-style: none;
    counter-reset: advice;
    padding: 0;
}

.advice-list li {
    counter-increment: advice;
    position: relative;
    padding-left: 36px;
    margin-bottom: 32px;
}

.advice-list li::before {
    content: counter(advice);
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.4rem;
    color: #cccccc;
    font-weight: 300;
}

.advice-list li strong {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.advice-detail {
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.7;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #999;
    color: #1a1a1a;
}

.filter-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

/* --- Channels Grid --- */
.channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.channel-card {
    display: block;
    padding: 14px 20px;
    background: #ffffff;
    transition: all 0.25s ease;
    text-decoration: none;
}

.channel-card:hover {
    background: #fafafa;
}

.channel-card.hidden {
    display: none;
}

.channel-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
}

/* --- Reads List --- */
.reads-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.read-item {
    display: block;
    padding: 16px 20px;
    background: #ffffff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.read-item:hover {
    background: #fafafa;
}

.read-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.read-source {
    display: block;
    font-size: 0.75rem;
    color: #999999;
}

.read-note {
    display: block;
    font-size: 0.85rem;
    color: #888888;
    font-style: italic;
    margin-top: 6px;
    line-height: 1.5;
}

/* --- Expandable Sections --- */
.expandable-section {
    position: relative;
}

.expandable-section.collapsed .expandable-hidden {
    display: none;
}

.expand-btn {
    display: block;
    width: 100%;
    padding: 14px 0;
    margin-top: 12px;
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.expand-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.expandable-section:not(.collapsed) .expand-btn {
    margin-top: 12px;
    color: #bbbbbb;
    border-color: #f0f0f0;
}

.expandable-section:not(.collapsed) .expand-btn:hover {
    color: #888888;
    border-color: #e0e0e0;
}

/* --- Page Links --- */
.page-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid #cccccc;
    transition: border-color 0.2s ease;
    margin-top: 8px;
}

.page-link:hover {
    border-color: #1a1a1a;
}

/* --- Subscribe --- */
.subscribe-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.subscribe-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s ease;
}

.subscribe-input:focus {
    border-color: #999999;
}

.subscribe-input::placeholder {
    color: #cccccc;
}

.subscribe-btn {
    padding: 12px 24px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.subscribe-btn:hover {
    background: #333333;
}

.subscribe-note {
    font-size: 0.8rem;
    color: #999999;
    margin-top: 8px;
    min-height: 1.2em;
}

/* --- Connect --- */
.section-connect {
    border-bottom: none;
}

.connect-links {
    display: flex;
    gap: 32px;
}

.connect-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid #cccccc;
    transition: border-color 0.2s ease;
}

.connect-link:hover {
    border-color: #1a1a1a;
}

/* --- Footer --- */
.footer {
    padding: 48px 0;
    text-align: center;
}

.footer p {
    font-size: 0.8rem;
    color: #cccccc;
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body {
        padding: 0 20px;
    }

    .hero {
        height: 100vh;
    }

    .hero-statement {
        font-size: 2rem;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .nav-indicator {
        display: none;
    }

    .section {
        padding: 60px 0;
    }

    .culture-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .channels-grid {
        grid-template-columns: 1fr;
    }

    .connect-links {
        flex-direction: column;
        gap: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Edit mode
   ============================================ */

#edit-toolbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

#edit-toolbar button {
    background: #2e2e2e;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    padding: 5px 11px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
    transition: background 0.15s;
}

#edit-toolbar button:hover {
    background: #3a3a3a;
}

#edit-save-status {
    color: #888;
    min-width: 72px;
}

body.edit-mode [contenteditable]:hover {
    outline: 1px dashed #cccccc;
    outline-offset: 3px;
    cursor: text;
    border-radius: 2px;
}

body.edit-mode [contenteditable]:focus {
    outline: 2px solid #1a1a1a;
    outline-offset: 3px;
    border-radius: 2px;
}

@media (min-width: 1200px) {
    body {
        max-width: 680px;
    }
}
