:root {
    --bg: #07111b;
    --bg-soft: rgba(9, 20, 31, 0.82);
    --bg-surface: rgba(13, 26, 40, 0.78);
    --bg-surface-strong: rgba(10, 19, 30, 0.92);
    --bg-light: #f4f8fb;
    --bg-light-surface: rgba(255, 255, 255, 0.8);
    --text: #edf5ff;
    --text-muted: #9cb1c7;
    --text-soft: #73879f;
    --line: rgba(96, 255, 129, 0.12);
    --line-strong: rgba(128, 255, 151, 0.34);
    --accent: #62ff81;
    --accent-strong: #b7ffbf;
    --accent-deep: #1acb42;
    --accent-alt: #12291a;
    --danger: #ff5a74;
    --warning: #ffd36a;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: min(1200px, calc(100vw - 32px));
    --header-height: 82px;
    --transition: 180ms ease;
    --sans: "Segoe UI Variable", "Aptos", "Inter", "Trebuchet MS", sans-serif;
    --mono: "Consolas", "Cascadia Code", "Lucida Console", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(14, 61, 31, 0.42), transparent 24%),
        radial-gradient(circle at top left, rgba(17, 45, 77, 0.32), transparent 20%),
        linear-gradient(180deg, #060d15 0%, #07111b 44%, #0a1420 100%);
    font-family: var(--sans);
    overflow-x: hidden;
}

body.theme-light {
    --bg: #edf5f4;
    --bg-soft: rgba(237, 245, 244, 0.9);
    --bg-surface: rgba(255, 255, 255, 0.78);
    --bg-surface-strong: rgba(255, 255, 255, 0.94);
    --text: #102131;
    --text-muted: #466073;
    --text-soft: #698295;
    --line: rgba(15, 121, 114, 0.12);
    --line-strong: rgba(15, 121, 114, 0.26);
    --accent: #0f8f84;
    --accent-strong: #0a6f81;
    --accent-deep: #095a68;
    --accent-alt: #dff3ef;
    --shadow: 0 18px 58px rgba(38, 64, 84, 0.12);
    background:
        radial-gradient(circle at top right, rgba(15, 143, 132, 0.12), transparent 22%),
        radial-gradient(circle at top left, rgba(92, 145, 223, 0.14), transparent 20%),
        linear-gradient(180deg, #edf5f4 0%, #e6eff1 38%, #f7faf9 100%);
}

body.theme-light::before {
    opacity: 0.14;
}

body.theme-light #matrix-canvas {
    opacity: 0.018;
}

body.theme-light #particle-canvas {
    opacity: 0.08;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 96%, rgba(98, 255, 129, 0.035) 96% 100%),
        linear-gradient(180deg, transparent 0 96%, rgba(98, 255, 129, 0.025) 96% 100%);
    background-size: 72px 72px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -52px;
    z-index: 120;
    padding: 10px 14px;
    background: var(--bg-surface-strong);
    border-radius: 10px;
    border: 1px solid var(--line-strong);
}

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

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 16px rgba(98, 255, 129, 0.44);
    z-index: 110;
}

#matrix-canvas,
#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#matrix-canvas {
    opacity: 0.12;
}

#particle-canvas {
    opacity: 0.42;
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    background: rgba(5, 10, 16, 0.96);
    transition: opacity 320ms ease, visibility 320ms ease;
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-panel {
    width: min(420px, calc(100vw - 32px));
    padding: 28px;
    border-radius: 24px;
    background: rgba(10, 18, 28, 0.92);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
}

.preloader-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.shield-mark,
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(98, 255, 129, 0.18), rgba(7, 18, 14, 0.9));
    box-shadow: inset 0 0 0 1px rgba(183, 255, 191, 0.2);
}

.shield-mark {
    width: 56px;
    height: 56px;
}

.shield-mark svg,
.brand-mark svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.preloader-logo strong,
.brand-text strong {
    display: block;
    margin-bottom: 3px;
    font-size: 1rem;
}

.preloader-logo span,
.brand-text span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.preloader-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.preloader-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 18px rgba(98, 255, 129, 0.6);
}

.preloader-text {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-family: var(--mono);
}

.page-shell {
    position: relative;
    z-index: 1;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(7, 16, 24, 0.74);
    border-bottom: 1px solid rgba(98, 255, 129, 0.08);
}

