/* ============================================================
   IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors */
    --color-bg: rgba(8, 8, 8, 1);
    --color-surface: rgb(30, 26, 30);
    --color-text: hsl(210, 11%, 96%);
    --color-subtle: rgb(233, 236, 239);
    --color-muted: rgb(145, 145, 145);
    --color-orange: rgb(220, 145, 4);

    /* Typography */
    --font-family: "Bricolage Grotesque", Helvetica, sans-serif;

    /* Fluid type scale using clamp(min, preferred, max) */
    --fs-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 1.8vw, 1rem);
    --fs-base: clamp(1rem, 2vw, 1.125rem);
    --fs-md: clamp(1.125rem, 2.5vw, 1.5rem);
    --fs-lg: clamp(1.5rem, 4vw, 2.25rem);
    --fs-xl: clamp(2rem, 6vw, 3.5rem);
    --fs-2xl: clamp(2.5rem, 8vw, 4.5rem);
    --fs-hero: clamp(2.25rem, 9vw, 5.5rem);

    /* Spacing */
    --space-xs: clamp(0.5rem, 1.5vw, 0.75rem);
    --space-sm: clamp(0.75rem, 2vw, 1rem);
    --space-md: clamp(1rem, 3vw, 1.5rem);
    --space-lg: clamp(1.5rem, 4vw, 2.5rem);
    --space-xl: clamp(2rem, 6vw, 4rem);
    --space-2xl: clamp(3rem, 8vw, 6rem);

    /* Borders */
    --radius-pill: 999px;
    --radius-lg: 1rem;

    /* Layout */
    --content-max-width: 1000px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--fs-base);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global content wrapper: bounds all main content */
main {
    width: 100%;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

/* ============================================================
   FOCUS STYLES — 2.4.7 Focus Visible (Level AA)
   Applies to keyboard navigation only (not mouse clicks)
   ============================================================ */
:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove focus ring for mouse users on elements that have custom styles */
.contact-link:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 3px;
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* 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;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-surface);
}

.header-wrapper {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(10px, 2vw, 14px) clamp(16px, 4vw, 32px);
}

/* Container 1: Brand logo */
.brand-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0.1rem;
}

/* The SVG logo image — fluid width, auto height preserves 199:75 aspect ratio */
.brand-logo img {
    width: clamp(60px, 10vw, 70px);
    height: auto;
    display: block;
}

/* Container 2: Center navigation container */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

/* Container 3: Right CTA & Controls container */
.header-cta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.nav-item {
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    padding: 4px 6px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--color-orange);
}

/* Active — orange colour + small dot indicator below the link */
.nav-item.active {
    color: var(--color-orange);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-orange);
    border-radius: 50%;
}

/* Active — contact-link pill inverts like its hover state */
.contact-link.active {
    background-color: var(--color-bg);
    color: var(--color-text);
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Active — mobile drawer links */
.mobile-nav-item.active {
    color: var(--color-orange);
}

.contact-link {
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: 8px clamp(12px, 2.5vw, 20px);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.contact-link:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
    /* ensures outline is visible outside the pill border */
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU DRAWER
   ============================================================ */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 99;
    background-color: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-nav-item {
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--fs-xl);
    font-weight: 600;
    transition: color 0.2s ease;
}

.mobile-nav-item:hover {
    color: var(--color-orange);
}

.mobile-menu .contact-link {
    font-size: var(--fs-md);
    color: var(--color-bg);
    padding: 10px 20px
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#home {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-family);
    font-size: var(--fs-base);
    font-weight: 500;
    border: 2px solid var(--color-subtle);
    color: var(--color-text);
    padding: 8px clamp(16px, 3vw, 24px);
    border-radius: var(--radius-pill);
    margin: 0 auto var(--space-md);
}

.hero-tagline {
    font-family: var(--font-family);
    font-size: var(--fs-hero);
    font-weight: 600;
    line-height: 1.12;
    color: var(--color-subtle);
    padding: var(--space-xs) 0;
}

.color-orange {
    color: var(--color-orange);
    font-weight: 600;
}

/* ============================================================
   ABOUT / SERVICES SECTION
   ============================================================ */
#about {
    min-height: 80vh;
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    align-items: center;
}

