/* =========================================================
   Elango Palaniyappan — Portfolio V5
   "Bento Minimal" Stylesheet
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --accent: #ff5a1f;
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --r: 24px;
    --r-sm: 14px;
    --gap: 14px;
    --maxw: 1200px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Gentle physical spring (~2% overshoot); browsers without linear() fall back to ease */
    --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1);
}

[data-theme="light"] {
    --bg: #f3f2ee;
    --tile: #ffffff;
    --chip: #f0eee8;
    --line: #e6e3db;
    --line-strong: #d3cfc4;
    --text: #141414;
    --text-dim: #6b6a66;
    --ink: #141414;
    --paper: #ffffff;
    --dot: rgba(20, 20, 20, 0.07);
    --shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
    --shadow-hover: 0 18px 40px -22px rgba(20, 20, 20, 0.28);

    --tint-1: #ece8ff; --tint-2: #dcf5e9; --tint-3: #e0edff;
    --tint-4: #fff1c4; --tint-5: #ffe3d4; --tint-6: #ffe0ec;
}

[data-theme="dark"] {
    --bg: #0b0b0c;
    --tile: #151517;
    --chip: #202023;
    --line: #242427;
    --line-strong: #37373c;
    --text: #f2f1ed;
    --text-dim: #9c9ba0;
    --ink: #f2f1ed;
    --paper: #0b0b0c;
    --dot: rgba(255, 255, 255, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 44px -22px rgba(0, 0, 0, 0.9);

    --tint-1: rgba(139, 92, 246, 0.18); --tint-2: rgba(16, 185, 129, 0.16); --tint-3: rgba(59, 130, 246, 0.18);
    --tint-4: rgba(234, 179, 8, 0.16); --tint-5: rgba(249, 115, 22, 0.16); --tint-6: rgba(236, 72, 153, 0.16);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
    background-size: 22px 22px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
strong { font-weight: 600; color: var(--text); }
.container { width: min(var(--maxw), 92%); margin-inline: auto; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip-link {
    position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 0.6rem 1rem; border-radius: 10px;
    background: var(--ink); color: var(--paper); transform: translateY(-160%); transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 200; }

/* =========================================================
   NAVBAR — segmented control with sliding pill
   ========================================================= */
.navbar { position: sticky; top: 0; z-index: 100; padding: 0.9rem 0; isolation: isolate; }
/* Blur lives on a pseudo-element so the navbar never becomes a containing
   block for the position:fixed mobile menu. */
.navbar::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.navbar.is-scrolled::before { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.nav__logo { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.nav__logo-mark {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
    background: var(--ink); color: var(--paper);
    font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.04em;
    transition: transform 0.5s var(--bounce), background 0.3s;
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-8deg) scale(1.06); background: var(--accent); color: #fff; }
.nav__logo-text { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.02em; }

.nav__menu {
    position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 99px;
    background: var(--chip); border: 1px solid var(--line);
}
.nav__indicator {
    position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 99px; pointer-events: none;
    background: var(--tile); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--line);
    transition: transform 0.55s var(--spring), width 0.55s var(--spring);
}
.nav__link {
    position: relative; z-index: 1; display: block; padding: 0.42rem 0.9rem; border-radius: 99px;
    font-size: 0.88rem; font-weight: 500; color: var(--text-dim); transition: color 0.25s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
    background: var(--tile); border: 1px solid var(--line);
    transition: transform 0.45s var(--bounce), border-color 0.25s;
}
.theme-toggle:hover { border-color: var(--line-strong); transform: rotate(-12deg); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

.nav__hamburger {
    display: none; width: 40px; height: 40px; border-radius: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    background: var(--tile); border: 1px solid var(--line);
}
.nav__hamburger span { width: 16px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.45s var(--bounce); }
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.nav__backdrop {
    position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.25);
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.nav__backdrop.is-open { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
    .nav__hamburger { display: flex; }
    .nav__indicator { display: none; }
    .nav__menu {
        position: fixed; top: 72px; left: 4%; right: 4%; z-index: 101;
        flex-direction: column; gap: 2px; padding: 0.5rem; border-radius: var(--r);
        background: var(--tile); box-shadow: var(--shadow-hover);
        opacity: 0; visibility: hidden; transform: translateY(-12px) scale(0.97); transform-origin: top center;
        transition: opacity 0.25s, visibility 0.25s, transform 0.5s var(--spring);
    }
    .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav__link { padding: 0.85rem 1rem; border-radius: 14px; font-size: 1rem; }
    .nav__link.is-active { background: var(--chip); }
}
body.nav-open { overflow: hidden; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border-radius: 14px;
    font-weight: 600; font-size: 0.95rem;
    transition: transform 0.45s var(--bounce), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.96); transition-duration: 0.12s; }
.btn svg { transition: transform 0.45s var(--bounce); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -12px var(--accent); }
.btn--ghost { border: 1px solid var(--line-strong); background: var(--tile); }
.btn--ghost:hover { border-color: var(--text); }

/* =========================================================
   BENTO + TILE
   ========================================================= */
.bento { display: grid; gap: var(--gap); }
.tile {
    position: relative; overflow: hidden; padding: 1.6rem;
    background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
/* Subtle cursor spotlight (--mx / --my set in JS) */
.tile::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--text) 5%, transparent), transparent 55%);
    opacity: 0; transition: opacity 0.35s;
}
.tile:hover::before { opacity: 1; }
.tile > * { position: relative; }

.tile__label {
    display: block; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-dim); margin-bottom: 0.6rem;
}
.tile__num {
    display: block; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em; line-height: 1;
    font-size: clamp(3rem, 6vw, 5.2rem); font-variant-numeric: tabular-nums;
}
.tile__caption { display: block; margin-top: auto; padding-top: 0.6rem; font-size: 0.85rem; color: var(--text-dim); line-height: 1.4; }
.tile__heading { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 0.35rem; }
.tile__text { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }
.tile__icon {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.15rem; margin-bottom: 1rem;
    transition: transform 0.5s var(--bounce);
}
.tile:hover .tile__icon { transform: rotate(-10deg) scale(1.1); }
.tint-1 { background: var(--tint-1); } .tint-2 { background: var(--tint-2); } .tint-3 { background: var(--tint-3); }
.tint-4 { background: var(--tint-4); } .tint-5 { background: var(--tint-5); } .tint-6 { background: var(--tint-6); }

