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

:root {
    --bg: #0a0a0b;
    --bg-elevated: #111113;
    --bg-card: #161618;
    --text: #f0eeea;
    --text-secondary: #a8a49c;
    --text-muted: #6b6760;
    --accent: #a723ff;
    --accent-soft: rgba(232, 184, 109, 0.12);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);
    --radius: 14px;
    --radius-sm: 10px;
    --header-h: 68px;
    --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(232, 184, 109, 0.08), transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(100, 120, 180, 0.05), transparent 45%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(232, 184, 109, 0.04), transparent 40%);
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(10, 10, 11, 0.75);
    border-bottom-color: var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.studio-sign {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font: 800 1.55rem/1 Consolas, monospace;
    letter-spacing: -.10em;
}
.studio-glyph {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px;
    transform: skewX(-18deg);
}
.studio-glyph i { display: block; width: 5px; height: 16px; background: var(--accent); }
.studio-glyph i:nth-child(2) { height: 27px; }
.studio-slash { color: var(--accent); }
.project-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.project-slot {
    display: grid;
    place-content: center;
    min-height: 125px;
    border: 1px dashed #47423a;
    border-radius: var(--radius);
    background: repeating-linear-gradient(135deg, transparent 0 9px, #ffffff03 9px 10px);
}
@media (max-width: 600px) { .project-slots { grid-template-columns: 1fr; } }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.logo img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    display: block;
    height: 1.5px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
}

.burger.open span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.burger.open span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 12px 14px;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.hero {
    position: relative;
    z-index: 1;
    min-height: min(760px, 85svh);
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 80px;
    overflow: hidden;
}

.portrait {
    position: relative;
    isolation: isolate;
    width: min(39%, 370px);
    aspect-ratio: 1.06;
    overflow: hidden;
    border: 1px solid #4e2f6b;
    border-radius: 28% 5% 5% 5%;
    background-color: #3c2353;
    background-image: radial-gradient(#5e4976 1px, transparent 1.5px);
    background-size: 10px 10px;
}

.portrait::before {
    content: "";
    position: absolute;
    inset: 10% 13% 14%;
    border-radius: 50%;
    background: linear-gradient(145deg, #5900ff, #ff0040);
    z-index: -1;
}

.portrait img {
    position: absolute;
    bottom: 0;
    left: 6%;
    width: 88%;
    height: 94%;
    object-fit: contain;
    object-position: bottom;
}

.signature {
    position: absolute;
    bottom: 12px;
    left: 12px;
    border-radius: 5px;
    padding: 4px 10px;
    background: #181614;
    color: #efd6b1;
    font: 14px/1.5 Consolas, monospace;
}

.hero h1 span, .hero-desc a { color: var(--accent); }
.hero-desc a { text-decoration: underline; text-underline-offset: .2em; }
.hero .hero-content h1 { font-size: clamp(4rem, 8vw, 6.7rem); letter-spacing: -.065em; }
.project-button { margin: 0 12px 8px 0; }
.work-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.work-notes div { border-top: 1px solid #554537; padding: 20px 0 0; }
.work-notes h3 { margin-bottom: 6px; font-size: 18px; }
.work-notes p { color: var(--text-secondary); }
#projects { padding-top: 34px; }
#contact .contact-block { max-width: none; }
#contact .contact-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
@media (max-width: 860px) {
    .portrait { width: min(68%, 260px); }
    .work-notes { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    width: 100%;
    max-width: 1080px;
}

.hero-content {
    max-width: 560px;
    flex: 1 1 auto;
}

.hero-avatar {
    flex: 0 0 auto;
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(232, 184, 109, 0.12);
}

.hero-avatar::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 184, 109, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(48px, 9vw, 72px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-desc strong {
    color: var(--text);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

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

.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 48px;
}

.section-tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.06em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.project.featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    transition: border-color 0.3s;
}

.project.featured:hover {
    border-color: var(--border-hover);
}

.project-visual {
    border-radius: 12px;
    overflow: hidden;
    background: #0d0d0f;
    aspect-ratio: 16 / 10;
}

.project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 12px 16px 12px 8px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent);
}

.year {
    font-size: 13px;
    color: var(--text-muted);
}

.project-info h3 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.project-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tags span {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    transition: gap 0.2s;
}

.link:hover {
    gap: 12px;
}

.link svg {
    flex-shrink: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text);
    font-weight: 500;
}

.skills h4 {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.skills ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skills li {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.skill-bar {
    display: block;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar i {
    display: block;
    height: 100%;
    width: var(--w);
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.7;
}

.contact-block {
    max-width: 560px;
}

.contact-lead {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

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

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.25s, background 0.25s, transform 0.2s;
}

.contact-card:hover {
    border-color: var(--border-hover);
    background: #1a1a1d;
    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.2s;
}

.contact-card:hover .contact-icon {
    color: var(--accent);
}

.contact-card strong {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.contact-card span {
    font-size: 13px;
    color: var(--text-muted);
}



@media (max-width: 860px) {
    .project.featured {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-info {
        padding: 4px 8px 12px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 36px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
        order: -1;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .hero {
        padding-top: calc(var(--header-h) + 48px);
        padding-bottom: 64px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-avatar {
        width: 160px;
        height: 160px;
    }

    .section {
        padding: 72px 0;
    }

    .section-head {
        margin-bottom: 36px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

.site-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 1.25rem;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}
.site-switch-item {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s;
}
.site-switch-item:hover { color: var(--text); }
.site-switch-item.is-on {
    background: var(--accent);
    color: #0a0a0b;
}
.header-inner .site-switch { margin-right: auto; margin-left: 1.5rem; }

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 3rem 0 2.4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.2rem 1.8rem;
}
.footer-brand .footer-logo {
    margin-bottom: 0.85rem;
    font-size: 1.25rem;
}
.footer-copy {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-legal {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    opacity: 0.85;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col h4 {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem 1.2rem; }
    .site-switch { margin-left: 0.75rem; }
    .site-switch-item { padding: 0.3rem 0.65rem; font-size: 0.72rem; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .header-inner .site-switch { display: none; }
}


.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #0a0a0b;
    transition: opacity .55s ease, visibility .55s ease;
}
.page-loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: loaderPulse 1.4s ease-in-out infinite;
}
.page-loader-text {
    font: 700 1.1rem/1 Consolas, monospace;
    letter-spacing: .08em;
    color: var(--text-muted);
}
@keyframes loaderPulse {
    0%, 100% { opacity: .5; transform: scale(.98); }
    50% { opacity: 1; transform: scale(1); }
}
html { scroll-behavior: smooth; }
body { transition: opacity .35s ease; }
body.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .page-loader-inner { animation: none; }
}