.about-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-wrapper {
    min-width: 0;
    color: var(--color-text);
    font-family: var(--font-family);
}

.text-wrapper h3 {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--color-orange);
    margin-bottom: var(--space-sm);
}

.text-wrapper ul {
    list-style: none;
    padding-left: 0;
}

.text-wrapper ul li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--color-orange);
    border-radius: var(--radius-pill);
    margin-right: var(--space-xs);
}

.custom-text {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-xs) 0;
    line-height: 1.5;
}

.profile-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image {
    width: clamp(200px, 38vw, 420px);
    /* No fixed height — let the image's natural aspect ratio dictate the height */
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.image img {
    width: 100%;
    height: auto;
    /* preserve intrinsic aspect ratio, no clipping */
    display: block;
}

/* ============================================================
   SKILLS & EXPERTISE CAROUSEL SECTION
   ============================================================ */
#skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2rem);
    text-align: center;
    color: var(--color-text);
    font-family: var(--font-family);
    padding: var(--space-xl) var(--space-lg);
    overflow: hidden;
}

#skills h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

/* Outer viewport with edge fade mask for infinite continuous look */
.skills-carousel-container {
    width: 100%;
    max-width: 1100px;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

/* Continuous scrolling track */
.skills-carousel-track {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 2rem);
    width: max-content;
    will-change: transform;
    animation: skills-slide 22s linear infinite;
}

/* Pause scroll when user hovers or focuses on items */
.skills-carousel-container:hover .skills-carousel-track,
.skills-carousel-container:focus-within .skills-carousel-track {
    animation-play-state: paused;
}

@keyframes skills-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Translates exactly half width (one full set of items + gaps) */
        transform: translateX(-50%);
    }
}

/* Individual skill pill cards */
.skill-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(1rem, 2vw, 1.5rem);
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    user-select: none;
    cursor: default;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 145, 4, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 145, 4, 0.2);
}

.skill-card img {
    width: clamp(24px, 3.5vw, 32px);
    height: clamp(24px, 3.5vw, 32px);
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.skill-card span {
    font-size: clamp(0.875rem, 1.8vw, 1.05rem);
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
}

/* ============================================================
   DESIGN STEPS SECTION
   ============================================================ */
#design-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    text-align: center;
    color: var(--color-text);
    font-family: var(--font-family);
    padding: var(--space-xl) var(--space-lg);
}

#design-steps>h3 {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

#design-steps>p {
    font-size: clamp(0.875rem, 2vw, 1.1rem);
    color: var(--color-muted);
    max-width: 55ch;
    line-height: 1.6;
}

/* Grid: auto-fills columns, min 180px each — no breakpoint needed */
.design-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 28vw, 220px), 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    /* wider gap — rotated cards need breathing room */
    width: 100%;
    max-width: 900px;
}

/* ── Sticky note base ──────────────────────────────────────────────────────── */
.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.875rem);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.5rem) clamp(1.75rem, 4vw, 2.5rem);
    /* extra bottom for the folded corner */
    border-radius: 2px;
    font-size: clamp(0.875rem, 2vw, 1.05rem);
    font-weight: 600;
    /* Dark ink on paper */
    color: #1a1209;
    /* Layered shadow: ambient + directional lift + hard edge */
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .25),
        0 4px 8px rgba(0, 0, 0, .35),
        0 8px 20px rgba(0, 0, 0, .3);
    /* Smooth out on hover */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Prevent folded corner from overflowing */
    overflow: hidden;
}

/* ── Per-card colours (amber / coral / sage) ────────────────────────────── */
.step:nth-child(1) {
    background-color: #f5c842;
    transform: rotate(-2.5deg);
}

