:root {
    --bg: #090a0f;
    --bg-soft: #101119;
    --surface: rgba(20, 22, 32, 0.76);
    --surface-strong: #171923;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text-main: #f6f7fb;
    --text-muted: #a3a7b7;
    --text-soft: #d7d9e2;
    --accent: #30f29b;
    --accent-2: #10c8e8;
    --accent-3: #ff7a3d;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --transition: 220ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 10%, rgba(48, 242, 155, 0.12), transparent 28rem),
        radial-gradient(circle at 82% 4%, rgba(16, 200, 232, 0.10), transparent 26rem),
        linear-gradient(180deg, #08090e 0%, #0d0e15 42%, #090a0f 100%);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

::selection {
    background: var(--accent);
    color: #07100c;
}

a {
    color: inherit;
}

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

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 10, 15, 0.74);
    backdrop-filter: blur(18px);
}

.nav-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.logo-code {
    width: 36px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
}

.logo-code span {
    aspect-ratio: 1;
    border-radius: 2px;
    background: rgba(48, 242, 155, 0.18);
}

.logo-code span:nth-child(2),
.logo-code span:nth-child(4),
.logo-code span:nth-child(6),
.logo-code span:nth-child(8),
.logo-code span:nth-child(10),
.logo-code span:nth-child(11),
.logo-code span:nth-child(13),
.logo-code span:nth-child(15) {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(48, 242, 155, 0.7);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.hero {
    position: relative;
    min-height: calc(100vh - 78px);
    display: grid;
    align-items: center;
    overflow: hidden;
    padding: 72px 0 90px;
}

.hero-dots {
    position: absolute;
    inset: 0;
    opacity: 0.82;
    background-image:
        radial-gradient(circle, rgba(48, 242, 155, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(16, 200, 232, 0.65) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(255, 122, 61, 0.72) 0 2px, transparent 3px);
    background-position: 6% 34%, 78% 22%, 90% 60%;
    background-size: 110px 130px, 150px 170px, 130px 160px;
    mask-image: radial-gradient(circle at 70% 34%, black 0 22rem, transparent 36rem), radial-gradient(circle at 10% 58%, black 0 16rem, transparent 30rem);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    gap: clamp(36px, 6vw, 80px);
    align-items: center;
}

.eyebrow,
.section-label {
    display: inline-flex;
    color: var(--accent);
    font-family: var(--font-code);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin-top: 22px;
    color: var(--text-main);
    font-family: var(--font-code);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: 0;
}

.hero h1 span {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px rgba(246, 247, 251, 0.86);
    text-shadow: 0 0 30px rgba(48, 242, 155, 0.18);
}

.hero-copy p {
    max-width: 690px;
    margin-top: 28px;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
}

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

.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.primary-link {
    background: var(--text-main);
    color: #08090e;
}

.secondary-link {
    border: 1px solid var(--line-strong);
    color: var(--text-main);
}

.primary-link:hover,
.secondary-link:hover {
    transform: translateY(-2px);
}

.secondary-link:hover {
    border-color: var(--accent);
    background: rgba(48, 242, 155, 0.08);
}

.hero-visual {
    position: relative;
    min-height: 560px;
    display: grid;
    place-items: center;
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.hero-visual::before {
    width: 520px;
    height: 520px;
}

.hero-visual::after {
    width: 340px;
    height: 340px;
    border-color: rgba(48, 242, 155, 0.2);
}

.portrait-card {
    position: relative;
    z-index: 1;
    width: min(410px, 100%);
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.portrait-card img {
    width: 100%;
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    border-radius: 18px;
    filter: grayscale(1) contrast(1.08);
}

.portrait-caption {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(9, 10, 15, 0.72);
    backdrop-filter: blur(18px);
}

.portrait-caption span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.portrait-caption strong {
    color: var(--accent);
    font-family: var(--font-code);
    font-size: 0.86rem;
    text-align: right;
}

.code-panel {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 58px;
    display: grid;
    gap: 8px;
    width: min(260px, 60%);
    padding: 16px;
    border: 1px solid rgba(48, 242, 155, 0.24);
    border-radius: 18px;
    background: rgba(9, 10, 15, 0.82);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.code-panel span {
    color: var(--text-soft);
    font-family: var(--font-code);
    font-size: 0.76rem;
}

.code-panel span::before {
    content: "> ";
    color: var(--accent);
}

.section {
    padding: clamp(72px, 9vw, 118px) 0;
    scroll-margin-top: 96px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-heading h2,
.skills-intro h2,
.contact-section h2 {
    margin-top: 14px;
    color: var(--text-main);
    font-size: clamp(2.1rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: 0;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.expertise-item {
    min-height: 250px;
    padding: 28px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018));
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.expertise-item:nth-child(4n) {
    border-right: 0;
}

.expertise-item:nth-last-child(-n + 4) {
    border-bottom: 0;
}

.expertise-item:hover {
    background: linear-gradient(160deg, rgba(48, 242, 155, 0.13), rgba(16, 200, 232, 0.04));
    border-color: rgba(48, 242, 155, 0.25);
    transform: translateY(-4px);
}

.expertise-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 34px;
    border: 1px solid rgba(48, 242, 155, 0.34);
    border-radius: 12px;
    color: var(--accent);
    background: rgba(48, 242, 155, 0.08);
    font-family: var(--font-code);
    font-size: 0.78rem;
    font-weight: 800;
}

.expertise-item h3 {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 1.2;
}

.expertise-item p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.skills-section {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.035), transparent);
}

.skills-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr;
    gap: clamp(36px, 6vw, 78px);
    align-items: start;
}

.skills-intro {
    position: sticky;
    top: 110px;
}

.skills-intro p {
    margin-top: 20px;
    max-width: 360px;
    color: var(--text-muted);
}

.skills-container {
    display: grid;
    gap: 18px;
}

.skill-category {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
    margin-bottom: 18px;
    color: var(--text-main);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skill-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.skill-tag {
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        var(--surface-strong);
    color: var(--text-soft);
    font-size: 0.88rem;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.skill-tag:hover {
    transform: translateY(-3px);
    border-color: rgba(48, 242, 155, 0.45);
    background:
        linear-gradient(145deg, rgba(48, 242, 155, 0.14), rgba(16, 200, 232, 0.035)),
        var(--surface-strong);
}

.skill-tag img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.24));
}

.letter-icon::before {
    content: attr(data-icon);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(48, 242, 155, 0.35);
    border-radius: 9px;
    color: var(--accent);
    background: rgba(48, 242, 155, 0.08);
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: 800;
}

.contact-section {
    padding-bottom: 100px;
}

.contact-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 7vw, 86px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(12, 13, 19, 0.9);
}

.contact-panel::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(48, 242, 155, 0.16);
    border-radius: 50%;
}

