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

body {
    font-family: 'Inter', sans-serif;
    background: #f0f0f0;
    color: #111;
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

.loader {
    position: fixed;
    inset: 0;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

.loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-bar-wrap {
    width: 280px;
    height: 2px;
    background: #d8d8d8;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: #111;
    transition: width 0.15s ease;
}

.loader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #999;
    margin-top: 14px;
}

.intro {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    padding-top: 64px;
}

.intro-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    width: 100%;
    max-width: 1100px;
    padding: 0 60px;
}

.intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-name {
    font-size: clamp(3.5rem, 9vw, 9rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.intro-description {
    font-size: 1.35rem;
    font-weight: 400;
    color: #555;
    line-height: 1.7;
}

.intro-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 2rem;
}

.intro-socials {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #ccc;
    color: #999;
    transition: color 0.2s, border-color 0.2s;
}

.social-btn:hover {
    color: #111;
    border-color: #111;
}

.btn {
    display: inline-block;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-primary {
    background: #111;
    color: #fff;
    padding: 12px 24px;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    width: 175px;
    height: 42px;
}

.btn-primary:hover {
    background: #333;
}

.btn-ghost {
    background: transparent;
    color: #111;
    padding: 12px 0;
    position: relative;
    border-bottom: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.btn-ghost::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

.btn-ghost:hover::after {
    transform: scaleX(1);
}

.btn-ghost:hover {
    gap: 12px;
}

.btn-ghost:hover {
    border-bottom-color: #111;
}

.intro-photo {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.intro-photo img {
    height: 420px;
    width: auto;
    display: block;
    filter: grayscale(100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.btn-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.btn-primary .label-default { opacity: 1; }

.btn-primary:hover .label-default { opacity: 0; }
.btn-primary:hover .label-hover  { opacity: 1; }

.btn-primary.copied .label-default,
.btn-primary.copied .label-hover  { opacity: 0 !important; }
.btn-primary.copied .label-copied { opacity: 1 !important; }

.btn-primary.copied {
    background: #2a7a2a;
}

.sc {
    width: 20px;
    height: 20px;
    display: block;
}

.sc-ring {
    stroke-dasharray: 56.55;
    stroke-dashoffset: 56.55;
}
.sc-check {
    stroke-dasharray: 16;
    stroke-dashoffset: 16;
}

.btn-primary.copied .sc-ring {
    animation: sc-ring 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.btn-primary.copied .sc-check {
    animation: sc-check 0.15s ease forwards 0.23s;
}

@keyframes sc-ring {
    to { stroke-dashoffset: 0; }
}
@keyframes sc-check {
    to { stroke-dashoffset: 0; }
}

.skills {
    background: #f0f0f0;
    border-top: 2px solid #111;
    padding: 120px 0;
}

.skills-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

.skills-title {
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ccc;
    white-space: nowrap;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 64px 48px;
    margin-top: 64px;
}

.skills-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ccc;
}

.skills-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    color: #444;
    padding: 9px 0;
    border-bottom: 1px solid #e4e4e4;
}

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

.skill-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.5;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(240, 240, 240, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #ddd;
}

.navbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
    height: 64px;
    gap: 24px;
}

.navbar-identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
}

.navbar-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #111;
    text-transform: uppercase;
    white-space: nowrap;
}

.navbar-job {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.navbar-dropdown {
    position: relative;
}

.navbar-dropdown-trigger {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.navbar-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(240, 240, 240, 0.98);
    backdrop-filter: blur(8px);
    border: 1px solid #ddd;
    min-width: 200px;
    padding: 8px 0;
    padding-top: 18px;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

.navbar-dropdown:hover .navbar-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.navbar-drop-cat {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbb;
    padding: 8px 16px 4px;
}

.navbar-drop-link {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
    text-decoration: none;
    padding: 6px 16px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.navbar-drop-link:hover,
.navbar-drop-link.active {
    color: #111;
    background: rgba(0,0,0,0.04);
}

.navbar-drop-sep {
    height: 1px;
    background: #e4e4e4;
    margin: 6px 0;
}

.navbar-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaa;
    text-decoration: none;
    padding: 5px 10px;
    white-space: nowrap;
    transition: color 0.2s;
    flex-shrink: 0;
}

.navbar-link:hover,
.navbar-link.active {
    color: #111;
}

.navbar-sep {
    width: 1px;
    height: 14px;
    background: #ccc;
    flex-shrink: 0;
    margin: 0 4px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid #ddd;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.navbar-actions.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.navbar-btn-contact {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #111;
    color: #fff;
    border: none;
    padding: 7px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.navbar-btn-contact:hover {
    background: #333;
}

.contact-wrap {
    position: relative;
    display: inline-flex;
}

.contact-wrap::after {
    content: attr(data-email);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #111;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s, transform 0.18s;
    z-index: 100;
}

.contact-wrap:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.navbar-cv {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
    text-decoration: none;
    padding: 7px 0;
    position: relative;
    white-space: nowrap;
}

.navbar-cv::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0; right: 0;
    height: 1px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.navbar-cv:hover::after {
    transform: scaleX(1);
}

.navbar-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #999;
    border: 1px solid #ccc;
    transition: color 0.2s, border-color 0.2s;
}

.navbar-social:hover {
    color: #111;
    border-color: #111;
}

.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 48px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #ccc;
    color: #999;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, color 0.2s, border-color 0.2s;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    color: #111;
    border-color: #111;
}

.scroll-indicator {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.scroll-indicator.hidden {
    opacity: 0;
}

.scroll-label {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: -8px;
    left: 0;
    width: 1px;
    height: 8px;
    background: #111;
    animation: scroll-drop 1.4s ease-in-out infinite;
}

@keyframes scroll-drop {
    0%   { top: -8px; opacity: 1; }
    80%  { top: 48px; opacity: 1; }
    81%  { top: 48px; opacity: 0; }
    82%  { top: -8px; opacity: 0; }
    100% { top: -8px; opacity: 1; }
}

.projects {
    width: 100%;
    padding: 120px 0;
    background: #fff;
    border-top: 2px solid #111;
}

.projects-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    gap: 240px;
}

.projects-category {
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.projects-count {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #999;
    text-transform: uppercase;
}

.projects-list {
    display: flex;
    flex-direction: column;
}

.project-item {
    display: flex;
    gap: 72px;
    align-items: flex-start;
    padding: 72px 0;
    border-bottom: 1px solid #ddd;
    transition: background 0.25s;
}

.project-media {
    flex-shrink: 0;
    width: 480px;
    height: 270px;
    object-fit: cover;
    display: block;
    background: transparent;
}

.project-video {
    flex-shrink: 0;
    width: 480px;
    height: 270px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.project-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.2s;
}

.project-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.project-video-play:hover {
    background: rgba(0, 0, 0, 0.55);
}

.project-video-iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.project-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.project-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
}

.project-date {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #888;
}

.project-description {
    font-size: 1.25rem;
    font-weight: 400;
    color: #555;
    line-height: 1.75;
}

.project-description ul {
    margin: 0.5em 0;
    padding-left: 1.5em;
    list-style: disc;
}

.project-description li {
    margin-bottom: 0.25em;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.project-tech {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    border: 1px solid #ccc;
    padding: 7px 16px;
}

.tech-icon {
    opacity: 0.55;
    flex-shrink: 0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
    border: 1px solid #bbb;
    padding: 10px 22px;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.link-icon {
    opacity: 0.6;
    flex-shrink: 0;
    transition: filter 0.18s, opacity 0.18s;
}

.project-link:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

.project-link:hover .link-icon {
    filter: grayscale(1) invert(1);
    opacity: 1;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

/* --- Large tablet ≤ 1100px --- */
@media (max-width: 1100px) {

    .projects-inner {
        padding: 0 48px;
    }

    .projects-category {
        font-size: 2.6rem;
        white-space: normal;
        flex-wrap: wrap;
    }

    .skills-inner {
        padding: 0 48px;
    }

    .skills-title {
        font-size: 2.6rem;
        white-space: normal;
    }
}

/* --- Tablet ≤ 900px --- */
@media (max-width: 900px) {

    .navbar-inner {
        grid-template-columns: 1fr auto;
        padding: 0 24px;
    }

    .navbar-job { display: none; }

    .navbar-actions {
        display: none;
    }

    .intro-inner {
        flex-direction: column-reverse;
        align-items: center;
        justify-content: center;
        gap: 32px;
        padding: 0 40px;
        text-align: center;
    }

    .intro-photo img {
        height: 260px;
    }

    .intro-buttons {
        justify-content: center;
    }

    .intro-socials {
        justify-content: center;
    }

    .projects-inner {
        padding: 0 40px;
        gap: 120px;
    }

    .projects-category {
        font-size: 2rem;
        white-space: normal;
        flex-wrap: wrap;
    }

    .project-item {
        flex-direction: column;
        gap: 32px;
        padding: 48px 0;
    }

    .project-video,
    .project-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .project-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .project-title {
        font-size: 2rem;
    }

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

    .skills-inner {
        padding: 0 40px;
    }

    .skills-title {
        font-size: 2.2rem;
    }

    .projects {
        padding: 80px 0;
    }

    .skills {
        padding: 80px 0;
    }
}

/* --- Mobile ≤ 600px --- */
@media (max-width: 600px) {

    .navbar-inner {
        padding: 0 16px;
    }

    .navbar-links {
        justify-content: flex-start;
    }

    .navbar-name {
        font-size: 0.7rem;
    }

    .intro-inner {
        padding: 0 24px;
    }

    .intro-photo { display: none; }

    .intro-description {
        font-size: 1.1rem;
    }

    .intro-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }

    .projects-inner {
        padding: 0 20px;
        gap: 80px;
    }

    .projects-category {
        font-size: 1.6rem;
        white-space: normal;
    }

    .project-title {
        font-size: 1.6rem;
    }

    .project-description {
        font-size: 1rem;
    }

    .project-item {
        padding: 32px 0;
        gap: 24px;
    }

    .skills-inner {
        padding: 0 20px;
    }

    .skills-title {
        font-size: 1.6rem;
        white-space: normal;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 24px;
        margin-top: 40px;
    }

    .projects {
        padding: 60px 0;
    }

    .skills {
        padding: 60px 0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }

    .loader-bar-wrap {
        width: 200px;
    }
}

/* --- Reveal on scroll  */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* --- Footer --- */
.footer {
    background: #111;
    padding: 40px 120px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.footer .navbar-social {
    color: #555;
    border-color: #333;
}

.footer .navbar-social:hover {
    color: #fff;
    border-color: #fff;
    background: transparent;
}

@media (max-width: 600px) {
    .footer {
        padding: 32px 20px;
    }
}