.step:nth-child(2) {
    background-color: #f5a28a;
    transform: rotate(1.8deg);
}

.step:nth-child(3) {
    background-color: #a8d5a2;
    transform: rotate(-1.2deg);
}

/* ── Folded corner (bottom-right) ──────────────────────────────────────────── */
.step::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    /* Triangle formed by two transparent borders + one coloured border */
    border-style: solid;
    border-width: 0 0 clamp(28px, 4vw, 36px) clamp(28px, 4vw, 36px);
    border-color: transparent transparent rgba(0, 0, 0, .18) transparent;
    filter: drop-shadow(-2px -2px 2px rgba(0, 0, 0, .15));
    transition: border-width 0.3s ease;
}

/* Fold highlight — lighter triangle layered on top */
.step::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 clamp(28px, 4vw, 36px) clamp(28px, 4vw, 36px);
    border-color: transparent transparent rgba(255, 255, 255, .35) transparent;
}

/* ── Hover — card levels out, lifts higher ─────────────────────────────────── */
.step:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.03);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, .2),
        0 10px 24px rgba(0, 0, 0, .4),
        0 20px 40px rgba(0, 0, 0, .25);
}

/* Keep nth-child colours on hover (override the transform only) */
.step:nth-child(1):hover,
.step:nth-child(2):hover,
.step:nth-child(3):hover {
    transform: rotate(0deg) translateY(-6px) scale(1.03);
}

/* ── SVG icons — dark tint matching each card ──────────────────────────────── */
.step svg {
    width: clamp(28px, 5vw, 40px);
    height: clamp(28px, 5vw, 40px);
    flex-shrink: 0;
    opacity: 0.8;
}

.step:nth-child(1) svg {
    color: #7a5a00;
}

.step:nth-child(2) svg {
    color: #7a2a10;
}

.step:nth-child(3) svg {
    color: #2a5a26;
}

/* ── Label text ─────────────────────────────────────────────────────────────── */
.step p {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 700;
    line-height: 1.4;
    padding: 0;
    color: #1a1209;
    letter-spacing: 0.01em;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
#projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    text-align: center;
    color: var(--color-text);
    font-family: var(--font-family);
    padding: var(--space-xl) var(--space-lg);
}

#projects h2 {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

/* ── Grid: 3 cards side-by-side, responsive ─────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 3vw, 1.75rem);
    width: 100%;
    max-width: 1100px;
}

.project-card {
    display: flex;
    flex-direction: column;
    /* image on top, info below */
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--color-surface);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image link — fixed aspect-ratio container, same size for every card */
.project-card a {
    display: block;
    flex-shrink: 0;
    width: 100%;
    /* fill the grid column */
    aspect-ratio: 8 / 3;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, .3),
        0 12px 28px rgba(0, 0, 0, .25);
}

.project-card:hover img {
    transform: scale(1.04);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: clamp(0.375rem, 1vw, 0.5rem);
    padding: clamp(0.875rem, 2vw, 1.25rem);
    text-align: left;
}

.project-info h3 {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

.project-info p {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 400;
    color: var(--color-muted);
    line-height: 1.5;
}

/* ============================================================
   CALL-TO-ACTION (CTA) SECTION
   ============================================================ */
.cta-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-2xl) var(--space-lg);
    font-family: var(--font-family);
    width: 100%;
}

.cta-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
    max-width: 900px;
    padding: clamp(1rem, 5vw, 1.5rem) clamp(1rem, 4vw, 1.5rem);
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cta-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-orange);
    background-color: rgba(220, 145, 4, 0.1);
    border: 1px solid rgba(220, 145, 4, 0.25);
    border-radius: var(--radius-pill);
}

.cta-card h2 {
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
    max-width: 24ch;
}

.cta-description {
    font-size: clamp(0.9rem, 2vw, 1.125rem);
    color: var(--color-muted);
    line-height: 1.6;
    max-width: 58ch;
}

