* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {

    --font-family: 'Maple Mono', monospace;
    --primary: #4D96FF;
    --secondary: #FFD93D;
    --tertiary: #6BCB77;
    --red: #FFB4AB;
    --neutral: #74777F;

    /* Default Light Mode */
    --bg-main: #F4F7FC;
    --bg-surface: #FFFFFF;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #94A3B8;

    /* Claymorphism Effects - Light */
    --clay-shadow-outer: 8px 8px 16px rgba(116, 119, 127, 0.18);
    --clay-shadow-inner: inset -6px -6px 12px rgba(0, 0, 0, 0.08),
        inset 6px 6px 12px rgba(255, 255, 255, 0.9);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-main: #0F172A;
    --bg-surface: #1E293B;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;

    /* Claymorphism Effects - Dark */
    --clay-shadow-outer: 10px 10px 20px rgba(0, 0, 0, 0.5);
    --clay-shadow-inner: inset -6px -6px 12px rgba(0, 0, 0, 0.35),
        inset 6px 6px 12px rgba(255, 255, 255, 0.08);
}

body {
    font-family: var(--font-family);
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    padding-top: 88px;
}

html,
body {
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE / legacy Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, modern Edge */
}

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

nav {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 100;
    width: min(92%, 760px);
    padding: 14px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-outer);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] nav {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
}

.navigations {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.navigations a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.navigations a:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    transform: translateY(-2px);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 2px;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    transform: translateY(-2px);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

.theme-icon-moon {
    display: none;
}

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

[data-theme="dark"] .theme-icon-moon {
    display: block;
}

section {
    min-height: calc(100vh - 96px);
    width: calc(100% - 40px);
    margin: 0 auto 32px;
    padding: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-surface);
    border-radius: 36px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    color: var(--text-primary);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
}

#home {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 48%, #eaf2ff 100%);
}

[data-theme="dark"] #home {
    background: linear-gradient(135deg, #1e293b 0%, #162033 48%, #101a2f 100%);
}

#home::before,
#home::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    opacity: 0.85;
    filter: blur(1px);
}

#home::before {
    top: 8%;
    left: 8%;
    background: var(--secondary);
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
}

#home::after {
    right: 7%;
    bottom: 10%;
    background: var(--primary);
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
}

.main {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: center;
}

.profile-card {
    position: relative;
    width: 260px;
    height: 260px;
    display: grid;
    place-items: center;
    background: var(--bg-surface);
    border-radius: 42px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
}

.avatar {
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--primary), #7fb4ff);
    border-radius: 38px;
    box-shadow: var(--clay-shadow-outer), inset -10px -10px 18px rgba(0, 0, 0, 0.12), inset 10px 10px 18px rgba(255, 255, 255, 0.28);
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.israel-flag {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    background: var(--bg-surface);
    border-radius: 22px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    font-size: 1.9rem;
}

.intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.eyebrow {
    margin-bottom: 18px;
    padding: 10px 18px;
    color: var(--primary);
    background: rgba(77, 150, 255, 0.12);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro h1 {
    color: var(--text-primary);
    font-size: clamp(3.2rem, 8vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.waving-hand-emoji {
    display: inline-block;
    transform-origin: 75% 75%;
    animation: wave 1.8s ease-in-out infinite;
}

.short-about {
    max-width: 600px;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
    font-weight: 600;
}

.tech-stack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.stack-card {
    padding: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 32px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    backdrop-filter: blur(14px);
}

[data-theme="dark"] .stack-card {
    background: rgba(30, 41, 59, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
}

.stack-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stack-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--secondary), #fade6b);
    border-radius: 16px;
    box-shadow: var(--clay-shadow-outer), inset -5px -5px 10px rgba(0, 0, 0, 0.1), inset 5px 5px 10px rgba(255, 255, 255, 0.28);
    font-size: 1.2rem;
}

.stack-card:nth-child(2) .stack-icon {
    background: linear-gradient(145deg, var(--tertiary), #91e59a);
}

.stack-heading h2 {
    color: var(--text-primary);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1;
}

.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.stack-list li {
    --chip-color: var(--primary);
    --chip-glow: rgba(77, 150, 255, 0.18);
    color: var(--text-secondary);
    background: linear-gradient(145deg, var(--bg-surface), var(--chip-glow));
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner), inset 0 0 0 2px var(--chip-glow);
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 800;
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stack-list li:nth-child(5n + 1) {
    --chip-color: var(--primary);
    --chip-glow: rgba(77, 150, 255, 0.2);
}

.stack-list li:nth-child(5n + 2) {
    --chip-color: var(--secondary);
    --chip-glow: rgba(255, 217, 61, 0.24);
}

.stack-list li:nth-child(5n + 3) {
    --chip-color: var(--tertiary);
    --chip-glow: rgba(107, 203, 119, 0.22);
}

.stack-list li:nth-child(5n + 4) {
    --chip-color: var(--red);
    --chip-glow: rgba(255, 180, 171, 0.26);
}

.stack-list li:nth-child(5n + 5) {
    --chip-color: #bba7ff;
    --chip-glow: rgba(187, 167, 255, 0.24);
}

.stack-list li:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner), inset 0 0 0 2px var(--chip-color);
}

.socials {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    list-style: none;
}

.socials a {
    display: inline-flex;
    color: var(--text-primary);
    background: var(--bg-surface);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    padding: 14px 22px;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.socials a:hover {
    transform: translateY(-3px);
    box-shadow: 12px 12px 22px rgba(116, 119, 127, 0.22), var(--clay-shadow-inner);
}

#about {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbf6 48%, #effbea 100%);
}

#about::before {
    content: "";
    position: absolute;
    top: 12%;
    right: 8%;
    width: 180px;
    height: 180px;
    background: var(--tertiary);
    border-radius: 48px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.75;
    transform: rotate(14deg);
}

#about::after {
    content: "";
    position: absolute;
    left: 7%;
    bottom: 10%;
    width: 140px;
    height: 140px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.75;
}

[data-theme="dark"] #about {
    background: linear-gradient(135deg, #1e293b 0%, #172337 48%, #13241f 100%);
}

.about-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1050px);
    display: grid;
    gap: 42px;
}

.section-title {
    max-width: 680px;
}

.section-title h2 {
    color: var(--text-primary);
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.section-title>p:last-child {
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
    font-weight: 600;
}

.journey-map {
    position: relative;
    display: grid;
    gap: 24px;
}

.journey-map::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 34px;
    width: 12px;
    background: linear-gradient(var(--primary), var(--secondary), var(--tertiary), var(--red));
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner);
}

.journey-point {
    position: relative;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    align-items: center;
}

.journey-dot {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--primary), #7fb4ff);
    border-radius: 28px;
    box-shadow: var(--clay-shadow-outer), inset -7px -7px 14px rgba(0, 0, 0, 0.12), inset 7px 7px 14px rgba(255, 255, 255, 0.28);
    font-size: 1rem;
    font-weight: 900;
}

