@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --text: #1a1a1a;
    --text-light: #666;
    --border: #e5e5e5;
    --bg: #f5f5f5;
    --paper: #ffffff;
    --accent: #027dc3;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.document {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Navigation */
.nav {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.profile .name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.profile .title {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.profile .bio {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.profile .contact {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.profile .contact a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 36px;
    height: 36px;
}

.profile .contact a svg {
    flex-shrink: 0;
}

.profile .contact a:hover {
    background: var(--accent);
    color: var(--paper);
    border-color: var(--accent);
}

.profile .cv-download {
    color: var(--paper);
    background: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-top: 1rem;
    width: 100%;
}

.profile .cv-download:hover {
    background: #016ba8;
    border-color: #016ba8;
}

.profile-skills {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.profile-skills h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

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

.skill-tags span {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-light);
    line-height: 1;
}

/* Main Content */
.main-content {
    min-width: 0;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--accent);
}

/* Items */
.list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.item:last-child {
    border-bottom: none;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.item h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.year {
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
}

.company {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.location {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.item a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    transition: opacity 0.2s;
    display: inline-block;
    margin-top: 0.75rem;
}

.item a:hover {
    opacity: 0.6;
}

/* Tags */
.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.tags span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.tags span::after {
    content: "·";
    margin-left: 0.5rem;
}

.tags span:last-child::after {
    content: "";
}

/* Skills */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skills span {
    font-size: 0.95rem;
    color: var(--text-light);
}

.skills span::after {
    content: "·";
    margin-left: 0.75rem;
}

.skills span:last-child::after {
    content: "";
}

/* Certifications */
.cert-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cert-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cert-item h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cert-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cert-item a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--accent);
    transition: opacity 0.2s;
}

.cert-item a:hover {
    opacity: 0.7;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--paper);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 125, 195, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: #016ba8;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(2, 125, 195, 0.4);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: relative;
        top: 0;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .profile .name {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .wrapper {
        padding: 1rem 0.5rem;
    }

    .document {
        padding: 2rem 1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 640px) {
    .document {
        padding: 2rem 1rem;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
