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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--name-bar-bg);
    color: var(--name-bar-text);
    padding: 8px 16px;
    z-index: 1000;
    font-weight: 700;
    text-decoration: none;
    border: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Focus States (Accessibility) */
:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Touch Action for Interactive Elements */
button, a, input, .dark-mode-toggle, [role="button"] {
    touch-action: manipulation;
}

/* Reduced Motion (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visually Hidden (for screen readers only) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    /* Light mode colors */
    --bg-color: #F5F5F5;
    --text-color: rgba(0, 0, 0, 0.5);
    --text-color-dark: rgb(31, 34, 32);
    --name-bar-bg: #000;
    --name-bar-text: #fff;
    --black-4: rgba(0, 0, 0, 0.4);
    --black-2: rgba(0, 0, 0, 0.2);
    --blue-grey-bg: #e2e8f0;
    --link-color: #FF4500;
    --selection-bg: rgba(255, 69, 0, 0.4);
    --selection-color: #000;
    --border-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
    --input-border: #ccc;
    --input-bg: #fff;
    --button-bg: #fff;
    --button-bg-gradient: #f7f7f7;
    --video-bg: #ddd;
    --form-hover-bg: rgba(0, 0, 0, 0.05);
    --factoid-color: rgba(0, 0, 0, 0.5);
    --transition: background-color 0.075s ease, color 0.075s ease, border-color 0.075s ease;
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-color: #000;
    --text-color: rgba(255, 255, 255, 0.7);
    --text-color-dark: #fff;
    --name-bar-bg: #fff;
    --name-bar-text: #000;
    --black-4: rgba(255, 255, 255, 0.4);
    --black-2: rgba(255, 255, 255, 0.2);
    --blue-grey-bg: #1a1a1a;
    --link-color: #FF6B35;
    --selection-bg: rgba(255, 107, 53, 0.4);
    --selection-color: #fff;
    --border-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
    --input-border: rgba(255, 255, 255, 0.3);
    --input-bg: #1a1a1a;
    --button-bg: #1a1a1a;
    --button-bg-gradient: #2a2a2a;
    --video-bg: #2a2a2a;
    --form-hover-bg: rgba(255, 255, 255, 0.05);
    --factoid-color: rgba(255, 255, 255, 0.5);
}

html {
    background-color: #000;
    overflow-x: hidden;
    color-scheme: light;
}

[data-theme="dark"] {
    color-scheme: dark;
}

body {
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Courier New', monospace;
    font-size: 15px;
    font-weight: 500;
    line-height: 23px;
    color: var(--text-color);
    letter-spacing: -0.2px;
    background-color: var(--bg-color);
    transition: var(--transition);
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Font rendering optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Font feature settings for better typography */
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    font-variant-ligatures: common-ligatures;
    font-variant-numeric: normal;
    /* Text rendering optimizations */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    /* Better text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    position: relative;
    overflow-x: hidden;
}

.site-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(-40px);
    animation: fadeInSlide 0.4s ease-in-out forwards;
}

/* Noise texture overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100%;
    background: url(assets/noise.gif);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.4;
    mix-blend-mode: soft-light;
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] body::before,
body:has([data-theme="dark"])::before {
    opacity: 0.1;
}

html[data-theme="dark"] body::before {
    opacity: 0.1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 1em;
    color: var(--text-color-dark);
    /* Typography optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
    /* Prevent text size adjustment on mobile */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

p {
    margin-bottom: 0.8em;
    /* Better text rendering for paragraphs */
    text-rendering: optimizeLegibility;
    /* Prevent orphans and widows */
    orphans: 3;
    widows: 3;
}

.sidenote {
    float: left;
    clear: left;
    margin-left: -80%;
    width: 198px;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-size: 10px;
    line-height: 130%;
    vertical-align: baseline;
    position: relative;
    color: var(--factoid-color);
    text-align: right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    white-space: normal;
}

/* Hide sidenotes if not enough space (e.g. less than 300px on the left) */
@media (max-width: 1230px) { /* Approx break point where left margin < 300px */
    .sidenote {
        display: none;
    }
}

a:hover + .sidenote,
.video-container:hover > .sidenote {
    opacity: 1;
}

.sidenote em {
    font-style: italic;
}

.note-target {
    position: relative;
    margin-bottom: 1.6em;
}

.note-target:last-child {
    margin-bottom: 0;
}

/* Now section items with increased spacing */
.now-items {
    margin-bottom: 0.8em;
}

.now-item {
    margin-bottom: 8px;
}

.now-item:last-child {
    margin-bottom: 0;
}

.margin-note {
    position: absolute;
    top: 0;
    left: -61px;
    width: 44px;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    pointer-events: none;
    color: rgba(0, 0, 0, 0.3);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-bottom: 16px;
}

[data-theme="dark"] .margin-note {
    color: rgba(255, 255, 255, 0.4);
}

.margin-note::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 37px;
    width: 1px;
    background-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
}

