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

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f3;
    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-text-muted: #6b7670;
    --color-primary: #2c5f3f;
    --color-primary-light: #3a7d52;
    --color-primary-dark: #1e4530;
    --color-primary-glow: #52B788;
    --color-accent: #c8a96e;
    --color-accent-light: #dfc494;
    --color-card-bg: #e2e7e0;
    --color-border: #d4d9d2;
    --color-code-bg: #1e2b22;
    --font-body: 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-light);
}

#projects, #stack, #about, #contact {
    scroll-margin-top: 72px;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 10px 18px;
    z-index: 200;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
}

/* Global focus indicator */
*:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Nav */
header {
    background-color: var(--color-primary-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.brand-accent {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-weight: 600;
    margin-left: 6px;
    font-size: 18px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--color-accent-light);
}

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 10px;
    margin-left: 16px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
    border-radius: 3px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Quick-access strip below nav */
.quick-access {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 9px 24px;
}

.qa-link {
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 3px;
    transition: color 0.15s, transform 0.15s;
}

.qa-link:hover,
.qa-link:focus-visible {
    color: var(--color-accent-light);
    transform: translateY(-1px);
}

.qa-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.qa-label {
    display: none;
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: inherit;
    white-space: nowrap;
}

@media (min-width: 900px) {
    .qa-label {
        display: inline;
    }
    .quick-access {
        gap: 24px;
    }
}

.qa-brand {
    fill: currentColor;
}

.qa-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    .quick-access {
        gap: 18px;
        padding: 8px 16px;
    }
    .qa-icon {
        width: 16px;
        height: 16px;
    }
}

/* Headings */
h1, h2, h3 {
    font-family: var(--font-heading);
}

h1 {
    font-size: 44px;
    line-height: 1.05;
    margin-bottom: 32px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 28px;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 4px solid var(--color-accent);
    color: var(--color-primary);
    display: inline-block;
}

h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--color-primary);
}

/* Sections */
section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 24px;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero */
.hero {
    max-width: none;
    padding: 0;
    background:
        linear-gradient(
            180deg,
            rgba(13, 31, 21, 0.35) 0%,
            rgba(13, 31, 21, 0.65) 55%,
            rgba(13, 31, 21, 0.88) 100%
        ),
        url('hero-stars.jpg') center top / cover no-repeat,
        var(--color-primary-dark);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 88px 24px 96px;
    text-align: center;
}

.hero .cta-row {
    justify-content: center;
}

/* Animated terminal hero (Mac Terminal light theme) */
.term-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    text-align: left;
    margin: 0 auto 36px;
    max-width: 720px;
}