.journey-point:nth-child(2) .journey-dot {
    background: linear-gradient(145deg, var(--secondary), #ffe779);
}

.journey-point:nth-child(3) .journey-dot {
    background: linear-gradient(145deg, var(--tertiary), #91e59a);
}

.journey-point:nth-child(4) .journey-dot {
    background: linear-gradient(145deg, var(--red), #ffd1cb);
}

.journey-card {
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 30px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .journey-card {
    background: rgba(30, 41, 59, 0.76);
    border-color: rgba(255, 255, 255, 0.08);
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: 14px 14px 26px rgba(116, 119, 127, 0.22), var(--clay-shadow-inner);
}

.journey-stage {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.journey-card h3 {
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    line-height: 1.15;
}

.journey-card p:last-child {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.7;
    font-weight: 600;
}

.journey-card a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: inset 0 -0.35em rgba(77, 150, 255, 0.16);
    transition: color 0.2s ease, box-shadow 0.2s ease;
}

.journey-card a:hover {
    color: var(--text-primary);
    box-shadow: inset 0 -1.35em rgba(77, 150, 255, 0.22);
}

#projects {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fbf7ff 48%, #f3ebff 100%);
}

[data-theme="dark"] #projects {
    background: linear-gradient(135deg, #1e293b 0%, #201b33 48%, #17132a 100%);
}

#projects::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 6%;
    width: 160px;
    height: 160px;
    background: #bba7ff;
    border-radius: 46px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.75;
    transform: rotate(-10deg);
}

#projects::after {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 8%;
    width: 190px;
    height: 190px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.7;
}

.projects-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    display: grid;
    gap: 42px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 32px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    backdrop-filter: blur(14px);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .project-card {
    background: rgba(30, 41, 59, 0.76);
    border-color: rgba(255, 255, 255, 0.08);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 14px 14px 26px rgba(116, 119, 127, 0.22), var(--clay-shadow-inner);
}

.project-thumb {
    position: relative;
    display: grid;
    place-items: center;
    height: 160px;
    margin: 20px 20px 0;
    background: linear-gradient(145deg, #bba7ff, #d8ccff);
    border-radius: 24px;
    box-shadow: inset -8px -8px 16px rgba(0, 0, 0, 0.1), inset 8px 8px 16px rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-thumb-icon {
    color: var(--bg-surface);
    font-size: 2.4rem;
    opacity: 0.9;
}

.project-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 26px 26px;
}

.project-tag {
    margin-bottom: 10px;
    padding: 6px 14px;
    color: var(--neutral);
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-card h3 {
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    line-height: 1.15;
}

.project-desc {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
    font-weight: 600;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    list-style: none;
}

.project-stack li {
    color: var(--text-secondary);
    background: rgba(187, 167, 255, 0.16);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 800;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.project-links a {
    color: var(--text-primary);
    background: var(--bg-surface);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 10px 10px 18px rgba(116, 119, 127, 0.22), var(--clay-shadow-inner);
}

.project-date {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner);
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 800;
}

.view-more-btn {
    justify-self: center;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--primary), #7fb4ff);
    border: none;
    border-radius: 999px;
    box-shadow: var(--clay-shadow-outer), inset -6px -6px 12px rgba(0, 0, 0, 0.12), inset 6px 6px 12px rgba(255, 255, 255, 0.28);
    padding: 16px 34px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 12px 12px 22px rgba(116, 119, 127, 0.28), inset -6px -6px 12px rgba(0, 0, 0, 0.12), inset 6px 6px 12px rgba(255, 255, 255, 0.28);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s, backdrop-filter 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s, backdrop-filter 0.3s ease;
}

.modal-card {
    position: relative;
    width: min(96%, 1280px);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 48px;
    background: var(--bg-surface);
    border-radius: 40px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    overflow: hidden;
    transform: scale(0.92) translateY(28px);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.28s ease;
}

.modal-overlay.is-open .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {

    .modal-overlay,
    .modal-card {
        transition-duration: 0.01ms;
    }
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: none;
    border-radius: 16px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 10px 10px 18px rgba(116, 119, 127, 0.22), var(--clay-shadow-inner);
}

.modal-header {
    padding-right: 60px;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.modal-header p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
}

.modal-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 8px;
    overflow-y: auto;
}

.modal-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 16px 18px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 22px;
    box-shadow: var(--clay-shadow-inner);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

[data-theme="dark"] .modal-list-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
}

.modal-list-item.is-active {
    background: linear-gradient(145deg, var(--bg-surface), rgba(77, 150, 255, 0.14));
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner), inset 0 0 0 2px var(--primary);
}

.modal-list-item .modal-list-tag {
    color: var(--neutral);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-list-item .modal-list-title {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 800;
}

.modal-list::-webkit-scrollbar,
.modal-detail::-webkit-scrollbar {
    width: 8px;
}

.modal-list::-webkit-scrollbar-thumb,
.modal-detail::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 999px;
}

.modal-detail {
    padding: 4px 8px 4px 4px;
    overflow-y: auto;
}

.modal-detail .project-thumb {
    height: 220px;
    margin: 0 0 22px;
}