.contact-section h2 {
    max-width: 760px;
}

.contact-intro {
    max-width: 680px;
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 1.04rem;
}

.social-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 42px;
}

.social-circle {
    min-height: 118px;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 18px 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text-soft);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.social-circle:hover {
    transform: translateY(-3px);
    border-color: rgba(48, 242, 155, 0.4);
    background: rgba(48, 242, 155, 0.08);
}

.social-icon-wrapper {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--accent);
    background: rgba(48, 242, 155, 0.08);
}

.social-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

footer {
    padding: 32px 0 44px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 980px) {
    .hero {
        min-height: auto;
    }

    .hero-content,
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: auto;
        padding: 30px 0 20px;
    }

    .hero-visual::before {
        width: min(520px, 100%);
        height: auto;
        aspect-ratio: 1;
    }

    .skills-intro {
        position: static;
    }

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

    .expertise-item:nth-child(4n) {
        border-right: 1px solid var(--line);
    }

    .expertise-item:nth-child(2n) {
        border-right: 0;
    }

    .expertise-item:nth-last-child(-n + 4) {
        border-bottom: 1px solid var(--line);
    }

    .expertise-item:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .social-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .nav-inner {
        min-height: 68px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .logo span:last-child {
        display: none;
    }

    .hero {
        padding: 38px 0 58px;
    }

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

    .hero-copy p {
        margin-top: 22px;
    }

    .hero-visual {
        padding-top: 8px;
    }

    .portrait-card {
        width: min(360px, 100%);
    }

    .hero-actions a {
        width: 100%;
    }

    .portrait-caption,
    .code-panel {
        position: static;
        width: 100%;
        margin-top: 12px;
    }

    .portrait-card {
        overflow: visible;
    }

    .expertise-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }

    .expertise-item,
    .expertise-item:nth-child(2n),
    .expertise-item:nth-child(4n),
    .expertise-item:nth-last-child(-n + 2),
    .expertise-item:nth-last-child(-n + 4) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .expertise-item:last-child {
        border-bottom: 0;
    }

    .skill-tags {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        border-radius: 22px;
    }
}