[data-theme="dark"] .margin-note::before {
    background-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
}

.margin-note__label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    margin-left: 16px;
    letter-spacing: 0.3em;
}

/* Horizontal Margin Note Modifier */
.margin-note.margin-note--horizontal {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.margin-note.margin-note--horizontal::before {
    content: '';
    position: relative;
    top: 0;
    bottom: auto;
    left: auto;
    width: auto;
    flex: 1;
    height: 1px;
    background-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
    margin-top: 0;
    order: 2; /* Line comes after label */
}

[data-theme="dark"] .margin-note.margin-note--horizontal::before {
    background-color: rgba(128, 128, 128, 0.4); /* Same color in both modes - visible on both backgrounds */
}

/* Visual Gallery margin note styling for dark background */
.visual-gallery .margin-note.margin-note--horizontal {
    color: rgba(255, 255, 255, 0.5);
}

.visual-gallery .margin-note.margin-note--horizontal::before {
    background-color: rgba(255, 255, 255, 0.5);
}

.margin-note.margin-note--horizontal .margin-note__label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-left: 0;
    display: block;
    flex-shrink: 0;
    order: 1; /* Label comes first (on the left) */
}

.dot-loader {
    display: inline-block;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.1));
    background-size: 200% 100%;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: dotSweep 1.8s linear infinite;
}

[data-theme="dark"] .dot-loader {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));
}

@keyframes dotSweep {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Hide sidenotes on mobile and tablet */
@media (max-width: 900px) {
    .sidenote {
        display: none;
    }

    .margin-note {
        display: none;
    }
    
    .margin-note.margin-note--horizontal {
        display: block; /* Ensure horizontal ones might still show if desired, or hide all */
        display: none; /* Consistent behavior */
    }
}

::selection {
    background-color: var(--selection-bg);
    color: var(--selection-color);
}

::-moz-selection {
    background-color: var(--selection-bg);
    color: var(--selection-color);
}

a {
    color: var(--link-color);
    /* Orange-Red */
    text-decoration: none;
    border-bottom: 2px solid transparent;
    display: inline-block;
    transform: translateY(0);
    transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

a:hover {
    border-bottom-color: #ff612833;
    transform: translateY(-2px);
}

.inline-logo {
    width: 23px;
    height: 23px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    margin-top: -4px;
    margin-bottom: -4px;
}

.page-shell {
    width: 100%;
    max-width: 928px; /* Updated from 588px */
    padding: 120px 20px 0px;
}

/* Layout Grid: Intro Section */
.layout-grid-intro {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 52px;
    margin-bottom: 40px;
}

.layout-grid-intro .col-left {
    justify-content: space-between;
}

/* Layout Grid: Media Section */
.layout-grid-media {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 24px;
    margin-bottom: 40px;
}

.col-left {
    display: flex;
    flex-direction: column;
}

.col-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.layout-grid-media .col-right {
    justify-content: space-between;
}

/* Make the Now section grow to fill column height */
.col-right .note-target.now-items {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.col-right .note-target.now-items .margin-note {
    height: 100%;
    min-height: 100%;
}

/* Dot Grid Animation */
.dot-grid-container {
    flex: 1;
    width: 100%;
    overflow: hidden;
    min-height: 100px; /* Ensure some visibility */
    opacity: 0.6; /* Slight transparency for subtle effect */
    margin-top: 16px;
    display: flex;
    align-items: stretch;
}

@media (max-width: 900px) {
    .dot-grid-container {
        display: none;
    }
}

/* Header */
header {
    margin-bottom: 24px;
    margin-right: 0px;
    position: relative;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Ruler Component - cm-style measurement ruler */
.ruler {
    --ruler-tick-color: rgba(0, 0, 0, 0.2);
    --ruler-tick-base: 12px;
    --ruler-tick-width: 1px;
    
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: calc(var(--ruler-tick-base) * 1);
    margin-bottom: 4px;
    margin-left: -24px;
    width: calc(100% + 24px);
}

.ruler-tick {
    flex: 0 0 var(--ruler-tick-width);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
}

.ruler-tick::after {
    content: '';
    display: block;
    width: var(--ruler-tick-width);
    height: calc(var(--ruler-tick-base) * 0.3);
    background-color: var(--ruler-tick-color);
    transition: background-color 0.075s ease;
}

.ruler-tick--5th::after {
    height: calc(var(--ruler-tick-base) * 0.5);
}

.ruler-tick--10th::after {
    height: calc(var(--ruler-tick-base) * 1);
}

[data-theme="dark"] .ruler {
    --ruler-tick-color: rgba(255, 255, 255, 0.2);
}

/* Mobile: use white ticks and black background because header is always black */
@media (max-width: 600px) {
    .ruler {
        --ruler-tick-color: rgba(255, 255, 255, 0.2);
        background-color: #000;
        margin-left: -9px;
        width: calc(100% + 9px);
        margin-bottom: 0;
    }
}

.name-bar {
    background-color: var(--name-bar-bg);
    color: var(--name-bar-text);
    padding: 8px 24px 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    margin-left: -24px;
    transition: var(--transition);
    position: relative;
}

.dark-mode-toggle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.name-bar:hover .dark-mode-toggle,
.dark-mode-toggle:focus {
    opacity: 1;
}

/* Sections */
section {
    margin-bottom: 40px;
}

.logo-grid-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, minmax(40px, auto));
    gap: 6px;
}

.logo-fade-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10%;
    right: -10%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, var(--bg-color) 100%);
    opacity: 0.8;
    transition: var(--transition);
}