.modal-detail h3 {
    color: var(--text-primary);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.modal-detail .modal-detail-desc {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.8;
    font-weight: 600;
}

.modal-detail .project-stack {
    margin-top: 20px;
}

.modal-detail .project-links {
    margin-top: 24px;
}

#contact {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fff6f4 48%, #ffe9e6 100%);
}

[data-theme="dark"] #contact {
    background: linear-gradient(135deg, #1e293b 0%, #241a1c 48%, #2a1414 100%);
}

#contact::before {
    content: "";
    position: absolute;
    top: 10%;
    right: 8%;
    width: 170px;
    height: 170px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.75;
}

#contact::after {
    content: "";
    position: absolute;
    left: 7%;
    bottom: 9%;
    width: 150px;
    height: 150px;
    background: var(--secondary);
    border-radius: 44px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    opacity: 0.75;
    transform: rotate(-12deg);
}

.contact-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1050px);
    display: grid;
    gap: 42px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    backdrop-filter: blur(14px);
}

[data-theme="dark"] .contact-info-card {
    background: rgba(30, 41, 59, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
}

.contact-info-icon {
    flex: none;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--red), #ffcfc8);
    border-radius: 16px;
    box-shadow: var(--clay-shadow-outer), inset -5px -5px 10px rgba(0, 0, 0, 0.1), inset 5px 5px 10px rgba(255, 255, 255, 0.28);
    font-size: 1.2rem;
}

