@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal.ttf') format('truetype');
}

:root {
    --bg: #12131c;
    --bg-soft: #181a26;
    --surface: #1e2030;
    --surface-2: #262940;
    --line: #31344c;
    --text: #e9e8f2;
    --text-dim: #9496b0;
    --text-faint: #5c5f7a;
    --amber: #e8a33d;
    --amber-soft: #f3c47a;
    --teal: #5fb3a3;
    --rose: #d9705f;
    --accent: #3776ab;
    --font-display: 'Tajawal', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    overflow-x: hidden;
}

::selection {
    background: var(--amber);
    color: #14151f;
}

.ltr {
    direction: rtl;
    unicode-bidi: isolate;
}

.mono {
    font-family: var(--font-mono);
}

/* ===== Background texture ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(-90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .15;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(18, 19, 28, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: .85rem;
    transition: .2s;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.topbar .fname {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-faint);
}

.bg-glow {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    z-index: -1;
    background: radial-gradient(circle, rgba(232, 163, 61, .10) 0%, transparent 65%);
    pointer-events: none;
}

/* ===== IDE Nav ===== */
.ide-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(18, 19, 28, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.ide-nav .titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.r {
    background: #e8615b;
}

.dot.y {
    background: #e8b13d;
}

.dot.g {
    background: #3ee87d;
    opacity: .85;
}

.tabs-row {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-row::-webkit-scrollbar {
    display: none;
}

.ide-tab {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-dim);
    padding: 12px 18px;
    border-right: 1px solid var(--line);
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    transition: .2s;
    position: relative;
    text-decoration: none;
}

.ide-tab:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.ide-tab.active {
    color: var(--amber-soft);
    background: var(--surface);
}

.ide-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--amber);
}

.ide-tab .dim {
    color: var(--text-faint);
}

/* ===== Hero ===== */
.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    font-family: var(--font-mono);
    color: var(--teal);
    font-size: .85rem;
    letter-spacing: .5px;
}

.hero h1 {
    font-weight: 900;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.05;
    margin: .4rem 0 .6rem;
}

.hero h1 span {
    color: var(--amber);
}

.hero .role {
    font-size: 1.3rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-bottom: 1.6rem;
}

.hero p.lead-text {
    color: var(--text-dim);
    max-width: 520px;
    font-size: 1.02rem;
    line-height: 1.9;
}

.p-hero {
    padding: 70px 0 50px;
    border-bottom: 1px solid var(--line);
}

.p-eyebrow {
    font-family: var(--font-mono);
    color: var(--amber);
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-eyebrow::before {
    content: '//';
    color: var(--text-faint);
}

.p-hero h1 {
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin: .5rem 0 .7rem;
}

.p-tagline {
    color: var(--text-dim);
    font-size: 1.15rem;
    max-width: 640px;
    line-height: 1.85;
    margin-bottom: 1.8rem;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2.2rem;
    margin-bottom: 1.8rem;
}

.meta-item .lbl {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.meta-item .val {
    font-weight: 700;
    margin-top: .2rem;
}

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

.btn-accent {
    background: var(--accent);
    border: none;
    color: #14151f;
    font-weight: 700;
    padding: .75rem 1.6rem;
    border-radius: 8px;
    transition: .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-accent:hover {
    filter: brightness(1.1);
    color: #14151f;
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
    padding: .75rem 1.6rem;
    border-radius: 8px;
    transition: .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ghost:hover {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--surface);
}

.thumb-big {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6);
    background: var(--bg-soft);
}

.thumb-big svg {
    width: 100%;
    display: block;
}

.btn-amber {
    background: var(--amber);
    border: none;
    color: #14151f;
    font-weight: 700;
    padding: .75rem 1.6rem;
    border-radius: 8px;
    text-decoration: none;
    transition: .2s;
}

.btn-amber:hover {
    background: var(--amber-soft);
    color: #14151f;
    transform: translateY(-2px);
}

.btn-outline-soft {
    border: 1px solid var(--line);
    color: var(--text);
    padding: .75rem 1.6rem;
    border-radius: 8px;
    text-decoration: none;
    transition: .2s;
}

.btn-outline-soft:hover {
    border-color: var(--amber);
    color: var(--amber-soft);
    background: var(--surface);
}

/* code card */
.code-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}

.code-card .bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.code-card .bar span.fname {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--text-faint);
    margin-left: auto;
}

.code-card pre {
    margin: 0;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: .92rem;
    line-height: 1.9;
    color: #c7c9de;
    direction: ltr;
    text-align: left;
    min-height: 230px;
}

.code-card .k {
    color: var(--rose);
}

.code-card .s {
    color: var(--teal);
}

.code-card .p {
    color: var(--amber-soft);
}

.caret {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--amber);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ===== Section shell ===== */
.section {
    padding: 100px 0;
    border-bottom: 1px solid var(--line);
}

.section-head {
    margin-bottom: 3rem;
}

.section-tag {
    font-family: var(--font-mono);
    color: var(--amber);
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: .6rem;
}

.section-tag::before {
    content: '//';
    color: var(--text-faint);
}

.section-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

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

