/**
 * Terminal Resume Theme - Main Styles
 * Version: 1.0.0
 */

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --bg: #020712;
    --accent: #22c55e;
    --accent-soft: #4ade80;
    --accent-dim: #a3e635;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #064e3b;
    --danger: #f97373;
    --warn: #facc15;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --r: 999px;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 80% 10%, #052e1688, transparent),
        radial-gradient(ellipse 50% 50% at 10% 90%, #022c2266, transparent),
        radial-gradient(ellipse 40% 30% at 50% 50%, #021c0e44, transparent),
        var(--bg);
}

.orb {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent)18, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    top: -100px;
    right: -100px;
    will-change: transform;
    animation: orb-drift 18s ease-in-out infinite alternate;
}

@keyframes orb-drift {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(-120px, 160px);
    }
}

/* ============================================
   PROGRESS BAR
   ============================================ */
#prog {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    z-index: 9999;
    box-shadow: 0 0 6px var(--accent);
    will-change: width;
    transition: width 0.1s linear;
}

/* ============================================
   PAGE LAYOUT - اصلاح شده
   ============================================ */
.page {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .7rem 1.5rem;
    background: #020f1aee;
    border: 1px solid var(--border);
    position: sticky;
    top: .5rem;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 0 1px #22c55e18, 0 4px 30px #00000088;
    border-radius: 12px;
    min-height: var(--header-height);
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: .3;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 0, var(--accent), #022c22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 0 1px #22c55e44;
    animation: icon-pulse 4s ease-in-out infinite;
    overflow: hidden;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes icon-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 1px #22c55e44;
    }
    50% {
        box-shadow: 0 0 0 1px #22c55e88, 0 0 20px #22c55e33;
    }
}

.brand-name {
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-tag {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--accent-soft);
    background: var(--bg);
    padding: .1rem .4rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
}

.brand-sub {
    font-size: .72rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

nav button {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    padding: .3rem .75rem;
    border-radius: var(--r);
    font-size: .75rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    transition: color .15s, border-color .15s, background .15s, transform .15s;
    white-space: nowrap;
}

nav button .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #16a34a44;
    transition: background .15s, box-shadow .15s;
}

