/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
    /* Colours */
    --color-bg:          #F8F5F0;
    --color-ink:         #1E293B;
    --color-ink-muted:   #64748B;
    --color-ink-soft:    #94A3B8;
    --color-accent:      #C8A951;
    --color-surface:     #FFFFFF;
    --color-border:      rgba(30, 41, 59, 0.1);
    --color-border-soft: rgba(30, 41, 59, 0.05);

    /* Typography */
    --font-sans:    'Inter', system-ui, sans-serif;
    --font-display: 'Fraunces', 'Inter', serif;

    /* Spacing scale */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-xxl: 8rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Motion */
    --transition-default: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}


/* ============================================================
   BASE
   ============================================================ */

html {
    scroll-padding-top: 90px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-ink);
    max-width: 100%;
    overflow-x: hidden;
}

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

/* Skip-to-content link — visually hidden until focused */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    z-index: 9999;
    background: var(--color-surface);
    color: var(--color-ink);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: var(--space-xs);
}


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

.btn-primary {
    display: inline-block;
    margin-top: 30px;
    padding: 18px 45px;
    border: 1px solid #000;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all var(--transition-default);
    background-color: transparent;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #000;
    color: #fff;
}

.btn-ghost {
    display: inline-block;
    padding: 18px 45px;
    border: 1px solid var(--color-ink);
    text-decoration: none;
    color: var(--color-ink);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all var(--transition-default);
    background-color: transparent;
    cursor: pointer;
}

.btn-ghost:hover {
    background-color: #8AB4F8;
    border-color: #8AB4F8;
    color: var(--color-ink);
}

.btn-small-primary {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid #000;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: all var(--transition-default);
    background-color: transparent;
    cursor: pointer;
    margin-right: 10px;
}

.btn-small-primary:hover {
    background-color: #000;
    color: #fff;
}

.btn-small-secondary {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    background-color: transparent;
    color: var(--color-ink-muted);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: all var(--transition-default);
    cursor: pointer;
}

.btn-small-secondary:hover {
    background-color: transparent;
    color: var(--color-ink);
    border-color: var(--color-ink);
}

.btn-text {
    text-decoration: none;
    color: var(--color-ink);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 4px;
    transition: all var(--transition-default);
}

.btn-text:hover {
    padding-left: 6px;
    border-bottom-color: var(--color-ink);
}


/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    height: 80px;
    background-color: rgba(248, 245, 240, 0.8);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: opacity 250ms ease;
}

.navbar-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-md);
}

.navbar-headers {
    list-style: none;
    display: flex;
    gap: var(--space-md);
    margin: 0;
    padding: 0;
}

.navbar-logo a,
.nav-link {
    text-decoration: none;
    color: var(--color-ink);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: opacity var(--transition-default);
}

.logo-link {
    font-weight: 800;
    letter-spacing: 0.2em;
    position: relative;
}

.nav-link:hover,
.logo-link:hover {
    opacity: 0.6;
}

.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: #000000;
    opacity: 0.1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 1001;
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-ink);
    margin: 5px 0;
    transition: all var(--transition-default);
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* ============================================================
   HERO
   ============================================================ */

.hero-minimalist {
    background-color: var(--color-bg);
    min-height: 70vh;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.hero-top-left {
    padding-top: 0;
    display: inline-block;
    margin-left: -20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.hero-editorial-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    height: 70vh;
    padding-top: clamp(var(--space-md), 5vh, var(--space-lg));
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 300;
    font-optical-sizing: auto;
    color: var(--color-ink);
    letter-spacing: -2px;
    margin: 0;
    line-height: 1;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.hero-meta {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    letter-spacing: 0.05em;
    color: var(--color-ink-muted);
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-meta .dot {
    color: var(--color-accent);
}

.hero-meta .status {
    font-weight: 500;
}

.hero-bottom-right {
    align-self: flex-end;
    max-width: 400px;
    margin-top: auto;
}

.minimal-growth-card {
    border-top: 1px solid var(--color-ink);
    padding-top: var(--space-md);
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--color-ink);
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 1rem;
}

.hero-sub {
    font-size: 1rem;
    color: var(--color-ink-muted);
    line-height: 1.7;
    margin: 0 0 var(--space-md);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

#home.hero-minimalist {
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
}

#home .container {
    padding-left: 0;
}

section {
    padding: var(--space-xl) 0;
}

section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--space-sm);
    color: #8AB4F8;
    font-weight: 700;
}

