:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef1fb;
    --text: #10162f;
    --muted: #5c6475;
    --line: #dde3f1;
    --primary: #FF7F00;
    --primary-strong: #e67300;
    --primary-soft: rgba(255, 127, 0, 0.12);
    --primary-glow: rgba(255, 127, 0, 0.18);
    --primary-gradient: linear-gradient(135deg, #FF7F00, #ff9a33);
    --shadow-sm: 0 10px 24px rgba(16, 22, 47, 0.06);
    --shadow-md: 0 18px 44px rgba(16, 22, 47, 0.1);
    --shadow-lg: 0 28px 60px rgba(16, 22, 47, 0.14);
    --radius: 20px;
    --radius-sm: 14px;
    --container: 1180px;
    --font: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1319;
    --surface: #131b24;
    --surface-2: #18212c;
    --text: #eef4fb;
    --muted: #a8b5c7;
    --line: rgba(166, 181, 199, 0.18);
    --primary: #FF7F00;
    --primary-strong: #ff9433;
    --primary-soft: rgba(255, 127, 0, 0.16);
    --primary-glow: rgba(255, 127, 0, 0.2);
    --primary-gradient: linear-gradient(135deg, #FF7F00, #ff9a33);
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.42);
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 127, 0, 0.08), transparent 30%),
        linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
    line-height: 1.6;
    transition: background 240ms ease, color 240ms ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0 45%, rgba(255, 255, 255, 0.18) 50%, transparent 55%) no-repeat;
    background-size: 260% 100%;
    opacity: 0.16;
    animation: pageShimmer 18s ease-in-out infinite;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-section {
    padding: 4.5rem 0;
}

#modele {
    scroll-margin-top: 96px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 0.7rem 0 0;
    color: var(--muted);
    max-width: 760px;
}

.section-heading {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1.6rem;
}

.section-heading .section-eyebrow {
    width: fit-content;
}

#modele .section-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

#modele .section-heading .section-eyebrow {
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: 180ms ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 16px 30px rgba(255, 127, 0, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(255, 127, 0, 0.35);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border-color: rgba(255, 127, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 127, 0, 0.34);
    background: rgba(255, 127, 0, 0.05);
    box-shadow: 0 8px 20px rgba(255, 127, 0, 0.12);
}

html[data-theme="dark"] .btn-secondary {
    background: rgba(19, 27, 36, 0.92);
    color: var(--text);
    border-color: var(--line);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.28) 50%, transparent 75%);
    transform: translateX(-120%);
    transition: transform 500ms ease;
}

.btn:hover::after {
    transform: translateX(120%);
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(249, 250, 255, 0.85), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(221, 227, 241, 0.5);
    box-shadow: 0 10px 24px rgba(16, 22, 47, 0.03);
}

html[data-theme="dark"] .main-header {
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(18, 26, 35, 0.9), rgba(13, 19, 25, 0.85));
    border-bottom-color: rgba(166, 181, 199, 0.08);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.7rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand img {
    height: 32px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.7rem;
    box-shadow: 0 10px 20px rgba(255, 127, 0, 0.28);
    animation: badgePulse 5.5s ease-in-out infinite;
}

html[data-theme="dark"] .brand-mark {
    box-shadow: 0 10px 20px rgba(255, 127, 0, 0.2);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav a {
    position: relative;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.3rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: 180ms ease;
}

.theme-toggle:hover {
    transform: translateY(-1px) scale(1.05);
    border-color: rgba(255, 127, 0, 0.28);
    box-shadow: 0 4px 14px rgba(255, 127, 0, 0.1);
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme="dark"] .theme-icon-dark {
    display: none;
}

html:not([data-theme="dark"]) .theme-icon-light {
    display: none;
}

.hero {
    padding: 5.5rem 0 4.25rem;
    background:
        radial-gradient(ellipse 80% 50% at 0% 50%, rgba(255, 127, 0, 0.08), transparent),
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 127, 0, 0.06), transparent),
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, #f9faff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .page-hero {
    background:
        radial-gradient(ellipse 80% 50% at 0% 50%, rgba(255, 127, 0, 0.1), transparent),
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 127, 0, 0.08), transparent),
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, #121a23 0%, #0d1319 100%);
}

