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

html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-secondary);
    scroll-behavior: smooth;
}

::selection {
    background: rgba(194, 42, 61, 0.3);
    color: white;
}

:root {
    --color-primary: #c22a3d;
    --color-secondary: #121212;
    --color-surface: #1d1a2452;
    --color-text: #dce0e5;
    --color-text-muted: #afafafe1;
    --color-glow: rgba(194, 42, 61, 0.4);
}

body {
    background-color: var(--color-secondary);
    background-image: radial-gradient(rgba(194, 42, 61, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: Poppins, sans-serif;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: transparent;
    max-width: 1180px;
    width: 100%;
    margin: auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* --- Scroll Reveal --- */

[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="left"] {
    transform: translateX(-40px);
}

[data-reveal="right"] {
    transform: translateX(40px);
}

[data-reveal="scale"] {
    transform: scale(0.9);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ============================================================
   NAVIGATION — Desktop base
   ============================================================ */

#main-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
    top: 0;
    position: sticky;
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(194, 42, 61, 0.1);
    overflow: hidden;
    padding: 20px 24px;
    transition: background 0.3s ease;
}

#main-nav.scrolled {
    background: rgba(18, 18, 18, 0.85);
    border-bottom: 1px solid rgba(194, 42, 61, 0.2);
}

#main-nav a {
    color: white;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

#main-nav a:hover::after,
#main-nav a.active::after {
    width: 100%;
}

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

.lang-toggle {
    background: transparent;
    border: 1px solid rgba(194, 42, 61, 0.4);
    color: var(--color-primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-left: 12px;
}

.lang-toggle:hover {
    background: var(--color-primary);
    color: white;
}

#responsive-nav {
    position: relative;
    padding: 10px;
    display: none;
}

.mobile-nav-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

#menu-icon {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

#menu-icon:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 40px;
    left: 20px;
    width: 200px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(194, 42, 61, 0.15);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
    overflow: hidden;
}

.nav-links.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links li:last-child {
    border-bottom: none;
}

.nav-links li a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 12px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(194, 42, 61, 0.1);
    color: var(--color-primary);
}

/* Shared focus styles */
#main-nav a:focus-visible,
#responsive-nav a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ============================================================
   SECTIONS — Desktop base
   ============================================================ */

section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- Section Titles (desktop base: 80px) --- */

#experience-title,
#skills-title,
#projects-title,
#certs-title {
    font-size: 80px;
    font-weight: 900;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: var(--color-primary);
    width: 100%;
    letter-spacing: 0.4rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

#experience-title::after,
#skills-title::after,
#projects-title::after,
#certs-title::after,
#papers-title::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 12px auto 0;
    border-radius: 2px;
}

#experience-title.revealed::after,
#skills-title.revealed::after,
#projects-title.revealed::after,
#certs-title.revealed::after,
#papers-title.revealed::after {
    width: 80px;
}

/* ============================================================
   HERO — Desktop base
   ============================================================ */

#first-sec {
    min-height: 85vh;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}


#img {
    height: 50vh;
    width: 45vh;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-image:
        linear-gradient(var(--color-secondary), var(--color-secondary)),
        linear-gradient(135deg, var(--color-primary), #ff6b6b, var(--color-primary));
    background-size: 100% 100%, 200% 200%;
    animation: gradientBorder 4s ease infinite;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(194, 42, 61, 0.2);
}

#img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes gradientBorder {
    0%, 100% { background-position: 0% 0%, 0% 50%; }
    50% { background-position: 0% 0%, 100% 50%; }
}

#bio {
    display: block;
    max-width: 680px;
    color: white;
}

#bio > *:not(.avatar) {
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

.avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(194, 42, 61, 0.3);
    float: right;
    margin-left: 24px;
    margin-bottom: 12px;
}

#bio h3 {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 30px;
    color: var(--color-primary);
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 30px var(--color-glow);
}

#bio p {
    text-align: justify;
    line-height: 1.8;
    font-size: 1.05rem;
}

