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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.header {
    text-align: center;
    padding: 60px 24px 40px;
}

.header__name {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header__role {
    font-size: 0.9rem;
    color: #888;
    margin-top: 4px;
}

/* --- Projects --- */
.projects {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project__label {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

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

.project__type {
    font-size: 0.8rem;
    color: #999;
}

/* --- Browser frame --- */
.project__browser {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e5e5e5;
}

.browser__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.browser__dots {
    display: flex;
    gap: 6px;
}

.browser__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser__dots span:nth-child(1) { background: #ff5f57; }
.browser__dots span:nth-child(2) { background: #febc2e; }
.browser__dots span:nth-child(3) { background: #28c840; }

.browser__url {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    background: #f0f0f0;
    padding: 5px 16px;
    border-radius: 6px;
}

/* --- Carousel --- */
.carousel {
    position: relative;
    overflow: hidden;
    background: #fff7f9;
}

.carousel__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel__slide {
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.carousel__slide img {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox__img {
    width: 65vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.lightbox__arrow:hover {
    background: #fff;
}

.lightbox__arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.lightbox__arrow--left { left: 24px; }
.lightbox__arrow--right { right: 24px; }

/* Arrows */
.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
    transition: all 0.2s ease;
}

.carousel:hover .carousel__arrow:not(:disabled) {
    opacity: 1;
}

.carousel__arrow:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.carousel__arrow--left { left: 14px; }
.carousel__arrow--right { right: 14px; }

.carousel__arrow:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* Dots */
.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    background: #fff;
}

.carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.carousel__dot.is-active {
    background: #1a1a1a;
    transform: scale(1.25);
}

.carousel__dot:hover:not(.is-active) {
    background: #bbb;
}

/* Tech tags */
.project__tech {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.project__tech span {
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #777;
    font-weight: 500;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid #eee;
}

.footer p {
    font-size: 0.8rem;
    color: #bbb;
}

.footer a {
    color: #999;
    text-decoration: none;
}

.footer a:hover {
    color: #666;
    text-decoration: underline;
}

/* --- Legal page --- */
.legal {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.legal h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 32px;
}

.legal h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 8px;
}

.legal p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

.legal a {
    color: #1a1a1a;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .header { padding: 40px 24px 28px; }
    .projects { gap: 48px; padding-bottom: 48px; }
    .carousel__arrow { opacity: 1 !important; width: 36px; height: 36px; }
    .carousel__arrow:disabled { opacity: 0 !important; }
}