.cta-action {
    margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px clamp(16px, 2.5vw, 24px);
    background-color: var(--color-text);
    color: var(--color-bg);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.cta-button:hover {
    background-color: var(--color-bg);
    transform: translateY(-2px);
    border: 1px solid var(--color-text);
    color: var(--color-text);
    transition: var(--transition-base);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button svg {
    transition: transform 0.25s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer#contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    width: 100%;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-xl) var(--space-lg);
    border-top: 1px solid var(--color-surface);
    color: var(--color-muted);
    font-family: var(--font-family);
}

footer#contact p {
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    font-weight: 400;
    color: var(--color-muted);
}

.social-link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

.social-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(38px, 4vw, 42px);
    height: clamp(38px, 4vw, 42px);
    border-radius: var(--radius-pill);
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-subtle);
    font-size: clamp(1rem, 2vw, 1.15rem);
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.social-link a i {
    line-height: 1;
    pointer-events: none;
}

.social-link a:hover {
    color: var(--color-bg);
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(220, 145, 4, 0.35);
    text-decoration: none;
}

.social-link a:active {
    transform: translateY(-1px);
}

/* Ensure mobile drawer icons match with spacious sizing */
.mobile-menu .social-link {
    margin-top: var(--space-sm);
    gap: var(--space-md);
}

.mobile-menu .social-link a {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Hide desktop nav container on mobile/tablet — drawer handles page links */
    .nav-bar {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    /* Header on tablet: edge-to-edge with borderless mobile appearance */
    #header {
        border-bottom: none;
    }

    .header-wrapper {
        padding: clamp(10px, 3vw, 14px) clamp(16px, 4vw, 24px);
    }

    /* Logo grows to fill free space → maximises gap between logo and CTA */
    .brand-logo {
        flex: 1;
    }

    /* About: stack vertically */
    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .text-wrapper {
        width: 100%;
    }

    /* Centre the list block on mobile while keeping item text left-aligned */
    .text-wrapper ul {
        display: inline-block;
        margin: 0 auto;
        text-align: left;
    }

    .profile-image {
        order: -1;
        /* Image on top when stacked */
    }

    /* Footer stacks on tablet */
    footer#contact {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .social-link {
        justify-content: center;
    }

    /* Projects: 2 columns on tablet */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

    #header {
        border-radius: 0 !important;
    }

    #header .contact-link {
        border-radius: var(--radius-pill);
    }

    #home {
        padding: var(--space-xl) var(--space-sm);
    }

    #about {
        padding: var(--space-lg) var(--space-sm);
        min-height: auto;
    }

    .hero-tagline br {
        display: none;
        /* Let text wrap naturally at small sizes */
    }

    #design-steps {
        padding: var(--space-lg) var(--space-sm);
    }

    /* Single-column steps on mobile */
    .design-steps {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        max-width: 214px;
        /* cap width so card doesn't stretch edge-to-edge */
        margin: 0 auto;
    }

    /* Smaller sticky notes on mobile */
    .step {
        padding: 0.875rem 1rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Reduce rotation — less tilt on narrow screens looks cleaner */
    .step:nth-child(1) {
        transform: rotate(-1.5deg);
    }

    .step:nth-child(2) {
        transform: rotate(1deg);
    }

    .step:nth-child(3) {
        transform: rotate(-0.8deg);
    }

    /* Smaller folded corner */
    .step::before,
    .step::after {
        border-width: 0 0 20px 20px;
    }

    /* Smaller icon */
    .step svg {
        width: 24px;
        height: 24px;
    }

    .step p {
        font-size: 0.875rem;
    }

    /* Skills carousel: compact padding on mobile */
    #skills {
        padding: var(--space-lg) var(--space-sm);
    }

    /* Projects: single column on mobile */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* CTA Section: compact padding on mobile */
    .cta-section {
        padding: var(--space-xl) var(--space-sm);
    }

    .cta-card {
        padding: 2rem 1.25rem;
    }
}

/* ============================================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .skills-carousel-container {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .skills-carousel-track {
        animation: none;
    }
}