.tagline {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 1rem;
    min-height: 1.5em;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--color-primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.f-media-interest {
    color: var(--color-primary);
    font-weight: bold;
}

/* --- Highlights (Awards) --- */

.highlights {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
    width: fit-content;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--color-text);
    padding: 6px 12px;
    background: rgba(194, 42, 61, 0.06);
    border: 1px solid rgba(194, 42, 61, 0.12);
    border-radius: 6px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.highlight-item:hover {
    background: rgba(194, 42, 61, 0.12);
    border-color: rgba(194, 42, 61, 0.3);
    transform: translateX(6px);
}

.highlight-item i {
    color: #ffcc00;
    font-size: 13px;
    width: 16px;
    text-align: center;
    filter: drop-shadow(0 0 4px rgba(255, 204, 0, 0.4));
}

/* --- Social / Media Links --- */

#media {
    color: var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.media-links {
    display: flex;
    gap: 8px;
}

.media-links a {
    font-style: normal;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(194, 42, 61, 0.2);
    transition: all 0.3s ease;
    background: transparent;
}

.media-links a:hover {
    background: rgba(194, 42, 61, 0.12);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(194, 42, 61, 0.2);
}

#media i {
    font-size: 20px;
    cursor: pointer;
    margin: 0;
    color: white;
    transition: color 0.3s ease;
}

.media-links a:hover i {
    color: var(--color-primary);
}

.imp-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.imp-links a {
    margin: 0;
    padding: 8px 20px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(194, 42, 61, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.imp-links a:hover {
    background: rgba(194, 42, 61, 0.12);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(194, 42, 61, 0.15);
}

/* --- Education --- */

#education {
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease, max-height 0.5s ease;
    height: max-content;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

#education h4 {
    color: var(--color-primary);
    font-weight: 900;
    margin-bottom: 5px;
}

.school {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 0 10px;
}

.school p {
    margin: 0;
}

.school p:first-child {
    flex: 1;
}

.school p:last-child {
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}

.group {
    margin: 3px 0;
    padding: 8px 0;
    border-left: 2px solid rgba(194, 42, 61, 0.2);
    padding-left: 12px;
}

/* ============================================================
   EXPERIENCE — Desktop base
   ============================================================ */

#experience {
    flex-direction: column;
    align-items: center;
    min-height: 60vh;
    max-width: 100%;
    padding: 80px 20px;
}

#experience-list {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Company Group --- */

.exp-group {
    color: white;
    background: linear-gradient(135deg, rgba(194, 42, 61, 0.03), rgba(194, 42, 61, 0.01));
    border: 1px solid rgba(194, 42, 61, 0.08);
    border-left: 3px solid rgba(194, 42, 61, 0.25);
    border-radius: 4px 12px 12px 4px;
    padding: 24px;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.exp-group:hover {
    border-color: rgba(194, 42, 61, 0.2);
    border-left-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(194, 42, 61, 0.08);
}

/* --- Company Header (logo + name) --- */

.exp-company-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(194, 42, 61, 0.08);
}

.exp-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px;
}

.exp-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 18px;
    flex-shrink: 0;
}

.exp-company-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-company {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

.exp-location {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* --- Roles within a company --- */

.exp-roles {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.exp-role {
    padding-left: 16px;
    border-left: 2px solid rgba(194, 42, 61, 0.12);
    transition: border-color 0.3s ease;
}

.exp-role:hover {
    border-left-color: rgba(194, 42, 61, 0.4);
}

.exp-role-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.exp-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.exp-type {
    font-size: 0.65rem;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-primary);
    background: rgba(194, 42, 61, 0.08);
    border: 1px solid rgba(194, 42, 61, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.exp-period {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: 'Courier New', Courier, monospace;
    display: block;
    margin-top: 2px;
}

.exp-desc {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text);
}

/* ============================================================
   SKILLS — Desktop base (12-col bento)
   ============================================================ */

#skills {
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
}

#skills-grid {
    color: white;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: min-content;
    gap: 14px;
    width: 100%;
    max-width: 1000px;
}

.skill:nth-child(1) { grid-column: span 7; }
.skill:nth-child(2) { grid-column: span 5; }
.skill:nth-child(3) { grid-column: span 4; }
.skill:nth-child(4) { grid-column: span 8; }
.skill:nth-child(5) { grid-column: span 5; }
.skill:nth-child(6) { grid-column: span 7; }
.skill:nth-child(7) { grid-column: span 5; }

.skill {
    background: linear-gradient(135deg, rgba(194, 42, 61, 0.04), rgba(194, 42, 61, 0.01));
    border: 1px solid rgba(194, 42, 61, 0.08);
    border-left: 3px solid rgba(194, 42, 61, 0.25);
    border-radius: 4px 12px 12px 4px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.skill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(194, 42, 61, 0.06), transparent 70%);
    pointer-events: none;
}