.logo-cell {
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-transform: none;
    color: rgba(0, 0, 0, 0.4);
    opacity: 0.5;
}

.logo-cell a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    border-bottom: none;
    transform: none;
    opacity: 1;
    transition: none;
}

.logo-cell a:hover {
    opacity: 1;
    border-bottom: none;
    transform: none;
}

.logo-cell img {
    max-width: 100%;
    max-height: 38px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.85;
    transition: transform 0.2s ease-in-out, filter 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .logo-cell img {
    filter: grayscale(1) invert(1);
    opacity: 0.7;
}

.logo-cell:hover img {
    transform: scale(1.05);
}

.logo-placeholder {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.current-work p:nth-of-type(2) {
    margin-bottom: 0.4em;
}

/* Video Embed */
.video-container {
    margin: 0; /* Removed margin bottom since it's in a grid */
    width: 100%;
    aspect-ratio: 810 / 456;
    border-radius: 7px;
    outline: 1px solid var(--black-2);
    outline-offset: 4px;
    background-color: var(--video-bg);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.video-container::before {
    content: 'Loading...';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 0;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Social Media List */
.social-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0; /* Added top margin for spacing after form */
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 12px;
}

.social-item {
    display: flex;
    align-items: center;
}

.social-item a {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced from 10px by 2px */
    color: rgba(0, 0, 0, 0.4); /* Grey 40% */
    border-bottom: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

[data-theme="dark"] .social-item a {
    color: rgba(255, 255, 255, 0.4); /* Grey 40% for dark mode */
}

.social-item a:hover {
    opacity: 0.8;
    border-bottom: none;
    transform: none;
}

.social-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    opacity: 0.4; /* Match label color opacity - Grey 40% */
}

[data-theme="dark"] .social-icon {
    opacity: 0.4; /* Match label color opacity - Grey 40% for dark mode */
    filter: brightness(0) invert(1); /* Make icons white in dark mode */
}

.social-label {
    font-size: 14px; /* Matched to twice a year font size */
    font-weight: 500;
}

/* Subscription Form */
.subscription-container {
    display: flex;
    flex-direction: column;
}

.subscription-text {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.subscription-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    background-color: transparent;
    transition: background-color 0.25s;
    border-radius: 12px;
    align-items: stretch;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-color-dark);
    max-width: 100%;
}

.form-inputs {
    display: flex;
    flex-direction: column; /* Changed to column for better fit in 30% width */
    gap: 8px;
    align-items: stretch;
}

.subscription-form:hover {
    background-color: transparent; /* Removed background change */
}

.subscription-form input[type="email"] {
    flex: 1;
    height: 44px;
    min-height: 44px; /* Explicit minimum height */
    padding: 0 16px;
    border: 1px solid var(--input-border);
    /* Default border */
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    outline: none;
    color: var(--text-color-dark);
    background-color: var(--input-bg);
    transition: var(--transition);
    width: 100%;
}

.subscription-form button {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 20px;
    background-image: linear-gradient(var(--button-bg), var(--button-bg)), linear-gradient(var(--button-bg-gradient), var(--button-bg-gradient));
    color: var(--text-color-dark);
    border: 1px solid var(--input-border);
    outline-offset: 0px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.23, 1, .32, 1);
    width: 100%;
}

.subscription-form button:hover {
    background-image: linear-gradient(var(--button-bg), var(--button-bg)), linear-gradient(var(--button-bg-gradient), var(--button-bg-gradient));
    outline-color: var(--blue-grey-bg);
    outline-offset: 3px;
    outline-width: 0;
    outline-style: solid;
    box-shadow: inset 0 0 0 .5px #00000040, 0 1px 3px -2px #0000001a;
    background-color: #eee;
}

.subscription-form button:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.subscription-form button.success {
    background-image: none;
    background-color: #089f77;
    border-color: #089f77;
    color: #fff;
}

.form-message {
    display: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.form-message.success {
    background-color: rgba(0, 200, 83, 0.1);
    color: #00C853;
    border: 1px solid rgba(0, 200, 83, 0.2);
}

.form-message.error {
    background-color: rgba(255, 69, 0, 0.1);
    color: #FF4500;
    border: 1px solid rgba(255, 69, 0, 0.2);
}

/* Dreams Tracker */
.dreams-tracker-header {
    display: none; /* Completely hidden */
}

.dreams-tracker-title {
    font-weight: 700;
    color: var(--text-color-dark);
    margin-bottom: 0;
    flex-shrink: 0;
}

.dreams-progress {
    font-size: 15px;
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    display: none; /* Hidden as requested */
    align-items: center;
    gap: 12px;
}

.dreams-progress-bar {
    display: flex;
    align-items: center;
}

.bar-fill {
    color: var(--text-color-dark);
    opacity: 0.5;
}

.bar-empty {
    display: inline-block;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.1));
    background-size: 200% 100%;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: dotSweep 1.8s linear infinite;
}