.term-titlebar {
    background: #ebebeb;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.term-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.term-dot:nth-child(1) { background: #ff5f56; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; }

.term-title {
    margin-left: 10px;
    color: #3a3a3a;
}

.term-body {
    padding: 22px 24px 26px;
    color: rgba(20, 20, 20, 0.85);
    line-height: 1.7;
    min-height: 280px;
}

.term-line {
    display: block;
    white-space: nowrap;
}

.term-prompt-user { color: #2154a0; }
.term-prompt-host { color: rgba(40, 40, 40, 0.55); }
.term-prompt-path { color: #2c5f3f; }

/* Step 1: initial prompt fade-in */
.tw-prompt-1 {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    animation-delay: 0.2s;
}

/* Step 2: command typing */
.tw-cmd-wrap {
    display: inline-block;
    vertical-align: bottom;
    position: relative;
}

.tw-cmd {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    width: 0;
    border-right: 2px solid #2c5f3f;
    color: #1a1a17;
    opacity: 0;
    animation:
        tw-cmd-show 0s linear forwards,
        tw-cmd-type 1.5s steps(15, end) forwards,
        tw-cmd-cursor-off 0s linear forwards;
    animation-delay: 0.55s, 0.55s, 2.1s;
}

@keyframes tw-cmd-show { to { opacity: 1; } }
@keyframes tw-cmd-type { from { width: 0; } to { width: 15ch; } }
@keyframes tw-cmd-cursor-off { to { border-right-color: transparent; } }

/* Step 3: output lines stagger */
.tw-out {
    opacity: 0;
    animation: fadeUp 0.35s ease forwards;
    display: block;
    white-space: pre-wrap;
}

.tw-out-1 { animation-delay: 2.25s; }
.tw-out-2 { animation-delay: 2.55s; }
.tw-out-3 { animation-delay: 3.05s; color: rgba(40, 40, 40, 0.5); height: 0.6em; }
.tw-out-4 { animation-delay: 3.35s; }
.tw-out-5 { animation-delay: 3.75s; }
.tw-out-6 { animation-delay: 4.25s; color: rgba(40, 40, 40, 0.5); height: 0.6em; }
.tw-out-7 { animation-delay: 4.55s; }

.tw-strong { color: #2c5f3f; font-weight: 600; }
.tw-sub { color: rgba(40, 40, 40, 0.72); }
.tw-stack-key { color: #2154a0; }
.tw-loc { color: #b87a14; }
.tw-status { color: #7a3aa0; }

/* Step 4: final prompt + permanent blinking cursor */
.tw-prompt-2 {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    animation-delay: 4.95s;
}

.tw-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: #2c5f3f;
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s steps(2) infinite;
}

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

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (prefers-reduced-motion: reduce) {
    .tw-prompt-1, .tw-cmd, .tw-out, .tw-prompt-2 {
        opacity: 1 !important;
        animation: none !important;
        width: auto !important;
        border-right-color: transparent !important;
    }
    .tw-cursor { animation: none; opacity: 1; }
}

/* CTAs */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s, color 0.2s;
    border: 2px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cta-icon {
    flex-shrink: 0;
    stroke-width: 2;
}

.cta-resume {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.cta-resume:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(200, 169, 110, 0.22);
    color: var(--color-primary-dark);
}

.cta-email {
    background-color: var(--color-primary-glow);
    color: var(--color-primary-dark);
}

.cta-email:hover {
    background-color: #6dc99e;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(82, 183, 136, 0.25);
    color: var(--color-primary-dark);
}

.cta-chat {
    background-color: #ffffff;
    color: var(--color-primary-dark);
}

.cta-chat:hover {
    background-color: #f4f6f3;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    color: var(--color-primary-dark);
}

/* About — cover letter manuscript (v15) */
.about {
    max-width: none;
    padding: 80px 24px 96px;
    background-color: #ece2c4;
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 31px,
            rgba(120, 95, 60, 0.06) 32px
        ),
        radial-gradient(
            ellipse at 50% 0%,
            rgba(255, 248, 230, 0.55) 0%,
            rgba(236, 226, 196, 0) 60%
        );
}

.letter-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fffdf7;
    border: 1px solid rgba(120, 95, 60, 0.12);
    border-radius: 2px;
    padding: 72px 76px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 6px 14px rgba(80, 60, 30, 0.08),
        0 22px 50px rgba(60, 45, 20, 0.12);
    position: relative;
    color: #2a2620;
}

.letter-clip {
    position: absolute;
    top: -22px;
    left: 48px;
    width: 38px;
    height: 48px;
    color: #9a9a92;
    transform: rotate(-18deg);
    filter: drop-shadow(0 2px 3px rgba(60, 45, 20, 0.28));
    pointer-events: none;
}

.letter-head {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: #4a3f2e;
    margin-bottom: 28px;
}

.letter-head .head-name {
    font-weight: 600;
    color: #2a2620;
    font-size: 14px;
}

.letter-head .head-date {
    margin-top: 14px;
    color: #6a5d47;
}

.letter-subject {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5a4a30;
    border-top: 1px solid rgba(120, 95, 60, 0.18);
    border-bottom: 1px solid rgba(120, 95, 60, 0.18);
    padding: 10px 0;
    margin-bottom: 26px;
}

.letter-salutation {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #2a2620;
    margin-bottom: 18px;
}

.letter-body p {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.85;
    color: #2a2620;
    margin: 0 0 18px;
}

.letter-body em {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: #3a3026;
}

.letter-body strong {
    font-weight: 600;
    color: #1f1c17;
}

.letter-body a {
    color: #1a3d2c;
    font-weight: 500;
    text-decoration-color: rgba(26, 61, 44, 0.4);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.letter-body a:hover {
    color: #2c5f3f;
    text-decoration-color: #2c5f3f;
}

.letter-body a em {
    color: inherit;
}

.letter-signoff {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #2a2620;
    margin-top: 28px;
    margin-bottom: 6px;
}

.letter-signature {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    font-weight: 500;
    color: #1a3d2c;
    transform: rotate(-3deg);
    transform-origin: left center;
    display: inline-block;
    margin: 4px 0 4px 8px;
    line-height: 1;
}

.letter-printed-name {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #6a5d47;
    margin-top: 10px;
    letter-spacing: 0.04em;
}

@media (max-width: 640px) {
    .about {
        padding: 56px 16px 72px;
    }
    .letter-card {
        padding: 40px 28px 36px;
    }
    .letter-signature {
        font-size: 28px;
    }
}

/* Work (merged stack + projects) */
.work {
    background-color: #f5efe2;
    max-width: none;
    padding: 88px 24px 64px;
    position: relative;
    border-top: 1px solid rgba(120, 95, 60, 0.16);
}

.work-clip {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%) rotate(-14deg);
    width: 38px;
    height: 48px;
    color: #9a9a92;
    filter: drop-shadow(0 2px 3px rgba(60, 45, 20, 0.25));
    z-index: 5;
}

.work > * {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.work-lead {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-style: italic;
}

.stack-icons {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 36px;
}

.stack-icons img {
    max-width: 100%;
    height: auto;
}

.more-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 36px;
    padding-right: 12px;
}

.more-link a {
    font-family: 'Caveat', 'JetBrains Mono', monospace;
    font-size: 19px;
    font-weight: 500;
    color: #2a2620;
    text-decoration: none;
    background: #fff5a3;
    border: 1px solid rgba(120, 95, 60, 0.15);
    padding: 14px 22px 16px;
    max-width: 320px;
    line-height: 1.25;
    transform: rotate(-2deg);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 10px rgba(80, 60, 30, 0.14);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.more-link a::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 18px;
    height: 22px;
    color: #9a9a92;
    background:
        linear-gradient(180deg, rgba(154, 154, 146, 0.85) 0%, rgba(154, 154, 146, 0.6) 100%);
    border-radius: 8px 8px 2px 2px;
    box-shadow: 0 1px 2px rgba(60, 45, 20, 0.22);
}

.more-link a::after {
    content: ' →';
    color: var(--color-primary-dark);
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.2s;
}

.more-link a:hover {
    transform: rotate(-2deg) translateY(-2px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 8px 18px rgba(80, 60, 30, 0.2);
}

.more-link a:hover::after {
    transform: translateX(3px);
}

.project-card {
    background-color: #fffdf7;
    padding: 28px;
    border-radius: 3px;
    border: 1px solid rgba(120, 95, 60, 0.14);
    border-top: 3px solid var(--color-primary-light);
    color: #2a2620;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.03),
        0 4px 12px rgba(80, 60, 30, 0.08);
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.project-card:hover {
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 8px 22px rgba(80, 60, 30, 0.14);
    transform: translateY(-2px);
}

.project-card h3 {
    color: var(--color-primary-dark);
}

.project-card p {
    color: var(--color-text-light);
}

.project-card strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.project-featured {
    background: #fffdf7;
    border: 1px solid var(--color-accent);
    border-top: 4px solid var(--color-accent);
    margin-bottom: 28px;
    padding: 32px;
    color: #2a2620;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 6px 18px rgba(80, 60, 30, 0.12);
}

.project-featured:hover {
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.05),
        0 12px 28px rgba(200, 169, 110, 0.2);
    border-color: var(--color-accent-light);
    transform: translateY(-2px);
}

.project-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.project-head h3 {
    margin-bottom: 0;
    font-size: 24px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 3px 10px;
    border-radius: 3px;
}

.project-tech {
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-muted);
}

.project-tech code {
    background-color: rgba(120, 95, 60, 0.08);
    color: var(--color-primary-dark);
    border: 1px solid rgba(120, 95, 60, 0.14);
    padding: 1px 8px;
    border-radius: 3px;
    margin-right: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

.project-card p {
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.project-card strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.project-link {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s, transform 0.15s;
}

.project-link:hover {
    color: var(--color-primary-light);
    transform: translateX(2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Connect */
.contact {
    background-color: #ece2c4;
    color: #2a2620;
    max-width: none;
    padding: 56px 24px 56px;
}

.contact > * {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Short stack strip between letter and business card */
.stack-strip {
    background-color: #0d1612;
    padding: 36px 24px 36px;
    text-align: center;
    max-width: none;
    border-top: 1px solid rgba(82, 183, 136, 0.18);
    border-bottom: 1px solid rgba(82, 183, 136, 0.18);
}

.stack-strip > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stack-strip-heading {
    font-size: 28px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 4px solid var(--color-accent);
    color: rgba(255, 255, 255, 0.94);
    display: inline-block;
}

.stack-strip-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 22px;
}

.stack-strip .stack-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.stack-strip .stack-icons img {
    max-width: 100%;
    height: auto;
}

/* Phone home screen (landscape) showing stack as apps */
.phone {
    max-width: 540px;
    width: 92%;
    margin: 0 auto 22px;
    padding: 10px;
    background: linear-gradient(180deg, #b8b8bc 0%, #88888c 60%, #6c6c70 100%);
    border-radius: 36px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.32),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 14px 36px rgba(0, 0, 0, 0.4),
        0 28px 70px rgba(0, 0, 0, 0.5);
    position: relative;
}

.phone-screen {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
}

.phone-bg {
    position: absolute;
    inset: 0;
    background-image: url('cornfield-stars.jpg');
    background-size: cover;
    background-position: center 40%;
}

.phone-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 78%, rgba(0,0,0,0.22) 100%);
}

.phone-statusbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 9px 22px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    z-index: 2;
}

.phone-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.phone-status-icons svg {
    height: 10px;
    width: auto;
    color: rgba(255, 255, 255, 0.95);
    display: block;
}

.phone-apps {
    position: absolute;
    inset: 32px 0 28px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.phone-apps img {
    width: 88%;
    max-width: 460px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.phone-home {
    position: absolute;
    bottom: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    max-width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 4px;
    z-index: 2;
}

@media (max-width: 480px) {
    .phone {
        width: 100%;
        padding: 8px;
        border-radius: 26px;
    }
    .phone-screen {
        border-radius: 18px;
    }
    .phone-statusbar {
        padding: 7px 16px 3px;
        font-size: 11px;
    }
    .phone-apps {
        inset: 26px 0 22px 0;
    }
}

.stack-strip-cta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2px;
}

.stack-strip-cta a {
    color: var(--color-accent-light);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted var(--color-accent);
    margin-left: 4px;
    transition: color 0.15s, border-color 0.15s;
}

.stack-strip-cta a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Business card */
.biz-card {
    max-width: 580px;
    margin: 0 auto;
    background: #fffdf7;
    border: 1px solid rgba(120, 95, 60, 0.16);
    border-radius: 4px;
    padding: 32px 40px;
    transform: rotate(-1.4deg);
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 6px 14px rgba(80, 60, 30, 0.1),
        0 22px 50px rgba(60, 45, 20, 0.14);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.biz-card:hover {
    transform: rotate(-1.4deg) translateY(-3px);
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 8px 18px rgba(80, 60, 30, 0.14),
        0 28px 60px rgba(60, 45, 20, 0.18);
}

.biz-card-mono {
    font-family: var(--font-heading);
    font-size: 60px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    letter-spacing: -2px;
    border-right: 1px solid rgba(120, 95, 60, 0.2);
    padding-right: 32px;
    text-align: center;
}

.biz-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary-dark);
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}

.biz-role {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #4a3f2e;
    margin: 0 0 14px;
}

.biz-rule {
    border: 0;
    border-top: 1px solid var(--color-accent);
    margin: 0 0 14px;
    opacity: 0.7;
    width: 100%;
}

.biz-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.biz-links li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.biz-links li a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.biz-copy-btn {
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 5px 7px;
    cursor: pointer;
    color: var(--color-primary-dark);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.biz-copy-btn:hover,
.biz-copy-btn:focus-visible {
    background: var(--color-accent-light);
    border-color: var(--color-accent-light);
    color: var(--color-primary-dark);
}

.biz-copy-btn.copied {
    color: var(--color-primary);
    background: rgba(82, 183, 136, 0.14);
}

.biz-copy-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.biz-link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.biz-link-icon.brand {
    fill: currentColor;
}

.biz-link-icon.stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.biz-links a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color 0.15s;
}

.biz-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

@media (max-width: 600px) {
    .biz-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 28px 26px;
    }
    .biz-card-mono {
        border-right: 0;
        border-bottom: 1px solid rgba(120, 95, 60, 0.2);
        padding-right: 0;
        padding-bottom: 14px;
        font-size: 44px;
    }
    .biz-links {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .biz-card {
        max-width: 720px;
        padding: 52px 60px;
        gap: 44px;
    }
    .biz-card-mono {
        font-size: 84px;
        padding-right: 40px;
    }
    .biz-name {
        font-size: 26px;
        margin-bottom: 8px;
    }
    .biz-role {
        font-size: 13px;
        margin-bottom: 18px;
    }
    .biz-rule {
        margin-bottom: 18px;
    }
    .biz-links {
        font-size: 14px;
        line-height: 1.85;
        gap: 8px;
    }
    .biz-link-icon {
        width: 16px;
        height: 16px;
    }
}

/* Featured email card (above the grid) */
.contact-featured {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background-color: rgba(200, 169, 110, 0.08);
    border: 1px solid var(--color-accent);
    padding: 22px 26px;
    border-radius: 6px;
    margin-bottom: 14px;
    transition: background-color 0.15s, border-color 0.15s;
}

.contact-featured:hover {
    background-color: rgba(200, 169, 110, 0.12);
    border-color: var(--color-accent-light);
}

.contact-featured .contact-label {
    flex-shrink: 0;
}

.contact-email-value {
    font-family: var(--font-mono);
    font-size: 18px;
    color: #ffffff;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.contact-email-value:hover,
.contact-email-value:focus-visible {
    color: var(--color-accent-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.contact-icon {
    width: 22px;
    height: 22px;
    color: var(--color-accent-light);
    display: block;
    margin-bottom: 6px;
    transition: color 0.15s;
}

.contact-card:hover .contact-icon,
.contact-card:focus-visible .contact-icon {
    color: var(--color-accent);
}

.contact-card:hover,
.contact-card:focus-visible {
    background-color: rgba(200, 169, 110, 0.12);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    color: #ffffff;
}

.contact-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--color-accent-light);
}

.contact-value {
    font-family: var(--font-mono);
    font-size: 15px;
    color: #ffffff;
    word-break: break-all;
}

/* Footer */
footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--color-text-light);
    font-size: 14px;
    font-family: var(--font-heading);
    border-top: 1px solid var(--color-border);
    background-color: var(--color-card-bg);
}

footer p {
    margin-bottom: 6px;
}

.footer-secondary a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-secondary a:hover {
    color: var(--color-primary);
}

/* Focus styles */
a:focus-visible,
.cta-button:focus-visible,
.contact-card:focus-visible {
    outline: 3px solid var(--color-accent-light);
    outline-offset: 3px;
}

/* Responsive */
@media (max-width: 700px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .quick-access {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary-dark);
        flex-direction: column;
        gap: 0;
        padding: 0 24px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links.is-open {
        max-height: 360px;
        padding: 4px 24px 14px;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links li:last-child {
        border-bottom: 0;
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        font-size: 14px;
    }

    .hero-content {
        padding: 64px 24px 56px;
    }

    .hero-lead {
        font-size: 17px;
    }

    section {
        padding: 48px 24px;
    }

    .cta-button {
        padding: 12px 22px;
        font-size: 14px;
    }

    .project-featured {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 18px;
    }

    .brand-accent {
        font-size: 15px;
    }

    .cta-row {
        flex-direction: column;
    }

    .cta-button {
        text-align: center;
    }
}
