/* ===================================================================
 * Ishmeen Garewal — Portfolio (2026 redesign)
 * A modern, soft-professional design: lavender × Columbia blue,
 * editorial Fraunces display, subtle mandala motifs.
 * =================================================================== */

/* Fonts are preconnected & loaded in <head> for faster first paint. */

/* ---------- tokens ---------- */
:root {
    --lav: #9B7EDE;
    --lav-d: #7C5CC4;
    --lav-dd: #5E4499;
    --lav-l: #C9B8F0;
    --lav-bg: #F3ECFF;
    --blue: #6CACE4;
    --blue-d: #3E86C4;
    --pink: #E48DBE;

    --ink: #2A2440;
    --ink-soft: #56506E;
    --muted: #8A83A0;

    --bg: #FAF8FE;
    --card: #FFFFFF;
    --line: rgba(124, 92, 196, 0.16);

    --grad: linear-gradient(120deg, var(--lav) 0%, var(--lav-d) 45%, var(--blue) 100%);
    --grad-soft: linear-gradient(120deg, #B9A3EA, #8AC0EA);

    --sh-sm: 0 4px 16px rgba(124, 92, 196, 0.08);
    --sh: 0 14px 34px rgba(124, 92, 196, 0.12);
    --sh-lg: 0 26px 60px rgba(124, 92, 196, 0.20);

    --r: 20px;
    --r-sm: 14px;
    --r-pill: 999px;

    --maxw: 1180px;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "Fira Code", monospace;
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 96px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink-soft);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* soft aurora canvas */
body::before {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(38vw 38vw at 12% 14%, rgba(155, 126, 222, 0.20), transparent 60%),
        radial-gradient(34vw 34vw at 88% 8%, rgba(108, 172, 228, 0.18), transparent 60%),
        radial-gradient(44vw 44vw at 82% 86%, rgba(228, 141, 190, 0.15), transparent 62%),
        radial-gradient(40vw 40vw at 16% 90%, rgba(155, 126, 222, 0.13), transparent 62%);
    animation: drift 28s ease-in-out infinite alternate;
}

@keyframes drift {
    to {
        transform: translate3d(0, -2.5%, 0) scale(1.06);
    }
}

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

a {
    color: var(--lav-d);
    text-decoration: none;
    transition: color .25s ease;
}

a:hover {
    color: var(--blue-d);
}

::selection {
    background: rgba(155, 126, 222, 0.25);
    color: var(--ink);
}

/* ---------- layout ---------- */
.wrap {
    width: min(92%, var(--maxw));
    margin-inline: auto;
}

section {
    padding: clamp(64px, 9vw, 130px) 0;
    position: relative;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--lav-d);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.kicker::before {
    content: "";
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(30px, 4.4vw, 50px);
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -.01em;
    max-width: 18ch;
}

.section-title .accent {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-intro {
    margin-top: 16px;
    max-width: 58ch;
    color: var(--ink-soft);
    font-size: 17px;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: .01em;
    padding: 14px 26px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background-position .5s ease, color .25s, border-color .25s;
}

.btn-primary {
    color: #fff;
    background: var(--grad);
    background-size: 160% 100%;
    box-shadow: 0 12px 28px rgba(124, 92, 196, 0.30);
}

.btn-primary:hover {
    color: #fff;
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(108, 172, 228, 0.32);
}

.btn-ghost {
    color: var(--lav-d);
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--line);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    color: var(--lav-dd);
    transform: translateY(-2px);
    border-color: var(--lav-l);
    box-shadow: var(--sh-sm);
}

/* ---------- navbar ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(18px, 4vw, 46px);
    background: rgba(250, 248, 254, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s, background .3s;
}

.nav.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 8px 30px rgba(124, 92, 196, 0.08);
}

.brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--ink);
    letter-spacing: -.01em;
}

.brand span {
    color: var(--lav-d);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 9px 15px;
    border-radius: var(--r-pill);
    transition: color .2s, background .2s;
}

.nav-links a:hover {
    color: var(--lav-dd);
    background: rgba(155, 126, 222, 0.10);
}

.nav-links a.active {
    color: #fff;
    background: var(--grad);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-only {
    display: none;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: .3s;
}

.nav-toggle span {
    top: 50%;
    margin-top: -1px;
}

.nav-toggle span::before {
    top: -7px;
}

.nav-toggle span::after {
    top: 7px;
}

body.menu-open .nav-toggle span {
    background: transparent;
}

body.menu-open .nav-toggle span::before {
    top: 0;
    transform: translateX(-50%) rotate(45deg);
}

body.menu-open .nav-toggle span::after {
    top: 0;
    transform: translateX(-50%) rotate(-45deg);
}

/* scroll progress */
#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 120;
    background: linear-gradient(90deg, var(--lav), var(--blue) 55%, var(--pink));
    box-shadow: 0 0 12px rgba(155, 126, 222, 0.5);
    transition: width .08s linear;
}

