:root {
    --navy-950: #0b1422;
    --navy-900: #0f1a2b;
    --navy-800: #16263b;
    --navy-700: #1e2a3e;
    --navy-600: #2e3f57;
    --navy-500: #3a506b;
    --slate-400: #7d97bb;
    --slate-300: #94a9c4;
    --slate-200: #b8ccf0;
    --slate-100: #d0dae8;
    --slate-50:  #eef2f8;
    --paper:      #ffffff;
    --paper-soft: #f5f8fd;
    --ink-900: #0f1a2b;
    --ink-700: #2c3e50;
    --ink-500: #5c6f8a;
    --ink-400: #7a8ba5;
    --accent:        #7aa2f7;
    --accent-strong: #5b8def;
    --accent-glow:   rgba(122, 162, 247, 0.35);
    --accent-soft:   rgba(122, 162, 247, 0.12);
    --shadow-sm: 0 2px 6px rgba(15, 26, 43, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 26, 43, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 26, 43, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background: radial-gradient(1200px 800px at 20% -10%, #dbe4f1 0%, #e8ecf2 40%, #e6ebf3 100%);
    font-family: 'Inter', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-900);
    padding: 2.5rem 1.25rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseRing {
    0%        { transform: scale(1);    opacity: 0.7; }
    80%, 100% { transform: scale(1.18); opacity: 0; }
}

.resume {
    position: relative;
    width: 100%;
    max-width: 1050px;
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: grid;
    grid-template-columns: 34% 66%;
    overflow: hidden;
    animation: cardIn 0.8s var(--ease) both;
}

.sidebar {
    position: relative;
    background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
    color: var(--slate-100);
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    animation: slideInLeft 0.9s var(--ease) 0.1s both;
}

.sidebar::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -90px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(122, 162, 247, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.avatar-wrap {
    display: flex;
    justify-content: center;
    animation: fadeUp 0.7s var(--ease) 0.35s both;
}

.avatar {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(122, 162, 247, 0.55);
    box-shadow:
        0 0 0 6px rgba(122, 162, 247, 0.06),
        0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.avatar::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(122, 162, 247, 0.45);
    animation: pulseRing 3.2s ease-out infinite;
}

.avatar:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 0 0 8px rgba(122, 162, 247, 0.12),
        0 16px 40px rgba(0, 0, 0, 0.45);
}

.name-title {
    text-align: center;
    animation: fadeUp 0.7s var(--ease) 0.45s both;
}

.name-title h1 {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    background: rgba(122, 162, 247, 0.15);
    border: 1px solid rgba(122, 162, 247, 0.4);
    color: #cfe0ff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    transition: background 0.3s var(--ease), color 0.3s var(--ease),
                transform 0.3s var(--ease);
}

.badge:hover {
    background: rgba(122, 162, 247, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeUp 0.7s var(--ease) 0.5s both;
}

.social-links a {
    color: var(--slate-300);
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-links svg {
    width: 1.25rem;
    height: 1.25rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    animation: fadeUp 0.7s var(--ease) 0.55s both;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--slate-100);
    line-height: 1.4;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
                transform 0.25s var(--ease), color 0.25s var(--ease);
    cursor: default;
}

.contact-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--accent);
    stroke: currentColor;
    margin-top: 0.18rem;
    transition: transform 0.25s var(--ease);
}

.contact-item span { word-break: break-word; }

.contact-item:hover {
    background: rgba(122, 162, 247, 0.08);
    border-color: rgba(122, 162, 247, 0.2);
    transform: translateX(4px);
    color: #ffffff;
}

.contact-item:hover svg {
    transform: scale(1.15);
}

.skills-block {
    animation: fadeUp 0.7s var(--ease) 0.65s both;
}

.section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    border-bottom: 1px solid rgba(122, 162, 247, 0.2);
    padding-bottom: 0.55rem;
    margin-bottom: 1.15rem;
}

.skills-group { margin-bottom: 1.25rem; }
.skills-group:last-child { margin-bottom: 0; }

.skills-group h3 {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-300);
    margin-bottom: 0.65rem;
}

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

.skill-tags span {
    background: rgba(255, 255, 255, 0.04);
    color: #dbe6f7;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    line-height: 1.3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.25s var(--ease), color 0.25s var(--ease),
                border-color 0.25s var(--ease), transform 0.25s var(--ease),
                box-shadow 0.25s var(--ease);
    cursor: default;
}

.skill-tags span:hover {
    background: var(--accent-strong);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(91, 141, 239, 0.35);
}

.soft-skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--slate-100);
}

.soft-skills-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.28rem 0;
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.soft-skills-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    flex-shrink: 0;
}

.soft-skills-list li:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.main {
    position: relative;
    background: var(--paper);
    padding: 2.5rem 2.5rem 2.25rem;
    animation: slideInRight 0.9s var(--ease) 0.15s both;
}