.contact-info-card:nth-child(2) .contact-info-icon {
    background: linear-gradient(145deg, var(--primary), #7fb4ff);
}

.contact-info-card:nth-child(3) .contact-info-icon {
    background: linear-gradient(145deg, var(--tertiary), #91e59a);
}

.contact-info-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-info-value {
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 32px;
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    backdrop-filter: blur(14px);
}

[data-theme="dark"] .contact-actions {
    background: rgba(30, 41, 59, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--bg-surface);
    background: linear-gradient(145deg, var(--red), #ff9d90);
    border: none;
    border-radius: 999px;
    box-shadow: var(--clay-shadow-outer), inset -6px -6px 12px rgba(0, 0, 0, 0.12), inset 6px 6px 12px rgba(255, 255, 255, 0.28);
    padding: 16px 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-cta:hover {
    transform: translateY(-3px);
    box-shadow: 12px 12px 22px rgba(116, 119, 127, 0.28), inset -6px -6px 12px rgba(0, 0, 0, 0.12), inset 6px 6px 12px rgba(255, 255, 255, 0.28);
}

.contact-copy-btn {
    width: 100%;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: none;
    border-radius: 999px;
    box-shadow: var(--clay-shadow-inner);
    padding: 14px 24px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-copy-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.contact-copy-btn.is-copied {
    color: var(--tertiary);
    box-shadow: var(--clay-shadow-inner), inset 0 0 0 2px var(--tertiary);
}

.contact-socials {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(16deg);
    }

    40% {
        transform: rotate(-8deg);
    }

    60% {
        transform: rotate(12deg);
    }
}

/* Scroll reveal: elements fade + rise into place as they enter the viewport */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children (project cards, journey points, stack cards, etc.) */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-stagger.is-visible>*:nth-child(1) {
    transition-delay: 0.05s;
}

.reveal-stagger.is-visible>*:nth-child(2) {
    transition-delay: 0.13s;
}

.reveal-stagger.is-visible>*:nth-child(3) {
    transition-delay: 0.21s;
}

.reveal-stagger.is-visible>*:nth-child(4) {
    transition-delay: 0.29s;
}

.reveal-stagger.is-visible>*:nth-child(5) {
    transition-delay: 0.37s;
}

.reveal-stagger.is-visible>*:nth-child(6) {
    transition-delay: 0.45s;
}

.reveal-stagger.is-visible>*:nth-child(7) {
    transition-delay: 0.53s;
}

.reveal-stagger.is-visible>*:nth-child(8) {
    transition-delay: 0.61s;
}

/* Home hero: fade + rise in on load. .profile-card gets an inner wrapper
   (.profile-card-inner) for the load-in transform so it doesn't fight with
   the cursor-tilt transform applied to .profile-card itself in JS. */
nav {
    opacity: 0;
    transform: translate(-50%, -18px);
    animation: navIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes navIn {
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.profile-card {
    opacity: 0;
    animation: heroInCard 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes heroInCard {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cursor tilt (applied via JS as inline transform) needs its own transition,
   separate from the load-in keyframes above which only run once. */
.profile-card.tilt-ready {
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.intro>* {
    opacity: 0;
    animation: heroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro>*:nth-child(1) {
    animation-delay: 0.2s;
}

.intro>*:nth-child(2) {
    animation-delay: 0.3s;
}

.intro>*:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme toggle: playful spin when switching */
.theme-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn:active .theme-icon {
    transform: rotate(90deg) scale(0.85);
}

/* Avatar: subtle wobble on hover, matches the playful clay aesthetic */
.avatar {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-card:hover .avatar {
    transform: rotate(-4deg) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-stagger>*,
    .profile-card,
    .intro>*,
    nav,
    .theme-icon,
    .avatar {
        animation: none !important;
        transition-duration: 0.01ms !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

section:last-of-type {
    margin-bottom: 48px;
}

@media (max-width: 640px) {
    body {
        padding-top: 112px;
    }

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

    nav {
        top: 12px;
        border-radius: 28px;
    }

    .navigations a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    section {
        min-height: calc(100vh - 120px);
        padding: 32px 20px;
        border-radius: 28px;
    }

    #home::before,
    #home::after {
        width: 140px;
        height: 140px;
    }

    .main {
        grid-template-columns: 1fr;
        gap: 28px;
        justify-items: center;
        text-align: center;
    }

    .profile-card {
        width: 210px;
        height: 210px;
        border-radius: 34px;
    }

    .avatar {
        width: 136px;
        height: 136px;
        border-radius: 30px;
        font-size: 3rem;
    }

    .israel-flag {
        right: 18px;
        bottom: 18px;
        width: 52px;
        height: 52px;
        font-size: 1.55rem;
    }

    .intro {
        align-items: center;
    }

    .intro h1 {
        font-size: clamp(3rem, 17vw, 4.6rem);
    }

    .tech-stack {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .stack-card {
        padding: 18px;
        border-radius: 26px;
    }

    .stack-heading {
        justify-content: center;
    }

    .stack-list {
        justify-content: center;
    }

    .socials {
        grid-column: 1;
        justify-content: center;
    }

    #about::before,
    #about::after {
        width: 110px;
        height: 110px;
    }

    .about-content {
        gap: 30px;
        text-align: center;
    }

    .section-title {
        margin: 0 auto;
    }

    .section-title .eyebrow {
        margin-left: auto;
        margin-right: auto;
    }

    .journey-map {
        gap: 18px;
    }

    .journey-map::before {
        display: none;
    }

    .journey-point {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }

    .journey-dot {
        width: 62px;
        height: 62px;
        border-radius: 22px;
        font-size: 0.85rem;
    }

    .journey-card {
        padding: 22px;
        border-radius: 26px;
    }

    #projects::before,
    #projects::after {
        width: 120px;
        height: 120px;
    }

    .projects-content {
        gap: 30px;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-body {
        align-items: center;
    }

    .project-links {
        justify-content: center;
    }

    .modal-card {
        width: 100%;
        max-height: 94vh;
        padding: 32px 22px;
        border-radius: 30px;
        gap: 20px;
    }

    .modal-header {
        padding-right: 44px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 180px) 1fr;
        gap: 16px;
    }

    .modal-list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 8px;
    }

    .modal-list-item {
        min-width: 200px;
    }

    .modal-detail .project-thumb {
        height: 160px;
    }

    #contact::before,
    #contact::after {
        width: 120px;
        height: 120px;
    }

    .contact-content {
        gap: 30px;
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .contact-info-card {
        justify-content: center;
        text-align: left;
    }

    .contact-actions {
        align-items: center;
        padding: 26px 22px;
    }
}