/* ---------- hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 70px;
    position: relative;
    overflow: hidden;
}

.hero-mandala {
    position: absolute;
    top: -8vw;
    right: -10vw;
    width: 48vw;
    max-width: 720px;
    opacity: .12;
    pointer-events: none;
    animation: spin 170s linear infinite;
}

.hero-mandala.two {
    top: auto;
    right: auto;
    bottom: -14vw;
    left: -12vw;
    width: 30vw;
    opacity: .08;
    animation-duration: 220s;
    animation-direction: reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 950px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .12em;
    color: var(--lav-d);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    padding: 8px 16px;
    border-radius: var(--r-pill);
    box-shadow: var(--sh-sm);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #46c98b;
    box-shadow: 0 0 0 4px rgba(70, 201, 139, 0.18);
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(38px, 7vw, 86px);
    line-height: 1.04;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 26px 0 0;
}

.hero h1 .accent {
    background: linear-gradient(110deg, var(--lav-dd) 0%, var(--lav) 32%, var(--blue) 66%, var(--pink) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 9s ease-in-out infinite alternate;
}

@keyframes shimmer {
    to {
        background-position: 100% 50%;
    }
}

.hero-sub {
    margin-top: 26px;
    max-width: 60ch;
    font-size: clamp(17px, 2vw, 20px);
    color: var(--ink-soft);
}

.hero-actions {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.hero-social {
    display: flex;
    gap: 10px;
    margin-left: 6px;
}

.icon-link {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    color: var(--lav-d);
    transition: .25s;
}

.icon-link:hover {
    color: #fff;
    background: var(--grad);
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: var(--sh-sm);
}

.icon-link svg {
    width: 19px;
    height: 19px;
}

.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.hero-scroll i {
    width: 1px;
    height: 34px;
    background: linear-gradient(var(--lav), transparent);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: .3; transform: scaleY(.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
}

.about-photo {
    position: relative;
}

.about-photo::after {
    content: "";
    position: absolute;
    inset: -10% -10% auto auto;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(108, 172, 228, 0.35), transparent 70%);
    filter: blur(36px);
    z-index: -1;
}

.about-photo img {
    width: 100%;
    border-radius: 26px;
    box-shadow: var(--sh-lg);
    border: 6px solid #fff;
}

.about-photo .badge {
    position: absolute;
    bottom: 18px;
    left: -18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 18px;
    box-shadow: var(--sh);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-photo .badge b {
    font-family: var(--font-display);
    color: var(--lav-d);
}

.about-body p + p {
    margin-top: 16px;
}

.about-body strong {
    color: var(--ink);
    font-weight: 600;
}

.stats {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 18px 16px;
    box-shadow: var(--sh-sm);
}

.stat .num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat .lbl {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.3;
}

/* ---------- experience / education ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    margin-top: 48px;
}

.col-head {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--lav-d);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-head svg {
    width: 18px;
    height: 18px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--lav), var(--blue));
    opacity: .4;
    border-radius: 2px;
}

.tl-item {
    position: relative;
    padding-bottom: 34px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--lav);
    box-shadow: 0 0 0 4px rgba(155, 126, 222, 0.14);
}

.tl-item .when {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--blue-d);
    text-transform: uppercase;
}

.tl-item h4 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 4px 0 2px;
    line-height: 1.2;
}

.tl-item .role {
    font-size: 14px;
    font-weight: 500;
    color: var(--lav-d);
    margin-bottom: 8px;
}

.tl-item ul {
    list-style: none;
    display: grid;
    gap: 6px;
}

.tl-item li {
    position: relative;
    padding-left: 18px;
    font-size: 14.5px;
    color: var(--ink-soft);
}

.tl-item li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lav-l);
}

.tl-item p {
    font-size: 14.5px;
    color: var(--ink-soft);
}

/* ---------- skills ---------- */
.focus-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 40px 0 36px;
}

.focus-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: var(--r-pill);
    color: var(--lav-dd);
    background: linear-gradient(120deg, rgba(155, 126, 222, 0.12), rgba(108, 172, 228, 0.12));
    border: 1px solid var(--line);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 26px 24px;
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease;
}