body.theme-light .site-header {
    background: rgba(241, 248, 248, 0.88);
    border-bottom-color: rgba(15, 121, 114, 0.08);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav a,
.mobile-menu a {
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition);
}

.site-nav a::after,
.mobile-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-menu a:hover {
    color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.is-active::after,
.mobile-menu a:hover::after {
    transform: scaleX(1);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.theme-toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(98, 255, 129, 0.52);
    transition: transform var(--transition);
}

body.theme-light .theme-toggle-thumb {
    transform: translateX(20px);
}

.theme-toggle-label {
    color: var(--text-muted);
    font-size: 0.84rem;
}

body.theme-light .shield-mark,
body.theme-light .brand-mark {
    background: linear-gradient(180deg, rgba(15, 143, 132, 0.16), rgba(255, 255, 255, 0.92));
    box-shadow: inset 0 0 0 1px rgba(10, 111, 129, 0.16);
}

body.theme-light .theme-toggle,
body.theme-light .menu-toggle,
body.theme-light .floating-socials a,
body.theme-light .scroll-top,
body.theme-light .modal-close,
body.theme-light .button-secondary,
body.theme-light .button-ghost {
    background: rgba(255, 255, 255, 0.76);
}

body.theme-light .theme-toggle-track {
    background: rgba(15, 121, 114, 0.16);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu {
    display: none;
}

.floating-socials {
    position: fixed;
    right: 18px;
    top: 50%;
    z-index: 60;
    display: grid;
    gap: 12px;
    transform: translateY(-50%);
}

.floating-socials a {
    display: grid;
    place-items: center;
    min-width: 54px;
    min-height: 54px;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(9, 22, 33, 0.76);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--text-muted);
    text-transform: uppercase;
    font-family: var(--mono);
    font-size: 0.82rem;
    transition:
        transform var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.floating-socials a:hover {
    transform: translateY(-2px);
    color: var(--accent-strong);
    border-color: var(--line-strong);
}

.section {
    padding: 56px 0 96px;
}

.section-tight {
    padding: 16px 0 32px;
}

.section-heading {
    display: grid;
    gap: 14px;
    margin-bottom: 36px;
    max-width: 780px;
}

.section-heading h2,
.contact-intro h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.section-heading p,
.story-card p,
.glass-panel p,
.terminal-output,
.contact-intro p,
.ping-result {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.74;
}

.reveal {
    opacity: 1;
}

.reveal.is-visible {
    animation: riseIn 520ms ease both;
}

.hero {
    padding-top: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 34px;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
}

.terminal-line {
    margin: 0 0 16px;
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.hero-title {
    margin: 0;
    font-size: clamp(3.2rem, 7vw, 6rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.hero-subtitle {
    min-height: 1.3em;
    margin: 16px 0 0;
    font-size: clamp(1.45rem, 3vw, 2.5rem);
    line-height: 1.14;
    color: var(--text);
}

.hero-summary {
    max-width: 700px;
    margin: 24px 0 0;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.85;
}

.hero-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-pill-row span,
.terminal-output code,
.badge,
.project-meta span,
.skill-list span,
.credential-tag {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.84rem;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background-color var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #04110a;
    box-shadow: 0 14px 38px rgba(98, 255, 129, 0.3);
}

body.theme-light .button-primary,
body.theme-light .filter-chip.is-active,
body.theme-light .filter-chip:hover {
    color: #f5fffd;
}

body.theme-light .button-primary {
    box-shadow: 0 12px 32px rgba(15, 143, 132, 0.18);
}

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

.button-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--line);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 0;
    margin: 24px 0 0;
    list-style: none;
    color: var(--text-soft);
}

.hero-meta li {
    position: relative;
    padding-left: 14px;
}

.hero-meta li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%);
}

.glass-panel,
.hero-visual-shell,
.stats-card,
.focus-card,
.timeline-card,
.project-card,
.skill-card,
.credentials-card,
.contact-card,
.terminal-panel,
.strengths-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-strong));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-visual-shell {
    position: relative;
    min-height: 640px;
    padding: 22px;
    border-radius: 34px;
    overflow: hidden;
}

