@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #111210;
  --panel: #191a17;
  --panel-soft: #20211d;
  --text: #f2f0e8;
  --muted: #a3a49a;
  --line: #30312b;
  --accent: #d9f36a;
  --accent-dark: #b9d34f;
  --max: 1160px;
}
body.darkmode{
  --bg: #F5F0E8;
  --panel: #E8DED0;
  --panel-soft: #D8C7B3;
  --text: #3E3026;
  --muted: #806D5C;
  --line: #CDBBA6;
  --accent: #C49A6C;
  --accent-dark: #A77D50; 

}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 95px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Vazirmatn", Tahoma, sans-serif; line-height: 1.8; transition: all 0.5s ease-in-out;}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { color: #111210; background: var(--accent); }
.page-shell { max-width: 1440px; margin: 0 auto; padding: 0 7.2%; overflow: hidden; }

.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 0px; border-bottom: 1px solid var(--line); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--accent); color: #171812; border-radius: 9px; font-weight: 800; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); color: var(--muted); font-size: 13px; }
.nav a, .social-links a { transition: color .2s ease; }
.nav a:hover, .social-links a:hover { color: var(--accent); }
.top-cta { border: 1px solid #44453c; border-radius: 6px; padding: 8px 14px; font-size: 12px; transition: .2s ease; }
.top-cta span, .text-link span, .inline-link span { color: var(--accent); margin-right: 7px; }
.top-cta:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.menu-toggle { display: none; background: transparent; color: var(--text); border: 1px solid var(--line); padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.hero { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 7%; padding: 84px 0 86px; min-height: 640px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; margin: 0 0 24px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #d9f36a1c; flex: 0 0 auto; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font-size: clamp(42px, 5.3vw, 76px); line-height: 1.35; letter-spacing: -2px; margin: 0 0 22px; font-weight: 700; }
.accent { color: var(--accent); }
.hero-description { max-width: 480px; color: var(--muted); font-size: 14px; line-height: 2.1; margin-bottom: 29px; }
.hero-actions { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 20px; padding: 11px 17px; border-radius: 5px; font-size: 12px; font-weight: 600; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--accent); color: #171812; }
.button-primary:hover { background: #e6ff88; }
.text-link, .inline-link { font-size: 12px; color: var(--text); }
.hero-meta { display: flex; gap: clamp(22px, 4vw, 47px); margin-top: 52px; padding-top: 23px; border-top: 1px solid var(--line); }
.hero-meta > div { display: flex; flex-direction: column; gap: 1px; }
.meta-number { font-size: 20px; font-weight: 700; direction: ltr; text-align: right; }
.meta-label { font-size: 10px; color: var(--muted); }
.hero-art { position: relative; min-height: 425px; display: grid; place-items: center; isolation: isolate; }
.art-grid { position: absolute; inset: 15px 0; z-index: -2; opacity: .35; background-image: linear-gradient(#37382f 1px, transparent 1px), linear-gradient(90deg, #37382f 1px, transparent 1px); background-size: 31px 31px; mask-image: radial-gradient(ellipse, #000 15%, transparent 72%); }
.orbit { position: absolute; border: 1px solid #d9f36a25; border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 360px; height: 220px; }
.orbit-two { width: 290px; height: 390px; transform: rotate(42deg); }
.code-card { width: min(100%, 370px); position: relative; z-index: 1; border: 1px solid #42443a; background: #171815; border-radius: 11px; box-shadow: 0 24px 80px #0008; overflow: hidden; transform: rotate(-2deg); }
.code-card-top { height: 43px; display: flex; align-items: center; gap: 6px; padding: 0 15px; border-bottom: 1px solid #30312b; }
.code-card-top > span { width: 7px; height: 7px; border-radius: 50%; background: #595a50; }
.code-card-top > span:first-child { background: #db7669; }.code-card-top > span:nth-child(2) { background: #d9b45b; }.code-card-top > span:nth-child(3) { background: #8dbb75; }
.code-card-top small { color: #77796e; font-size: 10px; margin-right: auto; direction: ltr; }
.code-lines { padding: 20px 15px 13px; direction: ltr; text-align: left; font-family: Consolas, monospace; font-size: 12px; }
.code-lines p { display: flex; gap: 13px; margin-bottom: 10px; white-space: pre; }
.code-lines i { font-style: normal; color: #66685e; width: 15px; text-align: right; }
.code-lines b { color: #e9e7dc; font-weight: 500; }.code-lines .purple { color: #c69be7; }.code-lines em { color: var(--accent); font-style: normal; }.code-lines .green { color: #8ed3b0; }.muted-code { color: #72776a; }
.code-card-footer { display: flex; align-items: center; gap: 9px; border-top: 1px solid #30312b; padding: 11px 15px; color: #96988c; font-size: 10px; }
.code-card-footer .status-dot { width: 6px; height: 6px; }
.floating-tag { position: absolute; z-index: 2; background: #24251f; border: 1px solid #45473b; border-radius: 6px; padding: 8px 12px; font-family: Consolas, monospace; font-size: 10px; color: #d0d1c6; box-shadow: 0 10px 30px #0005; direction: ltr; }
.tag-top { top: 55px; right: -5px; transform: rotate(5deg); }
.tag-bottom { bottom: 55px; left: -5px; display: flex; align-items: center; gap: 8px; font-family: "Vazirmatn", sans-serif; direction: rtl; }
.tag-symbol { color: var(--accent); font-size: 17px; }
.art-index { position: absolute; bottom: 0; right: 0; color: #5d5f55; font: 9px Consolas, monospace; direction: ltr; letter-spacing: 1px; }
.section { border-top: 1px solid var(--line); padding: 80px 0; }
.section-kicker { color: var(--muted); font-size: 11px; letter-spacing: .2px; margin-bottom: 28px; }
.section-kicker span { color: var(--accent); font-family: Consolas, monospace; direction: ltr; display: inline-block; margin-left: 7px; }
.about-content { display: grid; grid-template-columns: 3fr 4fr 1fr; gap: 5%; align-items: start; }
.about-content h2, .section-heading h2, .contact-content h2 { font-size: clamp(29px, 3.6vw, 47px); line-height: 1.55; margin-bottom: 0; letter-spacing: -.8px; }
.muted-heading { color: #77796f; }
.about-text { padding-top: 6px; }
.about-text p { color: var(--muted); font-size: 13px; line-height: 2.2; margin-bottom: 15px; }
.inline-link { display: inline-block; margin-top: 6px; border-bottom: 1px solid #55574b; padding-bottom: 5px; }
.skills-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: 30px 8%; }
.section-heading .section-kicker { margin-bottom: 25px; }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill-group { background: var(--panel); border: 1px solid #292a24; padding: 20px 20px 18px; border-radius: 7px; transition: border-color .2s ease, transform .2s ease; }
.skill-group:hover { border-color: #65694c; transform: translateY(-3px); }
.skill-group-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.skill-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #46483a; border-radius: 6px; color: var(--accent); font-size: 18px; }
.skill-index { color: #6f7166; font: 10px Consolas, monospace; }
.skill-group h3 { font-size: 15px; margin-bottom: 4px; }
.skill-group p { color: var(--muted); font-size: 10px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 10px; color: var(--text); border: 1px solid #3b3c33; padding: 3px 7px; border-radius: 3px; direction: ltr; }
.skills-note { grid-column: 2; font-size: 10px; color: #696b60; margin: 0; }
/* Projects */
.projects-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; align-items: end; margin-bottom: 30px; }
.projects-heading h2 { font-size: clamp(29px, 3.6vw, 47px); line-height: 1.55; margin: 0; letter-spacing: -.8px; }
.projects-heading > p { color: #b2b3a9; font-size: 13px; line-height: 2.2; max-width: 430px; margin: 0 0 8px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-card { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid #292a24; border-radius: 7px; transition: transform .25s ease, border-color .25s ease; }
.project-card:hover { transform: translateY(-5px); border-color: #65694c; }
.project-visual { height: 175px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #30312b; background: #171815; }
.project-visual-label { position: absolute; top: 15px; left: 15px; z-index: 1; color: #77796e; font: 9px Consolas, monospace; letter-spacing: 1px; direction: ltr; }
.project-visual-symbol { position: relative; z-index: 1; color: var(--accent); font: 700 49px Consolas, monospace; text-shadow: 0 0 35px #d9f36a35; }
.project-visual-status { position: absolute; bottom: 13px; right: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; color: #a3a49a; font-size: 9px; }
.project-visual-status i { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: var(--accent); }
.project-visual-grid { background: radial-gradient(ellipse at center, #303323, #171815 70%); } 
.project-visual-grid .project-visual-symbol { font-size: 58px; }
.project-visual-terminal { background: radial-gradient(ellipse at 50% 110%, #25352b, #171815 70%); }
.project-card-body { padding: 19px 19px 20px; }
.project-card-meta { display: flex; justify-content: space-between; color: var(--accent); font-size: 10px; }
.project-card-meta span:last-child { color: #6f7166; font-family: Consolas, monospace; }
.project-card-body h3 { font-size: 15px; line-height: 1.8; margin: 12px 0 7px; }
.project-card-body > p { min-height: 68px; color: var(--muted); font-size: 10px; line-height: 2.1; margin: 0 0 15px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.project-tags span { border: 1px solid #3b3c33; border-radius: 3px; padding: 2px 7px; color: var(--text); font: 9px Consolas, sans-serif; direction: ltr; }
.project-link-placeholder { display: block; border-top: 1px solid var(--line); padding-top: 13px; color: var(--accent); font-size: 10px; }
.projects-note { color: #696b60; font-size: 10px; margin: 16px 0 0; }

.education-card { display: grid; grid-template-columns: .7fr 2fr .45fr; align-items: center; gap: 25px; background: var(--panel); border: 1px solid #292a24; border-radius: 7px; padding: 27px 28px; }
.education-date { color: var(--accent); font-size: 11px; white-space: nowrap; }
.education-main h2 { font-size: 17px; margin: 0 0 6px; }
.education-main p { font-size: 11px; color: var(--muted); margin: 0; }
.separator { color: #5c5e52; padding: 0 6px; }
.grade { border-right: 1px solid #3a3b32; padding-right: 23px; display: flex; flex-direction: column; }
.grade span { color: var(--muted); font-size: 10px; }
.grade strong { color: var(--accent); font-size: 22px; direction: ltr; text-align: right; }
.highlights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.highlight-panel { border: 1px solid #292a24; border-radius: 7px; padding: 25px; background: var(--panel); }
.highlight-panel h2 { font-size: 20px; margin-bottom: 22px; }
.award-row, .language-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.award-star { color: var(--accent); font-size: 19px; }
.award-row strong, .language-row strong { font-size: 12px; font-weight: 600; }
.award-row p, .language-row p { font-size: 10px; color: var(--muted); margin: 4px 0 0; }
.award-year, .language-mark { margin-right: auto; color: #77796e; font: 11px Consolas, monospace; direction: ltr; white-space: nowrap; }
.language-row { justify-content: space-between; }
.contact-section { margin: 0 calc(-1 * 8.4%); padding: 75px 8.4% 80px; background: var(--accent); color: #171812; }
.contact-section .section-kicker { color: #555d35; }
.contact-section .section-kicker span { color: #171812; }
.contact-content h2 { margin-bottom: 22px; }
.contact-content .accent { color: #565f2e; }
.contact-email { display: inline-flex; align-items: center; gap: 15px; font-size: clamp(16px, 2.5vw, 26px); font-weight: 600; direction: ltr; border-bottom: 1px solid #6c7546; padding-bottom: 6px; }
.contact-email span { font-size: 17px; }
.contact-details { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 25px; color: #4b5135; font-size: 11px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 26px 0; color: var(--muted); font-size: 10px; }
.footer .brand { color: var(--text); font-size: 12px; }
.footer .brand-mark { width: 27px; height: 27px; border-radius: 7px; }
.social-links { display: flex; flex-wrap: wrap; gap: 20px; direction: ltr; }
.copyright { color: #6d6f64; white-space: nowrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .page-shell { padding: 0 5%; }
  .hero { gap: 4%; padding: 65px 0; }
  .hero h1 { font-size: clamp(39px, 6vw, 60px); }
  .hero-art { min-height: 370px; }
  .skills-section { grid-template-columns: 1fr; }
  .projects-heading { grid-template-columns: 1fr; gap: 15px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .section-heading h2 br { display: none; }
  .skills-note { grid-column: 1; }
}
@media (max-width: 680px) {
  .topbar { min-height: 72px; }
  .nav { display: none; position: absolute; top: 72px; right: 5%; left: 5%; z-index: 10; background: #1b1c18; border: 1px solid var(--line); border-radius: 8px; padding: 16px; flex-direction: column; align-items: stretch; gap: 12px; }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .top-cta { margin-right: auto; }
  .hero { grid-template-columns: 1fr; padding: 57px 0 55px; gap: 38px; }
  .hero h1 { font-size: clamp(42px, 12vw, 63px); }
  .hero-art { min-height: 360px; }
  .hero-meta { gap: 23px; margin-top: 38px; }
  .meta-number { font-size: 18px; }
  .meta-label { font-size: 9px; }
  .section { padding: 58px 0; }
  .about-content { grid-template-columns: 1fr; gap: 22px; }
  .about-content h2, .section-heading h2, .contact-content h2 { font-size: 34px; }
  .skills-grid, .highlights-grid, .projects-grid { grid-template-columns: 1fr; }
  .project-visual { height: 160px; }
  .project-card-body > p { min-height: 0; }
  .education-card { grid-template-columns: 1fr auto; gap: 12px; padding: 20px; }
  .education-date { grid-column: 1 / -1; }
  .education-main { grid-column: 1 / -1; }
  .education-main h2 { font-size: 15px; }
  .grade { grid-column: 1 / -1; border-right: 0; border-top: 1px solid var(--line); padding: 12px 0 0; flex-direction: row; align-items: center; gap: 12px; }
  .grade strong { font-size: 18px; }
  .contact-section { margin: 0 -5.6%; padding: 58px 5.6%; }
  .footer { align-items: flex-start; flex-direction: column; gap: 18px; }
  .social-links { gap: 18px; }
  .copyright { white-space: normal; }
  .tag-top { right: -1px; }.tag-bottom { left: -1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


.darkmode_btn{
cursor: pointer;
font-size: 20px; color: var(--text);  border: 1px solid #44453c; border-radius: 6px; padding: 8px 14px; transition: .2s ease; 
}

.darkmode_btn:hover{
   background: var(--accent); color: var(--bg); border-color: var(--accent); 
}

.btns{
  display: flex;
}

#darkmode_sun {
    display: none;
    cursor: pointer;
    /* color: rgb(255, 213, 0); */
}

#darkmode_moon {
    display: block;
    
    /* color: rgb(234, 232, 232); */
}

#dark_light:checked+label .fa-sun {
    display: block;
}

#dark_light:checked+label .fa-moon {
    display: none;
}
.darkmode_btn label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
    cursor: pointer;
}

.darkmode_btn label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
    font-size: 20px;
    flex-shrink: 0;
}