.skill-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sh);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card .ic {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(120deg, rgba(155, 126, 222, 0.16), rgba(108, 172, 228, 0.16));
    color: var(--lav-d);
    margin-bottom: 16px;
}

.skill-card .ic svg {
    width: 23px;
    height: 23px;
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 14px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    background: rgba(155, 126, 222, 0.08);
    border: 1px solid var(--line);
    padding: 6px 13px;
    border-radius: var(--r-pill);
    transition: .25s;
}

.skill-card:hover .chip {
    background: rgba(108, 172, 228, 0.1);
}

/* ---------- card grids shared ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

/* ---------- project cards ---------- */
.project-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    display: flex;
    flex-direction: column;
    transition: transform .4s cubic-bezier(.2,.7,.3,1), box-shadow .4s;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sh-lg);
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--lav-bg), #eaf3fb);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.7,.3,1);
}

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

.project-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--lav-dd);
    background: rgba(255, 255, 255, 0.92);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    box-shadow: var(--sh-sm);
}

.project-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-body h3 {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.22;
    margin-bottom: 10px;
}

.project-body p {
    font-size: 14.5px;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--lav-d);
    background: rgba(155, 126, 222, 0.1);
    border: 1px solid var(--line);
    padding: 4px 11px;
    border-radius: var(--r-pill);
}

.project-link {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 14px;
    color: var(--lav-d);
    align-self: flex-start;
}

.project-link svg {
    width: 15px;
    height: 15px;
    transition: transform .25s;
}

.project-link:hover svg {
    transform: translate(3px, -3px);
}

/* ---------- publication cards ---------- */
.pub-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 26px 24px;
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .35s, box-shadow .35s;
}

.pub-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s ease;
}

.pub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh);
}

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

.pub-venue {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--blue-d);
    background: rgba(108, 172, 228, 0.12);
    border: 1px solid rgba(108, 172, 228, 0.25);
    padding: 5px 12px;
    border-radius: var(--r-pill);
    margin-bottom: 14px;
}

.pub-card h3 {
    font-family: var(--font-display);
    font-size: 18.5px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 6px;
}

.pub-card .type {
    font-size: 13px;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 12px;
}

.pub-card p.desc {
    font-size: 14px;
    color: var(--ink-soft);
    flex: 1;
}

.pub-card a.more {
    margin-top: 16px;
    align-self: flex-start;
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- repo / writing cards ---------- */
.repo-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px;
    box-shadow: var(--sh-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform .35s, box-shadow .35s;
}

.repo-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s ease;
}

.repo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh);
}

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

.repo-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-right: 28px;
}

.repo-ic {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(120deg, rgba(155, 126, 222, 0.16), rgba(108, 172, 228, 0.16));
    color: var(--lav-d);
    flex-shrink: 0;
}

.repo-ic svg {
    width: 21px;
    height: 21px;
}

.repo-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.repo-card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    word-break: break-word;
}

.repo-card p {
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 8px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    align-items: center;
}

.repo-lang {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
}

.lang-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--lav);
}

.repo-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--muted);
}

.repo-stat svg {
    width: 14px;
    height: 14px;
}

.repo-card .ext {
    position: absolute;
    top: 22px;
    right: 22px;
    color: var(--muted);
    transition: .25s;
}

.repo-card:hover .ext {
    color: var(--lav-d);
    transform: translate(2px, -2px);
}

.feed-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 30px;
}

.center-btn {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* ---------- writing panel ---------- */
.writing-panel {
    position: relative;
    overflow: hidden;
    margin-top: 44px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--sh);
    padding: clamp(30px, 5vw, 58px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
}

.writing-copy {
    position: relative;
    z-index: 1;
}

.writing-copy h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(23px, 3.2vw, 34px);
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 14px;
    max-width: 22ch;
}

.writing-copy p {
    color: var(--ink-soft);
    margin-bottom: 26px;
    max-width: 54ch;
}

.writing-mark {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(120deg, rgba(155, 126, 222, 0.16), rgba(108, 172, 228, 0.16));
    color: var(--lav-d);
    position: relative;
    z-index: 1;
}

.writing-mark svg {
    width: 58px;
    height: 58px;
}

@media (max-width: 680px) {
    .writing-mark {
        display: none;
    }
}

/* ---------- responsive hero badge ---------- */
.eb-short {
    display: none;
}

@media (max-width: 560px) {
    .hero-eyebrow {
        font-size: 12px;
        padding: 7px 14px;
    }

    .eb-full {
        display: none;
    }

    .eb-short {
        display: inline;
    }
}

