@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ===================================
   DESIGN SYSTEM & TOKENS
=================================== */
:root {
    --bg-base: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.55);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.65);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.14);

    --blue: #4285f4;
    --red: #ea4335;
    --yellow: #fbbc05;
    --green: #34a853;
    --purple: #9c27b0;
    --pink: #e91e8c;

    --accent-grad: linear-gradient(135deg, var(--blue), var(--purple));
    --radius: 28px;
    --radius-sm: 14px;
    --radius-pill: 999px;
    --max-w: 1180px;
    --nav-h: 90px;
}

[data-theme="dark"] {
    --bg-base: #0b0d12;
    --bg-card: rgba(18, 22, 32, 0.6);
    --text-primary: #f0f4ff;
    --text-secondary: #a0aec0;
    --text-muted: #4a5568;
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* ===================================
   RESET & BASE
=================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Kill the blue tap flash on mobile */
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    overflow-x: clip;
    transition: background .4s, color .4s;
}

/* Subtle Noise Overlay for premium tactile feel */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999997;
    pointer-events: none;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

button,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* ===================================
   ANIMATED BACKGROUND BLOBS
=================================== */
.blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: blobFloat 18s infinite alternate ease-in-out;
}

[data-theme="dark"] .blob {
    opacity: 0.25;
}

.blob:nth-child(1) {
    width: 550px;
    height: 550px;
    background: #c9b3ff;
    top: -15%;
    left: -10%;
    animation-duration: 22s;
}

.blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: #b3d4ff;
    bottom: -15%;
    right: -10%;
    animation-duration: 26s;
}

.blob:nth-child(3) {
    width: 350px;
    height: 350px;
    background: #ffb3d4;
    top: 35%;
    left: 42%;
    animation-duration: 18s;
}

[data-theme="dark"] .blob:nth-child(1) {
    background: #3a1a7a;
}

[data-theme="dark"] .blob:nth-child(2) {
    background: #1a3a7a;
}

[data-theme="dark"] .blob:nth-child(3) {
    background: #6a1a4a;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(80px, -120px) scale(1.15);
    }
}

/* ===================================
   NAVIGATION
=================================== */
.navbar-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    z-index: 999;
}

.navbar {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 12px 28px;
    box-shadow: var(--shadow);
    transition: all .3s;
}

.logo {
    font-size: 1.55rem;
    font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color .2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-grad);
    transform: scaleX(0);
    transition: transform .25s;
}

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

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

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.35rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
}

.icon-btn:hover {
    background: rgba(130, 130, 200, 0.12);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Hamburger - premium glass circle */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: background 0.25s, box-shadow 0.25s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s, border-color 0.25s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.hamburger:hover {
    background: rgba(100, 80, 180, 0.12);
    box-shadow: 0 6px 20px rgba(100, 80, 180, 0.18);
    transform: scale(1.08);
}

.hamburger.open {
    background: var(--accent-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(66, 133, 244, 0.4);
}

.hamburger i {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    line-height: 1;
}

.hamburger.open i {
    transform: rotate(90deg);
}



/* Mobile slide-down glass menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    z-index: 998;
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: translateY(-12px) scale(0.97);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .25s;
}

.mobile-menu.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 14px;
    transition: background .2s, color .2s;
    text-decoration: none;
}

.mobile-menu-links a i {
    font-size: 1.2rem;
    color: var(--blue);
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: rgba(66, 133, 244, 0.08);
    color: var(--text-primary);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 20px;
}

/* ===================================
   MAIN CONTENT WRAPPER
=================================== */
main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 30px) 24px 32px;
}

/* ===================================
   GLASS CARD (REUSABLE)
=================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s;
}

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

.card-p {
    padding: 32px;
}

/* ===================================
   HOMEPAGE - BENTO GRID
=================================== */
.bento {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr;
    grid-template-rows: auto;
    gap: 20px;
}

/* Slot assignments */
.b-intro {
    grid-column: 1;
    grid-row: 1;
}