.section-description {
    text-align: center;
    font-size: 1.2rem;
    color: #5C4A3A;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    line-height: 1.8;
}

/* Shared heading style for all section headers */
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    font-optical-sizing: auto;
    letter-spacing: normal;
    color: #000000;
    text-align: left;
    border-left: 6px solid #000000;
    padding-left: 1.5rem;
    margin-bottom: 3rem;
    display: inline-block;
}

.section-title--secondary {
    margin-top: var(--space-xl);
}



/* ============================================================
   PROJECTS
   ============================================================ */

.projects-section {
    text-align: left;
    padding: 40px 0 100px 0;
    background-color: var(--color-bg);
}

.projects-section .section-description {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.projects-grid--featured {
    display: grid;
    gap: 3rem;
    margin-top: var(--space-md);
}

.projects-grid--secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(30, 41, 59, 0.12);
    border-color: #8C786A;
}

.project-card.has-image .project-image {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.project-card.has-image .project-image img {
    transition: transform 0.6s ease;
}

.project-card.has-image:hover .project-image img {
    transform: scale(1.01);
}

.project-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-md);
    border: 1px solid #E5E1DA;
    transition: transform 0.6s ease;
}

.project-card h3 {
    font-size: 1.5rem;
    color: var(--color-ink);
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.project-subtitle {
    font-size: 0.85rem;
    color: var(--color-ink-muted);
    font-weight: 400;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.project-description {
    color: var(--color-ink-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #8AB4F8;
    background: rgba(138, 180, 248, 0.1);
    padding: 4px 10px;
    border-radius: 2px;
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}


/* ============================================================
   TESTIMONIAL
   ============================================================ */

.testimonial-section {
    padding: var(--space-xl) 0;
    background: var(--color-bg);
}

.testimonial {
    border-left: 4px solid var(--color-accent);
    padding-left: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    font-optical-sizing: auto;
    line-height: 1.4;
    color: var(--color-ink);
    margin-bottom: 1.5rem;
}

.testimonial-attr {
    display: block;
    font-size: 0.85rem;
    color: var(--color-ink-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.testimonial-name {
    font-weight: 600;
    color: var(--color-ink);
    display: block;
}

.testimonial-role {
    display: block;
    margin-top: 0.25rem;
}


/* ============================================================
   SKILLS
   ============================================================ */

.skills-section {
    background-color: var(--color-bg);
    padding: 120px 0;
    border-top: 1px solid var(--color-border-soft);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.skill-category {
    background: var(--color-surface);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-default), border-color var(--transition-default);
    position: relative;
    text-align: center;
}

.skill-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    opacity: 0;
    transition: opacity var(--transition-default);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: transparent #8C786A #8C786A #8C786A;
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-ink);
    border-bottom: 1px solid var(--color-border-soft);
    padding-bottom: 0.75rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category li {
    font-size: 0.9rem;
    padding: var(--space-xs) 0;
    color: var(--color-ink-muted);
    border: none;
    background: none;
}

.skill-category:hover li {
    color: var(--color-ink);
}

.skill-category li::before {
    content: none;
}


/* ============================================================
   ABOUT
   ============================================================ */

.narrow-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-minimal {
    padding: 120px 0;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border-soft);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 0;
}

.about-card {
    border-top: 2px solid var(--color-accent);
    padding-top: 1.5rem;
}

.about-card-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-ink-muted);
    margin-bottom: 1.25rem;
}

.about-card p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-ink);
    margin: 0 0 1rem;
}

.about-card p:last-child {
    margin-bottom: 0;
}


/* ============================================================
   MAIN LAYOUT + SIDEBAR
   ============================================================ */

.main-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.main-content {
    min-width: 0;
}

.main-content .container {
    max-width: none;
    margin: 0;
    padding: 0;
}

.main-content .narrow-container {
    max-width: 640px;
    margin: 0 auto;
}

.sidebar-nav {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-top: var(--space-xl);
    padding-left: var(--space-sm);
}

/* "INDEX" editorial label */
.sidebar-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-ink-soft);
    margin-bottom: 0.75rem;
    padding-left: 36px;
}

