/* ============================
   EDITORIAL THEME (Substack-inspired)
   Layered on top of premium.css — remove this
   stylesheet's <link> to restore the previous look.
   ============================ */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f7;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-glass: #ffffff;
    --border-glass: #e6e6e6;
    --border-glow: #cfcfcf;

    --accent-primary: #ff6719;
    --accent-secondary: #e5560c;
    --accent-cyan: #ff6719;
    --accent-emerald: #ff6719;
    --accent-amber: #ff6719;
    --accent-rose: #ff6719;

    --gradient-primary: #ff6719;
    --gradient-cyan: #ff6719;
    --gradient-emerald: #ff6719;
    --gradient-amber: #ff6719;
    --gradient-text: #363737;

    --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --text-primary: #363737;
    --text-secondary: #6b6b6b;
    --text-muted: #8f8f8f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-glow: none;
    --shadow-glow-hover: none;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    --accent-tint: rgba(255, 103, 25, 0.1);
}

body.dark-mode {
    --bg-primary: #151515;
    --bg-secondary: #1e1e1e;
    --bg-card: #151515;
    --bg-card-hover: #1b1b1b;
    --bg-glass: #151515;
    --border-glass: #2e2e2e;
    --border-glow: #444444;

    --accent-primary: #ff6719;
    --accent-secondary: #ff7f3f;
    --gradient-primary: #ff6719;
    --gradient-text: #e8e8e8;

    --text-primary: #e8e8e8;
    --text-secondary: #a8a8a8;
    --text-muted: #7d7d7d;

    --shadow-glow: none;
    --shadow-glow-hover: none;

    --accent-tint: rgba(255, 103, 25, 0.14);
}

body {
    font-size: 17px;
    line-height: 1.65;
}

::selection {
    background: var(--accent-tint);
    color: var(--text-primary);
}

/* No ambient orbs — plain paper */
.portfolio-bg {
    display: none;
}

/* Serif for everything that reads as editorial */
h1, h2, h3, h4,
.about-name,
.about-title,
.section-title,
.pf-page-header h1,
.thesis-quote,
.exp-role,
.pf-modal-title,
.contact-form-headline,
.stat-number {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* Gradient text → solid ink */
.gradient-text,
.pf-page-header h1 .gradient-text,
.pf-logo,
.stat-number,
.preloader-logo {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-primary);
}

.pf-logo {
    font-family: var(--font-display);
    font-weight: 700;
}

/* ============================
   NAVIGATION
   ============================ */

.pf-nav,
body.dark-mode .pf-nav {
    background: var(--bg-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 14px 0;
}

.pf-nav-links li a {
    border-radius: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
}

.pf-nav-links li a:hover {
    background: none;
    color: var(--text-primary);
}

.pf-nav-links li.active a {
    background: none;
    box-shadow: none;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent-primary);
}

.theme-toggle,
.pf-mobile-toggle {
    backdrop-filter: none;
}

.theme-toggle:hover {
    box-shadow: none;
}

body.dark-mode .pf-nav-links.mobile-open {
    background: var(--bg-primary);
}

/* ============================
   CARDS — flat, hairline, no lift
   ============================ */

