/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent-1: #6c5ce7;
    --accent-2: #a855f7;
    --accent-3: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #a855f7);
    --gradient-accent: linear-gradient(135deg, #a855f7, #06b6d4);
    --gradient-hero: linear-gradient(160deg, #0a0a0f 0%, #1a1030 40%, #0d1525 100%);
    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) var(--bg-secondary);
}

html::-webkit-scrollbar {
    width: 6px;
}

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

html::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 3px;
}

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

a {
    color: var(--accent-2);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-3);
}

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

/* ===== LAYOUT ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* ===== SECTION HEADERS ===== */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 100px;
    width: fit-content;
}

.section-label .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.7;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width var(--transition-smooth);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-settings-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.nav-settings-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    color: var(--accent-2);
    transform: rotate(45deg);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-3);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.2s;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.4s;
}

.hero-name .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-headline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.6s;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.7s;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.8s;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
    color: #fff;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--bg-glass);
    border-color: var(--accent-2);
    color: var(--accent-2);
    transform: translateY(-2px);
}

.hero-avatar-container {
    position: relative;
    opacity: 0;
    animation: fadeInScale 0.8s ease forwards 0.5s;
}

.hero-avatar-ring {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-primary);
    position: relative;
}

.hero-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.2);
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
}

.hero-avatar-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.2) 0%, transparent 70%);
    z-index: -1;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-smooth);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.skill-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.skill-chip:hover {
    border-color: var(--accent-1);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.skill-chip:hover::before {
    opacity: 0.1;
}

.skill-chip span {
    position: relative;
    z-index: 1;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

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

.project-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-secondary);
}

.project-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
}

.project-links {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.project-link:hover {
    color: var(--accent-2);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

/* ===== PUBLICATIONS SECTION ===== */
.publications-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pub-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
}

.pub-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateX(8px);
}

.pub-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-2);
    min-width: 50px;
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.08);
    border-radius: var(--radius-sm);
    text-align: center;
}

.pub-info {
    flex: 1;
}

.pub-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.pub-journal {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--accent-3);
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.pub-link:hover {
    color: var(--accent-2);
    transform: translateX(4px);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-secondary);
    text-align: center;
}

.contact .section-subtitle {
    margin: 0 auto 40px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
}

.contact-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent-2);
    font-size: 1.2rem;
}

.contact-detail {
    text-align: left;
}

.contact-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.contact-detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-smooth);
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* ===== FOOTER ===== */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

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

.footer a {
    color: var(--accent-2);
}

/* ===== SETTINGS PANEL ===== */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-smooth);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
}

.settings-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.settings-close {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.settings-close:hover {
    background: rgba(255, 80, 80, 0.1);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff5050;
}

.settings-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-instruction {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 14px 16px;
    background: rgba(108, 92, 231, 0.06);
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: var(--radius-sm);
}

.settings-instruction code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: var(--accent-3);
}

.settings-textarea {
    flex: 1;
    min-height: 300px;
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 16px;
    resize: none;
    line-height: 1.6;
    transition: border-color var(--transition-fast);
}

.settings-textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.settings-textarea::placeholder {
    color: var(--text-muted);
}

.settings-error {
    font-size: 0.8rem;
    color: #ff5050;
    padding: 10px 14px;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.15);
    border-radius: var(--radius-sm);
    display: none;
}

.settings-error.visible {
    display: block;
}

.settings-success {
    font-size: 0.8rem;
    color: #10b981;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-sm);
    display: none;
}

.settings-success.visible {
    display: block;
}

.settings-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    gap: 12px;
}

.settings-footer .btn-primary,
.settings-footer .btn-outline {
    flex: 1;
    justify-content: center;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

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

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

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-glass);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .hero-avatar-container {
        order: -1;
        justify-self: center;
    }

    .hero-avatar-ring {
        width: 200px;
        height: 200px;
    }

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

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

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .section-title {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }

    .pub-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .contact-cards {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.8rem;
    }

    .hero-headline {
        font-size: 1rem;
    }

    .hero-avatar-ring {
        width: 160px;
        height: 160px;
    }

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

    .settings-panel {
        width: 100vw;
    }
}

/* ===== PIN AUTH MODAL ===== */
.pin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 2001;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-lg);
    width: 360px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pin-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.pin-modal-header {
    padding: 20px 24px 0;
    text-align: center;
}

.pin-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.pin-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.pin-input {
    width: 180px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.8rem;
    letter-spacing: 0.6em;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.pin-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.pin-error {
    font-size: 0.8rem;
    color: #ff4757;
    margin-top: 12px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pin-error.visible {
    opacity: 1;
}

.pin-lockout {
    font-size: 0.75rem;
    color: var(--accent-2);
    margin-top: 4px;
    min-height: 18px;
}

.pin-modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 24px;
}

.pin-modal-footer .btn-primary,
.pin-modal-footer .btn-outline {
    padding: 10px 24px;
    font-size: 0.85rem;
}