/* Lift on hover for interactive-feeling tiles */
.tile--stat, .tile--speed, .tile--clock, .tile--fact, .skill, .project, .tile--edu, .tile--award, .tile--link, .tile--code {
    transition: transform 0.5s var(--bounce), box-shadow 0.35s, border-color 0.35s,
        opacity 0.6s ease var(--d, 0ms), translate 0.9s var(--spring) var(--d, 0ms), scale 0.9s var(--spring) var(--d, 0ms);
}
.tile--stat:hover, .tile--speed:hover, .tile--clock:hover, .tile--fact:hover, .skill:hover, .project:hover,
.tile--edu:hover, .tile--award:hover, .tile--link:hover, .tile--code:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--line-strong);
}

/* =========================================================
   HERO BENTO
   ========================================================= */
.hero { padding: 1.2rem 0 2rem; }
.bento--hero {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "intro intro photo exp"
        "intro intro photo recs"
        "api   clock stack stack";
}
.tile--intro { grid-area: intro; padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; }
.tile--photo { grid-area: photo; padding: 0; min-height: 340px; }
.tile--stat.tile--accent { grid-area: exp; }
.tile--stat:not(.tile--accent) { grid-area: recs; }
.tile--speed { grid-area: api; }
.tile--clock { grid-area: clock; }
.tile--stack { grid-area: stack; }
.tile--stat, .tile--speed, .tile--clock { display: flex; flex-direction: column; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem; align-self: flex-start; margin-bottom: 1.4rem;
    padding: 0.38rem 0.85rem 0.38rem 0.7rem; border-radius: 99px; background: var(--chip);
    font-size: 0.8rem; font-weight: 500; color: var(--text-dim);
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }

.hero__title {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.92;
    font-size: clamp(2.7rem, 6.4vw, 5.4rem); margin-bottom: 1.1rem;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .word {
    display: inline-block; translate: 0 105%;
    transition: translate 1s var(--spring);
}
.hero__title .line:nth-child(2) .word { transition-delay: 0.09s; }
body.is-ready .hero__title .word { translate: 0 0; }
.accent-dot { color: var(--accent); }

.hero__role {
    font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
    font-size: clamp(1.25rem, 2.3vw, 1.75rem); margin-bottom: 1rem; line-height: 1.3;
}
.rotator {
    display: inline-block; vertical-align: top; height: 1.3em; line-height: 1.3; overflow: hidden; color: var(--accent); white-space: nowrap;
    transition: width 0.6s var(--spring);
}
.rotator__word { display: inline-block; transition: transform 0.6s var(--spring), opacity 0.3s ease; }
.rotator__word.is-out { transform: translateY(-110%); opacity: 0; }
.rotator__word.is-enter { transform: translateY(110%); opacity: 0; transition: none; }

.hero__desc { max-width: 520px; color: var(--text-dim); margin-bottom: 1.6rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.tile--photo__img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
    transition: transform 0.9s var(--ease-out);
}
.tile--photo:hover .tile--photo__img { transform: scale(1.04); }
.tile--photo__tag {
    position: absolute; left: 12px; bottom: 12px; padding: 0.4rem 0.75rem; border-radius: 99px;
    background: color-mix(in srgb, var(--tile) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: 0.8rem; font-weight: 500;
}

.tile--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile--accent .tile__label, .tile--accent .tile__caption { color: rgba(255, 255, 255, 0.82); }
.tile--accent::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 55%); }

/* API speed bars */
.speed { display: grid; gap: 0.7rem; margin: 0.2rem 0 0.2rem; }
.speed__row { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.8rem; }
.speed__name { color: var(--text-dim); }
.speed__bar { height: 10px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.speed__fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.4s var(--spring) 0.35s; }
.speed__fill--before { background: var(--line-strong); }
.speed__fill--after { background: var(--accent); transition-delay: 0.6s; }
.tile--speed.is-visible .speed__fill--before { width: 100%; }
.tile--speed.is-visible .speed__fill--after { width: 17%; }
.speed__val { font-family: var(--font-mono); font-weight: 500; min-width: 2.6rem; text-align: right; }
.speed__val--accent { color: var(--accent); }

/* Live clock */
.clock { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.2rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock__colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* Stack marquee */
.tile--stack { display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; gap: 0.5rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 36s; }
.tile--stack:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
    padding: 0.45rem 0.9rem; border-radius: 99px; background: var(--chip); font-size: 0.85rem; font-weight: 500; white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 4.5rem 0; }
.section__head {
    display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.4rem 2rem; margin-bottom: 1.8rem;
}
.section__num { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.06em; }
.section__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-size: clamp(2.3rem, 5.4vw, 4rem); }
.section__sub { max-width: 360px; color: var(--text-dim); font-size: 0.95rem; text-align: right; }
@media (max-width: 760px) {
    .section__head { grid-template-columns: 1fr; }
    .section__sub { text-align: left; }
}

