@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  /* Typography scale - aligned with Dynamic Type */
  --font-size-xs: 0.875rem;
  --font-size-sm: 1rem;
  --font-size-base: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.75rem;  /* 28pt equivalent */
  --font-size-3xl: 2.125rem; /* 34pt equivalent */
  
  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Colors */
  --color-text: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-link: #0066cc;
  --color-link-hover: #0051a2;
  --color-accent: #ff6b35;
  --color-background: #ffffff;
  --color-background-secondary: #f5f5f7;
  --color-border: #d2d2d7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #f2f2f7;
    --color-text-secondary: #98989d;
    --color-link: #0a84ff;
    --color-link-hover: #409cff;
    --color-accent: #ff6b35;
    --color-background: #000000;
    --color-background-secondary: #1c1c1e;
    --color-border: #48484a;
  }
  
  /* Dark mode syntax highlighting handled by Google Code Prettify themes */
  
}

*::selection {
    background: var(--color-link);
    color: white;
}

*::-moz-selection {
    background: var(--color-link);
    color: white;
}

*::-webkit-selection {
    background: var(--color-link);
    color: white;
}

* {
  transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-background);
}

@media only screen and (max-width: 1000px) {
    body {
        font-size: 1em;
    }
}

@media only screen and (min-width: 600px) {
    .wrap {
        margin: 0px auto;
        width: 90%;
    }
}

em {
    font-style: italic;
    font-family: "Inter", sans-serif;
}

