/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM & STYLESHEET
   Author: Ibnul Tahsin Rihan
   Tech: Vanilla Modern CSS3 (Variables, Flexbox, Grid, Fluid Typography)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Custom Properties & Design Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Dark Mode (Default) matching reference */
    --bg-primary: #141414;
    --bg-surface: #1c1c1c;
    --bg-elevated: #232323;
    --accent: #f2a93e;
    --accent-hover: #ffc363;
    --accent-subtle: rgba(242, 169, 62, 0.12);
    --accent-glow: rgba(242, 169, 62, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border: #2a2a2a;
    --border-hover: #3e3e3e;
    --on-accent: #141414;
    
    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Elevation & Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 8px 20px rgba(242, 169, 62, 0.2);

    /* Navbar Glass */
    --nav-bg: rgba(20, 20, 20, 0.88);
    --nav-border: rgba(255, 255, 255, 0.08);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    /* Transitions */
    --theme-transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    --anim-fast: 0.2s ease;
    --anim-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-surface: #f6f7f9;
    --bg-elevated: #ffffff;
    --accent: #e8951f;
    --accent-hover: #d48415;
    --accent-subtle: rgba(232, 149, 31, 0.12);
    --accent-glow: rgba(232, 149, 31, 0.2);
    --text-primary: #111318;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --border-hover: #cbd5e1;
    --on-accent: #141414;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 8px 20px rgba(232, 149, 31, 0.25);

    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   2. Base Reset & Typography
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    transition: var(--theme-transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.25;
    font-weight: 700;
    transition: color 0.2s ease;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--anim-fast);
}

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

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--accent);
    color: var(--on-accent);
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* --------------------------------------------------------------------------
   3. Layout & Reusable Utilities
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

/* Eyebrow Label matching reference */
.section-eyebrow {
    display: inline-block;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
}

.accent-dot {
    color: var(--accent);
}

.card-surface {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--theme-transition), transform 0.25s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    min-height: 48px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--on-accent);
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-height: 38px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 52px;
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    font-size: 0.71875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}

.badge-current {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-accent {
    background-color: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent);
    white-space: nowrap;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px currentColor; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   4. Header & Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nav-border);
    transition: var(--theme-transition), transform 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.25rem;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.25s ease;
    border-radius: var(--radius-pill);
}

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

.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Pill Theme Toggle matching reference */
.theme-toggle-pill {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 58px;
    height: 30px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0 6px;
    transition: var(--theme-transition);
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.theme-icon-moon {
    color: var(--accent);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Dark mode thumb position (right over moon) */
[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(26px);
}

[data-theme="dark"] .theme-icon-sun {
    color: var(--text-muted);
}

[data-theme="dark"] .theme-icon-moon {
    color: var(--on-accent);
}

/* Light mode thumb position (left over sun) */
[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(0);
}

[data-theme="light"] .theme-icon-sun {
    color: var(--on-accent);
}

[data-theme="light"] .theme-icon-moon {
    color: var(--text-muted);
}

/* Mobile Hamburger Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
    transition: var(--theme-transition);
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-backdrop.active {
    display: block;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 3.5rem;
}

.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.hero-greeting {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    letter-spacing: -0.03em;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Hero Visual / Avatar */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.avatar-frame {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
}

.avatar-halo {
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: var(--radius-xl);
    z-index: 0;
    filter: blur(12px);
    opacity: 0.8;
}

.avatar-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--border);
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-lg);
    z-index: 1;
    transition: var(--theme-transition), border-color 0.3s ease;
}

.avatar-inner:hover {
    border-color: var(--accent);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.4s ease;
}

.avatar-frame:hover .avatar-img {
    transform: scale(1.03);
}

