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

:root {
    --color: #ffffff;
    --bg-color: #1a1a1a;
    --bg-transparent: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --heading-color: #999999;
    --accent-color: #cccccc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color);
    padding: 1rem 0;
}

.card {
    background: var(--bg-transparent);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    width: 90vw;
    max-width: 600px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
}

.header {
    margin-bottom: 3rem;
}

.name-section {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    margin-bottom: 1rem;
}

.name {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color);
}

.codewars-badge img {
    height: 32px;
    border-radius: 6px;
}

.status {
    color: var(--heading-color);
    font-size: 1.1rem;
    font-weight: 400;
}

.platforms {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.platforms-title,
.projects-title {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 320px;
    margin: 0 auto;
}

.platform-item {
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.platform-item.active {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.platform-item.empty {
    background: rgba(255, 255, 255, 0.02);
    background-image: url(../img/web.svg);
    background-position: 0 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: default;
}

.platform-item.active:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.platform-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.platform-item:hover .platform-icon {
    transform: scale(1.1);
}

.info-grid {
    display: grid;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    grid-template-areas:
        "time"
        "user-time"
        /* "location" */
        "status"
        "empty"
        "quote";
}

.info-item--time {
    grid-area: time;
}

.info-item--location {
    grid-area: location;
}

.info-item--status {
    grid-area: status;
}

.info-item--quote {
    grid-area: quote;
}

.info-item--empty {
    grid-area: empty;
}

.info-item--user-time {
    grid-area: user-time;
}

.info-subtitle {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}


.info-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.info-title {
    color: #999999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.info-value {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

.time-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.quote-text {
    font-size: 1rem;
    line-height: 1.4;
    color: #cccccc;
    font-style: italic;
}

.quote-author {
    font-size: 0.85rem;
    color: #666666;
    margin-top: 0.5rem;
}

.loading {
    color: #666666;
    font-size: 0.9rem;
}

.svg-icon {
    width: 80%;
    height: 80%;
    fill: #000000;
    transition: fill 0.3s ease;
}

@media (min-width: 450px) {
    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "time user-time"
            "status empty"
            "quote quote";
    }


}

@media(min-width: 600px) {
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-template-areas: none;
    }

    .info-item {
        grid-area: auto;
    }

    .info-item--quote {
        grid-column: span 2;
    }
}

@media (min-width: 800px) {
    .platform-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .platform-item {
        width: 72px;
        height: 72px;
    }

    .card {
        padding: 3rem;
    }

    .name-section {
        flex-direction: initial;
        align-items: center;
        justify-content: center;
    }

    .platform-item.empty {
        background-position: center;
    }
}

.celebration-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #e0e0e0;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celebration-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: #e0e0e0;
}

.celebration-btn:active {
    transform: translateY(0);
}

.info-item.empty {
    background: transparent;
    /* прибираємо градієнт */
    opacity: 1;
    padding: 0;
    /* щоб кнопка займала весь простір */
}

/* PROJECTS */
/* ========== PROJECTS SECTION ========== */

.projects-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.projects-title {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

.project-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.project-header {
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.project-header-content {
    width: 100%;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.project-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.project-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.project-status.live {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.project-status.progress {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.project-status.archived {
    background: rgba(244, 67, 54, 0.15);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.project-description {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* SVG Arrow */
.arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    margin-top: 2px;
}

.arrow svg {
    width: 100%;
    height: 100%;
}

.project-item.active .arrow {
    transform: rotate(180deg);
    color: #999;
}

/* Accordion Content - плавна анімація */
.project-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    opacity: 0;
    padding: 0 1.5rem;
}

.project-item.active .project-content {
    max-height: 600px;
    padding: 0 1.5rem 1.5rem;
    opacity: 1;
}

/* Tech tags */
.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.4s ease 0.1s both;
}

.project-item:not(.active) .project-tech {
    animation: none;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Project links with arrow animation */
.project-links {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    animation: fadeInUp 0.4s ease 0.2s both;
}

.project-item:not(.active) .project-links {
    animation: none;
}

.project-links a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.project-links a::after {
    content: '→';
    display: inline-block;
    transition: transform 0.2s ease;
}

.project-links a:hover {
    color: #ffffff;
}

.project-links a:hover::after {
    transform: translateX(4px);
}

/* Meta info */
.project-meta {
    font-size: 0.85rem;
    color: #666;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeInUp 0.4s ease 0.3s both;
}

.project-item:not(.active) .project-meta {
    animation: none;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive */
@media (max-width: 600px) {
    .project-title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .project-name {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .arrow {
        margin-top: 0;
    }
}


.info-item--status .info-value {
    display: inline-block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.info-item--status .info-value {
    animation: fadeIn 0.5s ease;
}