:root {
    --ar-bg: #1a1a20;
    --ar-panel: #23232b;
    --ar-accent: #fbbf24;
    --ar-text: #ffffff;
    --ar-muted: #9ca3af;
    --ar-border: rgba(255,255,255,.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    background: var(--ar-bg);
    color: var(--ar-text);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.layout {
    display: grid;
    grid-template-columns: 300px 1fr 56px;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--ar-panel);
    border-right: 1px solid var(--ar-border);
    padding: 2rem 1.5rem;
}

.sidebar-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin: 0 auto 1rem;
    border: 3px solid var(--ar-accent);
    background: #fff;
}

.sidebar h1 {
    margin: 0 0 .35rem;
    font-size: 1.35rem;
    text-align: center;
    font-weight: 700;
}

.sidebar-role {
    text-align: center;
    color: var(--ar-muted);
    font-size: .82rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sidebar-block { margin-bottom: 1.5rem; }

.sidebar-block h4 {
    margin: 0 0 .75rem;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.info-list { list-style: none; padding: 0; margin: 0; }

.info-list li {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--ar-border);
}

.info-list span { color: var(--ar-muted); }

.lang-circles {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.lang-circle {
    text-align: center;
    flex: 1;
    min-width: 70px;
}

.lang-circle svg {
    width: 64px;
    height: 64px;
    transform: rotate(-90deg);
    margin: 0 auto;
}

.lang-circle circle.bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; }
.lang-circle circle.progress {
    fill: none; stroke: var(--ar-accent); stroke-width: 6;
    stroke-linecap: round; stroke-dasharray: 188; stroke-dashoffset: 188;
    transition: stroke-dashoffset 1.2s ease;
}
.lang-circle.animate circle.progress { stroke-dashoffset: var(--offset); }
.lang-circle label { display: block; font-size: .72rem; color: var(--ar-muted); margin-top: .35rem; }

.skill-row + .skill-row { margin-top: .85rem; }

.skill-row .label {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    margin-bottom: .35rem;
    text-transform: lowercase;
}

.skill-row .bar {
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
}

.skill-row .bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ar-accent);
    border-radius: 999px;
    transition: width 1.2s ease;
}

.skill-row.animate .bar span { width: var(--percent); }

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: .65rem;
    flex-wrap: wrap;
    padding-top: .5rem;
}

.sidebar-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--ar-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ar-muted);
    font-size: .9rem;
    transition: .25s;
}

.sidebar-social a:hover {
    background: var(--ar-accent);
    border-color: var(--ar-accent);
    color: #111;
}

.main { min-width: 0; }

.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    padding: 3rem 2.5rem;
    overflow: hidden;
    background: linear-gradient(rgba(26,26,32,.75), rgba(26,26,32,.85)), url('../img/hero-bg.jpg') center/cover no-repeat;
}

.hero-content { position: relative; z-index: 2; max-width: 520px; }

.hero h2 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
}

.hero-code {
    font-family: ui-monospace, monospace;
    color: var(--ar-accent);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    min-height: 1.5rem;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--ar-accent);
    color: #111;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .9rem 1.5rem;
    border-radius: 4px;
    transition: transform .2s;
}

.btn-explore:hover { transform: translateY(-2px); color: #111; }

.hero-person {
    position: absolute;
    right: 2rem;
    bottom: 0;
    width: min(42%, 380px);
    max-height: 95%;
    object-fit: contain;
    object-position: bottom;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.4));
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--ar-panel);
    border-top: 1px solid var(--ar-border);
    border-bottom: 1px solid var(--ar-border);
}

.stat-item {
    padding: 1.75rem 1rem;
    text-align: center;
    border-right: 1px solid var(--ar-border);
}

.stat-item:last-child { border-right: none; }

.stat-item strong {
    display: block;
    font-size: 1.75rem;
    color: var(--ar-accent);
    line-height: 1.1;
}

.stat-item span {
    display: block;
    font-size: .78rem;
    color: var(--ar-muted);
    margin-top: .25rem;
}

.section {
    padding: 3rem 2.5rem;
}

.section-head {
    margin-bottom: 2rem;
}

.section-head h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.service-card {
    background: var(--ar-panel);
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    padding: 1.75rem 1.5rem;
    transition: transform .25s, border-color .25s;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251,191,36,.35);
}

.service-card h4 {
    margin: 0 0 .75rem;
    font-size: 1.05rem;
}

.service-card p {
    margin: 0;
    color: var(--ar-muted);
    font-size: .88rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.portfolio-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--ar-panel);
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.portfolio-card:hover img { transform: scale(1.06); }

.portfolio-card .overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: .85rem;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
}

.timeline-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--ar-border);
}

.timeline-item h4 { margin: 0 0 .2rem; }
.timeline-item .meta { color: var(--ar-accent); font-size: .82rem; font-weight: 600; margin-bottom: .45rem; }
.timeline-item p { margin: 0; color: var(--ar-muted); font-size: .88rem; }

.contact-box {
    background: var(--ar-panel);
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.nav-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--ar-panel);
    border-left: 1px solid var(--ar-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem .5rem;
}

.nav-rail button,
.nav-rail a {
    border: none;
    background: transparent;
    color: var(--ar-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.nav-rail .vertical-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: .2em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ar-accent);
    text-transform: uppercase;
}

.nav-rail .lang-switch {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .72rem;
    font-weight: 700;
}

.nav-rail .lang-switch span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ar-border);
    color: var(--ar-muted);
}

.nav-rail .lang-switch span.active {
    background: var(--ar-accent);
    color: #111;
    border-color: var(--ar-accent);
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--ar-border);
    background: var(--ar-panel);
    color: var(--ar-text);
}

@media (max-width: 1100px) {
    .services-grid,
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 991px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar, .nav-rail { display: none; }
    .layout.open-sidebar .sidebar {
        display: block;
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 88vw);
        z-index: 90;
    }
    .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .hero { min-height: 360px; padding: 5rem 1.25rem 2rem; }
    .hero-person { width: 50%; right: .5rem; opacity: .85; }
    .section { padding: 2rem 1.25rem; }
    .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
}

@keyframes arFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes arSlideRight {
    from { opacity: 0; transform: translateX(48px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes arSlideLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes arSpin { to { transform: rotate(360deg); } }

@keyframes arPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--ar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .45s ease, visibility .45s ease;
}

.preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-ring {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--ar-accent);
    border-radius: 50%;
    animation: arSpin .85s linear infinite;
}

body.loaded .sidebar-photo,
body.loaded .sidebar h1,
body.loaded .sidebar-role {
    animation: arFadeUp .7s ease both;
}

body.loaded .sidebar-photo { animation-delay: .1s; }
body.loaded .sidebar h1 { animation-delay: .2s; }
body.loaded .sidebar-role { animation-delay: .3s; }

body.loaded .hero-content h2 { animation: arFadeUp .8s ease .15s both; }
body.loaded .hero-code { animation: arFadeUp .8s ease .35s both; }
body.loaded .btn-explore { animation: arFadeUp .8s ease .5s both; }
body.loaded .hero-person { animation: arSlideRight 1s ease .25s both; }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

.stat-item strong.counting {
    animation: arPulse .35s ease;
}

.service-card,
.portfolio-card,
.timeline-item,
.contact-box {
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.service-card.reveal.visible:hover,
.portfolio-card.reveal.visible:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