.page-hero {
    padding: 2rem 0 0.6rem;
}

.page-hero .hero-grid {
    align-items: end;
}

.page-hero .hero-copy {
    max-width: 860px;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(221, 227, 241, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .page-hero .hero-copy,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .editor-sidebar,
html[data-theme="dark"] .editor-form section,
html[data-theme="dark"] .editor-preview,
html[data-theme="dark"] .footer {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: var(--line);
}

html[data-theme="dark"] .template-preview {
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.18), transparent),
        linear-gradient(180deg, #131b24 0%, #18212c 100%);
}

html[data-theme="dark"] .template-preview::after {
    border-color: rgba(166, 181, 199, 0.16);
    background:
        linear-gradient(180deg, rgba(20, 28, 39, 0.94), rgba(20, 28, 39, 0.82));
}

html[data-theme="dark"] .preview-canvas {
    background: linear-gradient(180deg, #131b24 0%, #101823 100%);
}

html[data-theme="dark"] .editor-field,
html[data-theme="dark"] .editor-textarea,
html[data-theme="dark"] .editor-select,
html[data-theme="dark"] .searchbar input {
    background: rgba(19, 27, 36, 0.94);
    color: var(--text);
    border-color: var(--line);
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto -10% 0 auto;
    width: min(48vw, 640px);
    height: 280px;
    background: radial-gradient(circle, rgba(255, 127, 0, 0.15), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
    animation: drift 12s ease-in-out infinite alternate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -10% auto auto -8%;
    width: min(30vw, 400px);
    height: 300px;
    background: radial-gradient(circle, rgba(255, 127, 0, 0.06), transparent 68%);
    filter: blur(10px);
    pointer-events: none;
    animation: drift 15s ease-in-out infinite alternate-reverse;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 1.5rem;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
}

.hero-copy h1 {
    margin: 0.7rem 0 0;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    animation: rise 700ms ease both;
    background: linear-gradient(135deg, var(--text) 45%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-copy p {
    max-width: 660px;
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.15rem;
}

.home-hero {
    min-height: 58vh;
    display: grid;
    place-items: center;
}

.home-hero .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(250px, 340px);
    justify-content: center;
    text-align: left;
    gap: clamp(0.85rem, 1.8vw, 1.5rem);
}

.home-hero .hero-copy {
    max-width: 860px;
}

.home-hero .hero-copy h1 {
    font-size: clamp(3rem, 5vw, 4.8rem);
    max-width: 14ch;
    margin-top: 0;
    background: linear-gradient(135deg, var(--text) 30%, var(--primary) 65%, #ffa64d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero .hero-copy p {
    max-width: 56ch;
    font-size: 1.12rem;
}

.home-hero .hero-actions {
    margin-top: 1.4rem;
}

.default-template-preview {
    position: relative;
    justify-self: start;
    width: min(100%, 340px);
    padding: 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 127, 0, 0.18);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-lg);
    transform: rotate(1.5deg);
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
    animation: cvFloat 6s ease-in-out infinite;
    overflow: hidden;
}

.default-template-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.78);
    pointer-events: none;
}

.default-template-preview::after {
    content: '';
    position: absolute;
    inset: -20% auto -20% -55%;
    width: 44%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-18deg);
    animation: cvShine 5.5s ease-in-out infinite;
    pointer-events: none;
}

.default-template-preview:hover {
    transform: translateY(-8px) rotate(0deg) scale(1.015);
    border-color: rgba(255, 127, 0, 0.3);
    box-shadow: 0 32px 70px rgba(16, 22, 47, 0.18);
}

.default-template-preview img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 127, 0, 0.14);
    background: var(--surface-2);
    box-shadow: 0 18px 38px rgba(16, 22, 47, 0.1);
    transition: transform 260ms ease, filter 260ms ease;
}

.default-template-preview:hover img {
    transform: scale(1.018);
    filter: saturate(1.06) contrast(1.02);
}