/* Floating credential badge */
.floating-credential-card {
    position: absolute;
    bottom: -15px;
    left: -15px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.credential-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.credential-info {
    display: flex;
    flex-direction: column;
}

.credential-title {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.credential-sub {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.scroll-indicator {
    text-align: center;
    margin-top: 2rem;
}

.scroll-arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(8px) rotate(45deg); }
    60% { transform: translateY(4px) rotate(45deg); }
}

/* --------------------------------------------------------------------------
   6. About Section
   -------------------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.about-bio {
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.feature-icon-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--accent-subtle);
    border-radius: var(--radius-md);
}

.feature-icon {
    font-size: 1.25rem;
    color: var(--accent);
}

.feature-body h3 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

.feature-body p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   7. Experience Section (Highlight of the Page)
   -------------------------------------------------------------------------- */
.experience-timeline {
    max-width: 960px;
    margin: 0 auto;
}

.experience-card {
    padding: 2.5rem;
    position: relative;
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-md);
}

.experience-card:hover {
    border-color: var(--border-hover);
    border-left-color: var(--accent-hover);
    box-shadow: var(--shadow-lg);
}

.experience-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.75rem;
}

.experience-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.company-logo-chip {
    flex-shrink: 0;
    background-color: #ffffff;
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-sm);
    min-height: 60px;
    transition: var(--anim-normal);
}

.company-logo-chip:hover {
    border-color: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow), var(--shadow-md);
    transform: translateY(-2px);
}

