@font-face {
    font-family: 'Azonix';
    src: url('Azonix.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #2B2A33;
    --fg: #edddd4;
    --muted: #999999;
    --border: #6B697A;
    --accent: #6B697A;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light mode overrides */

body.light {
    --bg: #edddd4;
    --fg: #414149;
    --muted: #555;
    --border: #6B697A;
    --accent: #414149;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================
   MAIN PAGE STYLES
   ======================================== */

/* Header / Hero Section */

#main-content header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

.logo-container {
    margin-bottom: 32px;
}

#logo-light {
    display: none;
}

body.light #logo-light {
    display: inline;
}

body.light #logo-dark {
    display: none;
}

#main-content h1 {
    font-size: 42px;
    margin: 24px 0 8px;
    font-weight: 600;
    font-family: 'Azonix', system-ui, sans-serif;
    letter-spacing: 2px;
}

.tagline {
    font-size: 20px;
    margin: 8px 0 24px;
    color: var(--muted);
    font-weight: normal;
}

#main-content .intro {
    color: var(--fg);
    margin: 24px auto;
    max-width: 900px;
    font-size: 16px;
    line-height: 1.8;
}

.cta-container {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    cursor: pointer;
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.btn-primary:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--fg);
    color: var(--bg);
    transform: translateY(-2px);
}

/* Services Section */

.section {
    margin: 80px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 16px;
    text-align: center;
    padding-bottom: 12px;
    font-family: 'Azonix', system-ui, sans-serif;
    letter-spacing: 1px;
}

.section-description {
    text-align: center;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 48px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.service-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:nth-child(1) {
    --accent: #e06c75;
}

.service-card:nth-child(2) {
    --accent: #61afef;
}

.service-card:nth-child(3) {
    --accent: #c678dd;
}

.service-card:nth-child(4) {
    --accent: #56b6c2;
}

.service-card:nth-child(5) {
    --accent: #c9a34e;
}

.service-card:nth-child(6) {
    --accent: #7aab58;
}

.service-card:nth-child(7) {
    --accent: #b87d3a;
}

.service-card:nth-child(8) {
    --accent: #be5046;
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.service-icon {
    font-size: 30px;
    margin-bottom: 0;
    color: var(--accent);
    font-weight: 300;
}

.service-card h3 {
    font-size: 20px;
    margin: 0;
}

.service-card p {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

/* Tech Stack Section */

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.tech-badge {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    background: var(--bg);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    border-color: var(--fg);
    transform: scale(1.05);
}

/* Experience Highlights */

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

.highlight-item {
    text-align: center;
    padding: 24px;
}

.highlight-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 8px;
}

.highlight-label {
    color: var(--muted);
    font-size: 16px;
}

/* Contact Section */

.contact-section {
    text-align: center;
    padding: 60px 22px;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin: 80px 0;
}

.contact-section h2 {
    font-size: 32px;
    margin-bottom: 16px;

    @media (max-width: 699px) {
        font-size: 28px;
    }
}

.contact-section p {
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 18px;
}

.contact-section p.mail {
    font-size: 22px;
}

.contact-info {
    font-size: 20px;
    color: var(--fg);
    margin: 24px 0;
}

.contact-info a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

.contact-info a:hover {
    border-color: var(--fg);
}

/* Footer */

footer {
    margin-top: 60px;
    padding: 32px 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--fg);
}

/* Theme Toggle */

#themeToggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--fg);
    z-index: 1000;
    transition: transform 0.3s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

#themeToggle:hover {
    transform: scale(1.1);
}

@media (max-width: 699px) {
    #themeToggle {
        top: auto;
        bottom: 1rem;
        right: 0.5rem;
    }

    #main-content h1 {
        font-size: 32px;
    }

    .tagline {
        font-size: 18px;
    }

    .section-title {
        font-size: 26px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 20px;
    }

    .service-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .service-card h3 {
        font-size: 18px;
        margin: 0;
    }

    .service-card p {
        font-size: 14px;
    }

    .service-icon {
        font-size: 22px;
        margin-bottom: 0;
    }

    .section {
        margin: 48px 0;
    }

    .cta-container {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }
}

/* ========================================
   CV PAGE STYLES
   ======================================== */

#cv-content {
    display: none;
}

#cv-content.active {
    display: block;
}

#main-content.hidden {
    display: none;
}

#cv-content .container {
    max-width: 1500px;
}

#cv-content header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

#cv-content header .logo-container {
    cursor: pointer;
    display: inline-block;
}

#cv-content header .logo-container:hover {
    opacity: 0.8;
}

#cv-content h1 {
    font-size: 32px;
    margin: 0;
}

