/* ================= GLOBAL ================= */
@font-face {
    font-family: 'Roboto Slab';
    src: url('assets/fonts/RobotoSlab-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-start: #000000;
    --bg-mid: #1a1967;
    --bg-end: #3533cd;
    --soft-white: #f8fafc;
    --section-blue: #3533cd;
    --section-blue-deep: #2a27a8;
    --ink-dark: #101828;
    --ink-muted: #475467;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.84);
    --panel: rgba(92, 71, 177, 0.2);
    --panel-strong: rgba(46, 24, 120, 0.42);
    --border-soft: rgba(255,255,255,0.18);
    --border-accent: rgba(255,255,255,0.4);
    --glow-primary: rgba(255,255,255,0.18);
    --glow-strong: rgba(255,255,255,0.28);
    --accent-primary: #9b72ff;
    --accent-secondary: #7a4de2;
    --accent-cyan: #ffffff;
    --accent-pink: #f05ce7;
    --accent-pink-soft: #f48be9;
    --nav-height: 80px;
    --site-cursor: url("assets/cursor.png") 5 4, auto;
    --site-cursor-pointer: url("assets/cursor.png") 5 4, pointer;
    --site-cursor-text: url("assets/cursor.png") 5 4, text;
    --interactive-surface:
        radial-gradient(circle at 16% 12%, rgba(255,255,255,0.88) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 29% 39%, rgba(255,255,255,0.52) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 46% 57%, rgba(255,255,255,0.9) 0 1.5px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 64% 28%, rgba(255,255,255,0.62) 0 1.5px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 82% 52%, rgba(255,255,255,0.7) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 93% 82%, rgba(255,255,255,0.94) 0 1.5px, rgba(255,255,255,0) 3px),
        linear-gradient(135deg, rgba(26,25,103,0.92) 0%, rgba(42,39,168,0.9) 45%, rgba(53,51,205,0.92) 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    cursor: var(--site-cursor);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #000000 0%, #06051d 10%, #18155a 32%, #2a27a8 62%, #3533cd 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    padding-top: var(--nav-height);
    overflow-x: hidden;
    cursor: var(--site-cursor);
}

body.intro-active {
    overflow: hidden;
}

main,
.footer {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    cursor: var(--site-cursor-pointer);
}

button,
label,
select,
[role="button"],
.cta-btn,
.nav-toggle {
    cursor: var(--site-cursor-pointer);
}

input,
textarea {
    cursor: var(--site-cursor-text);
}

:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(28, 14, 92, 0.96);
    color: var(--text);
    text-decoration: none;
    z-index: 2000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* ================= INTRO SCREEN ================= */
.intro-screen {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #000000;
    opacity: 1;
    pointer-events: none;
    visibility: visible;
    z-index: 5000;
}

.intro-screen.is-ready {
    animation: introShell 4.7s ease forwards;
}

.intro-name {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 2.2vw, 28px);
    padding: 0 24px;
    font-family: 'Roboto Slab', 'Orbitron', sans-serif;
    font-size: clamp(2.6rem, 10vw, 8.5rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
}

.intro-name-master {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 1;
}

.intro-name-slice {
    position: absolute;
    inset: 0 auto 0 calc(var(--strip-index) * -100%);
    width: 1000%;
    height: 100%;
    opacity: 0;
}

.intro-screen.is-exiting .intro-name-master {
    opacity: 0;
}

.intro-screen.is-exiting .intro-name-slice {
    opacity: 1;
}

.intro-word {
    display: inline-flex;
    white-space: nowrap;
}

.intro-word-first {
    color: var(--accent-pink);
    text-shadow: 0 0 18px rgba(255,255,255,0.16);
}

.intro-word-last {
    color: #ffffff;
    text-shadow: 0 0 24px rgba(255,255,255,0.22);
}

.intro-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(105vh);
}

.intro-screen.is-ready .intro-letter {
    animation: introLetterReveal 0.68s cubic-bezier(0.18, 0.72, 0.3, 1) forwards;
    animation-delay: calc(0.14s + (var(--letter-index) * 0.085s));
}

.intro-letter-static {
    opacity: 1;
    transform: none;
    animation: none;
}

.intro-screen.is-ready .intro-letter-static {
    animation: none;
}

.intro-curtain {
    position: absolute;
    inset: 0 -1px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    overflow: hidden;
}

.intro-curtain > span {
    position: relative;
    display: block;
    min-width: 0;
    width: calc(100% + 2px);
    height: 100%;
    background: #000000;
    overflow: hidden;
    transform: translateY(0);
    backface-visibility: hidden;
    will-change: transform;
}

.intro-screen.is-ready .intro-curtain > span {
    animation: introStripExit 0.72s cubic-bezier(0.75, 0, 0.24, 1) forwards;
    animation-delay: calc(1.95s + (var(--strip-index) * 0.2s));
}

@media (max-width: 900px) {
    .intro-screen.is-ready {
        animation-duration: 3.75s;
    }

    .intro-screen.is-ready .intro-curtain > span {
        animation-duration: 0.62s;
        animation-delay: calc(1.72s + (var(--strip-index) * 0.12s));
    }
}

@media (max-width: 640px) {
    .intro-screen.is-ready {
        animation-duration: 3.25s;
    }

    .intro-screen.is-ready .intro-letter {
        animation-duration: 0.58s;
        animation-delay: calc(0.12s + (var(--letter-index) * 0.07s));
    }

    .intro-screen.is-ready .intro-curtain > span {
        animation-duration: 0.56s;
        animation-delay: calc(1.58s + (var(--strip-index) * 0.085s));
    }
}

@keyframes introShell {
    0% {
        opacity: 1;
        background: #000000;
    }

    12%,
    44% {
        opacity: 1;
        background: #000000;
    }

    45%,
    98% {
        opacity: 1;
        background: transparent;
    }

    100% {
        opacity: 0;
        background: transparent;
        visibility: hidden;
    }
}

@keyframes introLetterReveal {
    0% {
        opacity: 0;
        transform: translateY(105vh);
    }

    72% {
        opacity: 1;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes introStripExit {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-105%);
    }
}

/* ================= NAVBAR ================= */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    backdrop-filter: blur(20px);
    background: rgba(37, 15, 182, 0.34);
    border-bottom: 1px solid rgba(255,255,255,0.16);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.logo-primary {
    color: var(--accent-secondary);
}

.logo-secondary {
    color: var(--text);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.logo-mark {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(192,132,252,0.18));
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 18px;
}

.nav-links a {
    margin-left: 0;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: var(--site-cursor-pointer);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    transition: transform 0.24s ease, opacity 0.24s ease, background-color 0.24s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ================= HERO ================= */

#matrixCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.hero {
    min-height: calc(100vh - var(--nav-height));
    scroll-margin-top: var(--nav-height);
    padding: clamp(72px, 11vh, 120px) 20px 96px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(180px, 1fr);
    align-items: center;
    column-gap: clamp(56px, 10vw, 180px);
    width: min(100%, 1200px);
    min-height: calc(100vh - var(--nav-height) - clamp(72px, 11vh, 120px) - 96px);
    margin: 0 auto;
    padding: 0 20px;
}

.hero-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(-20px);
}