/* ---------- About ---------- */
.bento--about {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "bio bio code"
        "f1  f2  code";
}
.tile--bio { grid-area: bio; padding: clamp(1.6rem, 3vw, 2.4rem); }
.tile--bio p { font-size: 1.05rem; color: var(--text-dim); margin-bottom: 0.9rem; }
.tile--bio p:last-child { margin-bottom: 0; }
.tile--code { grid-area: code; padding: 0; background: #111113; border-color: #222226; color: #e7e6e3; }
.bento--about .tile--fact:nth-child(3) { grid-area: f1; }
.bento--about .tile--fact:nth-child(4) { grid-area: f2; }
.tile--fact .tile__text { color: var(--text); font-weight: 500; font-size: 0.98rem; }

.code-card__bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid #222226; }
.code-card__dot { width: 11px; height: 11px; border-radius: 50%; }
.code-card__dot:nth-child(1) { background: #ff5f57; } .code-card__dot:nth-child(2) { background: #febc2e; } .code-card__dot:nth-child(3) { background: #28c840; }
.code-card__file { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: #8b8a90; }
.code-card__body { padding: 1.3rem 1.2rem; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75; overflow-x: auto; }
.tok-key { color: #ff7b72; } .tok-cls { color: #79c0ff; } .tok-str { color: #a5d6a7; } .tok-num { color: #ffab70; }

/* ---------- Skills ---------- */
.bento--skills {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "backend     backend     azure"
        "frontend    tools       tools"
        "specialties specialties db";
}
.skill--backend { grid-area: backend; } .skill--azure { grid-area: azure; } .skill--frontend { grid-area: frontend; }
.skill--tools { grid-area: tools; } .skill--specialties { grid-area: specialties; } .skill--db { grid-area: db; }
.skill__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.skill__head .tile__icon { margin-bottom: 0; }
.skill__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
    padding: 0.42rem 0.85rem; border-radius: 99px; background: var(--chip); font-size: 0.84rem; font-weight: 500;
    transition: transform 0.45s var(--bounce), background 0.2s, color 0.2s;
}
.chip:hover { transform: translateY(-2px) scale(1.05); background: var(--ink); color: var(--paper); }

/* ---------- Experience accordion ---------- */
.exp { display: grid; gap: var(--gap); }
.exp__item { padding: 0; transition: border-color 0.3s, box-shadow 0.3s, opacity 0.6s ease var(--d, 0ms), translate 0.9s var(--spring) var(--d, 0ms), scale 0.9s var(--spring) var(--d, 0ms); }
.exp__item:hover { border-color: var(--line-strong); }
.exp__item.is-open { box-shadow: var(--shadow-hover); }
.exp__head {
    display: grid; grid-template-columns: 11rem 1fr auto; align-items: center; gap: 1.2rem;
    width: 100%; padding: 1.4rem 1.6rem; text-align: left;
}
.exp__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); }
.exp__main { display: flex; flex-direction: column; gap: 0.15rem; }
.exp__role { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.45rem); letter-spacing: -0.02em; }
.exp__org { color: var(--text-dim); font-size: 0.92rem; }
.exp__icon {
    position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--chip);
    transition: transform 0.55s var(--bounce), background 0.25s;
}
.exp__icon::before, .exp__icon::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px;
    background: var(--text); transition: transform 0.55s var(--bounce), background 0.25s;
}
.exp__icon::after { transform: rotate(90deg); }
.exp__item.is-open .exp__icon { background: var(--ink); transform: rotate(180deg); }
.exp__item.is-open .exp__icon::before, .exp__item.is-open .exp__icon::after { background: var(--paper); }
.exp__item.is-open .exp__icon::after { transform: rotate(0deg); }
.exp__head:hover .exp__icon { transform: scale(1.08); }
.exp__item.is-open .exp__head:hover .exp__icon { transform: rotate(180deg) scale(1.08); }