/* Minimal code block styling following Apple HIG */
pre {
    border-radius: 12px;
    overflow: auto;
    margin: 1.5rem 0;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Ensure JetBrains Mono is used */
code, pre, kbd, samp {
    font-family: "JetBrains Mono", monospace;
    font-feature-settings: "calt" 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Inline code - minimal styling */
code {
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
}

/* Code inside pre blocks shouldn't have extra styling */
pre code {
    padding: 0;
    border-radius: 0;
    background: none;
}


/* Syntax highlighting handled by Google Code Prettify themes */

.wrap>footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

header {
    background: var(--color-background);
    padding: 1.25rem 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

/* Unified left alignment on larger screens */
@media (min-width: 680px) {
    header {
        text-align: left;
    }
    
    header .title,
    header .slogan,
    header .navi,
    header .contact-list {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    header .navi ul {
        justify-content: flex-start;
    }
}

header .title {
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

header .title a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
}

header .title a:hover {
    color: var(--color-accent);
}

/* Motto/slogan styling */
header .slogan {
    color: var(--color-text-secondary);
    font-style: normal;
    font-weight: 400;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

header .navi {
    font-size: 1.05em;
}

header .navi ul {
    margin: 0.5rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1rem;
}

header .navi ul li {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

header .navi ul li a {
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--color-link);
}

header .navi ul li a:hover {
    text-decoration: underline;
    background-color: transparent;
    opacity: 0.8;
}

/* Already handled by global focus-visible styles */

header .navi ul li a:active {
    color: var(--color-link-hover);
}

a {
    text-decoration: none;
    color: var(--color-link);
    transition: color 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    color: color-mix(in srgb, var(--color-accent) 80%, black);
}

/* Remove outline on mouse click, keep for keyboard navigation */
a:focus,
button:focus,
input:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
}

blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    padding-left: 2rem;
    border-left: 3px solid #d2d2d7; /* Subtle gray border */
    background: #f5f5f7; /* Very light gray background */
    font-style: italic;
    font-size: inherit;
    line-height: inherit;
    color: var(--color-text);
    border-radius: 0 8px 8px 0; /* Rounded right corners */
    position: relative;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    blockquote {
        border-left-color: #48484a;
        background: rgba(255, 255, 255, 0.05);
    }
}




/* Nested paragraphs in blockquotes */
blockquote p {
    margin: 0.5rem 0;
}

blockquote p:first-child {
    margin-top: 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Citation styling - use <cite> tag or last paragraph starting with em dash */
blockquote cite,
blockquote p:last-child:has(em:first-child) {
    display: block;
    margin-top: 1rem;
    text-align: right;
    font-style: normal;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

blockquote cite::before {
    content: "— ";
}

article {
    width: 100%;
    padding: 0;
    font-size: 16px;
    line-height: 24px;
}

article .content {
    padding-bottom: 1.9em;
}

article footer {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    margin-top: 3rem;
}

article h1,article h2,article h3 {
    text-align: left;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

article h1 {
    font-size: clamp(1.875rem, 5vw, 2.5rem); /* Slightly larger for main event */
    font-weight: 600; /* Semibold, not bold */
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.15;
    text-align: left; /* Leading-edge alignment */
}

article h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.015em;
}

article h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: -0.015em;
}

article p {
    margin-bottom: 1.5rem;
}

article h1 a,article h2 a,article h3 a {
    color: var(--color-text);
    text-decoration: none; /* Clean, pure text */
}

article h1 a:hover,article h2 a:hover,article h3 a:hover {
    color: var(--color-accent);
}

article header {
    margin: 0;
    padding: 0;
    border: 0px;
    text-align: left; /* Left-align for multi-line titles */
    position: relative;
}

article header time {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-style: normal;
    font-weight: 400;
    display: block;
    margin-top: 0.5rem;
    text-align: left; /* Align with title */
}

article hr {
    margin: 1.5rem 0;
    height: 1px;
    border: none;
    color: var(--color-border);
    background-color: var(--color-border);
    opacity: 0.6;
}

/* Tighter spacing when hr immediately follows header */
article header + hr {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

/* Article images with Apple-polish styling */
.article-image,
figure {
  width: min(80%, 600px);
  margin: 1.5rem auto;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.article-image img,
figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* Tighter vertical rhythm */
.article-image,
figure {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Align to content edge on larger screens */
@media (min-width: 680px) {
  .article-image,
  figure {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
    margin: 2rem auto;
  }
}

/* Dark mode shadow adaptation */
@media (prefers-color-scheme: dark) {
  .article-image,
  figure {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  }
}

/* Legacy img styling for backwards compatibility */
#content img:not(figure img) {
  max-width: min(80%, 600px);
  margin: 1rem auto;
  display: block;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  #content img:not(figure img) {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  }
}

/* Figure captions */
.article-image figcaption,
figure figcaption {
  margin-top: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
  font-style: italic;
  padding: 0 1rem;
}

article p .word1,article p .word2,article p .word3 {
    font-size: 0.9em;
    font-variant: small-caps;
}



/* Let Desert theme handle all code styling */


.pagination {
    position: relative;
    margin: 5em 0;
}

.pagination a {
    font-family: "Inter", sans-serif;
    font-size: 0.9em;
    color: #333;
}

.pagination a:hover {
    color: #ff540b;
}

.pagination .newer {
    position: absolute;
    top: 0;
    right: 0;
}

.pagination .older {
    position: absolute;
    top: 0;
    left: 0;
}

.pagination span {
    display: block;
    width: 100%;
    text-align: center;
}

.cat-year {
    padding-top: 1.4em;
    font-family: "Inter", sans-serif;
    font-weight: bold;
    font-size: 1.2em;
}

.cat-month {
    margin: 1.9em 0 0.4em 1.9em;
    font-family: "Inter", sans-serif;
    font-size: 0.9em;
}

article ul {
    text-align: left;
}

li.archive-post {
    margin-left: 1.9em;
}

div.highlight {
    overflow: auto;
}

.highlight>table {
    width: 100%;
}

.line-numbers {
    display: none;
}



iframe {
    width: 100%;
    resize: vertical;
    height: 500px;
}

.nateface {
    display: block;
    border-radius: 50%;
    width: min(96px, 20vw);
    height: min(96px, 20vw);
    margin: 0.5rem auto;
}

@media (min-width: 680px) {
    .nateface {
        margin: 0.5rem 0;
        display: inline-block;
        vertical-align: middle;
        margin-right: 0.75rem;
    }
    
    header .title a {
        display: inline-flex;
        align-items: center;
    }
}

div#content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media only screen and (max-width: 767px) {
  /* small screens */
  #wrap {
    padding: 0px;
  }
  div#content {
    padding: 0 1rem;
  }
  
  /* Smaller title on mobile but still scales */
  article h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

@media only screen and (min-width: 768px) and (max-width: 1023px) {
  /* medium screens */
  div#content {
    padding: 0 1.5rem;
  }
}

    
div.content>h1 {
    margin-top: 2em;
}

/* Page load animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

article {
    animation: fadeIn 0.5s ease-out;
}

/* Collapsing header styles */
.article-header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    z-index: 95;
    transform: translateY(-100%);
    transition: transform 0.2s ease-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.article-header-sticky.visible {
    transform: translateY(0);
}

.article-header-sticky h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    padding: 0 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-header-sticky time {
    display: none; /* Hide date in collapsed state */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .article-header-sticky {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .article-header-sticky {
        transition: none;
    }
    
    article {
        animation: none;
    }
}

#sidebar {
    float: none;
    position: relative;
    width: 100%;
}

/* Contact list styling */
#sidebar-email,
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem auto 0 auto;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

#sidebar-email li,
.contact-list li {
    margin: 0.25rem 0;
}

/* Add a subtle label */
#sidebar-email::before {
    content: "REACH ME";
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

#shameless-self-promotion {
    text-align: center;
    margin: 0px auto;
    width: 50%;
}

@media only screen and (min-width: 0px) and (max-width: 768px) {
    #shameless-self-promotion {
        display: none;
    }
}

@media only screen and (min-width: 1000px) {
    #shameless-self-promotion {
        font-size: 0.9em;
    }
}