[data-theme="dark"] .bar-empty {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));
}

.dreams-progress-text {
    font-weight: 700;
}

.footer-cta {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color-dark);
    margin-bottom: 1em;
}

.footer-meta {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-color);
    gap: 16px;
}

.footer-meta a {
    color: inherit;
    font-weight: inherit;
    border-bottom: none;
}

.footer-meta a:hover {
    border-bottom: none;
    transform: none;
}

.dreams-grid {
    column-count: 3;
    column-gap: 24px;
    font-size: 15px;
    color: var(--text-color);
    line-height: 24px;
}

.dreams-controls {
    display: none;
}

.dream-item {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.1s;
    break-inside: avoid;
    margin-bottom: 5px;
}

.dream-item:hover {
    transform: translateX(4px);
}

.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.icon svg {
    width: 20px;
    height: 20px;
}

.icon.check {
    color: #00C853;
}

.icon.todo {
    color: #ccc;
}

/* Interest Map Container */
.interest-map-section {
    width: 100%;
    margin-bottom: -30px;
    margin-top: -24px;
}

.interest-map-wrapper {
    width: 100%;
    /* margin-left: -25%; Removed offset */
    margin-top: 10px;
    margin-bottom: 10px;
    aspect-ratio: 4 / 3;
    position: relative;
    background-color: var(--im-bg-color);
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.interest-map-wrapper #interest-map {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Radial vignette overlay for seamless integration */
.interest-map-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 100% 60% at center,
        #00000000 50%,
        var(--bg-color) 100%
    );
}

.interest-map-wrapper .interest-map-container {
    width: 100%;
    height: 100%;
}

/* Interest map light/dark mode variables */
.interest-map-wrapper {
    --im-bg-color: #F5F5F5;
    --im-text-color: rgba(0, 0, 0, 0.65);
    --im-text-color-strong: rgba(0, 0, 0, 0.8);
    --im-text-color-light: rgba(0, 0, 0, 0.5);
    --im-ring-color: rgba(0, 0, 0, 0.08);
    --im-center-label-color: #1a1a1a;
}

