/* ==========================================================================
   Shahria Mahmud — Academic Portfolio
   Core stylesheet: design tokens, layout, and component styles.
   ========================================================================== */

:root {
    --color-navy: #0F172A;
    --color-blue: #2563EB;
    --color-emerald: #059669;
    --color-bg: #F8FAFC;
    --color-card: #FFFFFF;
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-border: #E2E8F0;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 12px 32px rgba(37, 99, 235, 0.16);
    --gradient-accent: linear-gradient(90deg, var(--color-blue), var(--color-emerald));
    --transition: 0.2s ease;
    --ease-smooth: cubic-bezier(0.16, 0.84, 0.44, 1);
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-emerald);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 2000;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

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

.reveal .row > [class*="col-"] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.reveal.is-visible .row > [class*="col-"] {
    opacity: 1;
    transform: translateY(0);
}

.reveal.is-visible .row > [class*="col-"]:nth-child(1) { transition-delay: 0.05s; }
.reveal.is-visible .row > [class*="col-"]:nth-child(2) { transition-delay: 0.15s; }
.reveal.is-visible .row > [class*="col-"]:nth-child(3) { transition-delay: 0.25s; }
.reveal.is-visible .row > [class*="col-"]:nth-child(4) { transition-delay: 0.35s; }
.reveal.is-visible .row > [class*="col-"]:nth-child(5) { transition-delay: 0.45s; }
.reveal.is-visible .row > [class*="col-"]:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal .row > [class*="col-"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Buttons ---------- */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.5rem;
    transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth),
        background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover, .btn:focus-visible {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: var(--shadow-glow);
}

.btn-outline-navy {
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
    background: transparent;
}

.btn-outline-navy:hover {
    background-color: var(--color-navy);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-outline-light:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.btn-sm:hover {
    transform: translateY(-1px);
}

/* ---------- Page Loader ---------- */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--color-navy);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-mark {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
}

/* ---------- Navbar ---------- */
.navbar-academic {
    background-color: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.85rem 0;
    transition: box-shadow 0.3s var(--ease-smooth), padding 0.3s var(--ease-smooth);
}

.navbar-academic.is-scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.6rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
}

.brand-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-navy);
    background-image: var(--gradient-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-smooth);
}

.navbar-brand:hover .brand-initials {
    transform: rotate(-8deg) scale(1.06);
}

.brand-name {
    color: var(--color-navy);
    font-weight: 700;
    font-size: 1.15rem;
}

.navbar-nav .nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color var(--transition);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--color-blue);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.1rem;
    height: 2px;
    background: var(--color-emerald);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s var(--ease-smooth);
}

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

/* Center nav links at desktop widths: brand / links / spacer as equal outer
   columns so the link group sits at the true midpoint, not just the
   midpoint of the space left over after the brand. */
@media (min-width: 992px) {
    .navbar-academic .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        column-gap: 1.5rem;
    }

    .navbar-academic .navbar-nav {
        justify-content: center;
    }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    padding: 0.85rem 0;
}

.breadcrumb {
    margin: 0;
    font-size: 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6.5rem 0 6rem;
    background-color: var(--color-navy);
    background-size: cover;
    background-position: center;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.93) 5%, rgba(15, 23, 42, 0.82) 50%, rgba(15, 23, 42, 0.93) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.7;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0, rgba(255, 255, 255, 0.045) 1px, transparent 1px, transparent 26px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 0, rgba(255, 255, 255, 0.045) 1px, transparent 1px, transparent 26px);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6EE7B7;
    margin-bottom: 0.75rem;
}

.hero-name {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    margin-bottom: 0.35rem;
    color: #fff;
}

.hero-title {
    font-size: 1.25rem;
    color: #E2E8F0;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.hero-university {
    color: #94A3B8;
    margin-bottom: 1.25rem;
}

.hero-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.interest-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.hero-tagline {
    font-size: 1.05rem;
    color: #CBD5E1;
    max-width: 46rem;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero-photo-wrap {
    display: inline-block;
    position: relative;
}

.hero-photo {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--color-card);
}

/* ---------- Section Layout ---------- */
.section-block {
    position: relative;
    padding: 4.5rem 0;
}

.bg-subtle {
    background-color: #F1F5F9;
}

.bg-subtle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.section-heading {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.75rem;
}

.section-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 0.4rem;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 0 0 0.85rem;
}

.section-heading h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 0.85rem auto 0;
    border-radius: 999px;
    background: var(--gradient-accent);
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
}

.research-card, .publication-card {
    position: relative;
    overflow: hidden;
}

.research-card::before, .publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-smooth);
}

.research-card:hover::before, .publication-card:hover::before {
    transform: scaleX(1);
}