.b-photo1 {
    grid-column: 2;
    grid-row: 1 / 3;
}

.b-music {
    grid-column: 3;
    grid-row: 1;
}

.b-project {
    grid-column: 1;
    grid-row: 2;
}

.b-photo2 {
    grid-column: 3;
    grid-row: 2;
}

.b-skills {
    grid-column: 1 / 3;
    grid-row: 3;
}

.b-socials {
    grid-column: 3;
    grid-row: 3;
}

.b-quote {
    grid-column: 1;
    grid-row: 4;
}

.b-location {
    grid-column: 2;
    grid-row: 4;
}

.b-cta {
    grid-column: 3;
    grid-row: 4;
}

/* Intro Card */
.intro-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(66, 133, 244, 0.12);
    color: var(--blue);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.intro-name {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 14px;
}

.intro-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.role-tag {
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.role-tag.dev {
    background: rgba(66, 133, 244, 0.15);
    color: var(--blue);
}

.role-tag.med {
    background: rgba(52, 168, 83, 0.15);
    color: var(--green);
}

.role-tag.music {
    background: rgba(234, 67, 53, 0.15);
    color: var(--red);
}

.role-tag.design {
    background: rgba(156, 39, 176, 0.15);
    color: var(--purple);
}

.intro-bio {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

.intro-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-grad {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent-grad);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    transition: opacity .2s, transform .2s;
}

.btn-grad:hover {
    opacity: .9;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color .2s, background .2s;
}

.btn-outline:hover {
    border-color: var(--blue);
    background: rgba(66, 133, 244, 0.07);
}

/* Photo Cards */
.b-photo1,
.b-photo2 {
    padding: 0;
    min-height: 280px;
}

.photo-fill {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform .5s ease;
}

.card:hover .photo-fill {
    transform: scale(1.04);
}

/* Music Card */
.b-music {
    background: linear-gradient(135deg, #ea4335 0%, #c2185b 100%) !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

.b-music * {
    color: white !important;
}

.music-wave {
    font-size: 3rem;
}

.music-label {
    font-size: 1.3rem;
    font-weight: 700;
}

.music-sub {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.music-icons {
    display: flex;
    gap: 18px;
    font-size: 1.7rem;
}

.music-icons a {
    color: white !important;
    transition: transform .2s;
}

.music-icons a:hover {
    transform: scale(1.2);
}

/* Project Card */
.project-featured {
    display: flex;
    gap: 0;
    min-height: 200px;
}

.proj-text {
    padding: 28px;
    flex: 1;
}

.proj-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proj-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.proj-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.proj-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.proj-tag {
    background: rgba(130, 130, 200, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.proj-img {
    width: 42%;
    object-fit: cover;
    object-position: left top;
}

/* Skills Card */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.s-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: rgba(130, 130, 200, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background .2s, border-color .2s;
}

.s-pill:hover {
    background: rgba(66, 133, 244, 0.12);
    border-color: var(--blue);
}

.s-pill i {
    font-size: 1.1rem;
    color: var(--blue);
}

/* Social Card */
.social-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.soc-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(130, 130, 200, 0.06);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background .2s, transform .2s;
}

.soc-link:hover {
    background: rgba(66, 133, 244, 0.1);
    transform: translateX(4px);
}

.soc-link i {
    font-size: 1.3rem;
}

/* Quote Card */
.b-quote {
    background: var(--accent-grad) !important;
    border: none !important;
}

.b-quote * {
    color: white;
}

.quote-text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
}

.quote-attr {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* Location Card */
.b-location {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loc-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    color: var(--blue);
}

.loc-city {
    font-size: 1.3rem;
    font-weight: 700;
}

.loc-time {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.loc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 14px;
    background: rgba(52, 168, 83, 0.12);
    color: var(--green);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

/* CTA Card */
.b-cta {
    background: linear-gradient(135deg, #6a1a7a, #1a3a8a) !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.b-cta * {
    color: white;
}

.cta-title {
    font-size: 1.4rem;
    font-weight: 800;
}

.cta-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: white;
    color: #6a1a7a;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform .2s;
}

.btn-white:hover {
    transform: scale(1.05);
}

/* ===================================
   SECTION PAGES COMMON STYLE
=================================== */
.page-hero {
    text-align: center;
    padding: 60px 0 50px;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(66, 133, 244, 0.1);
    color: var(--blue);
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.page-desc {
    max-width: 600px;
    margin: 16px auto 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.content-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.content-wide {
    margin-top: 40px;
}

/* Timeline (About page) */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.tl-item {
    position: relative;
    margin-bottom: 32px;
}

.tl-dot {
    position: absolute;
    left: -27px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-grad);
}

.tl-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 4px;
}

.tl-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tl-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Skill bars (Skills page) */
.skill-bar-wrap {
    margin-bottom: 18px;
}

.skill-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(130, 130, 200, 0.12);
    border-radius: 8px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 8px;
    background: var(--accent-grad);
    transform-origin: left;
    animation: barGrow 1s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes barGrow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Blog cards */
.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.blog-cat {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.blog-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.blog-read-more {
    font-weight: 600;
    color: var(--blue);
    font-size: 0.88rem;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    padding: 14px 18px;
    background: rgba(130, 130, 200, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color .2s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--blue);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* Card header utility */
.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.card-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* ===================================
   SEARCH MODAL
=================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.search-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.search-box {
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 640px;
    overflow: hidden;
    transform: translateY(-20px) scale(.97);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: var(--shadow-hover);
}

.search-overlay.open .search-box {
    transform: translateY(0) scale(1);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.search-header i {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background .2s;
}

.search-result-item:hover {
    background: rgba(130, 130, 200, 0.08);
}

.res-icon {
    font-size: 1.3rem;
    color: var(--blue);
    width: 28px;
}

.res-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.res-page {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* ===================================
   FOOTER
=================================== */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px 32px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px 30px;
    margin-bottom: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s;
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-copy i {
    color: var(--red);
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 980px) {
    .bento {
        grid-template-columns: 1fr 1fr;
    }

    .b-intro {
        grid-column: 1 / 3;
    }

    .b-photo1 {
        grid-column: 1;
        grid-row: 2 / 4;
    }

    .b-music {
        grid-column: 2;
        grid-row: 2;
    }

    .b-project {
        grid-column: 2;
        grid-row: 3;
    }

    .b-photo2 {
        grid-column: 1 / 3;
        grid-row: 4;
        min-height: 220px;
    }

    .b-skills {
        grid-column: 1 / 3;
    }

    .b-socials {
        grid-column: 1 / 3;
    }

    .b-quote {
        grid-column: 1;
    }

    .b-location {
        grid-column: 2;
    }

    .b-cta {
        grid-column: 1 / 3;
    }

    .proj-img {
        display: none;
    }

    .content-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .mobile-menu {
        display: block;
    }

    .navbar-wrap {
        padding: 14px 16px;
    }

    .navbar {
        padding: 10px 18px;
    }
}

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

    .b-intro,
    .b-photo1,
    .b-music,
    .b-project,
    .b-photo2,
    .b-skills,
    .b-socials,
    .b-quote,
    .b-location,
    .b-cta {
        grid-column: 1;
        grid-row: auto;
    }

    .intro-name {
        font-size: 2.4rem;
    }

    main {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .skill-bar-wrap {
        margin-bottom: 14px;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .b-photo1 {
        min-height: 300px;
    }
}


/* ===================================
   ANIMATIONS
=================================== */

/* ── Scroll Fade-In (Intersection Observer) ── */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for bento cards */
.fade-up:nth-child(1) {
    transition-delay: 0ms;
}

.fade-up:nth-child(2) {
    transition-delay: 80ms;
}

.fade-up:nth-child(3) {
    transition-delay: 160ms;
}

.fade-up:nth-child(4) {
    transition-delay: 240ms;
}

.fade-up:nth-child(5) {
    transition-delay: 320ms;
}

.fade-up:nth-child(6) {
    transition-delay: 400ms;
}

.fade-up:nth-child(7) {
    transition-delay: 480ms;
}

.fade-up:nth-child(8) {
    transition-delay: 560ms;
}

.fade-up:nth-child(9) {
    transition-delay: 100ms;
}

.fade-up:nth-child(10) {
    transition-delay: 180ms;
}


/* ── Hero Entrance ── */
@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

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

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-anim-name {
    animation: heroSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero-anim-tags {
    animation: heroSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.hero-anim-bio {
    animation: heroFadeIn 0.6s ease 0.45s both;
}

.hero-anim-btns {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.hero-anim-eyebrow {
    animation: heroFadeIn 0.5s ease 0.05s both;
}


/* ── Typewriter Cursor ── */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--blue);
    margin-left: 2px;
    vertical-align: middle;
    border-radius: 1px;
    animation: cursorBlink 0.9s step-end infinite;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Hide static role tags when typewriter is active */
.intro-roles.typewriter-active .role-tag {
    display: none;
}

.intro-roles.typewriter-active {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
}

.typewriter-icon {
    font-size: 1.1rem;
}


/* ── 3D Card Tilt ── */
.card.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 0.1s linear, box-shadow 0.2s;
    will-change: transform;
}

.card.tilt-card:hover {
    box-shadow: var(--shadow-hover);
}

.card.tilt-card.tilt-reset {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}


/* ── Waving Hand ── */
@keyframes waveHand {
    0% {
        transform: rotate(0deg);
    }

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

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

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

    60% {
        transform: rotate(-4deg);
    }

    75% {
        transform: rotate(10deg);
    }

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

.ph-hand-waving {
    display: inline-block;
    transform-origin: bottom right;
    animation: waveHand 2.4s ease-in-out 0.8s 1;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-anim-name,
    .hero-anim-tags,
    .hero-anim-bio,
    .hero-anim-btns,
    .hero-anim-eyebrow {
        animation: none;
        opacity: 1;
    }

    .ph-hand-waving {
        animation: none;
    }

    .typewriter-cursor {
        animation: none;
    }
}


/* ───────────────────────────────────────────────
   SCROLL PROGRESS BAR
─────────────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-grad);
    z-index: 9999;
    border-radius: 0 2px 2px 0;
    transition: width 0.08s linear;
    pointer-events: none;
}


/* ───────────────────────────────────────────────
   BACK-TO-TOP BUTTON
─────────────────────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s;
    z-index: 900;
    -webkit-tap-highlight-color: transparent;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--accent-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 28px rgba(66, 133, 244, 0.35);
    transform: translateY(-2px);
}


/* ───────────────────────────────────────────────
   PAGE FADE TRANSITION (View Transitions API)
─────────────────────────────────────────────── */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes pageFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

::view-transition-old(root) {
    animation: pageFadeOut 0.2s ease-out forwards;
}

::view-transition-new(root) {
    animation: pageFadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}


/* ───────────────────────────────────────────────
   SKILL BAR SCROLL ANIMATION
─────────────────────────────────────────────── */
.skill-bar-fill {
    width: 0% !important;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.skill-bar-fill.animated {
    width: var(--skill-w) !important;
}


/* ───────────────────────────────────────────────
   TOAST NOTIFICATION (clipboard copy)
─────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 88px;
    right: 24px;
    background: var(--text-primary);
    color: var(--bg-base);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* ───────────────────────────────────────────────
   KEYBOARD SHORTCUT BADGE (search hint)
─────────────────────────────────────────────── */
.kbd-hint {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 6px;
    vertical-align: middle;
    opacity: 0.75;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .kbd-hint {
        display: none;
    }

    #back-to-top {
        bottom: 20px;
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #scroll-progress {
        transition: none;
    }

    #back-to-top {
        transition: opacity 0.2s;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    .skill-bar-fill {
        transition: none !important;
    }
}

/* ===================================
   ADSTERRA AD CONTAINERS
================================== */
.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 32px auto;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.ad-container-sm {
    margin: 24px auto;
}


/* Fix Adsterra Overflows and Homepage Display */
.ad-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 40px auto 20px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    /* Allow scroll on mobile if ad is 728px */
    position: relative !important;
    padding: 10px 0 !important;
    z-index: 10 !important;
    /* Ensure it's above blobs */
    grid-column: 1 / -1 !important;
    /* Force to span full width on bento grid */
}

.bento .ad-container {
    grid-column: 1 / -1 !important;
}


/* Blog Markdown Typography */
.blog-content h1,
.blog-content h2,
.blog-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.blog-content h2 {
    font-size: 1.7rem;
}

.blog-content h3 {
    font-size: 1.4rem;
}

.blog-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-content ul,
.blog-content ol {
    margin-left: 24px;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.blog-content li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.blog-content a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(66, 133, 244, 0.4);
    text-decoration-thickness: 2px;
    transition: text-decoration-color 0.2s;
}

.blog-content a:hover {
    text-decoration-color: var(--blue);
}

.blog-content pre {
    background: rgba(18, 22, 32, 0.85);
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.blog-content code {
    background: rgba(130, 130, 200, 0.15);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: var(--purple);
}

.blog-content pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
}

.blog-content blockquote {
    border-left: 4px solid var(--blue);
    padding-left: 16px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(66, 133, 244, 0.05);
    padding: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-content img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

/* ── Copy Code Button ── */
.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(130, 130, 200, 0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 2;
}

.copy-code-btn:hover {
    background: rgba(66, 133, 244, 0.15);
    border-color: var(--blue);
    color: var(--blue);
}

.copy-code-btn.copied {
    background: rgba(52, 168, 83, 0.15);
    border-color: var(--green);
    color: var(--green);
}

/* ── Responsive Banner Ad (728x90) ── */
@media (max-width: 760px) {
    .banner-ad-inner {
        transform: scale(calc(100vw / 728));
        transform-origin: top center;
        width: 728px;
    }

    .banner-ad-wrap {
        height: 90px;
        overflow: hidden;
    }
}

/* ===================================
   PREMIUM FEATURES (CURSOR, PROGRESS, A11Y)
=================================== */



/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 999999;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: var(--accent-grad);
    width: 0%;
    transition: width 0.1s linear;
}

/* A11y Focus States */
:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
    border-radius: inherit;
}

/* Author Bio Link Hover */
.author-bio-link {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease;
}

.author-bio-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(124, 58, 237, 0.15);
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.08), rgba(156, 39, 176, 0.08)) !important;
}

.author-bio-link:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===================================
   BLOG SHARE & AUTHOR BIO
=================================== */
.blog-share {
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.blog-share-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: auto;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: var(--bg-base);
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid var(--border);
    cursor: pointer;
}

.share-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.share-btn.twitter:hover {
    color: #1DA1F2;
}

.share-btn.linkedin:hover {
    color: #0A66C2;
}

.share-btn.whatsapp:hover {
    color: #25D366;
}

.share-btn.telegram:hover {
    color: #0088cc;
}

.share-btn.facebook:hover {
    color: #1877F2;
}

.share-btn.reddit:hover {
    color: #FF4500;
}

.author-bio {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.author-info h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.author-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   MOBILE OVERFLOW FIXES (ADDED)
=================================== */
@media (max-width: 600px) {
    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }

    .author-info h3 {
        margin-top: 8px;
    }

    .blog-share {
        justify-content: center;
    }

    .blog-share-title {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .blog-content pre {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        word-wrap: normal;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .card {
        max-width: calc(100vw - 28px) !important;
        box-sizing: border-box;
    }
}