/* Wrapper carries the spine pseudo-element and positions the progress fill */
.sidebar-body {
    position: relative;
}

/* Spine hairline — runs the full height of the link list */
.sidebar-body::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
    pointer-events: none;
}

/* Accent fill — CSS custom property --scroll-progress (0→1) set by rAF listener */
.sidebar-progress {
    position: absolute;
    left: 31.5px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--color-accent);
    pointer-events: none;
    transform: scaleY(var(--scroll-progress, 0));
    transform-origin: top;
}

/* Link list — z-index: 1 ensures links and dot paint above the progress fill */
.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Each row: [32px number] [name column] */
.sidebar-links > li {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
}

/* Section numbers — monospace, right-aligned up to the spine */
.sidebar-links > li::before {
    grid-column: 1;
    grid-row: 1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    color: var(--color-ink-soft);
    text-align: right;
    padding-right: 8px;
    padding-top: 0.4rem;
    line-height: 1.4;
    transition: color var(--transition-default);
}

.sidebar-links > li:nth-child(1)::before { content: "01"; }
.sidebar-links > li:nth-child(2)::before { content: "02"; }
.sidebar-links > li:nth-child(3)::before { content: "03"; }
.sidebar-links > li:nth-child(4)::before { content: "04"; }

.sidebar-links > li:has(.sidebar-link.active)::before {
    color: var(--color-ink);
}

/* Section name — Fraunces, right of spine */
.sidebar-link {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    font-optical-sizing: auto;
    color: var(--color-ink-muted);
    text-decoration: none;
    padding: 0.4rem 0 0.4rem 6px;
    display: block;
    line-height: 1.4;
    position: relative;
    transition: color var(--transition-default);
}

.sidebar-link:hover {
    color: var(--color-ink);
}

.sidebar-link.active {
    color: var(--color-ink);
}

