/* ==========================================================
   Vivek Shukla — Portfolio
   ========================================================== */
@font-face { font-family: 'Gilroy'; src: url('../fonts/gilroy/Gilroy-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('../fonts/gilroy/Gilroy-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('../fonts/gilroy/Gilroy-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('../fonts/gilroy/Gilroy-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --bg: #0b0d12;
    --bg-alt: #0f121a;
    --surface: #141823;
    --surface-2: #1a1f2c;
    --border: rgba(255, 255, 255, .08);
    --text: #e8eaf0;
    --muted: #98a1b3;
    --accent: #61dafb;
    --accent-2: #a78bfa;
    --accent-ink: #06121a;
    --good: #34d399;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
    --radius: 18px;
    --font: 'Gilroy', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --display: 'Gilroy', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f7f8fb;
    --bg-alt: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f3f5f9;
    --border: rgba(15, 23, 42, .09);
    --text: #0f172a;
    --muted: #556076;
    --accent: #0891b2;
    --accent-2: #7c3aed;
    --accent-ink: #ffffff;
    --good: #059669;
    --shadow: 0 20px 50px -24px rgba(15, 23, 42, .25);
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f7f8fb;
        --bg-alt: #eef1f6;
        --surface: #ffffff;
        --surface-2: #f3f5f9;
        --border: rgba(15, 23, 42, .09);
        --text: #0f172a;
        --muted: #556076;
        --accent: #0891b2;
        --accent-2: #7c3aed;
        --accent-ink: #ffffff;
        --good: #059669;
        --shadow: 0 20px 50px -24px rgba(15, 23, 42, .25);
        color-scheme: light;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
strong { color: var(--text); font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.3rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; border: 1px solid transparent;
    cursor: pointer; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
    font-family: var(--font);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--accent); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-grid; place-items: center;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font-size: 1.1rem; cursor: pointer; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121a; font-size: .9rem;
}
.nav { display: flex; gap: 1.8rem; }
.nav a { color: var(--muted); font-weight: 500; font-size: .95rem; position: relative; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.menu-btn { display: none; }

.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: inline; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .icon-sun { display: none; }
    :root:not([data-theme="dark"]) .icon-moon { display: inline; }
}

@media (max-width: 860px) {
    .menu-btn { display: inline-grid; }
    .hide-sm { display: none; }
    .brand-name { display: none; }
    .nav {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--border);
        padding: .5rem 16px 1rem; transform: translateY(-120%); transition: transform .3s ease;
        z-index: -1;
    }
    .nav.open { transform: translateY(0); }
    .nav a { padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
    .nav a.active::after { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 64px; overflow: hidden; }
.hero-glow {
    position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
                radial-gradient(circle at 30% 70%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 55%);
    filter: blur(20px); pointer-events: none;
}
.hero-grid { position: relative; }
.hero-copy { max-width: 820px; }
.status {
    display: inline-flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--muted);
    border: 1px solid var(--border); background: var(--surface); padding: .35rem .85rem; border-radius: 999px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin: 1.2rem 0 1.2rem; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-social { display: flex; gap: .6rem; margin-top: 2rem; }
.hero-social a {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--border); color: var(--muted); font-size: 1.1rem; transition: color .2s, border-color .2s, transform .2s;
}
.hero-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.stats {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 72px;
    background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.stats li { background: var(--surface); padding: 1.4rem 1.5rem; }
.stats strong { display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.stats strong em { font-style: normal; color: var(--accent); }
.stats span { color: var(--muted); font-size: .9rem; }

@media (max-width: 960px) and (min-width: 641px) {
    .stats { grid-template-columns: repeat(3, 1fr); }
    .stats li:last-child { grid-column: span 2; }
}
@media (max-width: 640px) {
    .hero { padding-top: 40px; }
    .stats { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
    .stats li:last-child { grid-column: span 2; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 2.6rem; }
.eyebrow {
    font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
    color: var(--accent); margin-bottom: .7rem;
}
.eyebrow::before { content: '// '; opacity: .6; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { border-radius: 24px; aspect-ratio: 1/1; object-fit: cover; border: 1px solid var(--border); box-shadow: var(--shadow); }
.about-photo::before {
    content: ''; position: absolute; inset: 16px -16px -16px 16px; border-radius: 24px; z-index: -1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: .35;
}
.about-photo figcaption {
    position: absolute; left: 16px; bottom: 16px; display: inline-flex; gap: .4rem; align-items: center;
    background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(8px);
    padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; border: 1px solid var(--border);
}
.about-copy h2 { margin-bottom: 1.2rem; }
.about-copy p { color: var(--muted); }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1.6rem 0 .4rem; }
.highlights li {
    display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); font-size: .9rem; font-weight: 500;
}
.highlights i { color: var(--accent); font-size: 1.1rem; }
@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-photo { max-width: 360px; }
    .highlights { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 1.4rem; }
.timeline::before { content: ''; position: absolute; left: 29px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.job { display: grid; grid-template-columns: 60px 1fr; gap: 1.4rem; position: relative; }
.job-logo img { width: 60px; height: 60px; border-radius: 14px; background: #fff; border: 1px solid var(--border); object-fit: contain; position: relative; }
.job-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.6rem; transition: border-color .2s; }
.job-body:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.job-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.job h3 { font-size: 1.2rem; }
.company { color: var(--accent); font-weight: 500; font-size: .95rem; margin: .25rem 0 0; }
.date { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--border); }
.job-sum { color: var(--muted); margin: .9rem 0 0; font-style: italic; }
.bullets { margin-top: 1rem; display: grid; gap: .5rem; }
.bullets li { position: relative; padding-left: 1.3rem; color: var(--muted); font-size: .95rem; }
.bullets li::before { content: ''; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.metrics { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.metrics li { font-size: .85rem; color: var(--muted); padding: .35rem .75rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.metrics strong { color: var(--accent); font-family: var(--display); }
.metrics.small { margin-top: .4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tags li { font-family: var(--mono); font-size: .75rem; padding: .25rem .6rem; border-radius: 6px; color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
@media (max-width: 640px) {
    .timeline::before { display: none; }
    .job { grid-template-columns: 1fr; gap: .8rem; }
    .job-logo img { width: 48px; height: 48px; }
    .job-head { flex-direction: column; gap: .6rem; }
    .job-body { padding: 1.2rem; }
}

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; transition: transform .25s, border-color .25s; }
.skill-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.skill-card > i { font-size: 1.6rem; color: var(--accent); display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.skill-card h3 { font-size: 1.1rem; margin-top: 1rem; }
.skill-card .tags { margin-top: .8rem; }
.skill-card.featured { grid-column: span 2; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), color-mix(in srgb, var(--accent-2) 12%, var(--surface))); }
@media (max-width: 640px) { .skill-card.featured { grid-column: auto; } }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }
.filter {
    font-family: var(--font); font-size: .9rem; font-weight: 500; cursor: pointer;
    padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--muted); transition: all .2s;
}
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
@media (max-width: 400px) { .projects-grid { grid-template-columns: 1fr; } }
.project {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.project.is-hidden { display: none; }
.project-media { aspect-ratio: 800/420; overflow: hidden; background: var(--surface-2); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .project-media img { transform: scale(1.04); }
.placeholder { display: grid; place-items: center; font-size: 3.5rem; color: #fff; }
.ph-health { background: linear-gradient(135deg, #f472b6, #8b5cf6); }
.ph-iot { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.ph-eva { background: #ffffff; }
.ph-eva { display: block; }
.ph-eva img { width: 100%; height: 100%; object-fit: contain; }
.project:hover .ph-eva img { transform: scale(1.04); }
.ph-vercab { background: radial-gradient(circle at 50% 45%, #3b1d8f, #120a2e 70%); }
.ph-vercab { display: block; }
.ph-vercab img { width: 100%; height: 100%; object-fit: contain; padding: 4% 0; }
.project:hover .ph-vercab img { transform: scale(1.06); }
.project-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-kind { font-family: var(--mono); font-size: .75rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.project h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.project-body > p:not(.project-kind) { color: var(--muted); font-size: .93rem; }
.project-link { margin-top: auto; padding-top: 1rem; display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .9rem; color: var(--accent); }
.project-link:hover { text-decoration: underline; }
.project-links { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.project-links .project-link { margin-top: 0; padding-top: 0; }
.feature-list { display: grid; gap: .4rem; margin: 0 0 1rem; }
.feature-list li { position: relative; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.feature-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.edu {
    display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem 1.6rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.edu > i { font-size: 2rem; color: var(--accent); }
.edu h3 { font-size: 1.1rem; }
.edu p { margin: .2rem 0 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.contact-copy h2 { margin-bottom: 1rem; }
.contact-copy > p { color: var(--muted); }
.contact-list { display: grid; gap: .8rem; margin-top: 1.6rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; }
.contact-list i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--accent); font-size: 1.15rem; }
.contact-list a:hover { color: var(--accent); }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; display: grid; gap: 1rem; box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.field input, .field textarea {
    font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: .8rem 1rem; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.invalid input, .field.invalid textarea { border-color: #f87171; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.4em; }
.form-status.ok { color: var(--good); }
.form-status.err { color: #f87171; }
@media (max-width: 860px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }
}
@media (max-width: 520px) {
    .field-row { grid-template-columns: 1fr; }
    .contact-form { padding: 1.2rem; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.6rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .9rem; }
.to-top { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Uniform project cards + details dialog ---------- */
.project .project-body > p:not(.project-kind) ~ p:not(.project-kind),
.project .project-body > .feature-list,
.project .project-body > .metrics { display: none; }
.project .project-body > p:not(.project-kind) {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(1.65em * 3);
}
.project .project-body > .tags { max-height: calc(2 * 1.9rem + .4rem); overflow: hidden; }
.project .project-body > .tags li:nth-child(n+5) { display: none; }
.project-foot { margin-top: auto; padding-top: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; }
.project-foot .project-link, .project-foot .project-links { margin: 0; padding: 0; }
.project-foot .project-links { gap: 1.2rem; }
.details-btn {
    margin-left: auto; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
    padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; gap: .3rem;
}
.details-btn:hover { border-color: var(--accent); color: var(--accent); }

.project-dialog {
    width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.project-dialog::backdrop { background: rgba(5, 7, 12, .65); backdrop-filter: blur(4px); }
.dialog-inner { padding: 1.8rem; position: relative; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog-inner h3 { font-size: 1.5rem; margin: .2rem 2.5rem .8rem 0; }
.dialog-content > p:not(.project-kind) { color: var(--muted); }
.dialog-content > .project-links, .dialog-content > .project-link { margin-top: 1.2rem; padding-top: 0; display: inline-flex; margin-right: 1.2rem; }
body.dialog-open { overflow: hidden; }
@media (max-width: 520px) { .dialog-inner { padding: 1.3rem; } }

.project-foot { flex-wrap: nowrap; }
.foot-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.foot-links .project-link { margin: 0; padding: 0; gap: .35rem; }
.foot-links .project-link i { font-size: 1.05rem; }
.details-btn { flex-shrink: 0; }
.dialog-content > .project-links { display: flex; gap: 1.4rem; margin-top: 1.2rem; }
.dialog-content > .project-links .project-link { margin: 0; padding: 0; }

.projects-grid { grid-auto-rows: 1fr; }

/* Logo tiles: always fit the whole logo inside the media box */
.project-media { position: relative; }
.ph-eva img, .ph-vercab img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: contain; padding: 6% 0; box-sizing: border-box;
}
.ph-eva img { padding: 0; transform: scale(1.35); }
.project:hover .ph-eva img { transform: scale(1.4); }