.hero-visual-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(98, 255, 129, 0.09), transparent 34%),
        linear-gradient(180deg, rgba(98, 255, 129, 0.05), transparent 32%);
    pointer-events: none;
}

body.theme-light .hero-visual-shell::before {
    background:
        radial-gradient(circle at 50% 30%, rgba(15, 143, 132, 0.08), transparent 36%),
        linear-gradient(180deg, rgba(15, 143, 132, 0.04), transparent 34%);
}

.hero-visual-header,
.terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot,
.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.hero-dot-red,
.terminal-dots span:nth-child(1) {
    background: var(--danger);
}

.hero-dot-yellow,
.terminal-dots span:nth-child(2) {
    background: var(--warning);
}

.hero-dot-green,
.terminal-dots span:nth-child(3) {
    background: var(--accent);
}

.hero-visual-header p,
.terminal-header p {
    margin: 0;
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 0.86rem;
}

.hero-visual-body {
    position: relative;
    min-height: 560px;
}

.shield-display {
    position: absolute;
    inset: 62px 42px 110px;
    display: grid;
    place-items: center;
    border-radius: 32px;
    background:
        radial-gradient(circle at 50% 50%, rgba(98, 255, 129, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(8, 20, 14, 0.5), transparent);
    overflow: hidden;
}

body.theme-light .shield-display {
    background:
        radial-gradient(circle at 50% 50%, rgba(15, 143, 132, 0.1), transparent 50%),
        linear-gradient(180deg, rgba(188, 227, 221, 0.34), transparent);
}

.shield-display::before,
.shield-display::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(183, 255, 191, 0.16);
}

body.theme-light .shield-display::before,
body.theme-light .shield-display::after {
    border-color: rgba(10, 111, 129, 0.12);
}

.shield-display::before {
    width: 76%;
    height: 76%;
    animation: spinSlow 18s linear infinite;
}

.shield-display::after {
    width: 92%;
    height: 92%;
    animation: spinSlowReverse 26s linear infinite;
}

.shield-display svg {
    width: min(100%, 300px);
    height: auto;
    filter: drop-shadow(0 0 22px rgba(98, 255, 129, 0.3));
    animation: floatGraphic 5s ease-in-out infinite;
}

.shield-outline,
.shield-core,
.shield-line,
.lock-head,
.lock-body {
    fill: none;
    stroke: url(#heroShieldGradient);
}

.shield-outline {
    stroke-width: 5;
}

.shield-core,
.shield-line {
    stroke-width: 2.2;
}

.lock-head {
    stroke-width: 6;
    stroke-linecap: round;
}

.lock-body {
    stroke-width: 4;
}

.hero-status-card {
    position: absolute;
    display: grid;
    gap: 6px;
    max-width: 220px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(7, 17, 24, 0.84);
    border: 1px solid rgba(128, 255, 151, 0.15);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    animation: driftCard 6s ease-in-out infinite;
}

body.theme-light .hero-status-card {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(15, 121, 114, 0.12);
    box-shadow: 0 16px 36px rgba(46, 69, 88, 0.12);
}

.hero-status-card span,
.card-header .section-code,
.modal-kicker {
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-status-card strong {
    font-size: 1rem;
}

.hero-status-card p {
    font-size: 0.87rem;
}

.card-left {
    left: 0;
    top: 92px;
    animation-delay: -1s;
}

.card-right {
    right: 0;
    top: 146px;
    animation-delay: -2.3s;
}

.card-bottom {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    max-width: 260px;
    animation-delay: -3.1s;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stats-card {
    padding: 22px;
    border-radius: 20px;
}

.stats-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1;
}

.stats-card span {
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stats-card p {
    margin: 0;
    color: var(--text-muted);
}

.about-layout,
.terminal-layout,
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 22px;
}

.story-card,
.terminal-panel,
.strengths-panel,
.contact-intro {
    padding: 28px;
    border-radius: 28px;
}

.card-header {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.card-header h3,
.card-header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

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

.focus-card {
    padding: 22px;
    border-radius: 22px;
}

.focus-card h3,
.project-card h3,
.skill-card h3 {
    margin: 10px 0 10px;
    font-size: 1.12rem;
}

.terminal-output {
    min-height: 240px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(4, 9, 14, 0.78);
    border: 1px solid rgba(98, 255, 129, 0.1);
    font-family: var(--mono);
    font-size: 0.95rem;
    white-space: pre-wrap;
}

body.theme-light .terminal-output,
body.theme-light .terminal-form {
    background: rgba(246, 250, 250, 0.9);
    border-color: rgba(15, 121, 114, 0.12);
}

.terminal-form {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(4, 9, 14, 0.78);
    border: 1px solid rgba(98, 255, 129, 0.1);
}

.terminal-form .prompt {
    color: var(--accent-strong);
    font-family: var(--mono);
}

.terminal-form input {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.terminal-form input::placeholder {
    color: var(--text-soft);
    opacity: 1;
}

.check-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.8;
}

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(180deg, rgba(98, 255, 129, 0.5), rgba(98, 255, 129, 0.06));
}

.timeline-item {
    position: relative;
    padding-left: 56px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 22px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-strong), var(--accent));
    box-shadow: 0 0 20px rgba(98, 255, 129, 0.5);
}