/* "You are here" dot — single element that slides between active link positions */
.sidebar-dot {
    position: absolute;
    left: 29px;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0;
    transform: translateY(var(--dot-y, 0px));
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

@keyframes dot-pulse {
    0%   { transform: translateY(var(--dot-y, 0px)) scale(1); }
    40%  { transform: translateY(var(--dot-y, 0px)) scale(1.4); }
    100% { transform: translateY(var(--dot-y, 0px)) scale(1); }
}

.sidebar-dot.is-clicking {
    animation: dot-pulse 250ms ease-out forwards;
}

/* Sub-links: grid-template-rows collapse (0fr → 1fr) */
.sidebar-sub-links {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.sidebar-sub-inner {
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
}

li:has(.sidebar-link.active) .sidebar-sub-links {
    grid-template-rows: 1fr;
}

.sidebar-sublink {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-ink-soft);
    text-decoration: none;
    padding: 0.2rem 0;
    transition: color var(--transition-default);
    letter-spacing: 0.02em;
}

.sidebar-sublink:hover {
    color: var(--color-ink-muted);
}

.sidebar-sublink.active {
    color: var(--color-ink-muted);
}

/* Tighter focus ring for the compact sidebar layout */
.sidebar-link:focus-visible,
.sidebar-sublink:focus-visible {
    outline-offset: 2px;
}

/* Hover metadata: desktop pointer devices only, no touch */
@media (hover: hover) and (min-width: 769px) {
    .sidebar-link[data-meta]::after {
        content: attr(data-meta);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        font-family: var(--font-sans);
        font-size: 0.7rem;
        font-style: italic;
        color: var(--color-ink-soft);
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.2s ease 50ms;
        pointer-events: none;
    }

    .sidebar-link[data-meta]:hover::after {
        opacity: 1;
    }
}


/* ============================================================
   CONTACT
   ============================================================ */

.contact-section {
    padding: 120px 0 150px 0;
    background-color: var(--color-bg);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.contact-availability {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-optical-sizing: auto;
    color: var(--color-ink);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.contact-pitch {
    font-size: 1.1rem;
    color: var(--color-ink-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Neutralise the default top margin in row layouts */
.contact-actions .btn-primary,
.hero-actions .btn-primary {
    margin-top: 0;
}

/* Tighter horizontal padding so both buttons fit side-by-side in the hero column */
.hero-actions .btn-primary,
.hero-actions .btn-ghost {
    padding-left: 24px;
    padding-right: 24px;
}

.contact-secondary {
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.contact-secondary a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color var(--transition-default);
}

.contact-secondary a:hover {
    color: var(--color-ink);
}

.contact-secondary .dot {
    color: var(--color-accent);
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background-color: var(--color-bg);
    color: var(--color-ink-muted);
    text-align: left;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border-soft);
    font-size: 0.85rem;
    max-width: 1100px;
    margin: 0 auto;
}


/* ============================================================
   SCROLL REVEAL
   ============================================================ */

html.js-loaded section,
html.js-loaded .project-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
    html.js-loaded section,
    html.js-loaded .project-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ============================================================
   NAV HANDOFF
   ============================================================ */

@media (min-width: 769px) {
    .sidebar-nav {
        opacity: 0;
        pointer-events: none;
        transition: opacity 350ms ease 100ms;
    }

    .nav-handoff-active .navbar {
        opacity: 0;
        pointer-events: none;
    }

    .nav-handoff-active .sidebar-nav {
        opacity: 1;
        pointer-events: auto;
    }
}


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

@media (min-width: 992px) {
    .project-card.has-image {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 3rem;
        grid-column: 1 / -1;
    }

    .project-card.has-image .project-content {
        flex: 1.2;
    }

    .project-card.has-image .project-image {
        flex: 1;
        display: block;
    }

    .project-card.has-image .project-image img {
        width: 100%;
        border-radius: var(--radius-md);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    /* Secondary cards are vertical, not side-by-side */
    .projects-grid--secondary .project-card.has-image {
        flex-direction: column;
        grid-column: auto;
        align-items: stretch;
    }

    .projects-grid--secondary .project-card.has-image .project-content,
    .projects-grid--secondary .project-card.has-image .project-image {
        flex: none;
    }
}

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

@media (max-width: 991px) {
    .project-card.has-image {
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .hero-name {
        letter-spacing: -1px;
    }

    .hero-editorial-grid {
        height: auto;
        min-height: 75vh;
        padding-bottom: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .navbar-headers {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transform: translateY(-120%);
        transition: transform var(--transition-default);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        display: flex;
        visibility: hidden;
    }

    .navbar-headers.active {
        transform: translateY(0);
        display: flex;
        visibility: visible;
    }

    .navbar-container {
        max-width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: var(--space-sm) 1.5rem;
        text-align: center;
        font-size: 1.1rem;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-ink);
        border-bottom: 1px solid var(--color-border-soft);
    }

    .nav-link:active {
        border-radius: 0;
    }

    .hero-minimalist {
        min-height: unset;
    }

    .hero-editorial-grid {
        height: auto;
        min-height: unset;
        padding-top: var(--space-md);
        padding-bottom: 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: var(--space-sm);
    }

    .hero-top-left {
        left: 0;
        margin-left: 0;
        text-align: center;
    }

    .hero-meta {
        justify-content: center;
        margin-top: var(--space-xs);
    }

    .hero-actions {
        gap: var(--space-sm);
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .hero-bottom-right {
        align-self: flex-start;
        text-align: left;
    }

    section h2 {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
        padding: 0 var(--space-sm);
    }

    .projects-section {
        padding: 5rem 0;
    }

    .projects-grid--featured,
    .projects-grid--secondary {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }

    .project-links {
        flex-direction: column;
        align-items: stretch;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .about-minimal {
        padding: var(--space-xs) 0 5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .sidebar-nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero-name {
        letter-spacing: -1px;
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-bottom-right {
        align-self: flex-start;
        max-width: 100%;
        width: 100%;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

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

    .project-card:hover { transform: none; }
    .project-card.has-image:hover .project-image img { transform: none; }
    .skill-category:hover { transform: none; }
    .about-text:hover { transform: none; }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 var(--space-sm);
    }

    .container {
        padding: 0 var(--space-sm);
    }

    section {
        padding: var(--space-lg) 0;
    }

    section h2 {
        font-size: 1.75rem;
    }

    .project-card {
        padding: 1.25rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    .contact-link {
        font-size: 0.9rem;
    }

    .skill-category {
        padding: 1.25rem;
    }

    .skill-category h3 {
        font-size: 1.2rem;
    }

    .skill-category li {
        font-size: 0.95rem;
    }

}