#cv-content h2.cv-subtitle {
    font-size: 18px;
    margin: 4px 0 16px;
    font-weight: normal;
    color: var(--muted);
}

#cv-content p.intro {
    color: var(--muted);
    margin: 0 auto;
    max-width: 50%;
    font-size: 14px;
    line-height: 1.5;
}

#cv-content section {
    margin-bottom: 32px;
}

#cv-content section>h3 {
    margin-bottom: 12px;
    padding-bottom: 4px;
    font-family: 'Azonix', system-ui, sans-serif;
    letter-spacing: 1px;
}

.work-item {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent, var(--border));
    border-radius: 8px;
    background: var(--bg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.work-item:nth-of-type(1) { --accent: #e06c75; }
.work-item:nth-of-type(2) { --accent: #61afef; }
.work-item:nth-of-type(3) { --accent: #c678dd; }
.work-item:nth-of-type(4) { --accent: #56b6c2; }
.work-item:nth-of-type(5) { --accent: #c9a34e; }
.work-item:nth-of-type(6) { --accent: #7aab58; }
.work-item:nth-of-type(7) { --accent: #b87d3a; }
.work-item:nth-of-type(8) { --accent: #be5046; }
.work-item:nth-of-type(9) { --accent: #d19a66; }
.work-item:nth-of-type(10) { --accent: #e06c75; }


.work-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.work-head-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.work-head h4 {
    margin: 0;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-head h5 {
    margin: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-head .meta {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

.toggle-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--accent, var(--border));
    background: var(--bg);
    color: var(--accent, var(--fg));
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
}

.work-body {
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
    margin-top: 10px;
}

.work-body.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.work-item ul {
    padding-left: 20px;
    margin: 0 0 10px 0;
}

.work-item ul li {
    margin-bottom: 6px;
    color: var(--fg);
}

.projects-list {
    padding-left: 20px;
}

@media (min-width: 700px) {
    .two-column {
        display: flex;
        gap: 32px;
        flex-wrap: wrap;
        >div:nth-child(1) {
            flex: 2;
        }
        >div:nth-child(2) {
            flex: 1;
        }
        >div:nth-child(3) {
            flex: 100%;
        }
    }
    .main {
        flex: 2;
    }
    .sidebar {
        flex: 1;
        padding-left: 24px;
    }
}

@media (max-width: 699px) {
    .two-column {
        flex-direction: column;
    }
    .work-head {
        gap: 8px;
    }
    .work-head-left h4 {
        font-size: 15px;
    }
    .toggle-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    #cv-content p.intro {
        max-width: 100%;
        padding: 0 8px;
    }
    .project-item .meta {
        max-width: 250px;
    }
    #cv-content .container {
        padding: 0;
    }
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    background: var(--bg);
}

.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    background: var(--bg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--fg);
}

.card h3 {
    margin-top: 0;
    padding-bottom: 0;
    margin-bottom: 16px;
    font-family: 'Azonix', system-ui, sans-serif;
    letter-spacing: 1px;
}

.education-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.education-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.education-list li:last-child {
    border-bottom: none;
}

.project-item {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent, var(--border));
    border-radius: 8px;
    background: var(--bg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-item:nth-of-type(1) { --accent: #61afef; }
.project-item:nth-of-type(2) { --accent: #c678dd; }
.project-item:nth-of-type(3) { --accent: #56b6c2; }
.project-item:nth-of-type(4) { --accent: #c9a34e; }
.project-item:nth-of-type(5) { --accent: #7aab58; }
.project-item:nth-of-type(6) { --accent: #b87d3a; }
.project-item:nth-of-type(7) { --accent: #be5046; }
.project-item:nth-of-type(8) { --accent: #e06c75; }
.project-item:nth-of-type(9) { --accent: #d19a66; }

.project-item .meta {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

.project-item summary {
    cursor: pointer;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-item summary:hover {
    opacity: 0.7;
}

.project-item .arrow {
    appearance: none;
    border: 1px solid var(--accent, var(--border));
    background: var(--bg);
    color: var(--accent, var(--fg));
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 34px;
}

.project-item .content {
    padding: 8px 0 16px 0;
}

details[open]>summary .arrow::before {
    content: "–";
}

details:not([open])>summary .arrow::before {
    content: "+";
}

.project-item summary a {
    color: inherit;
    text-decoration: none;
}

.project-item summary a::after {
    content: " ↗";
    font-size: 1em;
}

#cv-content footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

#cv-content footer p {
    margin: 8px 0;
}

/* CV Logo theme handling */
.cv-logo-light {
    display: none;
}

.cv-logo-dark {
    display: inline;
}

body.light .cv-logo-light {
    display: inline;
}

body.light .cv-logo-dark {
    display: none;
}