/* ===== About ===== */
.about-text {
    font-size: 1.08rem;
    line-height: 2.05;
    color: var(--text-dim);
}

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

.stat-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.4rem 1rem;
    text-align: center;
}

.stat-box .num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--amber);
}

.stat-box .lbl {
    color: var(--text-dim);
    font-size: .85rem;
    margin-top: .3rem;
}

/* ===== Skills ===== */
.skill-group {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.8rem;
    height: 100%;
}

.skill-group h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--teal);
    margin-bottom: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-row {
    margin-bottom: 1.1rem;
}

.skill-row:last-child {
    margin-bottom: 0;
}

.skill-row .top {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--text-dim);
}

.skill-track {
    height: 6px;
    background: var(--bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(-90deg, var(--amber), var(--amber-soft));
    width: 0;
    transition: width 1.4s cubic-bezier(.16, 1, .3, 1);
}

/* ===== Experience — commit log ===== */
.commit-log {
    position: relative;
    padding-left: 34px;
}

.commit-log::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--line), var(--line) 90%, transparent);
}

.commit {
    position: relative;
    padding-bottom: 2.6rem;
}

.commit:last-child {
    padding-bottom: 0;
}

.commit::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--amber);
}

.commit-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.6rem 1.8rem;
}

.commit-meta {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-faint);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: .5rem;
    direction: rtl;
    justify-content: flex-end;
}

.commit-meta .hash {
    color: var(--amber-soft);
}

.commit-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: .15rem;
}

.commit-company {
    color: var(--teal);
    font-size: .95rem;
    margin-bottom: 1rem;
}

.commit-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-dim);
}

.commit-card li {
    margin-bottom: .4rem;
    line-height: 1.75;
}

.diffstat {
    font-family: var(--font-mono);
    font-size: .8rem;
    margin-top: 1rem;
    direction: rtl;
    text-align: left;
}

.diffstat .add {
    color: #4fd67a;
}

.diffstat .rem {
    color: var(--rose);
}

/* ===== Projects ===== */
.proj-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: .25s;
}

.proj-card:hover {
    border-color: var(--amber);
    transform: translateY(-5px);
}

.proj-top {
    padding: 14px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.proj-top .fname {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-faint);
}

/* thumbnail preview */
.proj-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.proj-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.proj-thumb img {
    width: 100%;
    height: 100%;
    display: block;
}

.proj-thumb .peek {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 19, 28, .55);
    opacity: 0;
    transition: .25s;
    backdrop-filter: blur(2px);
}

.proj-card:hover .peek {
    opacity: 1;
}

.peek-btn {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: #14151f;
    background: var(--amber);
    padding: .5rem 1.1rem;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transform: translateY(8px);
    transition: .25s;
}

.proj-card:hover .peek-btn {
    transform: translateY(0);
}

.peek-btn:hover {
    background: var(--amber-soft);
}

.proj-body {
    padding: 1.5rem 1.6rem 1.7rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.proj-body h3 {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: .5rem;
}

.proj-body p {
    color: var(--text-dim);
    font-size: .95rem;
    line-height: 1.8;
    flex-grow: 1;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.2rem;
}

.stack-tags span {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-dim);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 4px 12px;
    direction: rtl;
}

.proj-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.3rem;
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    width: fit-content;
    transition: .2s;
}

.proj-link:hover {
    color: var(--amber-soft);
    border-color: var(--amber-soft);
}

.proj-link svg {
    width: 14px;
    height: 14px;
    transition: .2s;
}

.proj-link:hover svg {
    transform: translate(-2px, -2px);
}

/* ===== Education ===== */
.edu-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.6rem 1.8rem;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.edu-icon {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
    color: var(--amber);
    font-weight: 700;
}

.edu-card h3 {
    font-weight: 700;
    font-size: 1.08rem;
    margin-bottom: .2rem;
}

.edu-card .meta {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: .8rem;
}

.edu-card p {
    color: var(--text-dim);
    margin: .5rem 0 0;
    font-size: .92rem;
}

/* ===== Contact ===== */
.terminal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6);
}

.terminal .bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.terminal .bar .fname {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--text-faint);
    margin-left: auto;
}

.terminal-body {
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: .92rem;
    line-height: 2.1;
    direction: ltr;
    text-align: left;
    color: #c7c9de;
}

.terminal-body .prompt {
    color: var(--teal);
}

.terminal-body .cmd {
    color: var(--amber-soft);
}

.terminal-body a {
    color: #8fd3ff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(143, 211, 255, .4);
}

.terminal-body a:hover {
    color: var(--amber-soft);
    border-color: var(--amber-soft);
}

footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: .8rem;
}

@media (max-width:767px) {
    .commit-log {
        padding-left: 26px;
    }

    .commit::before {
        left: -27px;
    }
}

/* ===== Light theme ===== */
body.light-theme {
    --bg: #f6f5f0;
    --bg-soft: #efeee6;
    --surface: #ffffff;
    --surface-2: #f1f0e8;
    --line: #e2ded0;
    --text: #1d1e26;
    --text-dim: #5c5d6d;
    --text-faint: #8b8c9a;
}