nav button.active {
    color: var(--accent-soft);
    border-color: #16a34a;
    background: radial-gradient(circle at top, #022c22, var(--bg));
    transform: translateY(-1px);
}

nav button.active .dot {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

nav button:hover:not(.active) {
    color: var(--accent-soft);
    border-color: #16a34a;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .3rem .4rem;
    transition: border-color .2s;
}

.burger:hover {
    border-color: var(--accent);
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent-soft);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

.burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid2 {
    /*display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;*/
    align-items: start;
}

.span2 {
    grid-column: 1 / -1;
}

/* ============================================
   PANELS & SECTIONS
   ============================================ */
.panel,
.sect {
    position: relative;
    padding: 1.2rem 1.5rem;
    background: #020f1a;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
    border-radius: 12px;
}

.panel::before,
.sect::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, transparent 14px, #22c55e44 14px, #22c55e44 16px, transparent 16px),
        linear-gradient(-45deg, transparent 14px, #22c55e44 14px, #22c55e44 16px, transparent 16px);
    mix-blend-mode: screen;
    opacity: 0.5;
}

.panel:hover,
.sect:hover {
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #22c55e66, 0 0 30px #22c55e22;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .5s ease, transform .5s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
    margin-top: 30px;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.profile-wrap {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.2rem;
    align-items: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 10%, var(--accent), #022c22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px #22c55e44;
    animation: icon-pulse 4s ease-in-out infinite;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar::after {
    content: "root@me:~$";
    position: absolute;
    bottom: 5px;
    left: 4px;
    right: 4px;
    font-family: var(--mono);
    font-size: .45rem;
    color: #e5e7ebaa;
    background: #020712bb;
    border-radius: var(--r);
    padding: 1px 5px;
    text-align: center;
    pointer-events: none;
}

.p-name {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.p-role {
    font-size: .82rem;
    color: var(--accent-soft);
    margin: .15rem 0;
}

.p-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .4rem;
}

.chip {
    font-size: .7rem;
    padding: .2rem .6rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: .28rem;
}

.chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.chip.hi {
    border-color: #16a34a;
    color: var(--accent-soft);
    display: none;
}

.p-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: .9rem;
}

/* ============================================
   TERMINAL PILL
   ============================================ */
.term-pill {
    font-family: var(--mono);
    font-size: .7rem;
    padding: .25rem .7rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: .28rem;
}

.cursor {
    width: 6px;
    height: 10px;
    background: var(--accent);
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: var(--r);
    border: 1px solid #16a34a;
    background: radial-gradient(circle at top, #16a34a22, var(--bg));
    color: var(--accent-soft);
    padding: .35rem .9rem;
    font-size: .75rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: transform .15s, box-shadow .15s, background .15s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px #16a34a44;
    background: radial-gradient(circle at top, #16a34a33, var(--bg));
}

/* ============================================
   STATUS GRID
   ============================================ */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem .9rem;
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--muted);
}

.s-label {
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .6rem;
    margin-bottom: .12rem;
}

.s-row {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.bar {
    flex: 1;
    height: 5px;
    border-radius: var(--r);
    background: var(--bg);
    overflow: hidden;
    border: 1px solid #022c22;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    width: 0;
    transition: width 1.2s cubic-bezier(.16, 1, .3, 1);
}

.s-badge {
    padding: .08rem .4rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: .62rem;
    min-width: 35px;
    text-align: center;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.sh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid #22c55e22;
}

.sh-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .95rem;
    font-weight: 600;
}

.sh-title .icon {
    font-size: 1.1rem;
}

.tag {
    padding: .1rem .6rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--accent-soft);
    font-size: .68rem;
    font-family: var(--mono);
}

.sh-meta {
    font-size: .7rem;
    color: var(--muted);
    font-family: var(--mono);
}

/* ============================================
   BODY CONTENT
   ============================================ */
.body {
    font-size: .8rem;
    color: var(--text);
    line-height: 1.85;
}

.body p+p {
    margin-top: .5rem;
}

.hi-box {
    display:none!important;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .2rem .7rem;
    border-radius: var(--r);
    border: 1px dashed #16a34a;
    background: var(--bg);
    font-size: .78rem;
    margin-bottom: .6rem;
}

.ping {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: ping 2.5s ease-in-out infinite;
}

@keyframes ping {
    0%,
    100% {
        box-shadow: 0 0 4px var(--accent);
    }
    50% {
        box-shadow: 0 0 14px var(--accent), 0 0 24px #22c55e44;
    }
}

/* ============================================
   TIMELINE
   ============================================ */
.tl {
    position: relative;
    padding-right: 1rem;
    border-right: 1px dashed #064e3b;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tl-item {
    position: relative;
    padding-right: 1rem;
}

.tl-item::before {
    content: "";
    position: absolute;
    right: -1.1rem;
    top: .22rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent-soft);
    box-shadow: 0 0 0 3px var(--bg);
}

.tl-title {
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    gap: .3rem;
    margin-bottom: .12rem;
}

.tl-place {
    color: var(--accent-soft);
    font-weight: 400;
    font-size: .75rem;
}

.tl-meta {
    font-size: .7rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .32rem;
    margin-bottom: .12rem;
}

.tl-body {
    font-size: .75rem;
    color: var(--text);
}

/* ============================================
   SKILLS
   ============================================ */
.sk-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
}

.sk-group-title {
    font-size: .72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}

.sk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.sk-tag {
    font-size: .7rem;
    padding: .2rem .6rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: border-color .15s, background .15s, transform .15s;
    cursor: default;
}