li.title {
    text-align: left;
}

/* Archive page styling */
#post-list {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

#post-list h1 {
    text-align: left;
    margin-bottom: 2rem;
}

#post-list table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

#post-list .post-row {
    border-bottom: 1px solid var(--color-border);
}

#post-list .title-cell {
    padding: 0.5rem 0;
    text-align: left;
}

#post-list .date-cell {
    padding: 0.5rem 0;
    text-align: right;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

input#reader-email {
    border-radius: 5px;
    width: 80%;
    border: 2px solid 777;
}

p#success-msg {
    color: green;
    display: none;
    opacity: 0;
    transition: 1s ease-in-out all;
}

form#mailing-list-signup {
    margin-bottom: 50px;
}

.success-msg-showing {
    opacity: 1;
    display: block!important;
}

li.title {
    margin-bottom: 5px;
}

#mc-embedded-subscribe-form>label {
    width: 100%;
    text-align: center;
}

#mc_embed_signup form {
    margin: 0px auto;
    display: block;
    position: relative;
    text-align: left;
    padding: 10px 0 10px 3%;
}

#mc_embed_signup h2 {
    padding: 0;
    margin: 15px 0;
    font-size: 1.4em;
}

#mc_embed_signup input {
    border: 1px solid #999;
    -webkit-appearance: none;
}

#mc_embed_signup input[type=checkbox] {
    -webkit-appearance: checkbox;
}

#mc_embed_signup input[type=radio] {
    -webkit-appearance: radio;
}

#mc_embed_signup input:focus {
    border-color: #333;
}

#mc_embed_signup .button {
    clear: both;
    background-color: #094c83;
    border: 0 none;
    border-radius: 4px;
    color: #FFF;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    line-height: 32px;
    margin: 0 5px 10px 0;
    padding: 0;
    text-align: center;
    text-decoration: none;
    vertical-align: top;
    white-space: nowrap;
    width: auto;
}

#mc_embed_signup .button:hover {
    background-color: #ff540b;
}

#mc_embed_signup .small-meta {
    font-size: 11px;
}

#mc_embed_signup .nowrap {
    white-space: nowrap;
}

#mc_embed_signup .clear {
    clear: none;
    display: inline;
}

#mc_embed_signup label {
    font-size: 16px;
    padding-bottom: 10px;
    width: 100%;
}

#mc_embed_signup input.email {
    padding: 8px 0;
    margin: 0 3px 10px 0;
    text-indent: 5px;
    width: 75%;
}

#mc_embed_signup input.button {
    width: 40px;
    margin: 0 0 3px;
}

#mc_embed_signup div#mce-responses {
    float: left;
    top: -1.4em;
    padding: 0 .5em;
    overflow: hidden;
    width: 90%;
    margin: 0 5%;
    clear: both;
}

#mc_embed_signup div.response {
    margin: 1em 0;
    padding: 1em .5em .5em 0;
    font-weight: 700;
    float: left;
    top: -1.5em;
    z-index: 1;
    width: 80%;
}