.skill:hover {
    border-color: rgba(194, 42, 61, 0.3);
    border-left-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(194, 42, 61, 0.1), 0 0 0 1px rgba(194, 42, 61, 0.04);
    background: linear-gradient(135deg, rgba(194, 42, 61, 0.07), rgba(194, 42, 61, 0.02));
}

.skill > p {
    text-align: left;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: var(--color-primary);
    margin-bottom: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(194, 42, 61, 0.1);
}

.icons {
    padding: 6px 0;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.icons i {
    margin: 0;
    filter: grayscale(100%) brightness(0.8);
    font-size: 32px;
    width: 46px;
    height: 46px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.4s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    color: white;
    cursor: default;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.icons i:hover {
    filter: none;
    transform: scale(1.1) translateY(-2px);
    background: rgba(194, 42, 61, 0.06);
    border-color: rgba(194, 42, 61, 0.15);
}

/* --- Security Tools Pills --- */

.security-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 4px 0;
}

.security-pill {
    padding: 4px 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: default;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.security-pill i {
    font-size: 0.65rem;
    color: var(--color-primary);
    opacity: 0.8;
}

.security-pill:hover {
    background: rgba(194, 42, 61, 0.08);
    border-color: rgba(194, 42, 61, 0.2);
    color: var(--color-primary);
}

.security-pill:hover i {
    opacity: 1;
}

.security-label {
    width: 100%;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-top: 12px;
    padding-bottom: 0;
    opacity: 0.5;
}

.security-label:first-child {
    margin-top: 2px;
}

.security-tools.compact {
    padding: 4px 0;
    gap: 6px;
}

/* ============================================================
   CERTIFICATIONS — Desktop base
   ============================================================ */

#certs-section {
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
}

.cert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 800px;
    width: 100%;
}

.cert-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--color-surface);
    border: 1px solid rgba(194, 42, 61, 0.12);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.cert-badge:hover {
    background: rgba(194, 42, 61, 0.08);
    border-color: rgba(194, 42, 61, 0.3);
    transform: translateY(-2px);
}

.cert-badge i {
    color: var(--color-primary);
    font-size: 14px;
}

.cert-badge.pursuing {
    opacity: 0.7;
    border-style: dashed;
}

.cert-badge.pursuing i {
    color: var(--color-text-muted);
}

