:root {
    --bg: #0f1417;
    --bg-soft: #152026;
    --surface: rgba(14, 23, 29, 0.72);
    --surface-strong: rgba(19, 30, 37, 0.9);
    --surface-light: rgba(234, 243, 247, 0.08);
    --text: #edf5f7;
    --muted: #a7bbc3;
    --line: rgba(237, 245, 247, 0.11);
    --accent: #8bf3d9;
    --accent-deep: #38c7a6;
    --accent-alt: #ffb36b;
    --accent-pink: #f67db8;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 18px;
    --max-width: 1220px;
    --ease: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Sora", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(139, 243, 217, 0.14), transparent 22%),
        radial-gradient(circle at 84% 14%, rgba(246, 125, 184, 0.14), transparent 24%),
        radial-gradient(circle at 60% 80%, rgba(255, 179, 107, 0.12), transparent 26%),
        linear-gradient(180deg, #0b1013 0%, #111a20 35%, #0f1417 100%);
    overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor [role="button"] {
    cursor: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black 28%, transparent 82%);
    pointer-events: none;
    z-index: -3;
}

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

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

.cursor-glow {
    position: fixed;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 243, 217, 0.16), rgba(139, 243, 217, 0.04) 45%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 240ms ease;
    opacity: 0.9;
}

.cursor-ring,
.cursor-dot {
    position: fixed;
    left: 0;
    top: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 220ms ease, transform 220ms ease, width 220ms ease, height 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.cursor-ring {
    width: 42px;
    height: 42px;
    z-index: 60;
    border: 1px solid rgba(139, 243, 217, 0.45);
    background: rgba(139, 243, 217, 0.05);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    z-index: 61;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    box-shadow: 0 0 18px rgba(139, 243, 217, 0.55);
}

body.has-custom-cursor .cursor-ring,
body.has-custom-cursor .cursor-dot {
    opacity: 1;
}

body.cursor-active .cursor-ring {
    width: 58px;
    height: 58px;
    border-color: rgba(255, 179, 107, 0.55);
    background: rgba(255, 179, 107, 0.08);
}

body.cursor-active .cursor-dot {
    transform: translate(-50%, -50%) scale(1.25);
}

.page-shell {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 24px auto 42px;
}

.topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 17, 22, 0.68);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #091114;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    box-shadow: 0 16px 30px rgba(56, 199, 166, 0.25);
}

.brand-copy {
    min-width: 0;
}

.brand-copy strong,
.brand-copy span {
    display: block;
    white-space: nowrap;
}

.brand-copy strong {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.78rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a,
.button,
.button-secondary {
    border-radius: 999px;
    transition: transform var(--ease), border-color var(--ease), background-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.nav a {
    padding: 10px 16px;
    border: 1px solid transparent;
    color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line);
    color: var(--text);
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 26px;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(16, 26, 32, 0.9), rgba(10, 17, 21, 0.78));
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.hero::before {
    width: 460px;
    height: 460px;
    right: -140px;
    top: -160px;
    background: radial-gradient(circle, rgba(139, 243, 217, 0.18), transparent 68%);
    animation: drift 16s ease-in-out infinite alternate;
}

.hero::after {
    width: 360px;
    height: 360px;
    left: -120px;
    bottom: -160px;
    background: radial-gradient(circle, rgba(246, 125, 184, 0.16), transparent 70%);
    animation: drift 13s ease-in-out infinite alternate-reverse;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(139, 243, 217, 0.22);
    border-radius: 999px;
    background: rgba(139, 243, 217, 0.08);
    color: var(--accent);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(139, 243, 217, 0.12);
    animation: pulse 2.6s infinite;
}

.hero-copy,
.hero-side,
.about-grid,
.services-grid,
.projects-grid,
.contact-grid,
.insight-grid {
    min-width: 0;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(3.4rem, 8vw, 6.8rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-copy h1 span {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.92em;
    letter-spacing: -0.03em;
    color: var(--accent-alt);
}

.hero-copy p {
    max-width: 62ch;
    font-size: 1.03rem;
    line-height: 1.82;
    color: var(--muted);
}

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

.button,
.button-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    overflow: hidden;
    transform: translateZ(0);
}

.button {
    color: #081013;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    box-shadow: 0 18px 28px rgba(56, 199, 166, 0.24);
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-120%);
}

.button:hover::before,
.button:focus-visible::before {
    animation: sweep 700ms ease;
}

.button-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.button:hover,
.button:focus-visible,
.button-secondary:hover,
.button-secondary:focus-visible {
    transform: translateY(-2px) scale(1.01);
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.metric,
.panel,
.section,
.project-card,
.service-card,
.contact-card,
.footer,
.bio-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(18px);
}

.metric {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.metric strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 1.4rem;
}

.metric span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.hero-side {
    display: grid;
    gap: 16px;
}

.profile-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.profile-card::after {
    content: "";
    position: absolute;
    inset: auto -120px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 179, 107, 0.18), transparent 72%);
}