.sk-tag:hover {
    border-color: #16a34a;
    background: #022c22;
    transform: translateY(-2px);
}

.lv {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lv.h {
    background: var(--accent);
    box-shadow: 0 0 5px var(--accent);
}

.lv.m {
    background: var(--warn);
    box-shadow: 0 0 5px var(--warn);
}

.lv.l {
    background: var(--danger);
    box-shadow: 0 0 5px var(--danger);
}

/* ============================================
   SOFT SKILLS
   ============================================ */
.soft-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    font-size: .75rem;
}

.soft-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .5rem;
    border-radius: var(--r);
    border: 1px dashed #064e3b;
    background: var(--bg);
    transition: border-color .15s, transform .15s;
}

.soft-item:hover {
    border-color: #16a34a;
    transform: translateX(-3px);
}

/* ============================================
   PROJECTS
   ============================================ */
.proj-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pc {
    position: relative;
    border: 1px solid var(--border);
    background: #020f1a;
    padding: .9rem 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    cursor: default;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    border-radius: 12px;
}

.pc::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, transparent 14px, #22c55e33 14px, #22c55e33 16px, transparent 16px),
        linear-gradient(-45deg, transparent 14px, #22c55e33 14px, #22c55e33 16px, transparent 16px);
    mix-blend-mode: screen;
    opacity: 0.3;
}

.pc::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #22c55e09, transparent);
    transform: skewX(-15deg);
    transition: left .5s ease;
    pointer-events: none;
}

.pc:hover::after {
    left: 160%;
}

.pc:hover {
    transform: translateY(-3px);
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #16a34a88, 0 0 28px #16a34a33;
}

.pc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .35rem;
}

.pc-title {
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.pc-meta {
    font-size: .68rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .28rem;
}

.pc-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .15rem;
}

.pc-stack span {
    font-size: .62rem;
    padding: .1rem .5rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--accent-soft);
}

.pc-body {
    font-size: .73rem;
    color: var(--text);
    margin-top: .15rem;
    line-height: 1.7;
}

.pc-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    margin-top: .4rem;
}

.pc-link {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    color: var(--accent-soft);
    cursor: pointer;
    transition: color .15s, transform .15s;
    text-decoration: none;
}

.pc-link:hover {
    color: var(--accent-dim);
    transform: translateX(-2px);
}

.pc-status {
    padding: .08rem .4rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    font-size: .62rem;
}

/* ============================================
   CONTACT
   ============================================ */
.ct-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
}

.ct-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.ct-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    padding: .4rem .7rem;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color .2s, transform .2s;
    border-radius: 8px;
}

.ct-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #22c55e0a, transparent);
    transition: width .25s;
}

.ct-item:hover::after {
    width: 100%;
}

.ct-item:hover {
    border-color: #16a34a;
    transform: translateX(-3px);
}

.ct-main {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
}

.ct-main a {
    color: var(--text);
    text-decoration: none;
    transition: color .2s;
}

.ct-main a:hover {
    color: var(--accent-soft);
}

.ct-label {
    color: var(--muted);
    font-size: .7rem;
}

.ct-tag {
    font-size: .65rem;
    padding: .1rem .45rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    color: var(--accent-soft);
    background: var(--bg);
    white-space: nowrap;
}

/* ============================================
   TERMINAL WIDGET
   ============================================ */
.term {
    font-family: var(--mono);
    font-size: .72rem;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .7rem .8rem;
    color: var(--muted);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    min-height: 120px;
}

.term::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #22c55e08, transparent);
    transform: translateX(-100%);
    animation: scan 7s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.term-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.term-dots {
    display: flex;
    gap: .25rem;
}

.term-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.term-dots span:nth-child(1) {
    background: var(--danger);
}
.term-dots span:nth-child(2) {
    background: var(--warn);
}
.term-dots span:nth-child(3) {
    background: var(--accent);
    box-shadow: 0 0 5px var(--accent);
}