.cert-pursuing {
    margin-top: 24px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pursuing-label {
    color: var(--color-text-muted);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.view-all-certs {
    margin-top: 24px;
    color: var(--color-primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(194, 42, 61, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.view-all-certs:hover {
    background: rgba(194, 42, 61, 0.12);
    border-color: var(--color-primary);
}

/* ============================================================
   PROJECTS — Desktop base (2-col grid)
   ============================================================ */

#projects-section {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    padding: 80px 20px;
}

.projects-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 2px;
    text-transform: lowercase;
    margin-top: -20px;
    margin-bottom: 30px;
}

#projects {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project {
    color: white;
    background: linear-gradient(135deg, rgba(194, 42, 61, 0.04), rgba(194, 42, 61, 0.01));
    border: 1px solid rgba(194, 42, 61, 0.08);
    border-left: 3px solid rgba(194, 42, 61, 0.25);
    border-radius: 4px 12px 12px 4px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.project:hover {
    border-color: rgba(194, 42, 61, 0.2);
    border-left-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(194, 42, 61, 0.08);
}

.project:hover .repo-image img {
    transform: scale(1.05);
}

.repo-image {
    border-radius: 8px;
    width: 100%;
    height: auto;
    overflow: hidden;
    border: 1px solid rgba(194, 42, 61, 0.1);
}

.repo-image img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.repo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.repo-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

.repo-host {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(194, 42, 61, 0.15);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.repo-host:hover {
    background: rgba(194, 42, 61, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.repo-desc {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--color-text);
}

.repo-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.repo-language {
    font-family: 'Courier New', Courier, monospace;
    padding: 3px 10px;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: var(--color-text);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.project:hover .repo-language {
    background: rgba(194, 42, 61, 0.08);
    border-color: rgba(194, 42, 61, 0.2);
    color: var(--color-primary);
}

/* ============================================================
   PAPERS — Desktop base
   ============================================================ */

#papers-section {
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
}

#papers-title {
    font-size: 40px;
    font-weight: 900;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: var(--color-primary);
    width: 100%;
    letter-spacing: 0.2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

#papers-list {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.paper {
    background: linear-gradient(135deg, rgba(194, 42, 61, 0.03), rgba(194, 42, 61, 0.01));
    border: 1px solid rgba(194, 42, 61, 0.08);
    border-left: 3px solid rgba(194, 42, 61, 0.25);
    border-radius: 4px 12px 12px 4px;
    padding: 20px 22px;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.paper:hover {
    border-color: rgba(194, 42, 61, 0.2);
    border-left-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(194, 42, 61, 0.08);
}

.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.paper-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.paper-link {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.paper-link:hover {
    color: var(--color-primary);
}

.paper-authors {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: 'Courier New', Courier, monospace;
    margin-top: 4px;
    opacity: 0.7;
}

.paper-take {
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text);
    font-style: italic;
    padding-left: 12px;
    border-left: 2px solid rgba(194, 42, 61, 0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    border-top: 1px solid rgba(194, 42, 61, 0.2);
    padding: 24px 0;
    width: 100%;
    max-width: 1180px;
    color: var(--color-text-muted);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
}

/* ============================================================
   TABLET — max-width: 1000px (skills grid collapses to 2-col)
   ============================================================ */

@media screen and (max-width: 1000px) {
    #skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill:nth-child(1) { grid-column: span 2; }
    .skill:nth-child(2) { grid-column: span 2; }
    .skill:nth-child(3) { grid-column: span 1; }
    .skill:nth-child(4) { grid-column: span 1; }
    .skill:nth-child(5) { grid-column: span 1; }
    .skill:nth-child(6) { grid-column: span 1; }
    .skill:nth-child(7) { grid-column: span 2; }
}

/* ============================================================
   MOBILE — max-width: 800px
   ============================================================ */

@media screen and (max-width: 800px) {
    /* --- Navigation: hide desktop, show hamburger --- */
    #main-nav {
        display: none;
    }

    #responsive-nav {
        display: initial;
    }

    /* --- Sections --- */
    section {
        padding: 0;
    }

    /* --- Section Titles: smaller --- */
    #experience-title,
    #skills-title,
    #projects-title,
    #certs-title {
        font-size: 40px;
        margin-bottom: 20px;
    }

    /* --- Hero --- */
    #first-sec {
        flex-direction: column-reverse;
        margin-top: 2rem;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    #img {
        width: 85%;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    #bio {
        flex-basis: content;
        padding: 1rem;
    }

    h1 {
        font-size: 40px;
    }

    #bio h3 {
        font-size: 18px;
    }

    #bio p {
        text-align: justify;
        line-height: 25px;
        font-size: 16px;
        line-break: strict;
    }

    /* --- Education --- */
    .school {
        flex-direction: column;
        align-items: flex-start;
    }

    .school p {
        margin: 5px 0;
    }

    /* --- Experience --- */
    #experience {
        padding: 40px 10px;
    }

    .exp-group {
        padding: 18px 14px;
    }

    .exp-company-header {
        gap: 12px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .exp-logo {
        width: 36px;
        height: 36px;
        padding: 4px;
    }

    .exp-logo-placeholder {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .exp-company {
        font-size: 0.9rem;
    }

    .exp-role {
        padding-left: 12px;
    }

    .exp-role-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* --- Skills: single column --- */
    #skills {
        padding: 40px 10px;
    }

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

    .skill:nth-child(n) {
        grid-column: 1 / -1;
    }

    .skill {
        padding: 20px 14px;
    }

    .skill > p {
        font-size: 0.78rem;
    }

    .icons i {
        width: 38px;
        height: 38px;
    }

    .security-pill {
        padding: 4px 10px;
    }

    /* --- Certifications --- */
    #certs-section {
        padding: 40px 10px;
    }

    .cert-badge {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    /* --- Projects: single column --- */
    #projects-section {
        padding: 40px 10px;
    }

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

    /* --- Papers --- */
    #papers-section {
        padding: 40px 10px;
    }

    #papers-title {
        font-size: 22px;
        letter-spacing: 0.1rem;
    }
}

/* ============================================================
   SMALL MOBILE — max-width: 480px
   ============================================================ */

@media (max-width: 480px) {
    #education h4 {
        font-size: 1rem;
    }

    .school {
        padding: 0;
    }

    .school p {
        font-size: 0.7rem;
    }

    .highlight-item {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