[data-theme="dark"] .interest-map-wrapper {
    --im-bg-color: #000403;
    --im-text-color: rgba(255, 255, 255, 0.6);
    --im-text-color-strong: rgba(255, 255, 255, 0.7);
    --im-text-color-light: rgba(255, 255, 255, 0.5);
    --im-ring-color: rgba(255, 255, 255, 0.05);
    --im-center-label-color: white;
    border-color: rgba(255, 255, 255, 0.04);
}

/* Interest map internal styles */
.interest-map-wrapper .orbital-ring {
    fill: none;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 1;
    transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

[data-theme="dark"] .interest-map-wrapper .orbital-ring {
    stroke: rgba(255, 255, 255, 0.08);
}

.interest-map-wrapper .label-bg {
    fill: rgba(245, 245, 245, 0.5);
    transition: fill 0.3s ease;
}

[data-theme="dark"] .interest-map-wrapper .label-bg {
    fill: rgba(0, 4, 3, 0.5);
}

.interest-map-wrapper .node-label {
    fill: var(--im-text-color);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    will-change: transform;
    transition: fill 0.3s ease;
}

.interest-map-wrapper .node-label.level-1 {
    fill: var(--im-text-color-strong);
}

.interest-map-wrapper .node-label.level-2,
.interest-map-wrapper .node-label.level-3 {
    fill: var(--im-text-color-light);
    font-size: 11px;
}

.interest-map-wrapper .center-node-label {
    fill: var(--im-center-label-color);
    font-size: 14px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: central;
    transition: fill 0.3s ease;
}

.interest-map-wrapper .node-group {
    cursor: grab;
}

.interest-map-wrapper .node-group:active {
    cursor: grabbing;
}

.interest-map-wrapper .center-node-group {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.interest-map-wrapper .center-node-group:hover {
    transform: scale(1.05);
}

.interest-map-wrapper .center-node-group:active {
    transform: scale(0.98);
}

.interest-map-wrapper .links line {
    stroke-linecap: round;
    will-change: transform;
    shape-rendering: geometricPrecision;
}

.interest-map-wrapper svg text {
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.interest-map-wrapper .main-group {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive interest map */
@media (max-width: 900px) {
    .interest-map-wrapper {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    /* Removed interest map styles - managed in main mobile media query block at bottom */
}

/* Invisible link - looks like text but has pointer cursor */
.invisible-link {
    color: inherit;
    border-bottom: none;
    transform: none;
    cursor: pointer;
}

.invisible-link:hover {
    color: inherit;
    border-bottom: none;
    transform: none;
}

/* Footer */
footer {
    margin: 0 auto;
    padding: 0px 0px 60px;
    font-size: 15px;
    color: var(--text-color);
    line-height: 24px;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    position: relative;
    isolation: isolate;
}

footer > * {
    max-width: 928px; /* Updated from 588px */
    margin-left: auto;
    margin-right: auto;
}

/* Marylebone Illustration */
.marylebone-illustration {
    position: fixed;
    right: 80px;
    top: 240px;
    width: 320px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.marylebone-illustration:hover {
    transform: scale(1.03);
}

.marylebone-illustration:active {
    transform: scale(0.98);
}

.marylebone-illustration img {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    object-fit: contain;
    transition: opacity 0.4s ease;
}

/* Light mode: show day, hide night */
.marylebone-day {
    opacity: 1;
}

.marylebone-night {
    opacity: 0;
}

/* Dark mode: show night, hide day */
[data-theme="dark"] .marylebone-day {
    opacity: 0;
}

[data-theme="dark"] .marylebone-night {
    opacity: 1;
}

/* .marylebone-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-color);
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    margin-top: 300px;
} */

/* Hide on smaller screens */
@media (max-width: 1800px) {
    .marylebone-illustration {
        display: none !important;
    }
}


.spacer {
    height: 40px;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(5, minmax(40px, auto));
    }

    .layout-grid-intro,
    .layout-grid-media {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 16px;
    }
    
    .col-left, .col-right {
        width: 100%;
    }

    .social-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 24px;
        justify-content: space-between;
    }
    
    .social-item {
        width: auto;
        margin-right: 0;
    }
}

@media (max-width: 853px) {
    .dreams-grid {
        column-count: 1;
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        padding-bottom: 0;
    }

    /* Slider Styles */
    .dreams-slider-viewport {
        overflow: hidden;
        width: 100%;
    }
    
    .dreams-slider-track {
        display: flex;
        transition: transform 0.3s ease-in-out;
        width: 100%;
    }
    
    .dreams-page {
        flex: 0 0 100%;
        width: 100%;
        display: block; /* changed from flex to support column-count */
        column-count: 1;
    }
    
    @media (min-width: 500px) {
        .dreams-page {
            column-count: 2;
            column-gap: 24px;
        }
    }
    
    .dream-item {
        width: 100%;
        break-inside: avoid;
        margin-bottom: 5px; /* Match desktop margin-bottom */
        padding-right: 0;
    }

    .dreams-controls {
        display: flex;
        width: 100%;
        margin-top: 24px;
        gap: 0;
    }
    
    .dreams-btn {
        width: 50%;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-color);
        padding: 6px;
        cursor: pointer;
        font-family: inherit;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s;
        border-radius: 0; /* Reset */
    }
    
    .dreams-btn:hover {
        background-color: var(--form-hover-bg);
    }
    
    .dreams-btn:first-child {
        border-right: none;
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }
    
    .dreams-btn:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    /* Hide progress bar on mobile */
    .dreams-progress {
        display: none;
    }
    
    .dreams-tracker-header {
        gap: 0;
    }
}

@media (max-width: 600px) {
    body,
    body * {
        font-size: 13px;
        line-height: 150%;
    }

    .page-shell {
        padding-left: 9px;
        padding-right: 9px;
    }

    .inline-logo {
        width: 16.5px;
        height: 16.5px;
        margin-top: -3px;
        margin-bottom: -3px;
    }

    header {
        margin-right: -9px; /* Extend to edge */
        width: calc(100% + 18px); /* Compensate for negative margins */
    }

    .name-bar {
        margin-left: -9px;
        padding-left: 9px;
        /* Ensure it spans full width */
        width: 100%;
    }

    header::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 120px;
        background-color: #000;
        z-index: -1;
    }

    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, minmax(40px, auto));
    }

    .subscription-form {
        flex-direction: column;
        height: auto;
        width: 100%;
        padding: 0;
        margin: 0; /* Reset margin */
    }

    .form-inputs {
        flex-direction: column;
        width: 100%;
    }

    .form-inputs input,
    .form-inputs button {
        width: 100%;
    }

    .subscription-form input[type="email"],
    .subscription-form button {
        width: 100%;
        min-height: 44px;
        font-size: 16px; /* Prevents iOS Safari auto-zoom on focus */
        line-height: 150%;
        margin: 0;
        padding: 0 16px;
    }

    .subscription-form input[type="email"]::placeholder {
        font-size: 16px; /* Match input font size */
        line-height: 150%;
    }

    footer {
        width: 100%;
        padding-top: 16px;
    }

    /* Scale interest map on mobile */
    .interest-map-wrapper {
        width: calc(100% + 18px); /* Compensate for page padding */
        margin-left: -9px; /* Pull left to edge */
        aspect-ratio: 1 / 1;
        overflow: hidden;
        position: relative;
    }
    
    .interest-map-wrapper #interest-map {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }
}

/* Visual Gallery Section */
.visual-gallery {
    --gallery-gap: clamp(12px, 2vw, 24px);
    width: 100%;
    background: linear-gradient(180deg, #11242F 0%, #EEF2F3 100%);
    background: linear-gradient(180deg, color(display-p3 0.086 0.137 0.180) 0%, color(display-p3 0.937 0.949 0.953) 100%);
    padding: var(--gallery-gap);
    padding-top: 24px;
    margin: 0;
}

.visual-gallery__header {
    color: rgba(255, 255, 255, 0.5);
    padding: 0;
    font-weight: 700;
    margin-bottom: var(--gallery-gap);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
}

.visual-gallery__cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: rgba(255, 255, 255, 0.5);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.visual-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gallery-gap);
    width: 100%;
}

.visual-gallery__item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
}

.visual-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.visual-gallery__item:hover img {
    transform: scale(1.03);
}

/* Mobile: 1 image per row */
@media (max-width: 600px) {
    .visual-gallery__grid {
        grid-template-columns: 1fr;
    }
}