.research-card:hover, .publication-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-img-top {
    height: 190px;
    object-fit: cover;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.card-img-placeholder {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF2F7;
    color: #94A3B8;
    font-size: 2.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin: 0.6rem 0 0.5rem;
}

.card-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.research-methods {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 0.65rem;
    margin-top: 0.65rem;
    margin-bottom: 0;
}

.status-badge {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

.status-ongoing { background: #DBEAFE; color: #1D4ED8; }
.status-completed { background: #D1FAE5; color: #047857; }
.status-planned { background: #FEF3C7; color: #B45309; }

/* ---------- Publications ---------- */
.publication-card {
    height: 100%;
}

.category-badge {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

.category-journal { background: #DBEAFE; color: #1D4ED8; }
.category-conference { background: #D1FAE5; color: #047857; }
.category-book_chapter { background: #FCE7F3; color: #BE185D; }
.category-preprint { background: #F3E8FF; color: #7E22CE; }

.pub-authors {
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
}

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

.pub-abstract {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.pub-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.citation-text {
    font-family: var(--font-body);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 0.92rem;
}

/* ---------- Toolbar: filters + search ---------- */
.publications-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.25rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 2.25rem;
}

.publications-toolbar .filter-bar {
    margin-bottom: 0;
}

.filter-btn {
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.filter-btn.active {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: #fff;
}

.search-box {
    position: relative;
    min-width: 260px;
}

.search-box i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-box .form-control {
    padding-left: 2.3rem;
    border-radius: 999px;
    border-color: var(--color-border);
}

/* ---------- About / Timeline ---------- */
.about-photo {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 6px solid var(--color-card);
}

.lead-bio {
    font-size: 1.05rem;
    color: var(--color-text);
    white-space: pre-line;
}

.timeline {
    position: relative;
    max-width: 46rem;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 2px solid var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.25rem;
}

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

.timeline-marker {
    position: absolute;
    left: -2.45rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-blue);
    border: 3px solid var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-blue);
}

.timeline-years {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-emerald);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.2rem;
}

.timeline-institution {
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.timeline-description {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* ---------- Skills ---------- */
.skill-item {
    margin-bottom: 0.5rem;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.skill-percent {
    color: var(--color-text-muted);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--color-border);
    overflow: hidden;
}

.skill-bar-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--gradient-accent);
    transition: width 1.1s var(--ease-smooth) 0.15s;
}

@media (prefers-reduced-motion: reduce) {
    .skill-bar-fill {
        transition: none;
    }
}

/* ---------- Awards ---------- */
.award-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    height: 100%;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
}

.award-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: transparent;
}

.award-icon {
    font-size: 2rem;
    color: var(--color-emerald);
    margin-bottom: 0.75rem;
    transition: transform 0.3s var(--ease-smooth);
}

.award-card:hover .award-icon {
    transform: scale(1.15) rotate(-6deg);
}

.award-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.award-meta {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.award-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* ---------- Languages ---------- */
.language-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.language-badge {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 130px;
}

.language-name {
    font-weight: 700;
    color: var(--color-navy);
}

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

/* ---------- CTA ---------- */
.cta-block {
    background: var(--color-navy);
    text-align: center;
}

.cta-block h2, .cta-block p {
    color: #fff;
}

.cta-block p {
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

/* ---------- Gallery / Masonry ---------- */
.masonry-grid {
    column-count: 3;
    column-gap: 1.25rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.35s ease;
}

.masonry-item:hover img {
    transform: scale(1.06);
}

.gallery-item a {
    position: relative;
    display: block;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 40%, rgba(15,23,42,0.75) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition);
    text-align: center;
    font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    color: #fff;
    margin-top: 1rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}

/* ---------- CV Page ---------- */
.cv-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.cv-name {
    margin-bottom: 0.15rem;
}

.cv-title {
    color: var(--color-text-muted);
    font-weight: 600;
    margin: 0;
}

.cv-section-title {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--color-emerald);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.cv-entry {
    margin-bottom: 1.5rem;
}

.cv-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-entry-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.cv-years {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-blue);
}

.cv-entry-org {
    color: var(--color-text-muted);
    font-weight: 600;
    margin: 0.15rem 0;
}

.cv-entry-desc {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.cv-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    background: #EFF6FF;
    color: var(--color-blue);
    border: 1px solid #DBEAFE;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.cv-project-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    height: 100%;
}

.cv-project-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

/* ---------- Contact ---------- */
.contact-info-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item i {
    font-size: 1.2rem;
    color: var(--color-emerald);
    margin-top: 0.2rem;
}

.contact-info-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.contact-info-item p {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.map-embed-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    line-height: 0;
}

.contact-form-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.contact-form-card h3 {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    border-color: var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
}

.form-control:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    background: var(--color-navy);
    color: #CBD5E1;
    padding: 3.5rem 0 2rem;
    margin-top: 3rem;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
}

.footer-name {
    color: #fff;
    font-size: 1.4rem;
}

.footer-tagline {
    color: #94A3B8;
}

.footer-heading {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #CBD5E1;
}

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

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.footer-socials a:hover {
    background: var(--color-emerald);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
}

.site-footer hr {
    border-color: rgba(255,255,255,0.12);
    margin: 2rem 0 1.25rem;
}

.footer-copyright {
    color: #94A3B8;
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
}

/* ---------- Back to top ---------- */
#back-to-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-navy);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), background var(--transition), box-shadow var(--transition);
    z-index: 1000;
}

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

#back-to-top:hover {
    background: var(--color-blue);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

/* ---------- Error Pages ---------- */
.error-page {
    padding: 7rem 0;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 800;
    color: var(--color-blue);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--color-text-muted);
    max-width: 32rem;
    margin: 0 auto 2rem;
}