.panel {
    padding: 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 0.85rem;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    padding: 1.15rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(255, 127, 0, 0.12);
    box-shadow: 0 14px 34px rgba(16, 22, 47, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.95;
}

.card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding-top: 0.35rem;
}

.template-card {
    display: grid;
    gap: 0;
    padding: 0;
    width: 100%;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(255, 127, 0, 0.14);
    box-shadow: 0 16px 36px rgba(16, 22, 47, 0.07);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 400ms ease, border-color 300ms ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.template-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(255, 127, 0, 0.03));
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 0;
    pointer-events: none;
}

.template-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.template-card:hover::after {
    transform: scaleX(1);
}

.template-card:hover::before {
    opacity: 1;
}

.template-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(255, 127, 0, 0.3);
    z-index: 5;
    animation: badgePulse 3s ease-in-out infinite;
}

.template-card.featured {
    border-color: rgba(255, 127, 0, 0.25);
    box-shadow: 0 18px 42px rgba(255, 127, 0, 0.12);
}

.template-card.featured:hover {
    box-shadow: 0 28px 60px rgba(255, 127, 0, 0.2);
}

.template-shot {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0;
    background: var(--surface-2);
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 400ms ease;
    position: relative;
    z-index: 1;
}

.template-card:hover .template-shot {
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.03);
}

.template-shot-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.template-shot-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(16, 22, 47, 0.04));
    pointer-events: none;
    z-index: 2;
}

.template-card:hover .template-shot-wrapper::after {
    background: linear-gradient(180deg, transparent 40%, rgba(255, 127, 0, 0.08));
}

.template-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 22, 47, 0.5);
    opacity: 0;
    transition: opacity 350ms ease;
    z-index: 5;
    backdrop-filter: blur(2px);
}

.template-card:hover .template-overlay,
.template-card:focus-within .template-overlay {
    opacity: 1;
}

.template-card-footer {
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.98));
}

.template-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-action {
    min-height: 40px;
    padding: 0.55rem 1.1rem;
    font-size: 0.78rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(255, 127, 0, 0.25);
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;
    transition: opacity 350ms ease, transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 350ms ease;
}

.template-card:hover .template-action,
.template-card:focus-within .template-action {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.template-action.btn-primary:hover {
    transform: translateY(0) scale(1.06);
    box-shadow: 0 12px 28px rgba(255, 127, 0, 0.35);
}

.template-card:nth-child(1) .template-preview {
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.18), transparent),
        linear-gradient(180deg, #ffffff 0%, #fff3e0 100%);
}

.template-card:nth-child(2) .template-preview {
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.12), transparent),
        linear-gradient(180deg, #ffffff 0%, #fdf2e4 100%);
}

.template-card:nth-child(3) .template-preview {
    background:
        linear-gradient(135deg, rgba(24, 66, 77, 0.16), transparent),
        linear-gradient(180deg, #ffffff 0%, #f2f7f6 100%);
}

.template-card:nth-child(4) .template-preview {
    background:
        linear-gradient(135deg, rgba(45, 119, 137, 0.14), transparent),
        linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
}

.template-card:nth-child(5) .template-preview {
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.1), transparent),
        linear-gradient(180deg, #ffffff 0%, #fafbfe 100%);
}

.template-preview {
    height: 180px;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.12), transparent),
        linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
    position: relative;
}

.template-preview::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, transparent 0 28%, rgba(255, 127, 0, 0.08) 35%, transparent 42%) no-repeat,
        linear-gradient(180deg, transparent 0 24%, rgba(255, 127, 0, 0.08) 26%, transparent 31%) no-repeat;
    background-size: 220% 100%, 100% 220%;
    animation: previewSweep 7s ease-in-out infinite;
    opacity: 0.9;
    z-index: 1;
}

.template-preview::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 127, 0, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(16, 22, 47, 0.12);
    border-color: rgba(255, 127, 0, 0.28);
}