.timeline-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.74fr) minmax(250px, 0.92fr);
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.timeline-card:hover,
.project-card:hover,
.skill-card:hover,
.contact-card:hover,
.focus-card:hover,
.stats-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
}

.timeline-card.is-featured,
.timeline-item.is-featured .timeline-card {
    background:
        linear-gradient(135deg, rgba(12, 30, 22, 0.74), rgba(8, 18, 29, 0.92)),
        linear-gradient(180deg, var(--bg-surface), var(--bg-surface-strong));
}

body.theme-light .timeline-card.is-featured,
body.theme-light .timeline-item.is-featured .timeline-card {
    background:
        linear-gradient(135deg, rgba(225, 245, 241, 0.94), rgba(240, 248, 249, 0.98)),
        linear-gradient(180deg, var(--bg-surface), var(--bg-surface-strong));
}

.timeline-brand {
    display: grid;
    gap: 12px;
    align-content: start;
}

.company-logo {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(14, 33, 25, 0.96), rgba(8, 17, 27, 0.92));
    border: 1px solid rgba(183, 255, 191, 0.14);
    position: relative;
    overflow: hidden;
}

body.theme-light .company-logo {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(232, 243, 242, 0.92));
    border-color: rgba(15, 121, 114, 0.14);
}

.company-logo::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 18px;
    border: 1px solid rgba(183, 255, 191, 0.12);
}

body.theme-light .company-logo::before {
    border-color: rgba(15, 121, 114, 0.12);
}

.company-logo svg {
    width: 56px;
    height: 56px;
    position: relative;
    z-index: 2;
}

.brand-orbit {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(183, 255, 191, 0.25);
    border-right-color: transparent;
    animation: orbitSpin 7s linear infinite;
}

body.theme-light .brand-orbit {
    border-color: rgba(15, 121, 114, 0.2);
    border-right-color: transparent;
}

.brand-orbit::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(98, 255, 129, 0.56);
}

.company-logo .crest-fill {
    fill: rgba(98, 255, 129, 0.1);
    stroke: rgba(183, 255, 191, 0.78);
    stroke-width: 1.8;
}

body.theme-light .company-logo .crest-fill {
    fill: rgba(15, 143, 132, 0.08);
    stroke: rgba(10, 111, 129, 0.72);
}

.company-logo .crest-line {
    fill: none;
    stroke: rgba(183, 255, 191, 0.9);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-light .company-logo .crest-line {
    stroke: rgba(10, 111, 129, 0.82);
}

.company-logo .crest-letter {
    fill: rgba(241, 255, 244, 0.94);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
}

body.theme-light .company-logo .crest-letter {
    fill: #16314a;
}

.timeline-date,
.company-meta,
.project-kicker {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.86rem;
    line-height: 1.6;
}

.company-meta strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
}

.timeline-content h3 {
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.timeline-content p {
    margin: 0;
}

.timeline-points {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.72;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-chip {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #04110a;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
}

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

.project-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 24px;
}

.project-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.skill-card {
    padding: 24px;
    border-radius: 24px;
}

.skill-card p {
    margin: 0 0 16px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.credentials-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
    gap: 20px;
}

.credentials-card {
    padding: 26px;
    border-radius: 28px;
}

.credentials-list,
.education-list,
.contact-grid {
    display: grid;
    gap: 14px;
}

.credential-item,
.education-item,
.contact-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(98, 255, 129, 0.08);
}