.exp__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--spring); }
.exp__item.is-open .exp__body { grid-template-rows: 1fr; }
.exp__inner { overflow: hidden; }
.exp__inner > * { margin-left: calc(11rem + 2.8rem); margin-right: 1.6rem; }
.exp__points { padding-top: 0.2rem; }
.exp__points li { position: relative; padding-left: 1.2rem; margin-bottom: 0.55rem; color: var(--text-dim); font-size: 0.95rem; }
.exp__points li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.exp__inner .tags { padding: 0.4rem 0 1.6rem; }
@media (max-width: 760px) {
    .exp__head { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; padding: 1.2rem; }
    .exp__date { grid-column: 1 / -1; }
    .exp__main { grid-row: 2; }
    .exp__icon { grid-row: 2; }
    .exp__inner > * { margin-left: 1.2rem; margin-right: 1.2rem; }
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags span {
    font-family: var(--font-mono); font-size: 0.72rem; padding: 0.28rem 0.6rem; border-radius: 8px;
    border: 1px solid var(--line); color: var(--text-dim); background: var(--tile);
}

/* ---------- Projects ---------- */
.bento--projects {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "p1 p1 p2"
        "p1 p1 p3"
        "p4 p4 p4";
}
.bento--projects .project:nth-child(1) { grid-area: p1; }
.bento--projects .project:nth-child(2) { grid-area: p2; }
.bento--projects .project:nth-child(3) { grid-area: p3; }
.bento--projects .project:nth-child(4) { grid-area: p4; }
.project { display: flex; flex-direction: column; padding: 1.7rem; }
.project__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.project__kicker { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.project__index {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--chip);
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
    transition: transform 0.55s var(--bounce), background 0.25s, color 0.25s;
}
.project:hover .project__index { background: var(--accent); color: #fff; transform: rotate(-12deg) scale(1.1); }
.project__title { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 0.6rem; }
.project__desc { color: var(--text-dim); font-size: 0.94rem; margin-bottom: 1.2rem; }
.project .tags { margin-top: auto; }

.project--feature { padding: clamp(1.7rem, 3vw, 2.4rem); background: radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 55%), var(--tile); }
.project--feature .project__title { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.04em; }
.project--feature .project__desc { font-size: 1.02rem; max-width: 520px; }
.project--feature .pipeline { margin: auto 0; padding: 1.4rem 0 2rem; }
.project--feature .pipeline__node { padding: 0.7rem 1rem; font-size: 0.82rem; }
.project--feature .tags { margin-top: 0; }

.pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0; margin: 0.6rem 0 1.6rem; }
.pipeline__node {
    padding: 0.5rem 0.8rem; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--tile);
    font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap;
    transition: transform 0.45s var(--bounce), border-color 0.25s;
}
.pipeline__node:hover { transform: translateY(-3px); border-color: var(--accent); }
.pipeline__link { position: relative; flex: 1 1 18px; min-width: 18px; max-width: 60px; height: 2px; background: var(--line-strong); }
.pipeline__link::after {
    content: ''; position: absolute; top: 50%; left: 0; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
    animation: flow 2.4s var(--ease-out) infinite;
}
.pipeline__link:nth-of-type(4)::after { animation-delay: 0.4s; }
.pipeline__link:nth-of-type(6)::after { animation-delay: 0.8s; }
.pipeline__link:nth-of-type(8)::after { animation-delay: 1.2s; }
@keyframes flow { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 6px); opacity: 0; } }

.project--wide__body { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.project--wide .tags { margin-top: 0; }
.project__metric { text-align: right; }
.project__metric-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 6vw, 4.6rem); letter-spacing: -0.05em; line-height: 1; color: var(--accent); }
.project__metric-label { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Education & Awards ---------- */
.bento--edu { grid-template-columns: repeat(4, 1fr); }

/* ---------- Contact ---------- */
.section#contact { padding-bottom: 3rem; }
.bento--contact {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "cta cta l1"
        "cta cta l2";
}
.tile--cta { grid-area: cta; padding: clamp(1.8rem, 4vw, 3rem); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tile--cta::before { background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%); }
.tile--cta .section__num { display: block; margin-bottom: 1rem; }
.cta__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1rem; }
.cta__lead { max-width: 480px; opacity: 0.7; margin-bottom: 1.8rem; }
.cta__email { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.cta__email-link {
    font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 1.5rem); letter-spacing: -0.02em;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
    transition: background-size 0.5s var(--spring); padding-bottom: 2px; word-break: break-all;
}
.cta__email-link:hover { background-size: 100% 2px; }
.btn--copy { padding: 0.6rem 1rem; border-radius: 12px; font-size: 0.85rem; background: color-mix(in srgb, var(--paper) 12%, transparent); color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper) 20%, transparent); }
.btn--copy:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--copy.is-copied { background: #22c55e; border-color: #22c55e; color: #fff; }

.bento--contact .tile--link:nth-of-type(1) { grid-area: l1; }
.bento--contact .tile--link:nth-of-type(2) { grid-area: l2; }
.tile--link { display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; }
.tile--link .tile__icon { margin-bottom: auto; }
.tile--link .tile__heading { margin: 0; font-size: 1.2rem; }
.tile--link__arrow {
    position: absolute; top: 1.4rem; right: 1.4rem; color: var(--text-dim);
    transition: transform 0.55s var(--bounce), color 0.25s;
}
.tile--link:hover .tile--link__arrow { transform: rotate(45deg) scale(1.15); color: var(--accent); }

/* =========================================================
   FOOTER, BACK TO TOP, TOAST
   ========================================================= */
.footer { padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem; font-size: 0.88rem; color: var(--text-dim); }
.footer__socials { display: flex; gap: 1.2rem; }
.footer__socials a { transition: color 0.2s; }
.footer__socials a:hover { color: var(--accent); }

.back-to-top {
    position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 80; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-hover);
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.85);
    transition: opacity 0.3s, visibility 0.3s, transform 0.5s var(--bounce), background 0.25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.back-to-top:active { transform: scale(0.92); }