html[data-theme="dark"] .card {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: rgba(166, 181, 199, 0.14);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .template-card {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: rgba(166, 181, 199, 0.14);
}

html[data-theme="dark"] .template-card::after {
    background: var(--primary-gradient);
}

html[data-theme="dark"] .template-shot {
    border-color: rgba(166, 181, 199, 0.14);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .default-template-preview {
    background: rgba(19, 27, 36, 0.9);
    border-color: rgba(166, 181, 199, 0.16);
}

html[data-theme="dark"] .default-template-preview::before {
    border-color: rgba(166, 181, 199, 0.08);
}

html[data-theme="dark"] .default-template-preview img {
    border-color: rgba(166, 181, 199, 0.16);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.template-gallery .template-card:nth-child(2) {
    opacity: 0.96;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 700ms ease,
        transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.page-shell {
    padding: 1.5rem 0 3.25rem;
}

.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.98));
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: auto auto 0 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.4;
}

html[data-theme="dark"] .footer {
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
        linear-gradient(180deg, rgba(15, 20, 27, 0.95), rgba(13, 19, 25, 0.98));
    border-top-color: rgba(166, 181, 199, 0.08);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(255, 127, 0, 0.12), transparent 28%),
        linear-gradient(180deg, #121a23 0%, var(--bg) 100%);
}

html[data-theme="dark"] body::before {
    opacity: 0.06;
}


.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer strong {
    display: block;
    color: var(--text);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.footer strong::before {
    content: '✦ ';
    color: var(--primary);
}

.footer p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer nav {
    display: flex;
    gap: 1.5rem;
    color: var(--muted);
    font-weight: 600;
}

.footer nav a {
    position: relative;
    padding: 0.2rem 0;
    transition: color 180ms ease;
}

.footer nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 100%;
    height: 1.5px;
    border-radius: 999px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

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

.footer nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.page-hero {
    padding: 2rem 0 1.1rem;
}

.page-hero .hero-copy h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.sidebar {
    position: sticky;
    top: 5.2rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.sidebar nav {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.sidebar nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 600;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.editor-sidebar,
.editor-form section,
.editor-preview {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 253, 255, 0.96));
}

.editor-field,
.editor-textarea,
.editor-select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    outline: none;
}

.editor-field:focus,
.editor-textarea:focus,
.editor-select:focus {
    border-color: rgba(255, 127, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 127, 0, 0.1);
}

.editor-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) minmax(320px, 380px);
    gap: 0.85rem;
}

.editor-sidebar,
.editor-form,
.editor-preview {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.editor-sidebar {
    padding: 0.9rem;
}

.section-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.section-list button {
    text-align: left;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.section-list button.active {
    border-color: rgba(255, 127, 0, 0.35);
    background: var(--primary-soft);
    color: var(--primary);
}

.editor-form {
    padding: 1rem;
}

.editor-form section {
    padding: 0.95rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 0.85rem;
}

.editor-form h2 {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
}

.field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
}

.editor-preview {
    padding: 1rem;
}

.preview-canvas {
    min-height: 920px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

@media (max-width: 1100px) {
    .hero-grid,
    .editor-layout,
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 860px) {
    .hero-grid,
    .editor-layout,
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .main-header .container {
        flex-wrap: wrap;
    }

    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-hero {
        text-align: center;
    }

    .home-hero .hero-grid {
        text-align: center;
    }

    .home-hero .hero-copy {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero .hero-copy h1,
    .home-hero .hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero .hero-actions {
        justify-content: center;
    }

    .default-template-preview {
        justify-self: center;
        width: min(82vw, 300px);
        transform: none;
    }
}

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

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-18px, -10px, 0) scale(1.04); }
}

@keyframes cvFloat {
    0%, 100% { transform: translateY(0) rotate(1.5deg); }
    50% { transform: translateY(-12px) rotate(-0.6deg); }
}

@keyframes cvShine {
    0%, 42% { left: -55%; opacity: 0; }
    52% { opacity: 0.85; }
    68%, 100% { left: 118%; opacity: 0; }
}

@keyframes previewSweep {
    0%, 100% { background-position: -30% 0, 0 -30%; }
    50% { background-position: 120% 0, 0 120%; }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes pageShimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before,
    .hero::after,
    .hero::before,
    .default-template-preview::after {
        display: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}