[data-theme="light"] .company-logo-chip {
    background-color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.company-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.company-details {
    flex: 1;
}

.company-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.role-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.company-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.company-link {
    color: var(--accent);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.company-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.meta-separator {
    color: var(--text-muted);
}

.duration {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.experience-duties {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.experience-duties li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.experience-duties strong {
    color: var(--text-primary);
}

.duty-bullet {
    color: var(--accent);
    margin-top: 0.3rem;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}

.pill-tag {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.3125rem 0.875rem;
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   8. Skills & Technologies Section
   -------------------------------------------------------------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.skill-group {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.skill-group:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon-chip {
    width: 46px;
    height: 46px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.skill-icon-chip.accent-chip {
    background-color: var(--accent-subtle);
    border-color: var(--accent);
}

.skill-group-header h3 {
    font-size: 1.1875rem;
}

.skill-group-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.learning-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.skill-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: auto;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 0.4375rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.skill-pill i {
    color: var(--accent);
    font-size: 0.9375rem;
}

.skill-pill:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-pill.learning-pill {
    border-color: rgba(242, 169, 62, 0.3);
    background-color: var(--accent-subtle);
}

/* --------------------------------------------------------------------------
   9. Featured Projects Section
   -------------------------------------------------------------------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.projects-grid .project-card {
    grid-column: span 2;
}

/* Center the last two cards on desktop PC view */
.projects-grid .project-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tailored media backgrounds to seamlessly blend screenshots without letterbox artifacts */
.project-media.bg-rivertyne {
    background-color: #162444;
}

.project-media.bg-homenet {
    background-color: #0c1a17;
}

.project-media.bg-white {
    background-color: #ffffff;
}

.project-media.bg-bangladesh {
    background-color: #c5dfd4;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
    opacity: 1;
}

.overlay-buttons {
    display: flex;
    gap: 0.75rem;
}

.project-details {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex: 1;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-pill {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent);
}

.text-link:hover {
    color: var(--accent-hover);
    gap: 0.625rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.icon-link:hover {
    background-color: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.private-repo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
    user-select: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2;
    transition: border-color var(--anim-fast), color var(--anim-fast);
}

.private-repo-badge i {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.private-repo-badge:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.projects-cta-box {
    text-align: center;
}

/* --------------------------------------------------------------------------
   10. Education & Activities Section
   -------------------------------------------------------------------------- */
.education-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: start;
}

.subsection-title {
    font-size: 1.375rem;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}

.timeline-container {
    position: relative;
    padding-left: 2.75rem;
}

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

.timeline-entry {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

.timeline-node {
    position: absolute;
    left: -2.75rem;
    top: 4px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-sm);
    transition: var(--anim-normal);
}

.timeline-entry:hover .timeline-node {
    border-color: var(--accent-hover);
    box-shadow: 0 0 16px var(--accent-glow), var(--shadow-md);
    transform: scale(1.08);
}

.timeline-node-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    border-radius: 50%;
    display: block;
    background-color: #ffffff;
}

.timeline-card {
    padding: 1.5rem;
    margin-left: 0.75rem;
}

.timeline-date-chip {
    display: inline-block;
    background-color: var(--accent-subtle);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.timeline-org {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
}

.activity-logo-chip,
.activity-icon-chip {
    width: 52px;
    height: 52px;
    background-color: #ffffff;
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--anim-normal);
}

.activity-card:hover .activity-logo-chip,
.activity-card:hover .activity-icon-chip {
    border-color: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow), var(--shadow-md);
    transform: translateY(-2px);
}

.activity-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 2px;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
}

.activity-role {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.activity-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 3rem;
    align-items: start;
}

.contact-intro {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-channel-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}

.contact-channel-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-channel-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.channel-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.channel-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    word-break: break-all;
}

.channel-action-icon {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.contact-channel-card:hover .channel-action-icon {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* Form Styling */
.contact-form-panel {
    padding: 2.5rem;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
}

.form-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.required-star {
    color: #ef4444;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper-textarea .textarea-icon {
    top: 1.125rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.input-error {
    border-color: #ef4444;
}

.form-control.input-success {
    border-color: #22c55e;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.field-error {
    display: block;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
    min-height: 1rem;
}

.form-status {
    margin-top: 1.25rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding-top: 4rem;
    padding-bottom: 2.5rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-tagline {
    max-width: 360px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.footer-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-list a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links-list a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Back to Top Button
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--on-accent);
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 990;
}

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

.back-to-top:hover {
    background-color: var(--accent-hover);
    transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   14. Scroll Reveal Animations
   -------------------------------------------------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   15. Responsive Breakpoints (Mobile-First)
   -------------------------------------------------------------------------- */
/* Max-width 1024px (Tablets & small laptops) */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid .project-card,
    .projects-grid .project-card:nth-child(4) {
        grid-column: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .avatar-frame {
        max-width: 320px;
    }

    .floating-credential-card {
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

/* Max-width 768px (Mobile & Tablets portrait) */
@media (max-width: 768px) {
    .section {
        padding-top: 3.75rem;
        padding-bottom: 3.75rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Mobile Navigation Drawer */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 82%;
        max-width: 340px;
        height: calc(100vh - 72px);
        background-color: var(--bg-surface);
        border-left: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 2rem 1.5rem;
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        width: 100%;
    }

    .nav-link {
        font-size: 1.125rem;
        width: 100%;
        padding: 0.625rem 0;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        color: var(--accent);
        font-weight: 700;
    }

    /* Stacking Multi-Columns to Single Column */
    .about-grid {
        grid-template-columns: 1fr;
    }

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

    .skill-group {
        padding: 1.5rem;
    }

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

    .education-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .experience-card {
        padding: 1.75rem;
    }

    .company-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Max-width 480px (Small Mobile Phones) */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .avatar-frame {
        max-width: 270px;
    }

    .about-bio {
        padding: 1.5rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .experience-card {
        padding: 1.25rem;
    }

    .skill-group {
        padding: 1.25rem 1rem;
    }

    .skill-group-header {
        margin-bottom: 1.125rem;
        gap: 0.75rem;
    }

    .skill-icon-chip {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .skill-group-header h3 {
        font-size: 1.0625rem;
    }

    .skill-group-subtitle {
        font-size: 0.75rem;
    }

    .skill-pill-list {
        gap: 0.45rem;
    }

    .skill-pill {
        padding: 0.35rem 0.7rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }

    .skill-pill i {
        font-size: 0.8125rem;
    }

    .contact-form-panel {
        padding: 1.5rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 42px;
        height: 42px;
    }
}