body.light-theme .bg-grid {
    opacity: .08;
}

body.light-theme .bg-glow {
    opacity: .5;
}

body.light-theme .code-card pre,
body.light-theme .terminal-body {
    color: #c7c9de;
}

/* components that must always keep the dark "editor" look, regardless of theme */
.editor-locked {
    --bg: #12131c;
    --bg-soft: #181a26;
    --surface: #1e2030;
    --surface-2: #262940;
    --line: #31344c;
    --text: #e9e8f2;
    --text-dim: #9496b0;
    --text-faint: #5c5f7a;
}

/* ===== Reading progress bar ===== */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1200;
    background: transparent;
}

.progress-line .fill {
    height: 100%;
    width: 0;
    background: linear-gradient(-90deg, var(--amber), var(--teal));
    transition: width .1s linear;
}

/* ===== Theme toggle ===== */
.theme-toggle {
    margin-left: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-dim);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--amber-soft);
    border-color: var(--amber);
}

.theme-toggle svg {
    width: 14px;
    height: 14px;
}

/* ===== Avatar ===== */
.hero-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-135deg, var(--amber), var(--teal));
    font-family: var(--font-mono);
    font-weight: 700;
    color: #14151f;
    font-size: 1.05rem;
    border: 2px solid var(--line);
}

.hero-id {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: .3rem;
}

.avatar-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.avatar-frame {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    margin: 0 auto 1.2rem;
    position: relative;
    background: linear-gradient(-155deg, var(--amber) 0%, #e8734d 45%, var(--teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-frame::before,
.avatar-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--bg);
    border-style: solid;
}

.avatar-frame::before {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
    border-radius: 8px 0 0 0;
}

.avatar-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 3px 3px 0;
    border-radius: 0 0 8px 0;
}

.avatar-frame .initials {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 2.4rem;
    color: #14151f;
}

.avatar-card h3 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .2rem;
}

.avatar-card .meta {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: .8rem;
}

.avatar-note {
    margin-top: 1.2rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
    border-top: 1px dashed var(--line);
    padding-top: 1rem;
}

/* ===== Achievement badges ===== */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.6rem;
}

.badge-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: .55rem 1rem;
    font-size: .85rem;
    color: var(--text-dim);
}

.badge-chip .ico {
    font-size: 1rem;
}

.badge-chip strong {
    color: var(--text);
    font-weight: 700;
}

/* ===== Languages (inside skills) ===== */
.lang-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .9rem;
    font-size: .9rem;
    color: var(--text-dim);
}

.lang-row:last-child {
    margin-bottom: 0;
}

.lang-level {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--teal);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2px 10px;
}

/* ===== Project filters ===== */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2.2rem;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: .45rem 1.1rem;
    cursor: pointer;
    transition: .2s;
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--amber);
}

.filter-btn.active {
    background: var(--amber);
    color: #14151f;
    border-color: var(--amber);
    font-weight: 700;
}

.proj-card.hide-filtered {
    display: none;
}

/* ===== Testimonials (review cards) ===== */
.review-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.6rem 1.8rem;
    height: 100%;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.1rem;
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: .85rem;
    color: #14151f;
}

.review-name {
    font-weight: 700;
    font-size: .98rem;
}

.review-role {
    color: var(--text-faint);
    font-size: .8rem;
}

.review-approved {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: .68rem;
    color: #4fd67a;
    border: 1px solid rgba(79, 214, 122, .35);
    border-radius: 12px;
    padding: 3px 9px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.review-text {
    color: var(--text-dim);
    font-size: .94rem;
    line-height: 1.85;
}

.review-stars {
    margin-top: 1rem;
    color: var(--amber);
    letter-spacing: 2px;
    font-size: .85rem;
}

/* ===== Copy email button ===== */
.copy-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-faint);
    border-radius: 6px;
    padding: 2px 9px;
    font-family: var(--font-mono);
    font-size: .7rem;
    cursor: pointer;
    margin-left: 8px;
    transition: .2s;
}

.copy-btn:hover {
    color: var(--amber-soft);
    border-color: var(--amber-soft);
}

.copy-btn.copied {
    color: #4fd67a;
    border-color: #4fd67a;
}

/* ===== Back to top ===== */
.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s;
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, .5);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    border-color: var(--amber);
    color: var(--amber-soft);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ===== Print stylesheet ===== */
@media print {

    .ide-nav,
    .bg-grid,
    .bg-glow,
    .back-to-top,
    .progress-line,
    .peek,
    .filter-row,
    .theme-toggle,
    .btn,
    footer,
    .proj-link,
    .avatar-note,
    #pdfBtn {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #111 !important;
    }

    .section {
        padding: 22px 0;
        border-bottom: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .code-card,
    .terminal,
    .skill-group,
    .commit-card,
    .proj-card,
    .edu-card,
    .avatar-card,
    .stat-box,
    .review-card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        color: #111 !important;
    }

    .hero {
        min-height: auto;
    }

    a {
        color: #111 !important;
        text-decoration: underline;
    }
}

.swal2-container {
    z-index: 1000000;
}