.term-body {
    white-space: pre-line;
    line-height: 1.75;
    min-height: 80px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    font-size: .7rem;
    color: var(--muted);
    padding: 1rem .4rem 1.5rem;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #22c55e44, transparent);
}

/* ============================================
   RESPONSIVE DESIGN - اصلاح شده
   ============================================ */

/* تبلت و صفحه‌های متوسط */
@media (max-width: 1024px) {
    .page {
        padding: 1.2rem 1.5rem;
        max-width: 100%;
    }
    
    .grid2 {
        gap: 1rem;
    }
    
    .panel,
    .sect {
        padding: 1rem 1.2rem;
    }
}

/* موبایل بزرگ و تبلت کوچک */
@media (max-width: 768px) {
    .page {
        padding: 0.8rem 1rem;
        gap: 1rem;
        max-width: 100%;
    }
    
    .grid2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .span2 {
        grid-column: auto;
    }
    
    .panel,
    .sect {
        padding: 0.9rem 1rem;
    }
    
    /* Header - Mobile */
    .burger {
        display: flex;
    }
    
    nav {
        display: none;
        position: absolute;
        top: calc(100% + .4rem);
        right: 0;
        flex-direction: column;
        min-width: 180px;
        gap: .2rem;
        background: #020f1aee;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: .5rem;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 8px 30px #00000099;
        z-index: 200;
    }
    
    nav.open {
        display: flex;
        animation: drop .18s ease;
    }
    
    @keyframes drop {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
    
    nav button {
        width: 100%;
        justify-content: flex-start;
        font-size: .78rem;
        padding: .4rem .8rem;
    }
    
    header {
        position: relative;
        flex-wrap: wrap;
        top: 0;
        border-radius: 8px;
        padding: .6rem 1rem;
    }
    
    .brand-sub {
        display: none;
    }
    
    .brand-name {
        font-size: .85rem;
    }
    
    /* Profile */
    .profile-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 0.8rem;
    }
    
    .p-chips {
        justify-content: center;
    }
    
    .p-foot {
        justify-content: center;
    }
    
    .p-name {
        font-size: 1rem;
        justify-content: center;
    }
    
    /* Skills */
    .sk-layout {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .soft-list {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Projects */
    .proj-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* Contact */
    .ct-layout {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .ct-item {
        flex-direction: column;
        align-items: flex-start;
        gap: .3rem;
    }
    
    .ct-tag {
        align-self: flex-start;
    }
    
    /* Status */
    .status-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    /* Timeline */
    .tl-title {
        flex-direction: column;
        gap: .05rem;
    }
    
    .sh {
        flex-direction: column;
        align-items: flex-start;
        gap: .3rem;
    }
    
    .sh-meta {
        font-size: .65rem;
    }
    
    .term {
        font-size: .68rem;
        min-height: 100px;
    }
    
    .term-body {
        font-size: .65rem;
        min-height: 60px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .page {
        padding: 0.6rem 0.8rem;
        gap: 0.8rem;
    }
    
    .panel,
    .sect {
        padding: 0.7rem 0.8rem;
    }
    
    .brand-name {
        font-size: .75rem;
    }
    
    .brand-tag {
        font-size: .55rem;
        padding: .05rem .3rem;
    }
    
    .brand-sub {
        display: none;
    }
    
    .brand-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 1rem;
    }
    
    .avatar {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
    }
    
    .avatar::after {
        font-size: .38rem;
        content: "root@me:~$";
    }
    
    .p-name {
        font-size: .9rem;
    }
    
    .p-role {
        font-size: .72rem;
    }
    
    .chip {
        font-size: .62rem;
        padding: .15rem .4rem;
    }
    
    .soft-list {
        grid-template-columns: 1fr;
    }
    
    .sh-title {
        font-size: .85rem;
    }
    
    .tag {
        font-size: .6rem;
    }
    
    .body {
        font-size: .72rem;
    }
    
    .tl-title {
        font-size: .72rem;
    }
    
    .tl-place {
        font-size: .68rem;
    }
    
    .sk-tag {
        font-size: .62rem;
        padding: .15rem .45rem;
    }
    
    .pc-title {
        font-size: .72rem;
    }
    
    .pc-body {
        font-size: .68rem;
    }
    
    .pc-stack span {
        font-size: .55rem;
    }
    
    .ct-main {
        font-size: .7rem;
    }
    
    .term {
        font-size: .62rem;
        padding: .5rem .6rem;
    }
    
    .term-body {
        font-size: .6rem;
    }
    
    .btn {
        font-size: .68rem;
        padding: .25rem .7rem;
    }
    
    .term-pill {
        font-size: .62rem;
        padding: .15rem .5rem;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .orb {
        animation: none !important;
    }
    
    .term::after {
        animation: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .bg,
    .orb,
    #prog,
    .burger,
    nav,
    .btn,
    .pc-link,
    .pc::after,
    .pc::before {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .page {
        max-width: 100% !important;
        padding: 0.5in !important;
    }
    
    .panel,
    .sect {
        border-color: #ddd !important;
        background: #fff !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .panel::before,
    .sect::before {
        display: none !important;
    }
    
    header {
        background: #fff !important;
        border-color: #ddd !important;
        box-shadow: none !important;
        position: static !important;
        padding: 0.5rem 0 !important;
    }
    
    .brand-name {
        color: #000 !important;
    }
    
    .brand-sub {
        color: #666 !important;
        display: block !important;
    }
    
    .p-name {
        color: #000 !important;
    }
    
    .p-role {
        color: #0066cc !important;
    }
    
    .chip {
        border-color: #ddd !important;
        color: #333 !important;
    }
    
    .chip.hi {
        border-color: #0066cc !important;
        color: #0066cc !important;
    }
    
    .tl-item::before {
        border-color: #0066cc !important;
        background: #fff !important;
    }
    
    .pc {
        border-color: #ddd !important;
        background: #fff !important;
    }
    
    .pc-status {
        border-color: #ddd !important;
        color: #666 !important;
    }
    
    .sk-tag {
        border-color: #ddd !important;
        background: #fff !important;
        color: #333 !important;
    }
    
    .soft-item {
        border-color: #ddd !important;
        background: #fff !important;
        color: #333 !important;
    }
    
    .ct-item {
        border-color: #ddd !important;
        background: #fff !important;
    }
    
    .ct-main a {
        color: #0066cc !important;
    }
    
    .term {
        border-color: #ddd !important;
        background: #f5f5f5 !important;
        color: #333 !important;
    }
    
    .term-dots span {
        background: #ddd !important;
    }
    
    .term-dots span:nth-child(1) {
        background: #ff6b6b !important;
    }
    .term-dots span:nth-child(2) {
        background: #ffd93d !important;
    }
    .term-dots span:nth-child(3) {
        background: #6bcb77 !important;
    }
    
    footer {
        color: #666 !important;
    }
    
    footer::before {
        background: linear-gradient(90deg, transparent, #ddd, transparent) !important;
    }
}



/* ============================================
   INFO ITEMS - تاریخ تولد و وضعیت سربازی
   ============================================ */
.p-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.2rem 0 0.5rem;
}

.p-info-item {
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--bg);
    padding: 0.1rem 0.6rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.p-info-item:hover {
    border-color: #16a34a;
    color: var(--accent-soft);
}


/* ============================================
   CHIPS - ترتیب اولویت‌بندی
   ============================================ */
.p-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    transition: all 0.2s ease;
}

.chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.chip.hi {
    border-color: #16a34a;
    color: var(--accent-soft);
}

.chip:hover {
    border-color: #16a34a;
    color: var(--accent-soft);
    transform: translateY(-1px);
}