:root {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #262626;
    --text-primary: #FAFAFA;
    --text-secondary: #A8A8A8;
    --accent-blue: #0095F6;
    --border-color: #262626;
    --gradient-instagram: linear-gradient(45deg, #833AB4, #FD1D1D, #F77737);
    --gradient-orange: linear-gradient(135deg, #F77737, #FCAF45);
    --shadow-glow: 0 0 30px rgba(131, 58, 180, 0.3);
    --card-hover-border: rgba(131, 58, 180, 0.3);
    --card-hover-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --transition-default: all 0.3s ease;
}

[data-theme="light"] {
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0F0F0;
    --text-primary: #262626;
    --text-secondary: #8A8A8A;
    --accent-blue: #0095F6;
    --border-color: #DBDBDB;
    --shadow-glow: 0 0 30px rgba(131, 58, 180, 0.15);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.gradient-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: var(--gradient-instagram);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-default);
}

.card-lift:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
    box-shadow: var(--card-hover-shadow);
}

.period-pill {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 20px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(131, 58, 180, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(253, 29, 29, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(247, 119, 55, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .bg-pattern {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(131, 58, 180, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(253, 29, 29, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(247, 119, 55, 0.03) 0%, transparent 70%);
}

.container {
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 12px 0;
}

[data-theme="light"] header {
    background: rgba(250, 250, 250, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo {
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.header-icon:hover {
    transform: scale(1.1);
}

.header-icon svg {
    fill: var(--text-primary);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    width: 60px;
    height: 32px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), var(--shadow-glow);
    border-color: rgba(131, 58, 180, 0.5);
}

.toggle-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-instagram);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .toggle-thumb {
    transform: translateX(28px);
}

.toggle-icon {
    font-size: 10px;
}

main {
    padding-top: 80px;
    padding-bottom: 40px;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 20px;
}

.section-heading--spaced {
    margin-top: 40px;
}

.profile-section {
    padding: 30px 0;
    animation: fadeInUp 0.8s ease-out;
}

.profile-header {
    display: flex;
    gap: 60px;
    align-items: center;
    margin-bottom: 30px;
}

.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-instagram);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar-ring:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    object-fit: cover;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-blue);
}

[data-theme="light"] .avatar {
    background: #FFFFFF;
}

.profile-info {
    flex: 1;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.username {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
}

.profile-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    border: none;
}

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

.btn-primary:hover {
    background: #0074d4;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #363636;
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-bio {
    margin-bottom: 15px;
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.profile-bio-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
}

.meta-item a {
    color: var(--text-secondary);
}

.stories-bar {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.stories-bar::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.story-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: var(--gradient-instagram);
    transition: transform 0.3s ease;
}

.story-ring:hover {
    transform: scale(1.1);
}

.story-ring.viewed {
    background: var(--bg-tertiary);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.story-username {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px 0;
    border-top: 1px solid transparent;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--text-primary);
    border-top-color: var(--text-primary);
}

.tab-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.skill-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-instagram);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.skill-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.skill-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-instagram);
    border-radius: 3px;
    transition: width 1s ease;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.project-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: transform 0.3s ease;
}

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

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.project-stat svg {
    width: 18px;
    height: 18px;
    fill: white;
}

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

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

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gradient-instagram);
    border: 3px solid var(--bg-primary);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-role {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 600;
}

.timeline-location {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.timeline-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-description li {
    margin-bottom: 8px;
    padding-left: 8px;
}

.company-logos {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.company-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .company-logo {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.cert-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cert-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.cert-icon.aws {
    background: linear-gradient(135deg, #FF9900, #FF6600);
}

.cert-icon.google {
    background: linear-gradient(135deg, #4285F4, #34A853);
}

.cert-icon.azure {
    background: linear-gradient(135deg, #0078D4, #00A4EF);
}

.cert-icon.github {
    background: linear-gradient(135deg, #333, #666);
}

.cert-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cert-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

.contact-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-default);
}

.contact-item:hover {
    transform: translateX(8px);
    background: rgba(0, 149, 246, 0.1);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-instagram);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.contact-text {
    flex: 1;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 14px;
    font-weight: 600;
}

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

.form-group {
    position: relative;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: var(--transition-default);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.1);
}

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

.submit-btn {
    padding: 16px 32px;
    background: var(--gradient-instagram);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(131, 58, 180, 0.4);
}

.education-card {
    padding: 24px;
    margin-bottom: 16px;
}

.education-degree {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.education-institution {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 8px;
}

.education-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.education-grade {
    font-size: 14px;
    font-weight: 700;
    color: var(--gradient-orange);
}

.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.interest-tag {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-default);
}

.interest-tag:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 149, 246, 0.1);
}

.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-instagram);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(131, 58, 180, 0.4);
    transition: var(--transition-default);
    z-index: 999;
}

.fab:hover {
    transform: scale(1.1);
}

.fab svg {
    width: 24px;
    height: 24px;
    fill: white;
}

footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-logo {
    font-size: 18px;
    margin-bottom: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    transition: var(--transition-default);
}

.modal-close:hover {
    background: var(--accent-blue);
}

.modal-body {
    text-align: center;
    padding: 20px;
}

.modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 15px;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 25px;
}

.modal-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.modal-tech-tag {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
}

.modal-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#dynamic-title {
    display: inline-block;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#dynamic-title.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

#dynamic-title.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInSlideUp 0.5s forwards;
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ── Tablet ≤768px ── */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-content {
        padding: 0 16px;
    }

    .header-logo {
        font-size: 20px;
    }

    .header-actions {
        gap: 16px;
    }

    .header-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .profile-section {
        padding: 20px 0;
    }

    .profile-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .avatar-ring {
        width: 100px;
        height: 100px;
    }

    .avatar {
        font-size: 36px;
    }

    .profile-top {
        justify-content: center;
    }

    .username {
        font-size: 22px;
    }

    .profile-stats {
        justify-content: center;
        gap: 30px;
    }

    .profile-bio {
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-heading {
        font-size: 20px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .skill-card {
        padding: 16px;
    }

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

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

    .project-thumbnail {
        font-size: 36px;
    }

    .tab-nav {
        gap: 24px;
        padding: 12px 0;
    }

    .tab-item {
        padding: 8px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .contact-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-card {
        padding: 24px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-item {
        padding: 16px;
    }

    .timeline-header {
        flex-direction: column;
    }

    .company-logos {
        gap: 12px;
    }

    .company-logo {
        height: 24px;
        padding: 5px 12px;
    }

    .timeline-role {
        font-size: 16px;
    }

    .education-card {
        padding: 20px;
    }

    .modal-content {
        width: 95%;
        padding: 24px;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-icon {
        font-size: 60px;
    }

    .fab {
        width: 54px;
        height: 54px;
        bottom: 24px;
        right: 24px;
    }

    footer {
        padding: 30px 0;
    }

    .stories-bar {
        gap: 12px;
        padding: 12px 0;
    }

    .story-ring {
        width: 60px;
        height: 60px;
    }

    .story-avatar {
        font-size: 20px;
    }
}

/* ── Mobile ≤576px ── */
@media (max-width: 576px) {
    .header-content {
        padding: 0 12px;
        justify-content: space-between;
    }

    .header-logo {
        font-size: 18px;
    }

    .header-actions {
        gap: 12px;
    }

    header {
        padding: 8px 0;
    }

    main {
        padding-top: 60px;
        padding-bottom: 30px;
    }

    .container {
        padding: 0 12px;
    }

    .profile-section {
        padding: 16px 0;
    }

    .profile-header {
        gap: 16px;
    }

    .avatar-ring {
        width: 80px;
        height: 80px;
    }

    .avatar {
        font-size: 28px;
    }

    .username {
        font-size: 18px;
    }

    .profile-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 16px;
    }

    .stat-label {
        font-size: 12px;
    }

    .profile-name {
        font-size: 14px;
    }

    .profile-title {
        font-size: 12px;
    }

    .profile-bio-text {
        font-size: 13px;
    }

    .profile-meta {
        flex-direction: column;
        gap: 8px;
    }

    .meta-item {
        font-size: 12px;
    }

    .meta-item a {
        word-break: break-all;
    }

    .stories-bar {
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .story-ring {
        width: 56px;
        height: 56px;
    }

    .story-avatar {
        font-size: 18px;
    }

    .story-username {
        font-size: 10px;
        max-width: 56px;
    }

    .tab-nav {
        gap: 0;
        justify-content: space-around;
        padding: 10px 0;
        margin-bottom: 16px;
    }

    .tab-item {
        flex: 1;
        justify-content: center;
        font-size: 11px;
    }

    .tab-item span {
        display: none;
    }

    .tab-item svg {
        width: 20px;
        height: 20px;
    }

    .section-heading {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .section-heading--spaced {
        margin-top: 28px;
    }

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

    .project-card {
        border-radius: 4px;
    }

    .project-thumbnail {
        font-size: 28px;
    }

    .project-stat {
        font-size: 12px;
        gap: 4px;
    }

    .project-overlay {
        gap: 12px;
    }

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

    .skill-card {
        padding: 14px;
    }

    .skill-name {
        font-size: 14px;
    }

    .skill-category {
        font-size: 10px;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cert-card {
        padding: 16px;
    }

    .cert-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        border-radius: 10px;
    }

    .cert-info h4 {
        font-size: 13px;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item {
        padding: 14px;
        margin-bottom: 16px;
    }

    .timeline-dot {
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .timeline-role {
        font-size: 15px;
    }

    .timeline-company {
        font-size: 13px;
    }

    .company-logos {
        gap: 10px;
    }

    .company-logo {
        height: 20px;
        padding: 4px 10px;
        border-radius: 6px;
    }

    .timeline-description {
        font-size: 13px;
    }

    .education-card {
        padding: 16px;
        margin-bottom: 10px;
    }

    .education-degree {
        font-size: 15px;
    }

    .education-institution {
        font-size: 13px;
    }

    .interest-tag {
        padding: 8px 14px;
        font-size: 13px;
    }

    .contact-card {
        padding: 20px;
        border-radius: 12px;
    }

    .contact-card h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .contact-item {
        padding: 14px;
        gap: 12px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .contact-icon svg {
        width: 18px;
        height: 18px;
    }

    .contact-value {
        font-size: 13px;
    }

    .form-textarea {
        min-height: 100px;
        padding: 14px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 14px 24px;
        font-size: 13px;
    }

    .modal-content {
        width: 100%;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-icon {
        font-size: 48px;
        margin-bottom: 14px;
    }

    .modal-description {
        font-size: 13px;
    }

    .modal-tech-tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    .fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 16px;
    }

    .fab svg {
        width: 20px;
        height: 20px;
    }

    footer {
        padding: 24px 0;
        margin-top: 24px;
    }

    .footer-logo {
        font-size: 16px;
    }

    .footer-text {
        font-size: 11px;
    }
}

/* ── Small phones ≤360px ── */
@media (max-width: 360px) {
    .avatar-ring {
        width: 70px;
        height: 70px;
    }

    .avatar {
        font-size: 24px;
    }

    .username {
        font-size: 16px;
    }

    .profile-stats {
        gap: 14px;
    }

    .stat-number {
        font-size: 14px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stories-bar {
        gap: 6px;
    }

    .story-ring {
        width: 48px;
        height: 48px;
    }

    .story-avatar {
        font-size: 16px;
        border-width: 2px;
    }

    .story-username {
        font-size: 9px;
        max-width: 48px;
    }

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

    .project-thumbnail {
        font-size: 24px;
    }

    .tab-item svg {
        width: 18px;
        height: 18px;
    }

    .section-heading {
        font-size: 16px;
    }

    .timeline-role {
        font-size: 14px;
    }

    .company-logos {
        gap: 8px;
    }

    .company-logo {
        height: 18px;
        padding: 3px 8px;
    }

    .contact-card {
        padding: 16px;
    }

    .contact-item {
        padding: 12px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* ── Story Modal ── */
.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.story-modal.active {
    display: flex;
}

.story-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
}

.story-modal-container {
    position: relative;
    width: 420px;
    max-width: 95vw;
    height: 80vh;
    max-height: 720px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: storyZoomIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transition: background 0.5s ease;
}

@keyframes storyZoomIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

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

.story-progress-bar {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    position: relative;
    z-index: 2;
}

.story-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.story-progress-segment.done .story-progress-segment-fill {
    width: 100%;
    background: #fff;
    height: 100%;
    border-radius: 3px;
}

.story-progress-segment.active .story-progress-segment-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    animation: storyProgress 10s linear forwards;
}

@keyframes storyProgress {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.story-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    position: relative;
    z-index: 2;
}

.story-modal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.story-modal-user {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-modal-username {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.story-modal-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.story-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    transition: background 0.2s;
}

.story-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.story-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    animation: storyFadeSlide 0.4s ease;
}

@keyframes storyFadeSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s, transform 0.2s;
}

.story-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.story-nav-prev {
    left: 10px;
}

.story-nav-next {
    right: 10px;
}

/* ── Story Slide Content ── */
.story-slide-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    animation: storyBounce 0.6s ease;
}

@keyframes storyBounce {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.story-slide-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.story-slide-subtitle {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 12px;
    font-weight: 600;
}

.story-slide-divider {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    margin: 12px auto;
}

.story-slide-text {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 8px;
    max-width: 320px;
}

.story-slide-detail {
    font-size: 15px;
    margin-bottom: 6px;
}

.story-detail-label {
    font-weight: 700;
    opacity: 0.9;
}

.story-slide-quote {
    font-size: 15px;
    font-style: italic;
    margin-top: 16px;
    opacity: 0.85;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* Tags */
.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.story-tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(4px);
    transition: transform 0.2s, background 0.2s;
}

.story-tag:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.3);
}

/* Skill Bars */
.story-skill-bars {
    width: 100%;
    max-width: 300px;
    margin-top: 16px;
}

.story-skill-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.story-skill-row span {
    width: 100px;
    text-align: right;
    flex-shrink: 0;
}

.story-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.story-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), #fff);
    border-radius: 8px;
    animation: storyBarGrow 1s ease forwards;
}

@keyframes storyBarGrow {
    from {
        width: 0%;
    }
}

/* Cert Badges */
.story-cert-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.story-cert-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.story-cert-emoji {
    font-size: 28px;
}

/* Edu Logo */
.story-edu-logo {
    margin: 16px 0;
    animation: storyBounce 0.8s ease;
}

@media (max-width: 576px) {
    .story-modal-container {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .story-modal-body {
        padding: 20px 40px;
    }

    .story-slide-title {
        font-size: 22px;
    }

    .story-slide-icon {
        font-size: 48px;
    }

    .story-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.2);
    }
}