/* ---------- contact ---------- */
.contact {
    text-align: center;
}

.contact-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(40px, 6vw, 72px);
    box-shadow: var(--sh);
    position: relative;
    overflow: hidden;
    max-width: 880px;
    margin: 50px auto 0;
}

.contact-card .hero-mandala {
    opacity: .07;
    animation-duration: 200s;
}

.contact h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 46px);
    color: var(--ink);
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.contact p {
    margin: 18px auto 30px;
    max-width: 52ch;
    color: var(--ink-soft);
    position: relative;
    z-index: 1;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ---------- footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
}

.footer .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.footer p {
    font-size: 14px;
    color: var(--muted);
}

.footer .brand {
    font-size: 18px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--lav-d);
    transition: .25s;
}

.footer-social a:hover {
    color: #fff;
    background: var(--grad);
    border-color: transparent;
    transform: translateY(-2px);
}

.footer-social svg {
    width: 17px;
    height: 17px;
}

/* ---------- pointer glow on cards ---------- */
.project-card::after,
.pub-card::before,
.repo-card::before,
.skill-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s ease;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(155, 126, 222, 0.14), transparent 62%);
}

@media (hover: hover) {

    .project-card:hover::after,
    .pub-card:hover::before,
    .repo-card:hover::before,
    .skill-card:hover::after {
        opacity: 1;
    }
}

/* ---------- reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body::before,
    .hero-mandala,
    .hero h1 .accent {
        animation: none;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        max-width: 360px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-cta .btn {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        inset: 72px 14px auto 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: var(--sh-lg);
        padding: 14px;
        transform-origin: top;
        transform: scaleY(.6);
        opacity: 0;
        visibility: hidden;
        transition: .3s cubic-bezier(.2,.7,.3,1);
    }

    body.menu-open .nav-menu {
        transform: scaleY(1);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-menu .nav-links a {
        padding: 13px 18px;
        font-size: 15px;
    }

    .menu-only {
        display: flex;
        justify-content: center;
        margin-top: 8px;
    }
}

@media (max-width: 560px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .about-photo .badge {
        left: 0;
    }

    .hero-social {
        margin-left: 0;
    }
}

/* ===================================================================
 * ✨ PORTFOLIO REVAMP ENHANCEMENTS
 * =================================================================== */

/* ---------- Theme Toggle & Dark Mode ---------- */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}
.theme-toggle:hover {
    color: var(--lav);
    border-color: var(--lav-l);
    transform: scale(1.05);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
}
/* Hide appropriate icon depending on theme */
.theme-toggle .sun-icon {
    display: none;
}
.theme-toggle .moon-icon {
    display: block;
}
.dark-theme .theme-toggle .sun-icon {
    display: block;
}
.dark-theme .theme-toggle .moon-icon {
    display: none;
}

/* Dark theme tokens */
.dark-theme {
    --bg: #0F0C1E;
    --card: #18142C;
    --ink: #FAF8FE;
    --ink-soft: #C9B8F0;
    --muted: #8A83A0;
    --line: rgba(155, 126, 222, 0.18);
}
.dark-theme body::before {
    background:
        radial-gradient(38vw 38vw at 12% 14%, rgba(155, 126, 222, 0.15), transparent 60%),
        radial-gradient(34vw 34vw at 88% 8%, rgba(108, 172, 228, 0.12), transparent 60%),
        radial-gradient(44vw 44vw at 82% 86%, rgba(228, 141, 190, 0.10), transparent 62%),
        radial-gradient(40vw 40vw at 16% 90%, rgba(155, 126, 222, 0.10), transparent 62%);
}
.dark-theme .nav-menu {
    background: rgba(24, 20, 44, 0.95);
}
.dark-theme .nav-menu .nav-links a {
    color: var(--ink-soft);
}
.dark-theme .nav-menu .nav-links a:hover,
.dark-theme .nav-menu .nav-links a.active {
    color: var(--lav-l);
}

/* ---------- Project Filters ---------- */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 2rem 0 3.5rem;
    flex-wrap: wrap;
}
.btn-filter {
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink-soft) !important;
    box-shadow: var(--sh-sm) !important;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.25s ease;
}
.btn-filter:hover {
    color: var(--lav) !important;
    border-color: var(--lav-l) !important;
    transform: translateY(-2px) !important;
}
.btn-filter.active {
    background: var(--grad) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(124, 92, 196, 0.22) !important;
}
.project-card.filter-hide {
    display: none !important;
}