.toast {
    position: fixed; left: 50%; bottom: 1.6rem; z-index: 300; padding: 0.7rem 1.1rem; border-radius: 14px;
    background: var(--ink); color: var(--paper); font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow-hover);
    transform: translate(-50%, 160%); opacity: 0; pointer-events: none;
    transition: transform 0.6s var(--spring), opacity 0.3s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* =========================================================
   REVEAL — soft spring rise
   ========================================================= */
/* :where() keeps specificity at 0 so tile rules that add hover transitions win */
:where([data-reveal]) {
    opacity: 0; translate: 0 28px; scale: 0.97;
    transition: opacity 0.6s ease var(--d, 0ms), translate 0.9s var(--spring) var(--d, 0ms), scale 0.9s var(--spring) var(--d, 0ms);
}
:where([data-reveal].is-visible) { opacity: 1; translate: 0 0; scale: 1; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .bento--hero {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "intro intro"
            "photo exp"
            "photo recs"
            "api   clock"
            "stack stack";
    }
    .bento--about { grid-template-columns: repeat(2, 1fr); grid-template-areas: "bio bio" "code code" "f1 f2"; }
    .bento--skills {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas: "backend backend" "azure frontend" "tools tools" "db specialties";
    }
    .bento--projects { grid-template-columns: repeat(2, 1fr); grid-template-areas: "p1 p1" "p2 p3" "p4 p4"; }
    .bento--edu { grid-template-columns: repeat(2, 1fr); }
    .bento--contact { grid-template-columns: repeat(2, 1fr); grid-template-areas: "cta cta" "l1 l2"; }
}

@media (max-width: 600px) {
    :root { --r: 20px; --gap: 10px; }
    .section { padding: 3.2rem 0; }
    .bento--hero {
        grid-template-areas:
            "intro intro"
            "photo photo"
            "exp   recs"
            "api   api"
            "clock clock"
            "stack stack";
    }
    .tile--photo { min-height: 0; aspect-ratio: 1 / 1; }
    .tile { padding: 1.25rem; }
    .eyebrow { font-size: 0.74rem; }
    .tile__num { font-size: 2.6rem; }
    .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
    .bento--about, .bento--skills, .bento--projects, .bento--edu, .bento--contact {
        grid-template-columns: 1fr; grid-template-areas: none;
    }
    .bento--about > *, .bento--skills > *, .bento--projects > *, .bento--contact > * { grid-area: auto !important; }
    .project--wide__body { grid-template-columns: 1fr; gap: 1.2rem; }
    .project__metric { text-align: left; }
    .tile--link { min-height: 0; }
    .tile--link .tile__icon { margin-bottom: 1rem; }
    .footer__inner { flex-direction: column; align-items: flex-start; }
    .back-to-top { right: 1rem; bottom: 1rem; }
}

@media (min-width: 1800px) { :root { --maxw: 1440px; } html { font-size: 17px; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
    [data-reveal] { opacity: 1; translate: none; scale: none; }
    .hero__title .word { translate: 0 0; }
}