.glass-card,
.service-card,
.stat-card,
.exp-card,
.now-item,
.info-item,
.contact-info-card,
.contact-form-card {
    background: var(--bg-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.glass-card:hover,
.service-card:hover,
.stat-card:hover,
.exp-card:hover,
.now-item:hover,
.info-item:hover,
.contact-info-card:hover {
    transform: none;
    box-shadow: none;
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
}

.service-card::before,
.stat-card::before {
    display: none;
}

/* All icon chips share one accent tint */
.info-icon,
.service-icon,
.now-icon,
.exp-company-icon,
.contact-info-icon {
    background: var(--accent-tint) !important;
    color: var(--accent-primary) !important;
}

.stat-number {
    font-weight: 600;
}

/* ============================
   THESIS — pull quote
   ============================ */

.thesis-section {
    background: none;
    border: 0;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    border-radius: 0;
    padding: 48px 24px;
}

.thesis-section::before {
    display: none;
}

.thesis-mark {
    font-family: var(--font-display);
    opacity: 1;
}

.thesis-quote {
    font-weight: 500;
    font-style: italic;
}

.thesis-quote span {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent-primary);
}

/* ============================
   BUTTONS
   ============================ */

.cta-btn,
.submit-btn {
    background: var(--accent-primary);
    border-radius: var(--radius-md);
}

.cta-btn::before,
.submit-btn::before {
    display: none;
}

.cta-btn:hover,
.submit-btn:hover {
    background: var(--accent-secondary);
    transform: none;
    box-shadow: none;
}

.cta-btn-outline {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.cta-btn-outline:hover {
    background: var(--bg-secondary);
    transform: none;
    box-shadow: none;
}

/* ============================
   TAGS & SKILLS
   ============================ */

.now-tag.live,
.now-tag.building,
.now-tag.exploring {
    background: none;
    border-color: var(--border-glass);
    color: var(--text-secondary);
}

.now-tag.live {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.skill-tag:hover,
.tech-tag:hover {
    background: var(--accent-tint);
    border-color: var(--accent-primary);
}

.skill-bar-track,
body.dark-mode .skill-bar-track {
    background: var(--border-glass);
}

.skill-bar-fill::after {
    display: none;
}

/* ============================
   MODAL, TOAST, FORMS, PRELOADER
   ============================ */

.pf-modal,
.toast,
body.dark-mode .pf-modal,
body.dark-mode .toast {
    background: var(--bg-primary);
}

.form-field input,
.form-field textarea,
body.dark-mode .form-field input,
body.dark-mode .form-field textarea {
    background: var(--bg-primary);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

#pf-preloader,
body.dark-mode #pf-preloader {
    background: var(--bg-primary);
}

.about-photo-badge,
body.dark-mode .about-photo-badge {
    background: var(--bg-primary);
    backdrop-filter: none;
}

/* ============================
   FIELD-NOTES ACCENTS
   Mono labels, sharp corners, ruled hero,
   numbered cards, two-column thesis.
   ============================ */

:root {
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 3px;
    --radius-xl: 3px;
    --rule: rgba(0, 0, 0, 0.055);
}

body.dark-mode {
    --rule: rgba(255, 255, 255, 0.05);
}

/* Every small label speaks in mono caps */
.pf-nav-links li a,
.about-eyebrow,
.section-eyebrow,
.stat-label,
.thesis-author,
.now-tag,
.now-updated,
.info-text-label,
.clients-title,
.exp-date,
.exp-badge,
.modal-tech-label,
.modal-highlights-title,
.form-field label,
.contact-info-text label,
.tech-tag,
.cta-btn,
.cta-btn-outline,
.submit-btn,
.pf-footer {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pf-nav-links li a {
    font-size: 0.74rem;
    font-weight: 500;
}

.pf-nav-links li a i {
    display: none;
}

.cta-btn,
.cta-btn-outline,
.submit-btn {
    font-size: 0.74rem;
    font-weight: 500;
    padding: 13px 22px;
}

.tech-tag {
    letter-spacing: 0.06em;
    text-transform: none;
}

.about-eyebrow::before,
.thesis-author::before {
    display: none;
}

/* Italic serif accent inside headlines */
.about-name .gradient-text,
.about-title span {
    font-style: italic;
    color: var(--accent-primary);
}

.about-name {
    font-weight: 600;
    line-height: 1.05;
}

/* Faint ruled lines behind the hero, like notebook paper */
.about-hero {
    position: relative;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: -48px;
    bottom: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    background: repeating-linear-gradient(to bottom,
            transparent 0,
            transparent 63px,
            var(--rule) 63px,
            var(--rule) 64px);
    border-bottom: 1px solid var(--border-glass);
    z-index: -1;
    pointer-events: none;
}

/* Thesis: label on the left, statement on the right */
.thesis-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    align-items: start;
    text-align: left;
    padding: 64px 0;
}

.thesis-mark {
    display: none;
}

.thesis-author {
    grid-column: 1;
    grid-row: 1;
    color: var(--accent-primary);
    font-size: 0.72rem;
    padding-top: 0.9em;
}

.thesis-quote {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    max-width: none;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
    line-height: 1.2;
}

.thesis-quote span {
    display: block;
    font-style: italic;
}

/* Numbered expertise cards: 01, 02, … */
.services-grid {
    counter-reset: card;
}

.service-card {
    counter-increment: card;
}

.service-card::before {
    display: block;
    content: counter(card, decimal-leading-zero);
    position: absolute;
    top: 24px;
    right: 24px;
    left: auto;
    height: auto;
    background: none;
    opacity: 1;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .thesis-section {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 48px 0;
    }

    .thesis-author,
    .thesis-quote {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Logo and major headings share the nav's mono face */
.pf-logo,
.about-name,
.section-title,
.pf-page-header h1,
.contact-form-headline,
.preloader-logo {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.pf-logo {
    font-size: 1.1rem;
    letter-spacing: 0;
}

.about-name {
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.1;
}

.section-title {
    font-size: clamp(1.3rem, 2.6vw, 1.75rem);
}

/* Photo sits clean — no accent frame */
.about-photo-wrap::before {
    display: none;
}

/* "Now" item titles match the mono headings */
.now-body h4 {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
}

/* Resume: job titles, company initials and modal titles in mono */
.exp-role,
.exp-company-icon,
.pf-modal-title {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.exp-role {
    font-size: 1rem;
}

/* Every heading, site-wide, uses the mono face */
h1, h2, h3, h4, h5, h6,
.exp-role,
.pf-modal-title {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.service-card h4 {
    font-family: var(--font-mono);
    font-size: 1rem;
}

/* Resume skill bars: labels and percentages in mono */
.skill-bar-name,
.skill-bar-pct {
    font-family: var(--font-mono);
}

.skill-bar-name {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Page-header subtitles (resume, contact) in mono */
.pf-page-header p {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 560px;
}

/* ============================
   ONE TYPEFACE
   Everything uses IBM Plex Mono.
   ============================ */

:root {
    --font-sans: var(--font-mono);
    --font-display: var(--font-mono);
}

body {
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.7;
}

input,
textarea,
select,
button,
.tech-tag,
.modal-tech-chip {
    font-family: var(--font-mono);
}

/* Former serif pieces, retuned for mono widths */
.about-title {
    font-size: 1.05rem;
}

.thesis-quote {
    font-size: clamp(1.35rem, 3vw, 2.1rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.stat-number {
    font-size: 1.8rem;
    letter-spacing: -0.02em;
}

/* ============================
   RESPONSIVE
   ============================ */

/* Nothing may push the page sideways (clip keeps sticky nav working) */
html,
body {
    overflow-x: clip;
}

@media (max-width: 768px) {
    /* Ruled lines would run through the stacked bio text */
    .about-hero::before {
        display: none;
    }

    .about-hero {
        padding-bottom: 8px;
    }

    /* Thesis label sits above the statement */
    .thesis-author {
        order: -1;
        padding-top: 0;
    }

    .thesis-section {
        display: flex;
        flex-direction: column;
    }

    /* iOS zooms into inputs smaller than 16px */
    .form-field input,
    .form-field textarea {
        font-size: 16px;
    }
}

/* Solid, theme-coloured mobile menu */
.pf-nav-links.mobile-open,
body.dark-mode .pf-nav-links.mobile-open {
    background: var(--bg-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border-glass);
}

/* Tablets: keep two columns instead of collapsing to one */
@media (min-width: 561px) and (max-width: 768px) {
    .services-grid,
    .experience-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phones */
@media (max-width: 560px) {
    .cta-group {
        flex-direction: column;
        gap: 12px;
    }

    .cta-group .cta-btn,
    .cta-group .cta-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .pf-main {
        padding-top: 32px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }
}