.objective {
    font-size: 0.9rem;
    color: var(--ink-700);
    line-height: 1.65;
    margin-bottom: 2rem;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(135deg, #f7f9fd 0%, #eef3fb 100%);
    border-left: 3px solid var(--accent-strong);
    border-radius: var(--radius-sm);
    animation: fadeUp 0.7s var(--ease) 0.45s both;
}

.main-section {
    margin-bottom: 1.75rem;
    animation: fadeUp 0.7s var(--ease) both;
}

.main-section:nth-of-type(1) { animation-delay: 0.55s; }
.main-section:nth-of-type(2) { animation-delay: 0.65s; }
.main-section:nth-of-type(3) { animation-delay: 0.75s; }

.main-section:last-child { margin-bottom: 0; }

.section-title-light {
    position: relative;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-900);
    padding-bottom: 0.55rem;
    margin-bottom: 1.15rem;
    border-bottom: 2px solid var(--slate-50);
}

.section-title-light::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 42px;
    height: 2px;
    background: var(--accent-strong);
    border-radius: 2px;
}

.entry {
    margin: 0 -0.75rem 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

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

.entry:hover {
    background: var(--paper-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 26, 43, 0.06);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    margin-bottom: 0.15rem;
}

.entry-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-900);
    letter-spacing: -0.005em;
}

.entry-org {
    font-weight: 500;
    color: var(--ink-700);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.entry-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.entry-details {
    list-style: none;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-700);
    line-height: 1.55;
}

.entry-details li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.25rem;
}

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

.entry-details li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--slate-400);
    transition: background 0.25s var(--ease);
}

.entry:hover .entry-details li::before {
    background: var(--accent-strong);
}

.activity-item {
    margin: 0 -0.75rem 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

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

.activity-item:hover {
    background: var(--paper-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 26, 43, 0.06);
}

.activity-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.3rem;
}

.activity-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-900);
}

.activity-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.activity-desc {
    font-size: 0.82rem;
    color: var(--ink-700);
    margin-top: 0.25rem;
    line-height: 1.55;
}

@media (max-width: 860px) {
    body { padding: 1.5rem 0.9rem; }

    .resume {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .sidebar { padding: 2rem 1.5rem; }
    .main    { padding: 2rem 1.5rem; }

    .name-title h1 { font-size: 1.6rem; }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .entry-date { align-self: flex-start; }
}

@media (max-width: 520px) {
    body { padding: 1rem 0.6rem; }

    .sidebar { padding: 1.75rem 1.25rem; gap: 1.75rem; }
    .main    { padding: 1.75rem 1.25rem; }

    .avatar { width: 92px; height: 92px; }
    .name-title h1 { font-size: 1.45rem; }

    .objective { font-size: 0.85rem; padding: 0.9rem 1rem; }
    .section-title-light { font-size: 0.72rem; }

    .entry-title,
    .activity-title { font-size: 0.88rem; }

    .entry-details,
    .activity-desc { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    @page { margin: 12mm; }

    body {
        background: #ffffff !important;
        padding: 0 !important;
        display: block !important;
        font-size: 10pt;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        box-shadow: none !important;
    }

    .resume {
        max-width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        grid-template-columns: 34% 66% !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .sidebar {
        background: var(--navy-900) !important;
        color: var(--slate-100) !important;
        padding: 1.4rem 1.2rem !important;
        gap: 1.2rem !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .sidebar::before { display: none !important; }

    .main {
        padding: 1.4rem 1.4rem !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .avatar {
        width: 80px !important;
        height: 80px !important;
    }

    .avatar::before { display: none !important; }

    .name-title h1 { font-size: 1.35rem !important; }
    .social-links { gap: 0.8rem !important; }

    .contact-item,
    .skill-tags span,
    .entry,
    .activity-item {
        background: transparent !important;
        transform: none !important;
    }

    .skill-tags span {
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        background: rgba(255, 255, 255, 0.06) !important;
    }

    .entry-date,
    .activity-date { background: var(--accent-soft) !important; }

    .objective {
        background: #f5f8fd !important;
        margin-bottom: 1rem !important;
        padding: 0.8rem 1rem !important;
    }

    .main-section { margin-bottom: 1rem !important; }
    .entry { margin-bottom: 0.55rem !important; padding: 0 !important; }
    .activity-item { margin-bottom: 0.5rem !important; padding: 0 !important; }

    .section-title-light,
    .section-title { margin-bottom: 0.7rem !important; }

    .avatar-wrap,
    .name-title,
    .contact-info,
    .skills-block,
    .objective,
    .main-section {
        opacity: 1 !important;
        transform: none !important;
    }

    .contact-item svg,
    .social-links svg {
        color: var(--accent) !important;
        stroke: currentColor !important;
        transform: none !important;
    }
}