.hero-main > * {
    max-width: 520px;
}

/* Title */
.hero-title {
    font-family: 'Roboto Slab', 'Orbitron', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: clamp(2.15rem, 7vw, 4.55rem);
    text-align: left;
    letter-spacing: 0.02em;
    line-height: 0.92;
    position: relative;
    margin-bottom: 28px;
}

.hero-line {
    display: block;
    font-weight: 700;
}

.hero-line-primary {
    color: var(--accent-pink);
}

.hero-line-secondary {
    color: var(--text);
    margin-left: 0;
}

/* Subtitle */
.hero-subtitle {
    font-family: 'Roboto Slab', 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.hero-copy {
    max-width: 410px;
    line-height: 1.45;
}

.hero-copy strong {
    color: var(--text);
}

.hero-title::before {
    content: "";
    position: absolute;
    inset: -18px -12px;
    background: linear-gradient(90deg, rgba(240, 92, 231, 0.22), rgba(255, 255, 255, 0.08));
    filter: blur(24px);
    z-index: -1;
    opacity: 0.22;
    pointer-events: none;
}

.cta-btn {
    min-width: 202px;
    min-height: 50px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: 'Anton', 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: 0.01em;
    text-align: center;
    text-transform: uppercase;
    background:
        radial-gradient(circle at 18% 28%, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 34%),
        linear-gradient(90deg, #ff61f8 0%, #ff7bf4 52%, #ff61f8 100%);
    background-color: #ff61f8;
    color: transparent;
    -webkit-text-fill-color: transparent;
    cursor: var(--site-cursor-pointer);
    box-shadow: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
    filter: none;
    transform: none;
}

.cta-btn::before {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(180deg, #000000 0%, #06051d 10%, #161451 32%, #2a27a8 62%, #3533cd 100%);
    background-attachment: fixed;
    background-clip: text;
    -webkit-background-clip: text;
    pointer-events: none;
}

.cta-btn:focus,
.cta-btn:active {
    filter: none;
}

@media (hover: hover) and (pointer: fine) {
    .cta-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.03);
    }
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
}

.hero-status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-pink);
    box-shadow: 0 0 14px rgba(240, 92, 231, 0.48);
}