#mc_embed_signup #mce-error-response {
    display: none;
}

#mc_embed_signup #mce-success-response {
    color: #529214;
    display: none;
}

#mc_embed_signup label.error {
    display: block;
    float: none;
    width: auto;
    margin-left: 1.05em;
    text-align: left;
    padding: .5em 0;
}

#mc_embed_signup {
    background: #fff;
    clear: left;
    font: 14px "Inter", sans-serif;
}

#mce-EMAIL {
    display: inline!important;
}

img#search-icon {
    display: inline;
}

ul#archive-search-populate {
    margin: 0px auto;
    text-align: left;
}

input#archive-search {
    margin-bottom: 20px;
    padding: 8px 0;
    text-indent: 5px;
    width: 88%;
    min-width: 130px;
    border: 1px solid #999;
}

#sidebar-email {
    margin-bottom: 20px;
}

#mc-embedded-subscribe {
    display: inline!important;
    min-width: 20px!important;
}

.slogan {
    font-style: italic;
    margin: 0px;
}

.modal {
    display: none;
    width: 400px;
    background: #fff;
    padding: 15px 30px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -o-border-radius: 8px;
    -ms-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0 0 10px #000;
    -moz-box-shadow: 0 0 10px #000;
    -o-box-shadow: 0 0 10px #000;
    -ms-box-shadow: 0 0 10px #000;
    box-shadow: 0 0 10px #000;
}

.modal a.close-modal {
    position: absolute;
    top: -12.5px;
    right: -12.5px;
    display: block;
    width: 30px;
    height: 30px;
    text-indent: -9999px;
    background: url(/images/close.png) no-repeat 0 0;
}

.modal-spinner {
    display: none;
    width: 64px;
    height: 64px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-right: -32px;
    margin-top: -32px;
    background: url(spinner.gif) #111 no-repeat center center;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -o-border-radius: 8px;
    -ms-border-radius: 8px;
    border-radius: 8px;
}

.slabtexted .slabtext {
    display: -moz-inline-box;
    display: inline-block;
    white-space: nowrap;
}

.slabtextinactive .slabtext {
    display: inline;
    white-space: normal;
    font-size: 1em!important;
    letter-spacing: inherit!important;
    word-spacing: inherit!important;
    *letter-spacing: 0!important;
    *word-spacing: 0!important;
}

.slabtextdone .slabtext {
    display: block;
}



.container:before,
.container:after {
    display: table;
    content: " ";
}

.container:after {
    clear: both;
}

.container {
    margin-top: 1em;
    margin-bottom: 1em;
    margin-right: auto;
    margin-left: auto;
    width: 100%;
}

.row:before,
.row:after {
    display: table;
    content: " ";
}

.row:after {
    clear: both;
}

.row {
    width: 100%;
}

.col-one-quarter {
    width: 24%;
    float: left;
    padding-left: 1%;
    position: relative;
    min-height: 1px;
}

.col-three-quarters {
    width: 74%;
    float: left;
    padding-left: 1%;
    position: relative;
    min-height: 1px;
}

.col-half {
    width: 48%;
    float: left;
    padding-left: 2%;
    position: relative;
    min-height: 1px;
}

.col-one-third {
    width: 32%;
    float: left;
    padding-left: 1.33333333333333%;
    position: relative;
    min-height: 1px;
}

.col-quarter > p {
    margin-top: 0px;
}

.col-three-quarters > p {
    margin-top: 0px;
}

.call-to-action {
  background-color: rgb(204, 85, 0);
  padding: 10px;
  border-radius: 5px;
  font-size: 16px;
  border-width: 2px;
  border-style: solid;
  text-align: center;
  text-decoration: none;
  color: white;
  margin: 0px auto;
  display: block;
  width: 200px;
}

/* Minimal code block styling following Apple HIG */
pre {
    border-radius: 12px;
    overflow: auto;
    margin: 1.5rem 0;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Ensure JetBrains Mono is used */
code, pre, kbd, samp {
    font-family: "JetBrains Mono", monospace;
    font-feature-settings: "calt" 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Inline code - minimal styling */
code {
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
}

/* Code inside pre blocks shouldn't have extra styling */
pre code {
    padding: 0;
    border-radius: 0;
    background: none;
}