body.theme-light .credential-item,
body.theme-light .education-item,
body.theme-light .contact-card,
body.theme-light .resume-preview-role {
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(15, 121, 114, 0.1);
}

.credential-item strong,
.education-item strong,
.contact-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 1rem;
}

.credential-item p,
.education-item p,
.contact-card p {
    margin: 0;
}

.education-item small,
.contact-card span {
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.ping-result {
    min-height: 1.7em;
    margin-top: 16px;
    font-family: var(--mono);
    color: var(--accent-strong);
}

.site-footer {
    padding: 0 0 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.footer-inner p {
    margin: 0;
}

.scroll-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: 52px;
    height: 52px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(7, 18, 28, 0.88);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-2px);
}

.resume-modal {
    width: min(1020px, calc(100vw - 24px));
    padding: 0;
    border: 0;
    border-radius: 28px;
    background: transparent;
    color: inherit;
}

.resume-modal::backdrop {
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(8px);
}

.resume-modal-shell {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-strong));
    box-shadow: var(--shadow);
}

.resume-modal-header,
.resume-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.resume-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    justify-content: flex-end;
}

.resume-modal-header h2 {
    margin: 4px 0 0;
    font-size: 1.35rem;
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    font-size: 1.45rem;
}

.resume-modal-body {
    max-height: 72vh;
    overflow: auto;
    background: rgba(255, 255, 255, 0.03);
}

.resume-preview-content {
    display: grid;
    gap: 22px;
    padding: 28px 24px;
}

.resume-preview-header {
    display: grid;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.resume-preview-header h3 {
    margin: 0;
    font-size: 1.9rem;
}

.resume-preview-header p,
.resume-preview-section p,
.resume-preview-list,
.resume-preview-role ul {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.resume-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--text-soft);
}

.resume-preview-section {
    display: grid;
    gap: 12px;
}

.resume-preview-section h4 {
    margin: 0;
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resume-preview-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.resume-preview-list,
.resume-preview-role ul {
    padding-left: 18px;
}

.resume-preview-role {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(98, 255, 129, 0.08);
}

.resume-preview-role strong {
    font-size: 1rem;
}

.resume-preview-role span {
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 0.84rem;
}

.resume-preview-edu-grid {
    display: grid;
    gap: 12px;
}

.noscript-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 120;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 210, 106, 0.92);
    color: #261d00;
}

@keyframes riseIn {
    from {
        opacity: 0.18;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinSlowReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes floatGraphic {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes driftCard {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@media (max-width: 1180px) {
    .hero-grid,
    .about-layout,
    .terminal-layout,
    .contact-layout,
    .credentials-layout,
    .timeline-card {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .projects-grid,
    .skills-grid,
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .timeline-brand {
        grid-template-columns: auto 1fr;
        align-items: center;
    }
}

@media (max-width: 900px) {
    .site-nav,
    .theme-toggle {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu {
        display: none;
        padding: 0 16px 16px;
    }

    .mobile-menu.is-open {
        display: grid;
        gap: 12px;
    }

    .floating-socials {
        display: none;
    }

    .hero-visual-shell {
        min-height: 560px;
    }
}

@media (max-width: 720px) {
    .stats-grid,
    .projects-grid,
    .skills-grid,
    .about-card-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 42px 0 72px;
    }

    .hero-actions .button,
    .contact-actions .button {
        width: 100%;
    }

    .hero-meta {
        display: grid;
    }

    .hero-visual-shell {
        min-height: 500px;
        padding: 18px;
    }

    .shield-display {
        inset: 58px 18px 136px;
    }

    .hero-status-card {
        max-width: none;
    }

    .card-left,
    .card-right,
    .card-bottom {
        left: 16px;
        right: 16px;
        transform: none;
    }

    .card-left {
        top: 72px;
    }

    .card-right {
        top: auto;
        bottom: 78px;
    }

    .card-bottom {
        bottom: 12px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline::before {
        left: 14px;
    }

    .timeline-item::before {
        left: 7px;
    }

    .resume-modal {
        width: calc(100vw - 16px);
    }

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

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1 !important;
    }
}