.hero-stats {
    position: absolute;
    right: -104px;
    bottom: -26px;
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3vw, 34px);
    align-items: flex-end;
    text-align: right;
    width: min(100%, 202px);
    padding-bottom: 20px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hero-stat-value {
    font-family: 'Anton', 'Inter', sans-serif;
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    line-height: 0.92;
    color: var(--accent-pink);
    letter-spacing: 0.01em;
}

.hero-stat-label {
    font-family: 'Roboto Slab', 'Inter', sans-serif;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(255,255,255,0.84);
}

.hero-chevron {
    position: absolute;
    left: 50%;
    bottom: 42px;
    width: min(32vw, 360px);
    transform: translateX(-50%);
    opacity: 0.98;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.hero-chevron-art {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.hero-chevron.is-hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
}

.hero-chevron-sweep {
    transform-box: fill-box;
    transform-origin: center center;
    stroke-linejoin: round;
}

.hero-chevron-sweep-primary {
    fill: rgba(10, 8, 28, 0.4);
    stroke: rgba(255,255,255,0.04);
    stroke-width: 1.2;
    animation: chevronSweepPrimary 2.8s cubic-bezier(0.18, 0.72, 0.3, 1) infinite;
}

.hero-chevron-sweep-secondary {
    fill: rgba(14, 11, 36, 0.68);
    stroke: rgba(255,255,255,0.06);
    stroke-width: 0.9;
    animation: chevronSweepSecondary 2.8s cubic-bezier(0.18, 0.72, 0.3, 1) infinite;
}

@keyframes chevronSweepPrimary {
    0%,
    14% {
        opacity: 0;
        transform: translateY(-32px) scaleX(0.96);
    }

    28% {
        opacity: 0.16;
        transform: translateY(-10px) scaleX(0.985);
    }

    52% {
        opacity: 0.36;
        transform: translateY(18px) scaleX(1);
    }

    74% {
        opacity: 0.22;
        transform: translateY(38px) scaleX(1.015);
    }

    100% {
        opacity: 0;
        transform: translateY(58px) scaleX(1.03);
    }
}

@keyframes chevronSweepSecondary {
    0%,
    20% {
        opacity: 0;
        transform: translateY(-18px) scaleX(0.92);
    }

    38% {
        opacity: 0.28;
        transform: translateY(2px) scaleX(0.96);
    }

    60% {
        opacity: 0.5;
        transform: translateY(26px) scaleX(1);
    }

    82% {
        opacity: 0.2;
        transform: translateY(48px) scaleX(1.04);
    }

    100% {
        opacity: 0;
        transform: translateY(66px) scaleX(1.08);
    }
}

/* ================= SECTION ================= */
.section {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 100vh;
    scroll-margin-top: var(--nav-height);
    padding: clamp(72px, 11vh, 120px) 20px 96px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section > * {
    width: min(100%, 1200px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Titles */
.section-title {
    font-family: 'Roboto Slab', 'Orbitron', sans-serif;
    margin-bottom: 60px;
    position: relative;
    font-size: 42px;
    opacity: 1;
    line-height: 1.05;
    overflow-wrap: normal;
    word-break: keep-all;
}

h3,
p {
    font-family: 'Roboto Slab', 'Inter', sans-serif;
}

.section-title::after {
    content: "";
    width: 80px;
    height: 3px;
    background: currentColor;
    opacity: 1;
    position: absolute;
    left: 0;
    bottom: -12px;
    border-radius: 5px;
}

.section:not(.active) {
    opacity: 0.75;
    transform: translateY(8px);
}

.section-light {
    background: var(--soft-white);
    color: var(--ink-dark);
    border-top-color: rgba(16,24,40,0.08);
}

.section-dark {
    background: transparent;
    color: var(--text);
    border-top-color: rgba(255,255,255,0.18);
}

.section-light .section-title,
.section-light h3,
.section-light p,
.section-light li,
.section-light span,
.section-light a:not(.cta-btn) {
    color: var(--ink-dark);
}

.section-light .section-title {
    color: #000000;
}

.section-light .section-title::after {
    background: currentColor;
}

.section-light .progress-bar {
    background: linear-gradient(90deg, #7a4de2, #a855f7);
}

.section-light .skill-card-face,
.section-light .project-card,
.section-light .cert-card {
    background: rgba(122, 77, 226, 0.08);
    border-color: rgba(122, 77, 226, 0.18);
}

.section-light .skill-card span,
.section-light .about-content p,
.section-light .contact-form label,
.section-light .contact-info a,
.section-light .contact-form input,
.section-light .contact-form textarea {
    color: var(--ink-muted);
}

.section-light .terminal-box {
    background: rgba(53, 51, 205, 0.08);
    border-color: rgba(122, 77, 226, 0.16);
    color: #5b2fc7;
}

.section-light .tags span {
    background: rgba(122, 77, 226, 0.12);
}

.section-light .project-buttons button,
.section-light .contact-form button {
    background: linear-gradient(90deg, #7a4de2, #a855f7);
    color: #ffffff;
}

.section-light .contact-form input,
.section-light .contact-form textarea {
    background: rgba(122, 77, 226, 0.08);
    border-color: rgba(122, 77, 226, 0.14);
}

.section-light .contact-status-item span,
.section-light .contact-links span {
    color: #5b2fc7;
}

.section-light .contact-status-item strong {
    color: var(--ink-dark);
}

.section-light .contact-info .contact-links a {
    color: #5b2fc7;
    font-weight: 700;
}

.section-light .contact-form input:focus,
.section-light .contact-form textarea:focus {
    border-color: rgba(122, 77, 226, 0.45);
    background: rgba(122, 77, 226, 0.12);
    box-shadow: 0 0 0 3px rgba(122, 77, 226, 0.12);
}

.section-dark .section-title,
.section-dark h3,
.section-dark p,
.section-dark li,
.section-dark span,
.section-dark a:not(.cta-btn) {
    color: var(--text);
}

.section-dark .section-title {
    color: #ffffff;
}

.section-dark .section-title::after {
    background: currentColor;
}

.section-dark .skill-card-face,
.section-dark .project-card,
.section-dark .cert-card {
    background: rgba(18, 15, 66, 0.22);
    border-color: rgba(255,255,255,0.14);
}

.section-dark .terminal-box {
    background: rgba(12, 10, 44, 0.34);
    border-color: rgba(255,255,255,0.14);
    color: #f8fafc;
}

.section-dark .tags span {
    background: rgba(248,250,252,0.14);
}

.section-dark .project-buttons button,
.section-dark .contact-form button {
    background: linear-gradient(90deg, var(--accent-primary), #cbb9ff);
    color: #ffffff;
}

.section-dark .contact-form input,
.section-dark .contact-form textarea {
    background: rgba(248,250,252,0.08);
    border-color: rgba(248,250,252,0.14);
}

.section-dark .contact-form input:focus,
.section-dark .contact-form textarea:focus {
    border-color: rgba(248,250,252,0.55);
    background: rgba(248,250,252,0.12);
    box-shadow: 0 0 0 3px rgba(248,250,252,0.12);
}

.section-dark .about-content p,
.section-dark .skill-card span,
.section-dark .contact-form label,
.section-dark .contact-info a,
.section-dark .contact-form input,
.section-dark .contact-form textarea {
    color: var(--text-muted);
}

/* ================= ABOUT ================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
    border-radius: 20px;
    mix-blend-mode: screen;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, #000000 0%, #06051d 10%, #18155a 32%, #2a27a8 62%, #3533cd 100%);
    box-shadow: 0 0 40px rgba(192,132,252,0.25);
}

.about-particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.about-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--accent-secondary);
}

.about-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 17px;
}

/* Terminal */
.terminal-box {
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    background: var(--panel-strong);
    border: 1px solid rgba(255,255,255,0.18);
    font-family: monospace;
    color: #f7f1ff;
}

/* ================= SKILLS ================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 28px;
}

.skill-card {
    min-height: 200px;
    border-radius: 14px;
    background: transparent;
    border: 0;
    outline: none;
    perspective: 1000px;
    cursor: var(--site-cursor-pointer);
    touch-action: manipulation;
}

.skill-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.18, 0.72, 0.3, 1);
}

.skill-card.is-flipped .skill-card-inner {
    transform: rotateY(180deg);
}

.skill-card.is-flipped .skill-card-face {
    border-color: var(--border-accent);
}

@media (hover: hover) and (pointer: fine) {
    .skill-card:hover .skill-card-inner {
        transform: rotateY(180deg);
    }

    .skill-card:hover .skill-card-face {
        border-color: var(--border-accent);
    }
}

.skill-card:focus-visible .skill-card-face {
    border-color: rgba(248,250,252,0.55);
}

.skill-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: inherit;
    padding: 28px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    backface-visibility: hidden;
    overflow: hidden;
}

.skill-card-front {
    gap: 10px;
}

.skill-card-back {
    transform: rotateY(180deg);
    gap: 12px;
}

.skill-card h3 {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.15;
    margin-bottom: 0;
}

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

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Progress bar */
.progress-bar {
    width: 0;
    height: 6px;
    margin-top: 10px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
}

/* ================= PROJECTS ================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    padding: 30px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid rgba(192,132,252,0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.42);
    box-shadow: 0 0 24px rgba(255,255,255,0.14);
}

.tags span {
    display: inline-block;
    margin-right: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(192,132,252,0.15);
}

.project-buttons {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-buttons button {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(192,132,252,0.18);
    background: rgba(192,132,252,0.2);
    color: var(--text);
    cursor: var(--site-cursor-pointer);
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.project-status-progress {
    color: #ff253d;
    font-weight: 800;
}

.section-light h3 .project-status-progress {
    color: #ff253d;
    font-weight: 800;
}

.project-buttons button:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

/* ================= CERTIFICATIONS ================= */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.cert-card {
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    background: var(--panel);
    border: 1px solid rgba(192,132,252,0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.section-dark .cert-status-progress {
    color: #ff3b4f;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 59, 79, 0.28);
}

/* ================= CONTACT ================= */
.contact-container {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    gap: 50px;
    align-items: start;
}

.contact-info h3 {
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    margin-bottom: 12px;
}

.contact-info > p {
    max-width: 520px;
    line-height: 1.55;
    margin-bottom: 32px;
}

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

.contact-status-item {
    min-height: 86px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(122, 77, 226, 0.16);
    background: rgba(122, 77, 226, 0.07);
}

.contact-status-item span,
.contact-links > li > span {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-status-item strong {
    display: block;
    color: var(--ink-dark);
    font-family: 'Roboto Slab', 'Inter', sans-serif;
    font-size: 0.98rem;
    line-height: 1.25;
}

.section-light .contact-status-item .status-available {
    color: #118a45;
}

.section-light .contact-status-item .status-focus {
    color: #3533cd;
}

.contact-info ul,
.contact-links {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.contact-links li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid rgba(122, 77, 226, 0.14);
    background: rgba(255,255,255,0.54);
    cursor: var(--site-cursor-pointer);
}

.contact-links > li > span {
    margin-bottom: 0;
}

.contact-info a {
    color: var(--accent-cyan);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-links .contact-link-action {
    display: none;
}

.contact-info a:hover {
    color: var(--accent-secondary);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.88);
    font-size: 14px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.1);
    color: var(--text);
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.16);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
    outline: none;
}

.contact-form button {
    padding: 14px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid transparent;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    cursor: var(--site-cursor-pointer);
}

.contact-form-status {
    min-height: 1.2em;
    margin-top: 12px;
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.cta-btn,
.contact-form button,
.contact-links li {
    position: relative;
    overflow: hidden;
    background-size: 240% 240%;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
    background: var(--interactive-surface);
    background-size: 240% 240%;
    animation: interactiveSurfaceFlow 4.2s ease infinite;
    border-color: rgba(255,255,255,0.34);
    color: #ffffff;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.section-light .contact-form button:hover,
.section-light .contact-form button:focus-visible {
    background: var(--interactive-surface);
    background-size: 240% 240%;
    animation: interactiveSurfaceFlow 4.2s ease infinite;
    border-color: rgba(255,255,255,0.34);
    color: #ffffff;
}

.section-dark .contact-form button:hover,
.section-dark .contact-form button:focus-visible {
    background: var(--interactive-surface);
    background-size: 240% 240%;
    animation: interactiveSurfaceFlow 4.2s ease infinite;
    border-color: rgba(255,255,255,0.34);
    color: #ffffff;
}

.cta-btn:hover,
.cta-btn:focus-visible {
    background: var(--interactive-surface);
    background-size: 240% 240%;
    animation: interactiveSurfaceFlow 4.2s ease infinite;
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(12px);
}

.cta-btn:hover::before,
.cta-btn:focus-visible::before {
    background: none;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

@keyframes interactiveSurfaceFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ================= FOOTER ================= */
.footer {
    position: relative;
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #3533cd 0%, #171560 56%, #000000 100%);
}

.footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -180px;
    bottom: 0;
    background: linear-gradient(180deg, rgba(53, 51, 205, 0) 0%, rgba(23, 21, 96, 0.56) 48%, rgba(0, 0, 0, 0.92) 100%);
    z-index: -1;
    pointer-events: none;
}

.project-card:hover,
.cert-card:hover {
    box-shadow: 0 0 25px var(--glow-primary);
}

.skill-card-face,
.project-card,
.cert-card {
    backdrop-filter: blur(12px);
}

.fade-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left.active,
.fade-right.active {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 900px) {
    .nav-container {
        padding: 12px 20px;
    }

    .logo-mark {
        width: 50px;
        height: 50px;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
        z-index: 1101;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 20px;
        width: min(280px, calc(100vw - 40px));
        padding: 18px 18px 16px;
        border: 1px solid rgba(255,255,255,0.16);
        border-radius: 18px;
        background: rgba(16, 10, 60, 0.92);
        backdrop-filter: blur(18px);
        box-shadow: 0 16px 40px rgba(0,0,0,0.32);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
        z-index: 1100;
    }

    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 15px;
        color: rgba(255,255,255,0.92);
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr);
        min-height: calc(100vh - var(--nav-height) - clamp(72px, 11vh, 120px) - 96px);
        row-gap: 36px;
        align-content: space-between;
    }

    .hero-main {
        transform: translateY(-10px);
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-main > * {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hero-title {
        align-items: center;
        text-align: center;
    }

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

    .hero-stats {
        position: static;
        justify-self: end;
        align-self: end;
        align-items: flex-end;
        text-align: right;
        width: min(100%, 190px);
        padding-bottom: 0;
        margin-top: auto;
        margin-left: auto;
        margin-right: 4px;
    }

    .hero-chevron {
        width: min(44vw, 320px);
        bottom: 18px;
    }

    .hero-stat {
        align-items: flex-end;
    }

    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .skills {
        min-height: auto;
    }

    .skill-card {
        min-height: 215px;
    }

    .skill-card-face {
        padding: 26px;
    }

    .contact-links li {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .contact-links .contact-link-url {
        display: none;
    }

    .contact-links .contact-link-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        min-width: 112px;
        min-height: 38px;
        padding: 9px 16px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.34);
        background: linear-gradient(180deg, #000000 0%, #06051d 10%, #18155a 32%, #2a27a8 62%, #3533cd 100%);
        color: #ffffff;
        font-weight: 800;
        letter-spacing: 0.02em;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .contact-action-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    .contact-action-text {
        position: relative;
        z-index: 1;
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }

    .section-light .contact-info .contact-links .contact-action-text {
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }

    .section-light .contact-info .contact-links a {
        color: #ffffff;
    }

    .cta-btn:hover,
    .cta-btn:focus-visible {
        background:
            radial-gradient(circle at 18% 28%, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 34%),
            linear-gradient(90deg, #ff61f8 0%, #ff7bf4 52%, #ff61f8 100%);
        animation: none;
        border-color: transparent;
        backdrop-filter: none;
        filter: none;
        transform: none;
    }

    .cta-btn:hover::before,
    .cta-btn:focus-visible::before {
        color: transparent;
        -webkit-text-fill-color: transparent;
        background: linear-gradient(180deg, #000000 0%, #06051d 10%, #161451 32%, #2a27a8 62%, #3533cd 100%);
        background-attachment: fixed;
        background-clip: text;
        -webkit-background-clip: text;
    }

    .section {
        padding: clamp(72px, 11vh, 120px) 20px 96px;
    }

    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 72px;
    }

    .nav-container {
        align-items: center;
        padding: 12px 16px;
    }

    .logo-mark {
        width: 46px;
        height: 46px;
    }

    .nav-links {
        right: 16px;
        width: min(250px, calc(100vw - 32px));
    }

    .hero {
        min-height: calc(100svh - 72px);
        padding: 52px 16px 72px;
    }

    .hero-content {
        min-height: calc(100svh - 72px - 64px - 72px);
        padding: 0 16px;
        row-gap: 28px;
        align-content: space-between;
    }

    .hero-main {
        transform: none;
        align-items: center;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(2.175rem, 13vw, 3.375rem);
        margin-bottom: 24px;
        align-items: center;
        text-align: center;
    }

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

    .hero-line-secondary {
        margin-left: 0;
    }

    .hero-stats {
        justify-self: end;
        align-items: flex-end;
        text-align: right;
        gap: 14px;
        width: min(100%, 168px);
        margin-top: auto;
        margin-left: auto;
        margin-right: 2px;
    }

    .hero-chevron {
        display: none;
    }

    .hero-stat {
        align-items: flex-end;
    }

    .hero-stat-value {
        font-size: clamp(1.25rem, 7vw, 1.7rem);
    }

    .hero-stat-label {
        font-size: 0.68rem;
    }

    .projects-grid,
    .skills-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        min-height: 230px;
    }

    .skill-card h3 {
        font-size: 1.12rem;
    }

    .skill-card p {
        font-size: 0.92rem;
        line-height: 1.42;
    }

    .contact-status-grid {
        grid-template-columns: 1fr;
    }

    .contact-links li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .section {
        padding: 52px 16px 72px;
    }

    .section-title {
        font-size: clamp(1.65rem, 6.4vw, 2rem);
        margin-bottom: 44px;
    }
}

@media (max-width: 420px) {
    .section-title {
        font-size: clamp(1.45rem, 5.8vw, 1.8rem);
        margin-bottom: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-chevron-sweep-primary,
    .hero-chevron-sweep-secondary {
        opacity: 0.12;
        transform: none !important;
    }
}