.profile-photo-wrap {
    position: relative;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(139, 243, 217, 0.2), rgba(246, 125, 184, 0.12));
}

.profile-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    filter: saturate(1.04) contrast(1.04);
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.profile-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.profile-meta strong,
.panel strong,
.service-card strong,
.contact-card strong,
.bio-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.profile-meta span,
.panel p,
.service-card p,
.contact-card p,
.bio-card p,
.project-copy p {
    color: var(--muted);
    line-height: 1.68;
}

.panel {
    padding: 22px;
    border-radius: var(--radius-lg);
}

.panel ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 10px;
}

.skills-ribbon {
    margin-top: 24px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.skills-track {
    display: flex;
    gap: 14px;
    width: max-content;
    padding: 14px;
    animation: marquee 28s linear infinite;
}

.skills-track span {
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.88rem;
    white-space: nowrap;
}

.section {
    position: relative;
    margin-top: 24px;
    padding: 34px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 24px;
    margin-bottom: 30px;
}

.section-head h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.section-head h2 span {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    color: var(--accent-alt);
}

.section-head p {
    color: var(--muted);
    line-height: 1.8;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
}

.bio-card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.bio-card p + p {
    margin-top: 14px;
}

.insight-grid {
    display: grid;
    gap: 16px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius-lg);
    min-height: 240px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.service-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 243, 217, 0.12), transparent 70%);
}

.service-tag,
.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(139, 243, 217, 0.09);
    border: 1px solid rgba(139, 243, 217, 0.16);
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-card h3,
.project-copy h3 {
    margin-bottom: 12px;
    font-size: 1.28rem;
    line-height: 1.22;
}

.project-intro {
    margin-bottom: 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(240px, 0.75fr);
    gap: 18px;
    padding: 18px;
    /* padding-top: calc(18px * 4); */
    border-radius: 28px;
    transform-style: preserve-3d;
    transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color var(--ease), background-color var(--ease);
}

.project-card:hover {
    border-color: rgba(139, 243, 217, 0.24);
    background: rgba(17, 28, 34, 0.9);
}

.project-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    min-height: 220px;
    background: linear-gradient(135deg, rgba(139, 243, 217, 0.18), rgba(246, 125, 184, 0.12));
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 320ms ease;
}

.project-card:hover .project-image {
    transform: scale(1.06);
    filter: saturate(1.05) contrast(1.06);
}

.project-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 4px 6px 2px;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-stack span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 0.8rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600;
}

.project-link::after {
    content: "\2197";
    transition: transform var(--ease);
}

.project-card:hover .project-link::after {
    transform: translate(3px, -3px);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}

.contact-card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.contact-points {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.contact-points div {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    padding: 24px 28px;
    border-radius: 28px;
}

.footer p {
    color: var(--muted);
    max-width: 720px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: transform 850ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 850ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 80ms; }
.stagger-2 { transition-delay: 180ms; }
.stagger-3 { transition-delay: 280ms; }

.tilt-layer {
    transform: translateZ(30px);
}

@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(18px, 24px, 0) scale(1.08); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 243, 217, 0.18); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(139, 243, 217, 0); }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes sweep {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

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

    .cursor-glow {
        display: none;
    }

    .cursor-ring,
    .cursor-dot {
        display: none;
    }
}

@media (max-width: 1080px) {
    .hero,
    .about-grid,
    .contact-grid,
    .projects-grid,
    .project-card,
    .section-head,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta,
    .profile-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(calc(100% - 20px), var(--max-width));
        margin-top: 14px;
    }

    .topbar,
    .footer {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 28px;
    }

    .hero,
    .section {
        padding: 22px;
    }

    .hero-copy h1 {
        font-size: clamp(3rem, 17vw, 4.6rem);
    }

    .hero-meta,
    .profile-meta,
    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        justify-content: flex-start;
    }
}